dans.blog


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

CFMX: Execute Code Based Upon Debug IP Addresses...

I've been working with a lot of code recently that I didn't write and the code flow is very hard to follow. A lot of times there's no clear execution path flow and I'm finding fixing problems is very time consuming because I'm having to jump around to a bunch of seemingly unrelated files to find where the problem actually is.

One of the things I seem to be having to do a lot is dump out either little "I'm here" messages or having to output the SQL statements that are getting executed so I can run them in SQL Query Analyzer to find out what the results are and what the query really should be.

I've found myself writing a lot of <cfif cgi.remote_addr EQ "my.ip.addr.ess"> lines in order to only output that data to myself. This morning I decided I should just write a tag that checks the CF Admin for a list of valid Debugging IPs and uses that to decide if code should be excuted.

more…


Thunderbird v1.0.5 Released... Fixes Security Bugs...

The Mozilla group has released Thunderbird v1.0.5. This release is supposed to fix some stability issues and it also addresses a number of security issues.


Firefox v1.0.5 Released... Fixes Security Bugs...

The Mozilla group has released Firefox v1.0.5. This release is supposed to fix some stability issues (I've had Firefox crashing on occasion for me when opening a pop-up window, but I think this may be related to an Extension I have installed) and it also addresses a number of security issues.


See How The ColdFusion Team's Facilities Have Changed Since 1999...

Damon Cooper blogged about the ColdFusion 10th Birthday Party celebration and posted a link to a photo gallery of the ColdFusion MX 7 Team's facilities in Newton, MA.

This reminded me that I have some photos in my photo album on the Allaire Facilites at One Alewife Center that I took on a trip to Boston in 1999. Mike Nimer took myself and Cameron Childress on a tour through the building and then we walked down to this good little Greek restaurant for lunch.


CFMX Generating Vague "java.lang.NullPointerException" Errors...

I tend to use <cfscript> a lot in my coding, but there are times I find I need to refactor some code portion back to using a tag-based syntax, in order to to use a native CF tag. Yes, I know I could build CF wrapper functions for those tags, but sometimes it's just easier to change the code back.

Usually converting back to a serious of <cfset> tags is no big deal, but occassionally I get some really strange error when I re-run the template. There error gives me almost no detail on the problem, just a very obscure "java.lang.NullPointerException" with no reference to a line number. The full error message is:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.

more…


ColdFusion MX 7 Cumulative Hot Fix 3 Released...

Macromedia has release the ColdFusion MX 7 Cumulative Hot Fix 3 today. Download the hot fix here.


Control Your Desktop With Your PSP...

Control your desktop and/or server using your PSP with this VNC hack.

Another day, another PSP hack. The madmen at PSPUpdates.com posted PVNC v1.1, a VNC client for the PSP that allows you to connect to and control other computers running a VNC server. The program recreates the desktop of a remote computer on your PSP screen, a boon for the busy sysadmin who doesn't want to leave the toilet stall where he/she is playing Lumines to check on a server.

In related news, they've also created a nice FTP client for downloading non-pirated ISOs. Non-pirated. Remember that.


ColdFusion Bug: ValueList() Will Not Except Dynamic Column Names...

I came across what is apparently an old Macromedia ColdFusion "bug" today in the valueList() function. The valueList() function will only accept a value where both the queryName and columnName are static values in the form: queryName.columnName.

It appears it'll throw an error if you try passing any other combination of equally valid syntax. For example, all of the below will throw an error, even though they are all valid references to a query and column.

valueList(queryName["columnName"]);
valueList(queryName[dynamicValue]);
valueList(evaluate("queryName.#dynamicValue#"));
valueList(evaluate("queryName.columnName"#));

more…


Subclipse Eclipse SVN Plug-in: Emulate TortoiseSVN Labelling...

I'm really digging Eclipse. There's very little I don't like about v3.1—about the only thing I don't like out of the box is the Find/Replace dialog box. I'd like to see something a little more like HomeSite+ Extended Find/Replace dialog box. The good news is, I'm sure I can probably find a plug-in that will do pretty much what I want.

Anyway, what I'm really digging is Subclipse, which is a SVN plug-in for Eclipse that plugs right in to the "Team" context menu. The one thing I didn't like about Subclipse out of the box was it's re-labelling in my Navigation Pane. It adds a bunch of information that some users will probably want (last user to edit a file, date/time it was edited, etc) but I really don't generally care. If I do, I can just view the document in the Resouce History pane and I'll get all the details I want about the file.

Fortunately, Subclipse allows you to edit the labelling. I really like the way TortoiseSVN labels things in Windows Explorer, so I set up Subeclipse to basic emulate that labelling (while as close as you can with just text.) Anyway, here's a screenshot of my setup:

more…


qForms v2.0 - Real-time Server Validation Using xmlHttpRequest()

The buzzword "AJAX" is becoming all the rage these days. While the concept surely isn't new, the method of delivery has changed. A comment by Oguz Demirkapi over on Mark Kruger's "Client Side and Server Side Validation - a case for both" blog post got me thinking about AJAX and qForms. Oguz said:

and we use also Ajax for server side checks. As an example: while registering for our website our Ajax code check whether entered e-mail address has already been in database or not. And than show error msg directly as client side action.

It is a really great option to check availibility etc.

With all the changes I've made to qForms, I figured it would be pretty easy to throw together a little example form that used AJAX techniques to validate a field against live server data. Instead of using a validation method, were instead going to check the value onblur (so that we can then query the server while the user is interacting with the rest of the form) and then we'll display an error is the user has selected a user name that's already being used.

more…


Apple Announces New iPod Called "Flea"...

Apple has released a new product called the iPod Flea. ;)


Hiding Files/Folders From Eclipse Projects Using Filters...

After watching Rob Rohan's CFEclipse Intro Videos, I decided to give Eclipse another go around. I've played around w/Eclipse several times before, but I've always gone back to HomeSite+. Rob's video showed me a few key features (such as the Bookmarks and To-Do list) that are very intriguing to me. Following Rob's directions, install was simple and I was up and runing within minutes of downloading Eclipse.

One thing I ran into though, is I wanted to hide my .svn and .project entries from showing up in my Navigation bar. In order to hide those files/folders from showing up, you need to turn on the ".*" filter. Here are step-by-step instructions for turning on that filter.

  1. Click on the "Navigation" pane.
  2. Press [CTRL]+[F10] or click on the "View Menu" icon (which looking like an upside down triangle.)
  3. Click on the "Filters..." option.
  4. In the Navigation Filters, find the ".*" option and click in the checkbox just to the left of the label.
  5. Click "OK".

more…


Bummer Time--I'm Sick and Nikki's Got Bad Knees & Hips...

The last 48 hours have been a real bummer. Sunday night started feeling the onset of a cold comming on. My 14 year cousin Quintin spent the night Sunday—he's here from Denver with his Mom and Dad. That was great and I'm glad I got to spend some time with him, since I don't get to see him nearly as much as I'd like. We stayed up until about 2am playing XBox, but I was feeling pretty crappy by the time I went to bed.

On Monday, I woke up and went to Giant Eagle and picked up the fruit for the Fruit Salad we were to bring to a family pickup. I also went ahead and picked up a bunch of juice and other stuff to try to fight off my cold.

Anyway, since I was trying to keep Quinitin occupied, we took the dogs to a park so they could run for a bit. I had taken the dogs to the same park a couple of weeks ago and they really had fun. However, Nikki (our youngest Lab) began limping a few hours after we had left the park. She limped for a few days and then it basically went away. I thought she probably just tweaked a muscle or something since she never really seemed to be in pain (i.e. she wasn't whining and she never stopped her normal activities.)

more…


New Method Idea for qForms--Conditional Processing...

Last night I was thinking about the changes I had made to the createDependencyTo() method and started thinking that there might be times when you'd want to do something similiar, but instead of having one field affect another in some manor you'd define a rule for a field if it meets a given condition.

My basic thought would be to add a new method you could call. I've been tossing around the idea of setActionRule(), setConditionAction() or setConditionalRule(). Something along those lines. The idea would be that if the value of the field this method was attached to equal a condition supplied, a function would be triggered.

oForm.format.setActionRule(
    function (sValue){
        alert("You have selected to recieve the newsletter in " + sValue + " format.");
    }
);

more…


qForms v2.0 - Overriding the Default Dependency Mechanisms

When I was looking through my demo templates, I came across an example that showed some features in qForms v2.0 that I had forgotten I implemented, but it's something that's very cool and provides a lot of flexibility. What is this code you ask? Well, it deals with the createDepedencyTo() method.

For those of you who aren't familiar with this method, in a nutshell the createDependencyTo() method is used to build rule logic into your forms. For example, maybe you only want to require a user to enter their e-mail address if they've actually selected to have something e-mailed to them. You could do that like this:

oForm.email.createDependencyTo("EmailNewsletter", "yes");

more…