Showing posts with label Beer. Show all posts
Showing posts with label Beer. Show all posts

Wednesday 1 May 2013

Quick puzzle: is this path within the doc root?

G'day:
Here's a code puzzle question.

Write a function thus:

boolean function isWithinWebroot(required string fileSystemPath){
    // provide code here
}

Thursday 11 April 2013

Plutarch (via Andrew Myers) teaches me something about struct keys

G'day
I chat to Andrew Myers a bit on Twitter (OK, well it goes out to the entire Twitter universe, but you know what I mean). And a few weeks ago he flicked through some interesting code to me. I've been meaning to write this up for three weeks now, but other stuff seems to keep cropping up that I "need" to write up first. Anyway, I've just looked at his repro case and it's an interesting one. And the code speaks for itself (thus making this a very easy article to write):

Saturday 6 April 2013

abort

G'day (again):
Can anyone point me to where in the ColdFusion CFML docs that it tells us that the CFScript syntax for this:

<cfabort showerror="My error message">

Is this:
abort "My error message";

Tuesday 12 March 2013

Quick Quiz

G'day:
Whilst writing some code, I disengaged my brain for a moment (I'm getting old: this happens), and ended up with some code I didn't mean to have, but before moving on and fixing it, I stopped to think... but there must be an easy way of doing what I had accidentally started to do.

Friday 25 January 2013

Survey results: turning a string into an array of characters

G'day:
One of my readers pointed out to me if that if I tarry too long before reporting back on my recent survey about turning a string into an array of characters, then people would lose what little interest they have in the topic. And I admit it's not the world's most interesting topic anyhow. Anyway, I've got 35 responses, so I'll summarise the results.