I’ve never found a great solution for pagination in SQL 2000. I much prefer MySQL’s syntax: SELECT * FROM table LIMIT 100,10. That will get you 10 records starting at the 100th record. Why MS SQL still doesn’t offer an opposite to TOP, I don’t know. Yes, I’ve seen the double TOP method where you sort your data twice to end up with the last X rows. It works, but its not exactly elegant.

But I have come across a new method for pagination using some new 2005 features that is pretty neat. What I really like about this solution is that it gives you a count of the total number of records, which you usually don’t get with other pagination methods.
Continue reading ‘Elegant pagination with MS SQL 2005’ »

I came across this neat site that allows you to select which of the many eclipse plug-ins you want. It will then build a custom eclipse install with those plug-ins installed and allow you to download it. Very cool!

http://ondemand.yoxos.com/geteclipse/start
Continue reading ‘Online Eclipse configurator and download’ »

When debugging a Flex 3 application on Vista / IE 7, you may encounter this error when debugging an application for the second time.

Another flash debugger may be running. Close it to Continue.

Another flash debugger may be running. Close it to Continue.

Even though it appears there are no IE instances still running, this error comes up.

There are several solutions to this, one is to configure Flex Builder to launch a different browser for debugging, such as FireFox. Another is to disable Vista’s UAC. Neither of these were good solutions for me.

The problem has to do with a socket getting left open. As a short term fix you can use your task manager and kill the ieuser.exe process when you get this error. Then you should be able to launch the debugger ok.

This bug is discussed in Adobe’s bug tracker system. Their suggested solution for now is to add this string to your flexbuilder.ini file:

-Djava.net.preferIPv4Stack=true

After searching around for a while and not finding my flexbuilder.ini file, I discovered that file only exists if you’ve installed Flex Builder stand alone. If you install it as an eclipse plug-in, as I have, then you need to add that line to eclipse.ini. But that didn’t solve the problem for me, and I’ve read it didn’t solve it for some other people as well.

My solution was to add it to the shortcut I was using to launch Flex Builder. This solved the problem and I can now debug as many times as I want with no errors.

Today I needed to view the details for all the scheduled tasks on one of our client’s servers. I needed a print out showing the tasks including the URL, the schedule and whether the task was disabled or not. There were quite a few tasks on this machine, and I wasn’t looking forward to manually going into each task, printing it, and then ending up with a huge stack of printed pages.

So instead I wrote this short script that displays the information I need all in one page.
Continue reading ‘A one page view of scheduled task details’ »

My SQL savvy coworker Jason Troy has done some work recently on finding and deleting duplicate records in a database. One of the things he had to do was compare on a text field (that is, over 8000 characters and not a varchar). Very interesting.

http://phillyun.blogspot.com/2008/10/power-of-sql-find-and-delete-duplicates.html

I’ve released an update to my Craigslist Spam Buttons greasemonkey script. (If you don’t know what this is about, see my original post).

This new version works completely differently, it flags items in the background using a hidden iframe. This should fix the problems people were having with the old version. Special thanks to Steve Sweet for his help on this version.

I’m not 100% sure this is working perfectly yet, so please try it out and let me know what you think.

Update 10/29/2008 – this is now working great! And it keeps the [spam] links marked as visited, even after reloading the page, so you can see which posts you’ve already marked.

The latest version can always be downloaded from http://userscripts.org/scripts/show/7399

One of my clients has a site where they offer their archived radio shows for downloading. The files they provide us come from directly from the radio station. They are already in MP3 format, but they are encoded at an insanely high bitrate for a talk show, and are in stereo to boot. This can eat up a lot of bandwidth unnecessarily.

There are over 100 files, so opening each one in an audio tool such as Audacity or SoundBooth to re-compress would be quite tedious. Here is a short script I wrote to re-encode the files. Note that I did this on our Linux server, but since Perl and lame/notlame are both available for Windows you shouldn’t have a problem doing it there either.
Continue reading ‘Batch conversion of audio files – shrinking MP3s’ »

I thought enabling the new ColdFusion 8 server monitor was not supposed to affect your applications, but apparently it can. This morning all of the sudden I could not get one of my coldfusion applications to start, it kept throwing timeout errors in weird, almost random places. When I removed the offending piece of code I would just get a timeout error somewhere else.

I finally tracked it down to the fact that someone enabled the server monitor on this server. Turning it off let the application start up just fine. This is a ModelGlue/ColdSpring application, that may have something to do with it because we had other ColdFusion apps running ok on this same server.

I was able to turn monitoring back on after the application had started. The application scope was only using 3.3kb of memory, much less than some of the other applications. My lone session in the application was taking up 76kb though, which seems kind of high.

Thoughts???

Recently I’ve had a couple occasions where I needed to clean up some data that had non-ascii or high-ascii characters in it. Usually this happens when the data originates from MS Word or Excel. The first time I was producing XML, and was getting errors when I tried to validate my feed. Thats when I noticed I wasn’t using XMLFormat(), which of couse I should be.

I added XMLFormat() around my data, but was still getting errors. Evidently XMLFormat() still leaves in a lot of characters that are just plain illegal in XML. Here is a function I wrote to give me clean data.
Continue reading ‘Cleaning up non ascii chars for XML or other uses’ »

I had heard of this book a few years ago, and have had it on my Amazon wishlist for some time. So when fellow ColdFusion programmer Mike Henke offered me a copy, I quickly accepted. Steve Krug’s Don’t Make Me Think! A Common Sense Approach to Web Usability is a short read, designed to be read in under 4 hours.
Continue reading ‘Book review: Don’t Make Me Think!’ »