This post is a little behind, but two weeks ago I and most of the IT staff at eppley.org launched our new website. I cannot take credit for the design, but the jquery slideshows and the setup and conversion of the design for magento is all my handiwork.
eppley.org
March 5th, 2010Wordpress
February 2nd, 2010I spent most of the day today installing wordpress on the site and converting the old content to work on it. It’s pretty much ready to go as-is, but I’m sure it will need the occasional tweak. The purpose for this change is so I can document my projects as I work on them. It might be confusing because http://drogers.net/blog goes to my tumblr, and I’ll keep it that way for the sake of old links, but the site itself will be an actual log of my activity, while the tumblr has always been merely an aggregation of things I find worth sharing.
Roman Numerals
January 7th, 2010Disappointed to find that php’s date() function has no roman numeral conversion, nor is there any preexisting function to do so, I whipped up my own today.
"V", 10 => "X", 50 => "L", 100 => "C", 500 => "D", 1000 => "M");
$rom[100] = substr($dec, -3, 1);
$rom[10] = substr($dec, -2, 1);
$rom[1] = substr($dec, -1);
$m = substr($dec, 0, -3);
foreach($rom as $key => $base){
switch($base){
case 0:
$rom[$key] = "";
break;
case 9:
$rom[$key] = $table[$key].$table[$key*10];
break;
case 4:
$rom[$key] = $table[$key].$table[$key*5];
break;
case 5:
$rom[$key] = $table[$key*5];
break;
case $base < 4:
$rom[$key] = str_repeat($table[$key], $base);
break;
case $base > 5:
$rom[$key] = $table[$key*5].str_repeat($table[$key], $base - 5);
break;
}
}
return str_repeat("M", $m).implode($rom);
}
