This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(self.scene.global.H / 2 - y + Math.random() - 0.5) / upscale) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
callback() | |
) # f | |
], callback # waterfall | |
), callback # while | |
) # f | |
), callback # paralell | |
) # f | |
], callback # waterfall | |
), callback # while | |
) # f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Input | |
var message = "I'm starting to get turned on."; | |
await { | |
for (var i = 0; i < 10; i++) { | |
setTimeout (defer (), 10); | |
setTimeout (defer (), 100); | |
} | |
} | |
console.log (message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function f(a) { | |
var b = yield 'A'; | |
var c = yield 'B'; | |
} | |
gen = f('a'); | |
var A = gen.next(); | |
var B = gen.send('b'); | |
gen.send('c'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scrap = require '../src/scrap.js' | |
match = require 'match' | |
# Create a new Scrap with the base for all the following requests | |
wikipedia = new Scrap | |
path: 'http://en.wikipedia.org/' | |
# Download the front page as string | |
wikipedia.get '/', (page) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scrap = require '../src/scrap.js' | |
match = require 'match' | |
# Create a new Scrap with the base for all the following requests | |
wikipedia = new Scrap | |
path: 'http://en.wikipedia.org/' | |
# Download the front page as string | |
wikipedia.get '/', (page) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handlerMaker(obj) { | |
return { | |
getOwnPropertyDescriptor: function(name) { | |
var desc = Object.getOwnPropertyDescriptor(obj, name); | |
// a trapping proxy's properties must always be configurable | |
if (desc !== undefined) { desc.configurable = true; } | |
return desc; | |
}, | |
getPropertyDescriptor: function(name) { | |
var desc = Object.getPropertyDescriptor(obj, name); // not in ES5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Today's Budget: | |
$8.50 for the bus * 2 trips | |
$3.30 for the coffee + $4.40 for the muffin and it wraps over, that's too bad | |
$22 for lunch + 10% sales tax |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Te(){} | |
function vg(){} | |
function yg(){} | |
function zg(){} | |
function pg(){} | |
function ei(){} | |
function Ai(){} | |
function Ii(){} | |
function Qi(){} | |
function Zi(){} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function canFullScreen() { | |
return document.body.webkitRequestFullScreen || | |
document.body.requestFullScreen || | |
document.body.mozRequestFullScreen; | |
} | |
function isFullScreen() { | |
return document.fullScreenElement || | |
document.mozFullScreen || |