- Published
- Author
- Iffyuva
This website https://www.colorhexa.com/ is pretty good. Given a color, say #E4F6FC, it can explain the color, and also suggest a closest websafe color
At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.
export const getTheResults = async (params) => {
const response = await axios.get(
/api/v1/example.json?${stringify(params)}
);
return response.data;
};param is an object mentioned below , and we are stringifying it before sending the request to backend.stringify from qs npm package.key1=value1&key2=value2&key_3%5B0%5D=value3&key_3%5B1%5D=value4 i.e key1=value1&key2=value2&key_3[0]=value3&key_3[1]=value4key1=value1&key2=value2&key_3[]=value3&key_3[]=value4arrayFormat: "brackets"eg: export const getTheResults = async (params) => {
const response = await axios.get(
/api/v1/example.json?${stringify(params, {arrayFormat: "brackets"})}
);
return response.data;
};Eg:
Request: /api/v1/calendar.json?date_from=&date_to=&hotel_id[]=1&hotel_id[]=2
def permit_params
params.permit(:date_from, :date_to, hotel_id: []) # hotel_id: [] is important
end\pset pager off. This command is useful for seeing data from tables with huge jsonb dataundefined value to follow the JSON specification. According to the JSON standard, properties with undefined values are not allowed in JSON objects, these are the allowed JSON values: object, array, number, string, true, false, or null.null or defaults for missing data. On the frontend, ensure data is present before accessing it.// let's say we want to show logos of our client
.logo {
background-image: url('client-logos-sprite.png');
background-repeat: no-repeat;
}
.client1 {
background-position: 0 0;
}
.client2 {
background-position: -100px 0;
}// implementation of login test
const apiEndpointURL = "https://example.com/api/endpoint";
const apiResponse = await page.evaluate(async (url) => {
const response = await fetch(url);
return await response.json()
}, apiEndpointURL)
console.log(apiResponse)class String
def reverse
'Reverse op blocked'
end
end
'Hello'.reverse
>> 'Reverse op blocked'Showing 43 to 45 of 82 results
Codemancers can bring your vision to life and help you achieve your goals