From Fabrice Bellard, with minor name change (umulh
):
// return the high 32 bit part of the 64 bit addition of (hi0, lo0) and (hi1, lo1)
Math.iaddh(lo0, hi0, lo1, hi1)
// return the high 32 bit part of the 64 bit subtraction of (hi0, lo0) and (hi1, lo1)
Math.isubh(lo0, hi0, lo1, hi1)
// return the high 32 bit part of the signed 64 bit product of the 32 bit numbers a and b
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
Interesting text editors. Some very old, some very new. Some standalone, some in the cloud.
Originally posted as this Gist. An up to date version is available here:
The original version is below:
Now using node v4.7.2 (npm v2.15.11) | |
// v8 4.5.103.43 (Node.js 4.7.2) | |
forVar_______: 2ms | |
forLet_______: 13ms | |
forOfVar_____: 66ms | |
forOfLetConst: 64ms | |
forEachVar___: 15ms | |
forEachLet___: 21ms |
# Tutorial https://www.daimto.com/how-to-get-a-google-access-token-with-curl/ | |
# YouTube video https://youtu.be/hBC_tVJIx5w | |
# Client id from Google Developer console | |
# Client Secret from Google Developer console | |
# Scope this is a space seprated list of the scopes of access you are requesting. | |
# Authorization link. Place this in a browser and copy the code that is returned after you accept the scopes. | |
https://accounts.google.com/o/oauth2/auth?client_id=[Application Client Id]&redirect_uri=http://127.0.0.1&scope=[Scopes]&response_type=code | |
# Exchange Authorization code for an access token and a refresh token. |
This is tutorial how to run awesome application to context translation: QTranslate The authors write on the site that they don't plan to support QTranslate for other platforms than Microsoft Windows. I felt a lack similiar solution at Linux. So I've tried to run that application at Linux Ubuntu distribution. On the end that's works I really appreciate all the help which I received at winehq forum.
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <submodule full name>" | |
exit 1 | |
fi | |
MODULE_NAME=$1 | |
MODULE_NAME_FOR_SED=$(echo $MODULE_NAME | sed -e 's/\//\\\//g') |
#!/bin/bash | |
# | |
# Work repo: https://gist.github.com/GerHobbelt/5f084b559d3197c04e90dfd018a00ee6 | |
# | |
# Sources: | |
# https://stackoverflow.com/a/16162000/1635910 | |
# https://gist.github.com/myusuf3/7f645819ded92bda6677 | |
# https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule/1260982#1260982 | |
# | |
if [ $# -ne 1 ]; then |