This file contains hidden or 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
$ cat Makefile | |
.ONESHELL: | |
SHELL = node | |
.SHELLFLAGS = -e | |
runjs : | |
@let fun = (v) => v * 2 | |
console.log([1, 2, 3, 4].map(fun)) | |
$ make runjs | |
[ 2, 4, 6, 8 ] |
This file contains hidden or 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
[3;0;0t | |
This file contains hidden or 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 buf = FS.readFile('/foo/bar'); | |
var blob = new Blob([buf], {"type" : "application/octet-stream" }); | |
var url = URL.createObjectURL(blob); | |
$('#result').attr("href", url); | |
This file contains hidden or 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
import java.awt.*; | |
import java.applet.*; | |
public class MyApplet extends Applet { | |
public void paint(Graphics g) { | |
g.drawString("A Simple Applet",0,10); | |
int b = 0, applet = 0; | |
String code; | |
int width; | |
boolean height; |
This file contains hidden or 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
(r"6120758542842770990422519315113/12241517085685542430359819778729").toDouble | |
(r"6120758542842771439937300463616/12241517085685542430359819778729").toDouble |
This file contains hidden or 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
class A { | |
static String S = "a:" + B.S; | |
} | |
class B { | |
static String S = A.S; | |
} | |
class Test { | |
public static void main(String[] args) { | |
if (Math.random() > 0.5) { |
This file contains hidden or 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
import java.util.Random; | |
import org.eclipse.collections.api.map.primitive.MutableIntIntMap; | |
import org.eclipse.collections.impl.factory.primitive.IntIntMaps; | |
public class Main { | |
public static void time(String name, Runnable f) { | |
long s = System.nanoTime(); |
This file contains hidden or 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
$ time node fib.asm.js | |
102334155 | |
node fib.asm.js 0.00s user 0.01s system 0% cpu 1.723 total | |
$ time node fib.js | |
102334155 | |
node fib.js 0.00s user 0.01s system 0% cpu 2.025 total | |
$ cat fib.asm.js |
This file contains hidden or 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
/*! jetzt 2015-10-28 | |
* https://ds300.github.io/jetzt/ | |
* Copyright (c) 2015 David Sheldrick and contributors; Licensed Apache 2.0 */ | |
// TinySegmenter 0.1 -- Super compact Japanese tokenizer in Javascript | |
// (c) 2008 Taku Kudo <[email protected]> | |
// TinySegmenter is freely distributable under the terms of a new BSD licence. | |
// For details, see http://chasen.org/~taku/software/TinySegmenter/LICENCE.txt |
This file contains hidden or 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
module.exports = function(grunt) { | |
// require("time-grunt")(grunt); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
opt: { | |
client: { | |
"tsMain": "src", | |
"tsMainLib": "typings", |