// For faster converting of dates to strings
char* sLeadingZeroIntegerValues[] = {
"00","01","02","03","04","05","06","07","08","09",
...
#!/usr/bin/ruby require 'builder' require 'fasterCSV' ...
Ruby Speed up DB access?
Is it possible to speed up ...
function state_classes(updateall) {
var value = display.value * 1, tempcolor;
for (var i = 1; i <= 118; i++) {
...
JavaScript Color elements by state of ...
Logic is cheap and DOM is e...
module Enumerable # Sorts the enumeration by mapping the # values in the enumeration through the given block. ...
Ruby sort_by_multiple
require "benchmark"
data_s...
#include <math.h> #include <stdio.h> ...
C Fastest way to get value of pi
by Chris Jester-Young,
July 30, 2008 03:50,
5 refactorings, tagged with speed, pi, language agnostic
Solutions welcome in any la...
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. ...
$.fn.textNodes = function() {
var ret = [];
this.each( function() {
...
JavaScript [jQuery] All descendent tex...
This function returns a jQu...
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...
# Boids - A Shoes Application # # Author : Wally Glutton - http://stungeye.com ...
Ruby Boids - A Shoes Application
You will need Shoes install...
public PreviewTreeModel(Collection<FileDescription> files)
{
...
Java Create a tree out of a coll...
I would like to transform a...
SCRIPT="gen_${1}.sql"
echo "--gen_${1}.sql" > $SCRIPT
typeset -i counter
...
Bash Slow bash for loop.
Here's a quick and dirty ba...
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...
#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...
Can we make the code betwee...