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
| /** | |
| * Interpret any valid css string as an r, g, b, (a) object. | |
| * If nothing found then it returns an object that is black with | |
| * no alpha. | |
| * | |
| * Usage: interpret('red'); // { r: 1, g: 0, b: 0 }; | |
| * interpret('#f00'); // { r: 1, g: 0, b: 0 }; | |
| * interpret('#ff000'); // { r: 1, g: 0, b: 0 }; | |
| * interpret('rgb(255, 0, 0)'); // { r: 1, g: 0, b: 0 }; | |
| * interpret('rgba(255, 0, 0, 1)'); // { r: 1, g: 0, b: 0, a: 1 }; |
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'); |