Dan G. Switzer, II
Member since Dec 11, 2008
- Profile: /members/278-dan-g-switzer-ii.htm
- URL: https://blog.pengoworks.com/
- Comments: 198
Recent Blog Comments By Dan G. Switzer, II
-
Considering The Ergonomics Of Tags And Objects In ColdFusion
Posted on Jan 4, 2024 at 1:54 PM
Why not just create a generic "retry" wrapper that would retry any block of code any time an exception is thrown? That way you could use it for any problem. You could have something like: retry attempts="10" { // code to retry here retrycatch { // something to do when a... read more »
-
Using A Closure To Encapsulate CFThread Execution And Error Handling In ColdFusion
Posted on Nov 17, 2022 at 1:38 PM
@Ben, Things may have changed in ACF, so I might be wrong, but I think you have some potential issues that would make this not thread safe. I know that in ACF, the closure is used to hold references to the current request, so if any of the variables your closure is relying on die after the... read more »
-
Proxying Gravatar Images For Better Avatar Caching In ColdFusion
Posted on Nov 7, 2022 at 3:03 PM
If you're using Nginx, you could also use it to proxy the requests: https://woorkup.com/load-gravatars-from-cdn/ Doing it from the webserver would be my preferred method, since it already has mechanisms for doing the task and should be much more efficient at the task.... read more »
-
A Relational Database Table To Prevent Double Form-Submissions In ColdFusion
Posted on Jun 10, 2022 at 12:28 PM
This is called a "nonce": https://www.techtarget.com/searchsecurity/definition/nonce... read more »
-
Ignoring Loopback WebSocket Events From Pusher In Lucee CFML 5.3.8.206
Posted on Feb 18, 2022 at 2:22 PM
For anyone implementing something similar, keep in mind that you can't use X-Browser-UUID for any kind of authentication/verification. So you would not want to use a session ID or anything like that because you'd be announcing this value to all clients listening to the websocket. I'd sug... read more »
-
Using jSoup To Inject Section-Title Anchors In ColdFusion 2021
Posted on Feb 10, 2022 at 12:39 PM
I'm sure you know this, but for other readers, you don't need an anchor tag to link to headings on a page. Any element with an id attribute can be linked to view the hash in the URL. So you could generate the id attribute on the heading tags themselves. This can open up the options. If y... read more »
-
CFThread "ElapsedTime" Is Not "Processor Time" In Lucee CFML 5.3.8.201
Posted on Sep 23, 2021 at 9:10 AM
@Ben: This definitely seems like a Lucee bug to me, but I believe Lucee states that all compatibility differences should be considered a bug so I'd recommend filing this bug w/Lucee: https://luceeserver.atlassian.net/... read more »
-
TimeMachine-Inspired Progress Indicator Using CSS Keyframes Animation
Posted on Jul 6, 2021 at 8:04 AM
@Ben, I'm glad it was helpful to you!... read more »
-
TimeMachine-Inspired Progress Indicator Using CSS Keyframes Animation
Posted on Jul 6, 2021 at 7:34 AM
Ben, I think the reason it's jerky is because the keyframes are overly complex. Since your parent container is hiding the overflow, I'd just move the inner element outside the viewable area, so start the progress meter outside the viewing area and then on the "right" of the animation, pu... read more »
-
Strange Variable-Name Error When Writing To Base Tag In Adobe ColdFusion 2018
Posted on Jun 16, 2021 at 7:58 AM
I wonder if this in another place where (the seldom used, at least I rarely use it), setVariable() might solve the issue. There seem to be a lot of weird differences in how ACF/Lucee handle scope assignment and setVariable() seems to behave consistently (at least in my findings) between ... read more »
-
Celebrating The Power And Simplicity Of CSV (Comma Separated Value) Data In Lucee CFML 5.3.7.47
Posted on Apr 24, 2021 at 7:31 AM
If you're generating really large datasets, wrapping all values in quotes can really grow the files size. You should only need to wrap values when they contain double quotes, commas or a CRLF. I was just working on generating CSVs this week that contains hundreds of thousands of rows and onl... read more »
-
Using Constants To Help Clarify Boolean Arguments And Return Values In ColdFusion And JavaScript
Posted on Aug 22, 2020 at 6:28 AM
Personally, I think this would be overly verbose. The code comments already explain what it does. If you wanted more inline clarity you could always do something like: return true /* FILTER_IN */; or return true /* INCLUDE */; I just think the code is going to end up getting littered wit... read more »
-
The canonicalize() Function Will Decode Strings That "Loosely Match" HTML Entities In Lucee CFML 5.3.5.92
Posted on May 14, 2020 at 8:46 AM
@Ben, What you could do is parse the URL (using something like https://blog.pengoworks.com/index.cfm/2006/9/27/CFMX-UDF-Parsing-a-URI-into-a-struct ), then sanitize the parts separately, then join them back to a URL.... read more »
-
The canonicalize() Function Will Decode Strings That "Loosely Match" HTML Entities In Lucee CFML 5.3.5.92
Posted on May 14, 2020 at 7:54 AM
Since the point of the canonicalize() method is to try to sanitize string and make them safe from XSS exploits (which encodes normalizing multiple encoded strings), I would say this would be the expected behavior. Since browser can interpret the strings as HTML entities, it makes sense canon... read more »
-
Behavior Change Of AutoComplete = "Username" In Recent Chrome Update
Posted on Apr 8, 2020 at 7:04 AM
I suspect this is because you have a login saved for the site you're running your demo on so it's suggesting the username saved in the Google native password manager. Once you vary from the saved username, it starts showing you the previous entries for similarly named fields (like it used ... read more »
-
Desktop Safari Seems To Add Extra Padding To CSS Flexbox Item Inside List Item
Posted on May 30, 2019 at 8:14 AM
I believe that Webkit is not ignoring the whitespace around your HTML. I bet if you remove the whitespace between your tags, the problem goes away.... read more »
-
Using Java's AtomicInteger To Loop Over A Range Of Numbers In ColdFusion
Posted on Mar 20, 2018 at 8:49 AM
Oops... Sorry missed that. Not enough caffeine yet apparently :)... read more »
-
Using Java's AtomicInteger To Loop Over A Range Of Numbers In ColdFusion
Posted on Mar 20, 2018 at 8:35 AM
@Ben: It appears you still have a race condition around the following statement: var currentValue = counter.get(); The problem is you could have multiple threads read this input and get back a value (let's say 4). The first thread that hits compareAndSet() will succeed, but the other threads wi... read more »
-
ColdFusion Can Safely Pull-Through NULL Values In Function Return Statements
Posted on Feb 26, 2016 at 9:52 AM
The behavior of "intermediary_return_value" drives me nuts. It makes working with the language, at times, so much more difficult than it should be.... read more »
-
Experimenting With ExtendedInfo To Aggregate Error Information In ColdFusion
Posted on Dec 9, 2015 at 9:07 AM
@Ben: The one problem with using serializeJSON() is that serialization bugs could result in the "catch" being transformed in some ways that might end up being misleading when debugging. It might be better to serialize the catch using ByteArrayOutputStream, then store it as Base64 (see ht... read more »