Ryan Guill
Member since Dec 11, 2008
- Profile: /members/70-ryan-guill.htm
- URL: http://ryanguill.com
- Comments: 11
Recent Blog Comments By Ryan Guill
-
I Wish JavaScript Had A Way To Map And Filter Arrays In A Single Operation
Posted on Jun 6, 2017 at 10:14 AM
I've elaborated here: https://www.webpackbin.com/bins/-Klxe4iaXptF4a_WpFTq But reduce is what you probably want to use - but there are libraries out there like lodash that will let you actually combine the operations so you only iterate once.... read more »
-
The Philosophy Of Extending Lodash In JavaScript
Posted on Jun 11, 2015 at 8:19 AM
Yeah, its great - I sing the praises of lodash on a regular basis, and always finding something new. Have you ever used _.template() ? Might not be as useful for you with angular, but its great.... read more »
-
The Philosophy Of Extending Lodash In JavaScript
Posted on Jun 10, 2015 at 9:01 AM
Good article ben, I haven't ever looked into lodash's mixin functionality - good stuff. Also, just wanted to throw out that you could also consider using map() for your purposes: friends = _.map(friends, function(item) { item.createdAt = _.now(); return item; });... read more »
-
ColdFusion 10 Beta - Closures And Function Expressions And Threads
Posted on Oct 24, 2014 at 2:52 PM
Tristan, I replied on your gist (im not sure if you get notifications for that or not) - this seems to be a compile (syntax parse) error with that code. Certainly strange! Simplified example: https://gist.github.com/ryanguill/6ee21d821e9af59ecd57... read more »
-
Rule Of Thumb: Always Define And Consume An ArgumentCollection Map In A Single Context
Posted on Oct 14, 2014 at 8:39 AM
If you are going to do the intermediate step, you can clean it up a little: var inputs = { a = rc.a, b = rc.b, c = rc.c, d = "Dang" }; fwiw, I go back and forth between the different sides of this argument. I like being declarative and self-documenting, but I also like to... read more »
-
ColdFusion 10 Beta - Closures And Function Expressions And Threads
Posted on Sep 22, 2014 at 9:34 PM
Great resource ben, just so happened to be doing a lot of this stuff today. Just fyi though, you can compare equality of objects and functions using .equals(). See: https://gist.github.com/ryanguill/cc083242d3f2700a7767... read more »
-
Getting The Decimal Part Of A Number In ColdFusion
Posted on May 7, 2007 at 9:18 AM
I didn't do speed tests, but why not this? <cfset number = 3.14159 /> <cfset decimal = number - int(number) /> <cfdump var="#decimal#">... read more »
-
Force ColdFusion Server To Recompile A ColdFusion Template
Posted on May 2, 2007 at 8:22 PM
Chances are its not coldfusion that is not recompiling, it is probably the webserver itself (apache, iis, etc). If the filesize doesn't change, sometimes it wont pull the file again. One time, I was even getting a 404 not found error on a file that I knew existed and I was beating my head on the ... read more »
-
Could Not Unlock The Names Lock "GOOGLE.TXT" Because No Lock Is Known By That Name
Posted on Jan 30, 2007 at 7:55 AM
Is this code recently written? the name google.txt seems strange to me, only because it possibly may be that cf is thinking that is a variable of some sort? Does it error every time, or just once in a blue moon?... read more »