An example of the d3.geom.contour plugin.
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
#define M_PI 3.14159265358979323846 /* pi */ | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; |
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 formatCurrency(amount) | |
{ | |
var i = parseFloat(amount); | |
if (isNaN(i)) { i = 0.00; } | |
var minus = ''; | |
if (i < 0) { minus = '-'; } | |
i = Math.abs(i); | |
i = parseInt((i + 0.005) * 100, 10); | |
i = i / 100; | |
s = ''; |
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 IsNumeric(e) | |
return Object.prototype.toString.call(e) == '[object Number]'; | |
} |
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 formatTime(e) | |
{ | |
var _hour = e.getHours(), | |
_min = e.getMinutes(), | |
_ampm = +_hour >= 12 ? " PM" : " AM", | |
_nice_hour = ((+_hour % 12)+"").replace(/^0$/, "12"); | |
return _nice_hour + ":" + _min + _ampm; | |
} |
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 formatJSONTime(jsonTime){ | |
var matches = jsonTime.match(/date\((\d{13})\)/), | |
date = matches !== null ? formatTime(new Date(+matches[0])) : +new Date(); | |
return date; | |
} |
NewerOlder