Ben Nadel
Member since Dec 11, 2008
- Profile: /members/1-ben-nadel.htm
- URL: https://www.bennadel.com
- Twitter: @bennadel
- FaceBook: http://www.facebook.com/bennadel
- Comments: 15,155
Recent Blog Comments By Ben Nadel
-
Reading Environment (ENV) Variables From The Server Scope In Lucee CFML 5.3.7.47
Posted on May 16, 2022 at 5:27 PM
@Derek, That's an interesting question - I haven't run across that in my work since we actually deploy new containers as part of changes like that. As such, I've not personally had to reload an ENV value. Your question is founded on the idea that the readable scope isn't automatically up... read more »
-
Ask Ben: Converting An XML Document Into A Nested ColdFusion Struct
Posted on May 11, 2022 at 9:42 PM
@Ross, Good question. I think there's probably two possible approaches: "Last one wins" - where the last child with a given name overwrites whatever values existed before hand. Instead of a simple key-value relationship, the value would be an array of... read more »
-
Considering Approaches To Handling MySQL Key Conflicts In Lucee CFML
Posted on May 11, 2022 at 4:39 PM
@Anthony, That's how I feel about the MongoDB query API... I do not like it, I do not like it one bit :D But, I really should get better at it.... read more »
-
100% Of BenNadel.com Traffic Now Flows Through The CloudFlare CDN (For Free)
Posted on May 9, 2022 at 8:10 PM
@Dan, So, technically, nothing that I have ishosted" on CloudFlare. That said, you are correct about the caching headers. For static content, CloudFlare is caching them in the CDN, but the original request is still hitting my origin server to get the static content. Theoreticall... read more »
-
100% Of BenNadel.com Traffic Now Flows Through The CloudFlare CDN (For Free)
Posted on May 9, 2022 at 10:31 AM
@Dan, First, thank you for the kind words! With that said, this is change is just about traffic not about hosting. I'm still hosting my ColdFusion blog over on Hostek (a managed ColdFusion host). But, my DNS for bennadel.com now resolves to CloudFlare. So, when you make a request to ... read more »
-
Generating PDF Signatures With Google Fonts And html2canvas In JavaScript
Posted on May 9, 2022 at 10:25 AM
If you notice in my JavaScript code, I have this comment and line: // CAUTION: We have to append the fragment to the body as the LAST STEP here // otherwise the .find() seems to fail. It looks like appending the template to // the body somehow clears the fragment contents. fragment.appendTo( main... read more »
-
The Value Class java.time.LocalDateTime Cannot Be Converted To A Date In ColdFusion
Posted on May 8, 2022 at 9:43 AM
@Nick, Awesome! Glad this helped out. Yeah, seems like such a strange breaking change in the driver. Or the runtime? I'm not really sure where the problem is 🤪 I just want to query my data and get on with my app!... read more »
-
Generating Meme Images In The Browser Using html2canvas In Angular 9.0.1
Posted on May 7, 2022 at 1:19 PM
@All, This morning, I just posted another example of using html2canvas on the web: generating PDF signatures as transparent PNGs: https://www.bennadel.com/blog/4262-generating-pdf-signatures-with-google-fonts-and-html2canvas-in-javascript.htm Hopefully, most people sign a PDF online... read more »
-
Considering Approaches To Handling MySQL Key Conflicts In Lucee CFML
Posted on May 4, 2022 at 2:26 PM
Ha ha... read more »
-
Considering Approaches To Handling MySQL Key Conflicts In Lucee CFML
Posted on May 4, 2022 at 1:39 PM
@Chris, "Oracle" as a database always feels like one of those "enterprise only" things. To be clear, I know nothing about it ; but, I've only ever heard it discussed in the context of massive companies.... read more »
-
Considering Approaches To Handling MySQL Key Conflicts In Lucee CFML
Posted on May 4, 2022 at 12:33 PM
@Chris, Heck yeah! SQL is just a groovy language. Now, these are all specifically for the MySQL specification; but, I'm 100% certain that all SQL variations have some form of these constructs.... read more »
-
Safely Using Array.sublist() To Generate Slices In Lucee CFML
Posted on May 3, 2022 at 2:49 PM
@Frédéric, An interesting question. I sort of just assumed that .push() is an alias for .append() . I haven't really played around with it yet. I'll have to do some digging.... read more »
-
Safely Using Array.sublist() To Generate Slices In Lucee CFML
Posted on May 2, 2022 at 12:31 PM
Fast-follow, I'm wondering if it would be helpful for ColdFusion to provide a built-in function, arrayFrom() that could take array-like and other iteratable values and turn them into native ColdFusion arrays: https://www.bennadel.com/blog/4258-for-consideration-an-arrayfrom-function-in... read more »
-
Using Array-Like Structs As Arrays In Lucee CFML 5.3.7.47
Posted on May 2, 2022 at 12:24 PM
@All, I wonder now if it would make sense for ColdFusion to just have an arrayFrom() built-in function: https://www.bennadel.com/blog/4258-for-consideration-an-arrayfrom-function-in-coldfusion.htm ... something that could take array-like and other iterable values and turn them into ... read more »
-
ArraySlice() Has An Exponential Performance Overhead In Lucee CFML 5.3.8.201
Posted on May 2, 2022 at 11:04 AM
@All, I took a quick peek at using the Array.sublist() method in ColdFusion. First, I just demonstrate what Brad already demonstrated - that mutations to the .sublist() slice also mutate the original array. But, then I look at the overall performance in the context of my large array ... read more »
-
deserializeJson() Silently Fails On High-Precision Numbers In Lucee CFML 5.3.4.77
Posted on Apr 30, 2022 at 9:38 AM
@Rupert, Very nice. And, totally agree that 99.99% of the time, JSON is Structs :D At least at the top-level. In fact, every API that I've ever created that returns anything other than a Struct at the top level, it always comes back to bite me (in terms of flexibility and ease-of-change)... read more »
-
ArraySlice() Has An Exponential Performance Overhead In Lucee CFML 5.3.8.201
Posted on Apr 26, 2022 at 6:31 PM
@Brad, I believe it would still be a net-win for performance since the problem with the current implementation of arraySlice() is that it iterates over the array to find the slice . If we reduce the "pre slice space" using .subList() , then we would get rid of that iteratio... read more »
-
ArraySlice() Has An Exponential Performance Overhead In Lucee CFML 5.3.8.201
Posted on Apr 26, 2022 at 6:26 PM
@Brad, Oh, ha ha, I just now see that your ACF bug is about treating .subList() as an Array in ColdFusion :D And, that your demo is exactly what I was suggesting 😅 Great minds think alike, clearly.... read more »
-
ArraySlice() Has An Exponential Performance Overhead In Lucee CFML 5.3.8.201
Posted on Apr 26, 2022 at 6:25 PM
@Brad, That's a great catch! Yeah, that could have / would have lead to some seriously hard-to-debug errors, no doubt. That said, you could probably do something like: [].append( collection.subList( ... ), true ) ... to create a copy of the sub-list and isolate it. That said, I'm ju... read more »
-
Managing Selections With A Dual-Select Control Experience In Angular 9.1.9
Posted on Apr 26, 2022 at 6:06 PM
@P, Ultimately, the left and right sides are just represented as Arrays. So, if you wanted to move all the items to one side you'd have to: Add all the items to the target side. Remove all the items from the source side. Sort the target side (if that makes sense for your use-case).... read more »