February 16th, 2010
I have a project that stores dates in “Feb 09, 2010″ format and I’ve been loving the jQuery plugin – tablesorter – for the flexibility and convenience it offers. Unfortunately, the three parsers that ship as part of the tablesorter plugin (isoDate, usLongDate, and shortDate) never seem to work correctly when attempting to sort the dates in my tables. So, after banging on it for a while, I’ve come up w/ the following date parser. Feel free to alter as much as you’d like.
$(function() {
var monthNames = {};
monthNames["Jan"] = "01";
monthNames["Feb"] = "02";
monthNames["Mar"] = "03";
monthNames["Apr"] = "04";
monthNames["May"] = "05";
monthNames["Jun"] = "06";
monthNames["Jul"] = "07";
monthNames["Aug"] = "08";
monthNames["Sep"] = "09";
monthNames["Oct"] = "10";
monthNames["Nov"] = "11";
monthNames["Dec"] = "12";
$.tablesorter.addParser({
id: 'bishDate',
is: function(s) {
return false;
},
format: function(s) {
var hit = s.match(/([A-Za-z]{3})\s(\d{2}),\s(\d{4})/);
var m = hit[1];
m = monthNames[m];
var d = "0" + hit[2];
d = d.substr(d.length - 2);
var y = hit[3];
return "" + y + m + d;
},
type: 'numeric'
});
// then force your custom parser on the column you need
$("#tproc").tablesorter({
headers: {
5: {sorter: 'bishDate'}
}
});
Tags: date, frustration, jquery, parser, sort, tablesorter, webdev
Posted in Uncategorized | No Comments »
December 29th, 2009
Just looked at the hospital bill we got that covers all the things that have happened since Martha first got diagnosed w/ Melanoma (die cancer, die!) this past September…
So, this covers two surgeries, several ‘minor procedures’, imaging, visits, etc.:
Total hospital charges: $28,655.49
Adjustments to date: $-22,091.34
Amount pending from insurance: $229.85
Already paid by insurance: $-6,356.30
Already paid by patient: $0.00
Amount [we] owe now: $50.00
Wow! I’m not about to get into the current healthcare reform stuff (I’m not intellectually equipped to do so) … but, wow, thank God for a job, a job that’s a good job, and a job that provides insurance.
Tags: bills, cancersucks, healthcare, insurance, martha
Posted in Uncategorized | No Comments »
December 28th, 2009
I’ve been enjoying my Droid for almost two months now and during that time, it’s been connected to my MacBook repeatedly as I experiment w/ the ‘right way’ to move music/movies back and forth (still haven’t found the right solution; that’s a post for another day).
I suppose you could call me “visu-anal-ly retentive”. It irked me a little that my Droid was represented by a default, generic drive icon on the desktop and in the finder. I decided that I ought to try putting together an icon to represent the red-eyed wonder.
After a few minutes of searching, I found an image that I thought would work as an icon w/o looking too lame. I threw it into Acorn, cut away the background pixels, and saved it as a 512×512 32-bit PNG (w/ transparency). I thought I’d be able to export the image as an icon directly from Acorn… alas, it was not so. More searching revealed a utility called ‘Img2icns’ and it did just the trick. Here’s the icon I ended up with.
Once you’ve got your icon, right-click on your Droid in a finder window and select ‘Get Info’. Then you can drag your icon right onto the ‘Droid’ in the Get Info dialog. That should do it. You should now see something like this:

Tags: droid, icons, mac, os x, phone
Posted in Uncategorized | No Comments »
December 19th, 2009
Martha has been documenting her journey ever since being diagnosed with melanoma earlier this fall. It’s been nice getting to watch her put her thoughts, feelings, worries, and joys into words. Unfortunately, she’s been growing tired of the limitations of her current setup and has been longing for a real blogging platform. Fortunately, she’s married to a fan of WordPress and he happens to have spare webspace.
So, while we work to move her previous content to the new WP install, go ahead and bookmark This is Martha.
UPDATE: She’s mostly moved in to the new blog!
Tags: cancersucks, gelato, martha, WordPress
Posted in Uncategorized | No Comments »
November 30th, 2009
Mar: “I remember the first time you cleaned up my vomit.”
Me: “I don’t.”
Mar: [romantically] “I do.”
Tags: overheard
Posted in Uncategorized | No Comments »