Crashes in Chrome Version 38.0.2125.104
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
const numFeatures = 100; | |
const numPolygons = 5; | |
const numRings = 10; | |
const numPoints = 10000; | |
console.time('populate storage'); | |
const features = []; | |
for (let i = 0; i < numFeatures; i++) { |
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
enum Expression { | |
Literal(u32), | |
Add(Box<Expression>, Box<Expression>), | |
Sub(Box<Expression>, Box<Expression>) | |
} | |
impl Expression { | |
fn map<F: Fn(Expression) -> Expression>(self, f: F) -> Expression { | |
match self { | |
Expression::Literal(_) => self, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title></title> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.uncompressed.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.ie.css' rel='stylesheet'> | |
<![endif]--> |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
<style> | |
path { | |
fill: none; | |
stroke-linejoin: round; | |
} |
The current solar terminator is shown.
Thanks to Ben Elsen and NOAA for help implementing the correct equations for the position of the sun, which turned out to be quite a bit more complicated than I expected.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.0.1/mapbox.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.1/mapbox.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.1/mapbox.ie.css' rel='stylesheet' > | |
<![endif]--> | |
<style> | |
body { margin:0; padding:0; } |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
body { | |
font:normal 14px/20px 'Georgia', serif; | |
} | |
</style> | |
</head> |
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 Array | |
# See https://en.wikipedia.org/wiki/Run-length_encoding. | |
def rle | |
chunk {|e| e }.map {|e, a| [e, a.length] } | |
end | |
end | |
raise "Incorrect rle function." unless [1,1,1,2,3,3].rle == [ |
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
require 'java' | |
require 'benchmark' | |
def foo | |
Benchmark.measure { | |
sc = org.jruby.embed.ScriptingContainer.new(org.jruby.embed.LocalContextScope::SINGLETHREAD, org.jruby.embed.LocalVariableBehavior::TRANSIENT) | |
sc.runScriptlet("require 'ffi'") | |
sc.runScriptlet <<-RUBY | |
Fork = Object.new | |
lib = FFI::DynamicLibrary.open('/usr/lib/libc.dylib', FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_GLOBAL) |
NewerOlder