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
{ | |
maxCount: 6, | |
maxWord: 'shave', | |
minCount: 2, | |
minWord: 'hello', | |
average: 3.798704103671706 | |
} | |
2 guesses: 80 | |
3 guesses: 706 | |
4 guesses: 1160 |
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
// ["cigar","rebut","sissy","humph","awake","blush","focal","evade","naval","serve","heath","dwarf","model","karma","stink","grade","quiet","bench","abate","feign","major","death","fresh","crust","stool","colon","abase","marry","react","batty","pride","floss","helix","croak","staff","paper","unfed","whelp","trawl","outdo","adobe","crazy","sower","repay","digit","crate","cluck","spike","mimic","pound","maxim","linen","unmet","flesh","booby","forth","first","stand","belly","ivory","seedy","print","yearn","drain","bribe","stout","panel","crass","flume","offal","agree","error","swirl","argue","bleed","delta","flick","totem","wooer","front","shrub","parry","biome","lapel","start","greet","goner","golem","lusty","loopy","round","audit","lying","gamma","labor","islet","civic","forge","corny","moult","basic","salad","agate","spicy","spray","essay","fjord","spend","kebab","guild","aback","motor","alone","hatch","hyper","thumb","dowry","ought","belch","dutch","pilot","tweed","comet","jaunt","enema","steed","abyss","gro |
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
<html><head><title>WebAssembly: JavaScript binding profiling</title> | |
<script> | |
onload = function() { | |
var textarea = document.getElementById("textarea"); | |
var log = function(message) { | |
var now = performance.now(); | |
textarea.value += (now - time).toFixed(3) + ": " + message + "\n"; | |
time = performance.now(); | |
}; | |
var time = performance.now(); |
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 data = [1, 4, 5, 6, 7, 8]; | |
//var data = [2, 3, 5, 7, 11, 13, 17]; | |
//var data = [2, 3, 5, 10, 20]; | |
var a = []; | |
var r = function(u) { | |
if(a.length == data.length - 1) { | |
if(u) return solve(); | |
else return false; | |
} |
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 canvas; | |
var ctx; | |
var isWorking = false; | |
var exchangeRate = 0; | |
var timerId; | |
var found = false; | |
var maxHPS = 0; | |
var hpsList = []; |
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 originalRatios = [ | |
.259, .337, .330, .267, .188, .274, .224, .227, .091 | |
]; | |
function calcHit(h, bases) { | |
if(h > 2) { | |
// homerun | |
var s = 1 + (bases[0]?1:0) + (bases[1]?1:0) + (bases[2]?1:0); | |
bases[0] = bases[1] = bases[2] = false; | |
return s; |
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
#include <stdio.h> | |
void recursive(int level, int* op) { | |
if(level == 8) { | |
int result = 0; | |
int lastOp = 1; | |
int stack = 0; | |
for(int i = 0; i < 9; i++) { | |
int num = i + 1; | |
stack *= 10; |
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
// http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ | |
"use strict"; | |
// Optional. You will see this name in eg. 'ps' or 'top' command | |
process.title = 'node-chat'; | |
// Port where we'll run the websocket server | |
var webSocketsServerPort = 1337; | |
// websocket and http servers |
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
#include <stdio.h> | |
template<int a_bunshi, int a_bunbo> | |
struct Calc1 { | |
enum { result = (a_bunbo != 0 && a_bunbo * 10 == a_bunshi) }; | |
}; | |
template<int a_bunshi, int a_bunbo, int b_bunshi, int b_bunbo> | |
struct Calc2 { | |
enum { |
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 max(a, b) { | |
// 差のある最上位のビットを立てる | |
// (例えば 11010010 と 10110101 の場合、 x は 01000000 ) | |
var x = a ^ b; | |
x |= x >>> 1; | |
x |= x >>> 2; | |
x |= x >>> 4; | |
x |= x >>> 8; | |
x |= x >>> 16; | |
var h = x ^ (x >>> 1); |
NewerOlder