1 2 3 4
int main(int argc, char **argv) { ...
C On argv iteration
by Chris Jester-Young,
April 30, 2009 21:40
1 2 3 4
public int getStat(String stat) { try { Field field = Stats.class.getField(stat.toUpperCase()); ...
1 2 3
(define (compose . fns) (define (make-chain fn chain) ...
Lisp On Generalised composition
by Chris Jester-Young,
April 22, 2009 05:07
zbigniew from freenode #sch...
1 2 3
(define (compose . fns) (define (make-chain fn chain) ...
Lisp Generalised composition
Most people have worked wit...
1 2 3 4
#include <math.h> #include <stdio.h> #include <stdlib.h> ...
1 2 3
% % A simple test program to calculate pi, using an easy, slow converging formula ...
C On Fastest way to get value of pi
by Chris Jester-Young,
August 31, 2008 22:34
@evilteach: Thanks for that...
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...
C# On I hate to do this, but...
by Chris Jester-Young,
July 18, 2008 01:45
@Wolfbyte: Haha, nice. Very...
1 2 3
my %fbmap = (3 => 'Fizz', 5 => 'Buzz'); my $fizzbuzz = sub { ...
C# On I hate to do this, but...
by Chris Jester-Young,
July 16, 2008 10:20
Implementation in Perl. :-P...
1 2 3 4
<?php function addSecondsToTimestamp ($_timestamp, $_amount) { list($year, $month, $day, $hours, $minutes, $seconds) = preg_split('/[- :]/', $_timestamp); ...
PHP On Adding seconds to a MySQL t...
by Chris Jester-Young,
July 14, 2008 21:50
My fixes below are really t...
1 2
#!/bin/bash printf '%s\t%s\n' "$(date)" "$*" >> ~/progress/progress.txt
Bash On store string from terminal ...
by Chris Jester-Young,
July 08, 2008 11:36
Here's a one-liner (excludi...
Ruby On Tracking error in numbers
by Chris Jester-Young,
June 30, 2008 00:08
I don't know whether your s...
1 2 3 4
function _TDisplay() { var self = this; this.tick = function () { ...
JavaScript On countdown timer (minutes &a...
by Chris Jester-Young,
June 29, 2008 22:23
@Ryan: Yes, it seems backwa...
Java On Simple interpreter
by Chris Jester-Young,
June 23, 2008 09:18
I don't have a code refacto...

Your method is mostly good,...