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
/* | |
* CSSrefresh | |
* | |
* Copyright (c) 2012 Fred Heusschen | |
* www.frebsite.nl | |
* | |
* Dual licensed under the MIT and GPL licenses. | |
* http://en.wikipedia.org/wiki/MIT_License | |
* http://en.wikipedia.org/wiki/GNU_General_Public_License | |
*/ |
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
// Allows the creation of an API from a base url and an array of objects with parameters and names. | |
var API = {}; | |
API.init = function(baseUrl, parms) { | |
var o = {}; | |
o.baseUrl = baseUrl; | |
o.parms = parms; | |
o.url = function() { |
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 stat = {}; | |
stat.variance = function(x) { | |
var counter = 0; | |
var runningMean = 0; | |
var newMean = 0; | |
var runningVariance = 0; | |
var newVariance = 0; | |
var builder; | |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 a = function(counter, values) { | |
var i = 0, r; | |
for (i; i < values.length; i++) { | |
if (counter % values.length === i) { | |
r = values[i]; | |
break; | |
} | |
} | |
return r; | |
}; |
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 c= function(p){n = p;pA = [];for(i=3;i>=0;i--){pq=Math.floor(n/Math.pow(256,i));pA.push(pq);n=n-pq * Math.pow(256, i);}return pA.join('.');}; |