Dan G Switzer II
Member since Dec 11, 2008
- Profile: /members/278-dan-g-switzer-ii.htm
- URL: https://blog.pengoworks.com/
- Comments: 194
Recent Blog Comments By Dan G Switzer II
-
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 »
-
Creating A Closure-Based Tunnel Between A Thread And A Function In ColdFusion
Posted on Nov 11, 2015 at 12:40 PM
One thing to be aware of, which has bitten me a few times with closures. A closure will not work when executed outside the request context of the original request in which is was recreated. This makes it impossible to store a closure in something like the Application scope or store it in variable t... read more »
-
Handling Plupload's Uploader Init Race Condition In AngularJS
Posted on Sep 1, 2015 at 7:24 PM
@Ben: Why not use Plupload's event system. You could use the PostInit event to set a flag in your scope that indicates that it's initialized, so your destroy can clean it up. You can also check in the PostInit event see if view is destroyed and if so, have Plupload destroy itself. That way you're n... read more »
-
Parsing AngularJS Request Data On The Server Using ColdFusion
Posted on Apr 25, 2014 at 8:23 AM
I think Angular sets the "Content-Type" request header to "application/json". To make your code more full proof, you could just add something to your onRequest event handler to look if the "Content-Type" header is "application/json" and if it is, then do your ... read more »
-
Keep Overflow Content Scrolling Unresponsive Until Clicked Using jQuery
Posted on Jan 7, 2014 at 12:09 PM
You can get the same affect w/pure CSS too: http://jsfiddle.net/dswitzer/6Ye7B/embedded/result/ I had to change the <div> to an <a> so that element would actually get focus. Tried to use a <button> element (which would be more correct) but scrolling a button element didn't seem... read more »