1 2 3 4
function state_classes(updateall) { var value = display.value * 1, tempcolor; for (var i = 1; i <= 118; i++) { ...
JavaScript Color elements by state of ...
1 2 3 4
module Enumerable # Sorts the enumeration by mapping the # values in the enumeration through the given block. ...
Ruby sort_by_multiple
require "benchmark"
data_s...
1 2 3
#include <math.h> #include <stdio.h> ...
C Fastest way to get value of pi
by Chris Jester-Young,
July 30, 2008 03:50,
3 refactorings, tagged with pi, speed, language agnostic
Solutions welcome in any la...
1 2 3 4
public static function getColorFromString(color:String):int { return parseInt(new RegExp(/[0-9a-fA-F]+/).exec(color),16); ...
ActionScript Get color from string
Script was written on AS3. ...
1 2 3 4
$.fn.textNodes = function() { var ret = []; this.each( function() { ...
JavaScript [jQuery] All descendent tex...
This function returns a jQu...
1 2 3 4
function calc_color(value, start, end, min, max) { var n = (value - min) / (max - min); var s = parseInt(start.replace("#", ""), 16); ...
JavaScript Hex color between two colors
Watch out for edge cases, l...
1 2 3 4
# Boids - A Shoes Application # # Author : Wally Glutton - http://stungeye.com ...
Ruby Boids - A Shoes Application
You will need Shoes install...
1 2 3
public PreviewTreeModel(Collection<FileDescription> files) { ...
Java Create a tree out of a coll...
I would like to transform a...
1 2 3 4
SCRIPT="gen_${1}.sql" echo "--gen_${1}.sql" > $SCRIPT typeset -i counter ...
Bash Slow bash for loop.
Here's a quick and dirty ba...
1 2 3 4
SIXTYTWO = ('0'..'9').to_a + ('a'..'z').to_a + ('A'..'Z').to_a def to_s_62(i) ...
Ruby Base 62 Encoding
Base WHAT??? Well, 62 is th...
1 2 3 4
#Functions [javscript] var ms = 0; var state = 0; ...
JavaScript Stop Watch
by richardhealy,
October 27, 2007 13:31,
3 refactorings, tagged with time, clock, speed, test, javascript
I use this to test speed of...
Logic is cheap and DOM is e...