Before getting to React, it's helpful to know what this does generally in Javascript.
Take the following snippet of code. It's written in ES6 but the principles for this
predate ES6.
class Dog {
constructor() {I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
| /* | |
| A port of the Fraksl Android App by Ella Jameson | |
| WASD to move, QE to rotate, [UP][DOWN] to zoom, P to take a picture in the sketch directory | |
| */ | |
| void mirror_screen() | |
| { | |
| loadPixels(); | |
| for(int row = 0; row < height; row++) | |
| { |
| # GALE01 - Super Smash Bros. Melee | |
| [Gecko] | |
| $Increase input timing accuracy [Dan Salvato] | |
| C21A4DA0 00000003 | |
| 901C0000 3D808001 | |
| 618C95FC 7D8903A6 | |
| 4E800421 00000000 | |
| 08402cc4 004e0400 |
| @echo off | |
| SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
| rem add it for all file types | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
| rem add it for folders | |
| @reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
| #ifndef __LAB_COLORSPACE__ | |
| #define __LAB_COLORSPACE__ | |
| /* | |
| * Conversion between RGB and LAB colorspace. | |
| * Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138 | |
| */ | |
| float3 rgb2xyz( float3 c ) { | |
| float3 tmp; |
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.offsetParentI wrote this as a reference for myself because some of the property names are non-obvious, and there are a number of relevant special properties, and there is no central concise listing of them all in GSAP Docs, other than (in longer form) on the CSSPlugin page.
...are all supported, with hyphenated-names becoming camelCaseNames. Non-animatable properties are also supported but they will be set at the beginning of the tween.
Special mentions:
| var a = []; | |
| for (i = 33; 126 >= i; i++) a.push(String.fromCharCode(i)); | |
| var array = new Uint32Array(12); | |
| window.crypto.getRandomValues(array); | |
| var password = ''; | |
| for (var i = 0; i < array.length; i++) { | |
| password += a[Math.round(array[i] / 4294967296 * a.length-1)]; | |
| } | |
| console.log(password); |
| #!/usr/bin/env bash | |
| cd /c/ffmpeg | |
| rm -rf ./* | |
| aria2c --file-allocation=falloc http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-latest-win64-shared.7z | |
| 7z x ffmpeg-latest-win64-shared.7z | |
| rm ffmpeg-latest-win64-shared.7z | |
| tar -c --remove-files -f ffmpeg.tar ./* | |
| tar -x --strip-components=2 -f ffmpeg.tar | |
| rm ffmpeg.tar |