Posts from 2011/11

Regex Escapees

November 22, 2011 00:00

Sometimes when one writes regexes, Its hard to know what needs to be escaped and what doesn't. But I've solved that problem while I was writing a program that generated my regexes for me. Now I have a snippet that both humans and programs can use to write regexes!

This is for the .NET flavor of Reg...

Read post

Making Color From Alpha, Hue, Saturation and Brightness

November 22, 2011 00:00

I find myself wanting to do this sometimes, so here's a bit of code (I'm sure I stole this code from somewhere else);

public static Color ColorFromAhsb(int a, float h, float s, float b) {

    if (0 > a || 255 < a) {
        throw new ArgumentOutOfRangeException(&quot;a&quot;);
    }
    if (0f > h || ...
Read post