The miscellaneous ramblings and thoughts of Dan G. Switzer, II

Steve Stevens Flamenco A Go-Go

I was talking w/someone recently about guitar work and he brought about Flamenco style music. This immeditately made me remember Steve Stevens excellent Flamenco/Rock album called Flamenco A Go-Go.

This album is a really great intrumental album with lots of influences from around the world. A did a quick You Tube search and came across the video for Dementia. While this song is probably the most traditional sounding songs on the album, it's still a very tasteful piece.

Steve Stevens - Dementia (Live)


Free Windows MD5 Checksum Application

I downloaded the ColdFusion v7.0.2 Updater this morning. Since I've had some problems recently with downloading CF updates from Adobe.com, I decided I'd verify the MD5 checksum. This made me realize I didn't have a good Windows application for verify the MD5 checksum. After searching Google for a few minutes, I came across a very small (97k) application called MD Checker v2.20.

Using the program is very straightforward—just unzip to a directory and run the md5.exe executable. No installation required. To compare a checksum against a file's checksum, select the "Verify an MD5 checksum" (which is the default option.) Next, copy the MD5 checksum into your clipboard and click the "Paste" button—this will put the MD5 checksum value to verify against in an uneditable control. To verify the checksum of a file, click the "Browse" button and find the file on your hard drive and click the "Open" button. The application will then report the checksum found in either a green (if the values match) or red (if the values differ) box.

This program is very straightforward and best of all, it's free.

New and Improved--now built with LylaCaptcha!

In order to try and prevent the spamming issues, I finally had to do something I didn't want to do—and that's implement a Captcha process to the comments.

When you wish to post a comment, you'll now be required to fill in the text you see in the image right below the comment box. This is to help ensure that it's a real person entering in the comment and not just a spam bot. If this doesn't help with the problem, the next step will be either to require a valid e-mail (in which you'll have to go through a verify process the first time you post) or I'll start approving all comments manually. I really hope I don't have to turn off commenting altogether, but I'm tired of deleting 20-30 spam messages a day.

For those of you wondering, I used LylaCaptcha for my captcha needs, which worked on really well. I was going to type up a "how-to", as the documents on the LylaCaptcha site aren't as straightforward as they could be. Once you figure out what you need to do, it's very straightforward, but I found I had to really do a lot through trial an error. Anyway, the reason I'm not doing a write-up is Brian Rinaldi already wrote what I ended up doing in a blog post titled Adding Open-Source LylaCaptcha to BlogCFC.


A ColdFusion UDF For Dynamically Loading Java Classes

I just noticed today that the createClass() function below was an old version of the actual code I'm using, so I've updated the code with the latest version.

I've been working on modifying some ColdFusion based web services for XStandard originally written by Ben Nadel. One of the things the original code didn't support was the Spell Checker support feature built-in to XStandard.

After doing some searching, it appeared the Jazzy Spell Checker Java API would fill my needs nicely. It's based on the algorithms in aspell and it can use both dictionary and phonetic files to help with spelling suggestions and it returns all the information required by XStandard (position of word and suggested spellings.) The only "disadvantage" of Jazzy is that it does come "ready-to-use" with CFMX—you need to write a wrapper class for easy use w/ColdFusion. (More on that to come in a later post.)


MSSQL 2k Stored Procedure for Pagination...

A while back I found a stored procedure that someone was using to create pagination resultsets in SQL Server 2000. While the stored procedure was nice, it didn't allow for the "DISTINCT" keyword—which is necessary for some of my queries. There were also a few other issues I didn't like about the stored procedure, so I re-wrote the stored procedure pretty much from scratch.

In order to support the "DISTINCT" keyword, I had to change the inner query to use a derived table. Since this provides a little more overhead, I added a bit parameter "@Distinct" which inserts the "DISTINCT" keyword into the query and uses the derived table.

Also, on the initial page of results, I simply use the TOP keyword. The previous stored proc used an inner query, which did a TOP 0—which means the code did nothing.


Protecting your HTML pages from Spam Harvester Bots

Today I was reading a post on a message list and someone mentioned they were using a function to generate their mailto: links using HTML entities instead of the ASCII characters in order to prevent spam harvesters from snagging the e-mail address. The problem with this method, is it would be pretty easy for a harvester to re-encode the HTML entities back into the correct ASCII characters.

This got me think that the best method would involve using JavaScript to write out the link. In order for a spam harvester bot to parse out the e-mail address, they'd have to understand the context of the page. This means they'd either have to actually parse the page into a DOM object and parse the DOM, or they'd have to specifically knowledge of the function and reverse engineer the links to the function. Either method is probably more than what most harvesting bots are going to use (although this could always change.)

So, I spent a few minutes and whipped up the following code. The spamProtector() JS function takes in an array of ASCII character codes, which will be used to generate the mailto: links. I obfuscated the document.write() statement by breaking the string into chunks in order to throw off any parsers looking for certain strings.


It's amazing what you can do w/some Coke & Menthos...

What happens when you combine 200 liters of Diet Coke and over 500 Mentos mints? It's amazing and completely insane. Watch the video

License Free Photo Resource - everystockphoto

I think I've seen this link before, but there's a great site for license free images called everystockphoto. They currently have over 268,000 free images for download. Definitely worth checking out if you're doing a project on the cheap and need some images to use.

On a related note, iStockphoto is site were you can get very inexpensive photos (from $1 to $5 per image, based on the resolution you want.) The great thing about this site is if you're a photographer, you can sell your pictures on this site. A acquaintance of mine, Todd Smith of SaturatedPixels has been selling his works there for a couple of years. Check out his iStockphoto portfolio.

Steelers Receive Super Bowl Rings

The Steelers' Super Bowl rings were given to the players yesterday. Pretty cool design. I was a bit surprised that the ring included all 5 trophies in the background, as Dan Rooney has been very stout in his opinion that he wanted to keep this win separate from the wins in the 70s. However, I found this quote from Jerome Bettis that I think sums things up nicely:

It was Bettis who convinced Dan Rooney to include the team's four previous Super Bowl victories as part of the franchise's fifth ring, and why it has five Lombardi Trophies in diamonds on the face.

"He didn't want the other championships to overshadow this one,'' Bettis said. "I wanted to let him know that it was important that the other ones be involved because we had to live under that shadow. Now instead of us being separated, we're part of that family.

"As a player walking by those four trophies every day, I wanted to include those into this. It's part of the history and we're part of it. We wanted to feel part of it."

Here are the pictures:


Worst Rendition of the Nation Anthem, Ever...

Has this guy even heard the Nation Anthem before? I'm sure the guy was nervous and all, but as a Police Officer in the United States of America, you should at least know how to sing the Nation Anthem. This guy makes Rosanne Barr sound like she should be on American Idol.

Listen to the worst rendition of the Nation Anthem, ever.