<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
/* Method to exclude items in a json, filtering by key index */ | |
const excludeItemsInJson = | |
(jsonObject: any, filterParams: ReadonlyArray<string>) = | |
Object.keys(jsonObject) | |
.filter((key: string) => filterParams.includes(key) ? false : true) | |
.reduce((obj, item) => ({...obj, [item]: test[item]}) ,{}) | |
/* Method to allow items in a json, filtering by key index. | |
Then a json will be returned with all the allowed items | |
*/ |
FROM nginx:alpine | |
RUN apk add --update npm | |
COPY nginx.conf /etc/nginx/conf.d/default.conf | |
COPY . /usr/local/app/ | |
WORKDIR /usr/local/app/ | |
RUN npm install |
UNLOGGED
table. This reduces the amount of data written to persistent storage by up to 2x.WITH (autovacuum_enabled=false)
on the table. This saves CPU time and IO bandwidth
on useless vacuuming of the table (since we never DELETE
or UPDATE
the table).COPY FROM STDIN
. This is the fastest possible approach to insert rows into table.time timestamp with time zone
is enough.synchronous_commit = off
to postgresql.conf
.FROM php:5.6-apache | |
RUN apt-get update | |
RUN apt-get install -y apt-utils | |
RUN apt-get install -y libpq-dev | |
RUN apt-get install -y mcrypt libmcrypt-dev | |
RUN apt-get install -y zlib1g-dev | |
RUN docker-php-ext-install pdo_pgsql pgsql mcrypt zip | |
RUN apt-get install nano |
// This validation is correct, because is not undefined neither zero | |
if(42){ | |
// Here we have a comparison without types (===) so, JS sees both as equals | |
if(42 == "42"){ | |
// Correct | |
if(true){ | |
// This have no sense, because the callstack see the first item that is an integer, and can't compare | |
// the boolean as a number | |
if(42 == true){ | |
console.log("continue") |
/** | |
* Explanation with an interview example from real life | |
* Call invokes the function and allows you to pass in arguments one by one. | |
* Apply invokes the function and allows you to pass in arguments as an array. | |
* Bind returns a new function, allowing you to pass in a this array and any number of arguments. | |
**/ | |
// Call - Example | |
const callSomeone = (name, callback) => { | |
const innerMessage= { |
/** | |
* When we do a freeze to an object, we only can read their items. | |
*/ | |
const obj = { | |
prop: 42 | |
}; | |
Object.freeze(obj); | |
obj.prop = 55; |
const handsomeArray = [ | |
"Option1", | |
"Option2", | |
"Option3", | |
"Option4", | |
"Option5", | |
"Option6" | |
] | |
function * generatorFunction(array) { // Line 1 |
/** | |
* Theory: | |
-Arrays in JavaScript are an ordered collection of values | |
-Its elements are untyped, an array can contain different types of data | |
-Arrays are 32-bit indexed so its index can be from 0-4294967294 (2^32 - 2) | |
and its elements can go from 0 to 4.294.967.295 | |
*/ | |
/** | |
* Relevant Examples |