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 gotoLabel; | |
do { | |
switch(gotoLabel) { | |
default: | |
/* code here... */ | |
gotoLabel = "label1"; break; /*goto lable1*/ | |
case "label1": | |
/* code here... */ | |
gotoLable = null; | |
} |
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
void switch_func(int n) { | |
char *s; | |
switch(n) { | |
case 0: | |
s = "Sun"; | |
if(0) | |
case 1: | |
{ s = "Mon"; } | |
if(0) | |
case 2: |
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
window.Profiler = { | |
stackFrame: [], | |
counters: {}, | |
working: false, | |
listup: function(name, obj, parentName, parentObj, level) { | |
if(level > 10) { | |
return; | |
} | |
var fullName = parentName? parentName + "." + name: name; |
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
/** | |
* @constructor | |
*/ | |
var f1 = function() { | |
}; | |
/** | |
* | |
*/ | |
f1.prototype.foo = function() { |
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 o = {a: 0, b: 1, c: 2, d: 3}; | |
var a = []; var i = 0; | |
for(a[i++] in o); |
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 canvas = document.createElement("canvas"); | |
canvas.width = canvas.height = 300; | |
document.body.appendChild(canvas); | |
var ctx = canvas.getContext("2d"); | |
var m = document.createElement("canvas"); | |
m.width = m.height = 100; | |
var mctx = m.getContext("2d"); | |
mctx.fillStyle = "#f00"; | |
mctx.fillRect(0, 0, 100, 100); |
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 fs = require("fs"); | |
var path = require("path"); | |
var rmdir = function(dir) { | |
var list = fs.readdirSync(dir); | |
for(var i = 0; i < list.length; i++) { | |
var filename = path.join(dir, list[i]); | |
var stat = fs.statSync(filename); | |
if(filename == "." || filename == "..") { |
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
while(offset >= 0) { | |
switch(offset) { | |
case 0: // "PUSH 10" | |
stack.push(10); | |
case 2: // "PUSH 8" | |
stack.push(8); | |
case 4: // "LESS" | |
var a = stack.pop(); | |
var b = stack.pop(); | |
stack.push((a < b)? 1: 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 mkdir = function(dir) { | |
// making directory without exception if exists | |
try { | |
fs.mkdirSync(dir, 0755); | |
} catch(e) { | |
if(e.code != "EEXIST") { | |
throw e; | |
} | |
} | |
}; |
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
<!doctype html> | |
<html><head><title>escape sample</title></head> | |
// http://www.vector.co.jp/soft/other/java/se342855.html | |
<script src="ecl.js"></script> | |
<script> | |
onload = function() { | |
var xhr = new XMLHttpRequest(); | |
xhr.overrideMimeType('text/plain; charset=x-user-defined'); // binary | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { // DONE |
OlderNewer