Adam Cameron
Member since May 27, 2015
- Profile: /members/12672-adam-cameron.htm
- URL: http://blog.adamcameron.me/
- Comments: 9
Recent Blog Comments By Adam Cameron
-
Code Kata: Parsing Strings Like "5mb" Into A Number Of Bytes In Lucee CFML 5.3.7.47
Posted on Jan 24, 2021 at 2:14 PM
That trycf.com snippet I posted works in Lucee 5. It errors as you say in 4.5 though.... read more »
-
Code Kata: Parsing Strings Like "5mb" Into A Number Of Bytes In Lucee CFML 5.3.7.47
Posted on Jan 24, 2021 at 12:36 PM
Re: it's hard to believe there's still no reMatchGroups() function in ColdFusion - extracting parts of a Regular Expression Very hard to believe, especially as it's been there since CF2016 ;-). Ref: https://helpx.adobe.com/uk/coldfusion/cfml-reference/coldfusion-functions/functi... read more »
-
ColdFusion 2016 Skips Over Undefined Elements With For-In Array Loop
Posted on Nov 16, 2018 at 12:52 PM
I am not sure that I entirely agree with the idea that the old behavior was a bug it's a bug in that the behaviour of the tag version and script version should match. It doesn't. I was not making any observation of which of the two behaviours I consider "right" (although now w... read more »
-
OWASP Encoder.cfc - A Java Encoder Proxy For ColdFusion
Posted on Dec 29, 2015 at 8:46 AM
Haha, way to build "suspense"! I was wondering why you weren't just using the native CFML functions for this lot, nor even mentioned they existed... until I saw your comment above. I like your code technique here, but I'd perhaps put your comment caveat at the *top* of the article, cos th... read more »
-
The CFParam Tag Doesn't Care About White-Space In ColdFusion
Posted on Oct 18, 2015 at 1:57 PM
I rather think it is buggy, Ben. CFPARAM is not supposed to trim. That it *does* trim is a bug. It should just do what it's told to do, with the values it's been given. It should not be second-guessing stuff like this. Did you by any chance check your code on Lucee? Cheers for writing this up, fel... read more »
-
Switch Cases Do Not Have To Be Static In JavaScript
Posted on Aug 4, 2015 at 1:46 AM
@Edward: a better description would perhaps be a *constant value*. And the only way to express a constant value in CFML is with a literal. It also, as far as I can tell, must be a simple literal.... read more »
-
Switch Cases Do Not Have To Be Static In JavaScript
Posted on Aug 3, 2015 at 5:46 PM
Just FYI, Ben... Railo and Lucee both handle dynamic case values no worries. It's just ColdFusion that can't manage it. A quick repro case here: https://github.com/adamcameron/cfml/blob/master/language/statements/flowControl/switch/dynamicCaseInScriptWithFunction.cfm -- Adam... read more »
-
Reading Environment Variables In ColdFusion
Posted on May 28, 2015 at 2:07 PM
Nice one @Tom.... read more »
-
Reading Environment Variables In ColdFusion
Posted on May 27, 2015 at 8:53 AM
Re this: "it will return a Struct". You allude to this further down, but it *doesn't* return a struct, it returns a java.util.Collections$UnmodifiableMap ( https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#unmodifiableMap-java .util.Map-). I presume you're suggesting w... read more »