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
alert('Hello') |
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
final boolean[] ok = new boolean[]{true}; | |
final int[] returnCount = new int[]{0}; | |
NodeTraversal.traverse(compiler, block, new AbstractShallowCallback() { | |
@Override | |
public void visit(NodeTraversal t, Node n, Node parent) { | |
if (n.isName() && "arguments".equals(n.getString())) { | |
ok[0] = false; | |
} | |
if(n.isReturn()) { | |
returnCount[0]++; |
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
var seed = Math.random() + ''; | |
/** | |
* Call this early in your program and only once and only if you are | |
* paranoid about the amount of entropy in Math.random(). | |
*/ | |
exports.srand = function(newSeed) { | |
seed = newSeed + ''; | |
} |
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
JS: | |
function makeDoubler() { | |
var a = 1 | |
return function() { | |
a = a * 2; | |
return a; | |
} | |
} | |
Java: |
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
var e = {}, f = require.m || function() { | |
}; | |
if(!f("dojo-has-api")) { | |
var g = "undefined" != typeof window && "undefined" != typeof location && "undefined" != typeof document && window.location == location && window.document == document, h = this, i = g && document, k = i && i.createElement("DiV"), l = {}, f = function(a) { | |
return l[a] = "function" == typeof l[a] ? l[a](h, i, k) : l[a] | |
}; | |
f.b = l; | |
f.add = function(a, b, c, d) { | |
("undefined" == typeof l[a] || d) && (l[a] = b); | |
return c && f(a) |
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() { | |
var MAX_ROUNDS = 25; | |
var MAX_RECURSION_DEPTH = 4; | |
var cheatCount = 0; | |
(function cheat() { | |
function asArray(arraylike) { | |
return Array.prototype.slice.call(arraylike); | |
} | |
function gameField() { |
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
Artist: https://twitter.com/mandylauderdale | |
I wouldn't be so alone | |
If my Github followers lived in my home | |
Alex Russell would send a pull request | |
But I'd be too busy | |
Return to San Francisco by nine | |
That guy Brendan Eich, did he see my sign | |
He makes me smile all the time | |
His lines of code would compliment mine |
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
javascript:(function(){var style=document.createElement('style');style.textContent='.popupContent{display:none}';document.body.appendChild(style);})() |
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 set() { | |
var origTimeout = window.setTimeout; | |
window.setTimeout = function(cb, time) { | |
if (time == null || time == 0 && typeof cb === 'function') { | |
var active = true; | |
var mc = new MessageChannel(); | |
mc.port1.onmessage = function() { | |
if (active) { | |
cb(); | |
} |
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
Hi, | |
Malte emailed me about giving a presentation about node.js but I haven't heard from him in a while. So I'm submitting this request to be a speaker, just in case :) | |
I'd really like to give a talk about my project node.js http://tinyclouds.org/node/ | |
ry |