Matthew Ellen .co .uk

Useful code snippets


A function to convert the first 3 characters of a string to an HTML colour (but without the #) by using the characters' hexadecimal ASCII values.

Languages: PHP, Delphi


A function for converting unsigned integers into trinary numbers. Returns a string. Courtesey of David Woo.

Languages: C++


A function that calculates the least common multiple of a list of numbers

Languages: Haskell, C#