-
javascript – TypeError: Cannot read property ‘then’ of undefined – Stack Overflow
“You need to return your promise to the calling function.
”
Mês: setembro 2018
Update (weekly)
-
“new Schema({ … }, { usePushEach: true });
This solves the error for me too” -
“isEmail function from the validator library takes 2 parameters, even though the second one is completely optional.
isEmail(str [, options])
You can prevent mongoose from seeing it by creating a function on top of it:validate: [{ validator: value => isEmail(value), msg: ‘Invalid email.’ }]”
-
“Alternatively, if this application is only installed for the current user, it would be more appropriate to put the .desktop file in ~/.local/share/applications”
Update (weekly)
-
Javascript add leading zeroes to date – Stack Overflow
“{
year: “numeric”,
month: “2-digit”,
day: “2-digit”,
}” -
Number.prototype.toLocaleString() – JavaScript | MDN
“// informando um formato de moeda
console.log(numero.toLocaleString(‘de-DE’, { style: ‘currency’, currency: ‘EUR’ }));
// → 123.456,79 €
“ -
Disk Management From the Command-Line, Part 2 – The Instructional
“diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b
“ -
logging – More lines in command window – Stack Overflow
“At least in Win7, Kristina’s answer now seems to be either its memory of commands typed in the command lines, or the amount you can copy-paste.
To increase the scrollbar’s memory, I did the following:
Go to properties as mentioned by Kristina
Go to the layout tab (that’s the third one)
Modify the screen buffer size’s height – 9999 is the maximum.”
Update (weekly)
-
_.sortedUniq(b.sort()) ou _.uniq(b).sort()
“_.sortedUniq(array)”
-
Building and Distributing Packages with Setuptools — setuptools 40.2.0 documentation
“python setup.py sdist “
-
“The Lodash remove method works much like the array filter method, but sort of in reverse. It does not save the original array values, but removes matching elements. It returns the matching elements as a new array.”