0.1 + 0.2 // 0.30000000000000004
sumFloats([0.1, 0.2]) // 0.3
I hereby claim:
- I am NV on github.
- I am NV (https://keybase.io/NV) on keybase.
- I have a public key whose fingerprint is BBE6 E287 4B13 807B 8C85 FCE4 E175 B4CA D090 60CC
To claim this, I am signing this object:
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
<head> | |
<title>Temperature converter</title> | |
</head> | |
<body> | |
{{> c2f}} | |
</body> | |
<template name="c2f"> | |
<input type="number" value="{{celsius}}" id="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
// example using the raf module from npm. try changing some values! | |
var BitSet = require("bitset"); | |
var s = new BitSet(); | |
for (var i = 0; i <= 13; i++) { | |
s.set(i); | |
} | |
log(s.get(0)); | |
log(s.store); |
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
// example using the raf module from npm. try changing some values! | |
var BitSet = require("bitterset"); | |
var s = new BitSet(); | |
for (var i = 0; i <= 13; i++) { | |
s.set(i); | |
} | |
log(s.get(0)); | |
log(s.store); |
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
// example using the raf module from npm. try changing some values! | |
var BitterSet = require("bitterset"); | |
var s = new BitterSet(); | |
s.set(30); | |
document.body.textContent += s.store.join(', ') + '\n'; | |
s.clear(30); | |
s.set(31); | |
document.body.textContent += s.store.join(', ') + '\n'; |
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> | |
<h1 class=title id=head>Quack-Quack!</h1> | |
<p> | |
Quack | |
<span>quack</span> | |
quack! | |
</p> | |
</html> | |
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 foo = function(bar) { | |
console.log("foo"); | |
return bar; | |
} | |
(function(){ | |
console.log("bar") | |
})(); | |
// 'foo bar' |
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 request = new XMLHttpRequest; | |
request.open('POST', 'http://twitter.com/statuses/update.json', false, 'username','password'); | |
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
request.send('status=Quack-quack!'); |
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
curl -u username:password -d status="Quack-quack!" http://twitter.com/statuses/update.json |
OlderNewer