- Plug in your SD card, HDD, or other block device and then use the following command to see which /dev/diskN node it's located on:
diskutil list- Unmount the disk where “N� is the number of the disk taken from the above command:
| <script> | |
| function lalaj() { | |
| var out = document.querySelector("pre"); | |
| var a = new OfflineAudioContext(1, 44100, 44100); | |
| var b = a.createBuffer(1, 44100, 44100); | |
| var g = a.createGain(); | |
| var bb = b.getChannelData(0); | |
| for (var i = 0; i < bb.length; i++) { | |
| bb[i] = 1.0; | |
| } |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {| export CC="clang" | |
| export CXX="clang++" | |
| export CFLAGS="-fcolor-diagnostics" | |
| export CXXFLAGS="-fcolor-diagnostics" | |
| mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-firefox-release-b2g-desktop | |
| mk_add_options AUTOCONF=autoconf213 | |
| ac_add_options --enable-application=b2g |
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns on recent CPU
L2 cache reference ........................... 7 ns 14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory
| let let = macro { | |
| rule { async $vars ... = $fname ... ($params ...); $rest ...} => { | |
| $fname ... ($params ..., function (err, $vars ...) { | |
| if (err) throw err; | |
| $rest ... | |
| }) | |
| } | |
| } | |
| var buffer = new Buffer(1024); |
| ZIP,LAT,LNG | |
| 00601,18.180555, -66.749961 | |
| 00602,18.361945, -67.175597 | |
| 00603,18.455183, -67.119887 | |
| 00606,18.158345, -66.932911 | |
| 00610,18.295366, -67.125135 | |
| 00612,18.402253, -66.711397 | |
| 00616,18.420412, -66.671979 | |
| 00617,18.445147, -66.559696 |
| #!/bin/bash | |
| emcc sin.cpp -o sin.js \ | |
| -s EXPORTED_FUNCTIONS="['_Sin_constructor','_Sin_destructor','_Sin_setFrequency','_Sin_setAmplitude','_Sin_getFrequency','_Sin_computeBuffer']" | |
| cat sin-proxy.js >> sin.js |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.