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
/** | |
* @author jonobr1 / http://jonobr1.com | |
* | |
*/ | |
var has = (function() { | |
var root = this; | |
var previousHas = root.has || {}; |
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
/// # Google Closure Compiler Service # | |
/// https://github.com/weaver/scribbles/blob/master/node/google-closure/lib/closure.js | |
/// Compress javascript with Node.js using the Closure Compiler | |
/// Service. | |
/// Attempted update for Node.js v0.8 | |
var sys = require('sys'); | |
exports.compile = compile; |
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
(function() { | |
var root = this; | |
var previousSuperformula = root.Superformula; | |
var NP = 360, phi = Math.PI * 2 / NP; | |
var Superformula = root.Superformula = function(m, n1, n2, n3) { |
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
/** | |
* @author jonobr1 / http://jonobr1.com | |
* | |
* An array of rgb values from their CMYK counterpart in Adobe Photoshop CS4. CMYK space is 0 - 10. | |
* e.g: | |
* | |
* CMYK_RGB[0] represents c: 0, m: 0, y: 0, k: 0 | |
* CMYK_RGB[1] represents c: 0, m: 0, y: 0, k: 1 | |
* CMYK_RGB[2] represents c: 0, m: 0, y: 0, k: 2 | |
* CMYK_RGB[n] represents c: Math.floor(n / 30), (Math.floor(n / 20) % 10), y: (Math.floor(n / 10) % 10), k: (n % 10) ??? |
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
function supports_canvas() { return !!document.createElement('canvas').getContext; }; |
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
<!-- Place anywhere in the head --> | |
<style type = "text/css"> | |
canvas { | |
width: 100%; | |
height: 759px; | |
} | |
#example-vis { | |
position: absolute; | |
top: -250px; |
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
private function getPoint(lat : Number, lon : Number, mapwidth : uint, mapheight : uint) : Point | |
{ | |
return new Point(((lon+180) / 360) * mapwidth, ((90-lat) / 180) * mapheight); | |
} | |
private function getMercatorPoint(lat : Number, lon : Number, mapwidth : uint, mapheight : uint) : Point | |
{ | |
return new Point(((lon+180) / 360) * mapwidth, ((90-GudermannianInv(lat)) / 180) * mapheight); | |
} |
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
String thisLine = reader.readLine(); | |
if(thisLine != null) { | |
String[] explode = split(thisLine, '='); | |
if (explode != null) { | |
long epoch = explode[0].trim() / 1000; | |
Date time = new Date(epoch); | |
float lat = -1; | |
float lon = -1; | |
String[] latLong = split(explode[1].trim(), ','); |
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
<script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type = "text/javascript" src = "http://processingjs.org/content/download/processing-js-1.0.0/processing-1.0.0.min.js"></script> | |
<script type = "text/javascript" id = "narcissus_source"> | |
function initNarcissus() { | |
if(!(window.jQuery && window.jQuery.fn.jquery == '1.3.2')) { | |
if(!document.getElementById('narcissus_jquery')) { | |
var jquery = document.createElement('script'); | |
jquery.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'); | |
jquery.setAttribute('type', 'text/javascript'); |
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
<html> | |
<script type = "text/javascript" src = "tween.js"></script> | |
<script> | |
var g, canvas; | |
var objects = []; | |
function init() { | |
canvas = document.createElement('canvas'); | |
document.body.appendChild(canvas); |