I had the need to convert a ColdFusion date/time stamp to a JS Date Object. I thought serializeJSON() function would handle this, but it turns out it treats CF date/time variables as strings. The toScript() function will convert CF variables to JS Date Objects—provided that the date/time variable is in ODBC format (i.e. {ts '2008-05-02 13:32:16'}.)
However, I wanted something that would work for anything that ColdFusion saw as a Date object, so I just whipped out this little 4 line helper function:
If ColdFusion doesn't see the date as a date object, then it'll set the date/time to "null". To use this function you just do:
This would then generate the following:
Obviously this is pretty straightforward, but it's saved me a lot of repetitive typing today and simplified the readability of my code.
A problem I've been having more and more frequently is that I'll get a piece of spam in my POP3 account which Outlook is unable to process. This causes Outlook to keep downloading the same messages over and over from the server and it's unable to grab the latest messages.
Fortunately I found a nice little freeware utility years ago called Vallen POP3 Mail Checker that allows you to connect to a POP account and remove delete messages setting in your spool. This little utility works really great and doesn't require any installation—you can just unzip the exe into a folder and run the pop3.exe.
This little utility is also great for checking other miscellaneous POP3 accounts. I use it to occasionally connect to account that are set up for automation, so I can delete a message if it's causing problems with the server.
Anyway, since I just had to run this program again to delete some spam from my mail server, I thought I'd post about this great little tool.
Well, this isn't exactly news, but it's news to me. Extreme has wrapped up a new album and is planning a Summer Tour (rumored to be with King's X and possibly Living Color.) The album is scheduled to be released "Spring 2008."
Now this news really excites me. I thought III Sides to Every Story and Waiting for the Punchline were two of the best albums in the 1990s and was extremely sadden when they decided to part ways. If you listen to Extreme's albums from their first album to their last, they just kept getting better and better. So I'm really excited to see what the new album we be like.
Being a big fan of Extreme, I followed Gary and Nuno's post-Extreme careers pretty closely. While I've always loved Nuno's guitar work, I was never a big fan of his post Extreme work. I thought Schizophonic was a decent album. I've listen to all his other projects (Population One, Mourning Windows, Dramagods,) but nothing really hooked me like his work with Extreme.
Gary Cherone on the other hand has done several things I've really loved. I thought Tribe of Judah's Exit Elvis was a great album. I also really dig the EP he put out titled Need I Say More—which is sort of an adult contemporary, funk, pop thing. The song Love Got Left Behind's got this really cool funk/Sade vibe to it. I actually really love all the songs on that EP (which you can buy/download from either iTunes or Amazon,) but don't expect anything that really resembles Extreme (except for maybe the title track, Need I Say More which definitely has a When I First Kissed You/More Than Words vibe to it.)
Anyway, here's to hoping the new Extreme album continues the excellent trend that Pornograffiti, III Sides and Punchline all set.
[UPDATED: Monday, November 21, 2011 at 8:33:18 AM]
I'm working on a project where I'm trying to create thumbnails for documents the user uploads. Since CF8 has introduced the <cfpdf /> tag, I thought it would be pretty straightforward to turn page 1 of a PDF into a thumbnail image—turns out I was wrong.
While the <cfpdf /> does work, it was causing me to jump through some various hoops some of which I could easily overcome. The issues I had were:
One of the UI components I'm in need of from time to time, is a hierarchy tree where the user needs to select an option. While there are plenty of "tree" scripts, they take up a lot of screen reality and involve lots of clicking. I've always thought I could come up with a better UI component, so we started working on script that would create downdown component that supported hierarchical data.
The problem with doing a dropdown is that if you have a lot of data (which is often the case for us) data really quickly rolls off the screen. To resolve this issue, we split the list into multiple columns when there's too much data. Here's a screenshot of what the dropdown looks like:

CNET is giving away downloads to two Flight of the Concord tunes—Ladies of the World and Business Time. If you're unfamiliar with this band, the best way I can describe it funny funky melodic music.
Yesterday I ran an announced "contest", which was a simple post of "Speak the word." Although know one knew it was a contest, Jim Priest won being the first person to correctly respond with the answer "Revolution." Jim won a gift off his Amazon Wishlist.
For those of you who don't understand the answer, it's a reference to the song Speak by Queensryche—off their masterpiece Operation Mindcrime. While this was a pretty obscure reference, I knew enough of my readers had pretty similar tastes in music so I thought someone would get the reference. I was a bit surprise Jim got it right off the bat, but it's also what I was hoping would happen.
I got the idea while walking my dog over lunch and listening to my iPod. One of my good friends and I used to play a "game" where we'd just walk up to each and quote some random lyric and you were expected to answer. So, I might pass him in the office and whisper "Speak the word" and I'd expect him to whisper back "Revolution." Anyway, I thought I'd post something to my blog and see if anyone else got the reference. I then decided to make it into a little contest.
I plan to run more of these seemingly random contest, so keep an eye for them. They'll be cryptic postings and I'll provide clues if needed. I'm not sure how often I'll run the contests, but as long as your reading my blog on regular basis, you won't miss it.
As far as the content for the contests, who knows what it'll be. I'll try to make them either broad enough for everyone or at least try to make sure I'm not focusing on a specific genre. I won't do anything to explicitly mark the entry as a content, but it'll be something that appears very cryptic or sound like a riddle. You'll just have to keep reading daily to watch out for the contests. :)
I've been pretty quite the past two weeks. I've been really plugging away doing a lot of client-side UI programming in jQuery. I'm working on a complete revamp of some portions of our application and than means modernizing the UI.
One of the tasks I needed to accomplish was to create a UI component that would allow for sortable, collapsible table rows. jQuery already has a very good (an official) plug-in for sorting column rows called tablesorter.js. The Tablesorter is part of the jQuery UI project and allows for sorting of multiple columns—which is a really nice feature.
However, the current tablesorter.js codebase does not have anything in place to allow for "children" rows—which is needed to provide a collapsible architecture. Essentially I need a way to tell certain rows that they belong with the row above.
After playing around with some different variations I finally came up with a solution that worked elegantly and had minimal impact on the Tablesorter codebase. The way I solved the problem is to add a class to "children" rows, which tells the Tablesorter plug-in to include the row as part of the last row that does not have the "child" class. This allows me to actually have multiple children rows, that are all grouped together and ignored by the sorting algorithms.
I'm working with Christian Bach to get the mods added to the official codebase—and it looks like that might happen as early as next week. I've upload my Tablesorter mod and an example of implementing collapsible rows.
The example uses the "Pager" add-on for Tablesorter, just to show my mod attempted not to break backwards compatibility.
If you have any comments, please leave them. They will only help me and Christian in the long run.
I can't even tell you how much my yellow Lab would love this toy. If we set this up in our house, I'd never see her again.
This video is a couple of months old, but I just came across it (actually my mom sent me a link it.) This is another Improv Everywhere video. The premise on this video is that 200 people all go into Grand Central station and all freeze at exactly the same time and resume exactly 5 minutes later. I'm sure it would have been very freaky to witness in person.
Very cool!
It's pretty cool to see this kind of robotics in motion. This is definitely something you want to watch all the way through. The highlights for me were watching it regain it's balance after being shoved and after slipping on ice. It's also pretty cool to watch it run and jump. It's pretty spooky just how close it looks like a quadpedal creature.
I recently discovered a bug in Safari (Mac and PC) related to use the :hover pseudo class in conjunction with an adjacent sibling selector. The problem is that the mouseover event correctly changes the adjacent sibling's style, but when the mouseout event occurs the style is never reset. This means if you have the selector ul li:hover + li the adjacent selector's (+ li) style will be changed when the user hovers over the element, but the style is never reset once the user mouse's out of the element.
I've tested this CSS selector combination in IE7, IE8b1, FF2 (PC and Mac) and FF3b4 and in all those browsers when the mouse leaves the element being hovered, the style of the sibling element is reset to it's original state.
One problem with stating this as a "bug" is that I believe the CSS spec is unclear on what the correct behavior should be, but I do believe that the other browsers got this right. I definitely expect any visual changes applied to the screen on the :hover pseudo class to be undone when mouse leaves the target area.
It turns out I'm not the first to find problems with Safari's implementation of the :hover and adjacent sibling selector.
To see this bug in action, move your mouse pointer from the bottom of the list to the top. If you move from top to bottom you will not see the bug since the style is correctly reset once you mouse over the sibling element.
Here's what the CSS looks like behind the scenes:
Odds are high that you might never run into this bug, but I'm working on a menu system that requires a pretty complex CSS rule set and this bug is causing me serious problems in Safari. I may end up needing to implement a JS in order to resolve the problem.
I just read that Bruce Dickinson has penned a new movie titled Chemical Wedding (which is also the name of his 1998 solo album.) I've always been a big fan of Maiden and Bruce's vocals, so I'll definitely be following this movie. I've got no clue if the movie will be any good, but for those of you who follow Iron Maiden, you know that their huge book and movie buffs—a good portion of their songs are based on either old movies, books or TV shows.
The information I've been able to find out about the movie is sparse, but apparently the movie is about a professor who brings back to live Aleister Crowley.