coldfusion

CF9 Compatibility for FB3Lite

I just made another minor tweak to FB3Lite to fix out-of-the-box ColdFusion 9 compatibility.  CF9 added a 'location' built-in function, which means that the function of the same name that FB3Lite provides now generates a compiler error.  Fortunately, since functions are real data within CFML, a simple realiasing gets around the issue.  This creates a [...]

Tag-Based HQL Queries on CF9

I'm sure I wasn't the only one that was sorely disappointed when Adobe released CF9 without the ability to execute HQL queries via the CFQUERY tag.  Using a function (ormExecuteQuery) works, but it's really ungainly if you have complex – or even just long – HQL or need to build your statement conditionally, and you [...]

Moving Pic of the Day Foiled Again

A while back I made an attempt to move Pic of the Day (NSFW) off of ColdFusion 8 and onto Railo 3.  I can't afford a license of CF9, so my only upgrade path is through a free alternative.  Unless someone has an extra four grand they want to give me….
Last time I was foiled [...]

Goodbye JRun, Hello Tomcat

Last night I finally kicked JRun to the curb and replaced it with Tomcat on my personal server.  I knew JRun was a pig and that I'd get some improvements by switching, I'd just never gotten around to doing it.  I don't know why I waited.  Here are two graphs from my server, see if [...]

Interesting ColdFusion CFQuery "Feature"

And just to be clear, when I say "feature" I actually mean "completely broken behaviour," though for a change of pace it's not with the compiler.  Probably.  Hopefully.
Consider this innocent-seeming code:
<cfquery datasource="dsn_A" name="">
insert into test (s) values (
'dsn_A – record 1'
)
</cfquery>
Every CF app has this (or equivalent) [...]

Even Better CF DB Error Messages

A few weeks ago I posted about fixing CF's DB error messages so that they include query params you passed as well as the raw SQL of the query.  I also supplied a patch for detail.cfm so your SQL renders in a PRE tag for better readability, but didn't make it general enough to handle [...]

Fixing CF DB Error Messages

Fixing CF DB Error Messages

When you're working on someone else's code and you get an error message (because I know you'd never write code that errors), CF usually does a pretty good job of giving you the info you need to debug the issue.  But for some reason they don't show you query parameters, even though they're included in [...]

Custom Scopes for CFGroovy2

The middle of last week I committed an update to CFGroovy2 to allow an arbitrary number of scopes to be passed in as attributes, just like you have always been able to do with the 'variables' attribute.  If you update, the change is the addition of lines 47-51:
<cfloop list="#lCase(structKeyList(attributes))#" index="scope">
<cfif listFind("language,lang,script,variables", scope) EQ [...]

More Floating Point Madness

Ever the one to fight floating point errors, I thought I'd share my latest troubles.  The context is rendering axis labels for a chart, specifically from 67 to 68, in steps of 0.2.  As you can easily deduce, the desired list has six labels: 67.0, 67.2, 67.4, 67.6, 67.8, and 68.0.  However, ColdFusion might disagree [...]

Beware ColdFusion Floating Point Integers

Adobe ColdFusion uses java.lang.Double to represent numbers in most cases, and it's a floating point representation.  That means it stores a finite amount of precision about the number in question, and discards any bits beyond that.  The stored precision is relative to the magnitude of the number.  So if you ask it to store a [...]