Skip to main content

Adam Fairbanks

Member since Dec 11, 2008

Recent Blog Comments By Adam Fairbanks

  • Ask Ben: Delete Values In A Given List Using ColdFusion

    Posted on Jan 29, 2008 at 5:41 AM

    @David Good catch. Here's a method using a regular expression: <cfset thelist="1,21,2,1,1,4,1,1,22,2,2,82,26,3,33,3,4,4,94,4,2,ab4,5"> <cfset itemstodelete="1|2|4"> <cfset delimiter=","> <cfset thelist=ListChangeDelims(thelist,chr(7)&chr(7),delimiter)> <cfset thelist=RER... read more »

  • Ask Ben: Delete Values In A Given List Using ColdFusion

    Posted on Jan 29, 2008 at 2:48 AM

    Here's the most succint solution I can think of: <cfset thelist="1,2,1,1,1,1,2,2,2,2,2,3,3,3,4,4,4,2,4,5"> <cfset thelist=ReplaceNoCase(thelist," 2 ","","all")> <cfset thelist=REReplace(thelist,",{2,}",",","all")> <cfoutput>#thelist#</cfoutput> If you want to replace ... read more »

  • ColdFusion NumberFormat() Exploration

    Posted on Aug 14, 2007 at 1:48 PM

    Brett - I believe if you add YesNoFormat(), it should handle all the boolean options: #NumberFormat(YesNoFormat("1"))# = 1 #NumberFormat(YesNoFormat("true"))# = 1 #NumberFormat(YesNoFormat("yes"))# = 1 #NumberFormat(YesNoFormat("0"))# = 0 #NumberFormat(YesNoFormat("false"))# = 0 #NumberFormat(YesNo... read more »

  • Exploring ColdFusion InputBaseN() And FormatBaseN() Functions

    Posted on Aug 13, 2007 at 1:05 PM

    Very nice! This will help me when converting colors in some server-side font and image manipulation tools I use that require decimal color values. I know a lot of hex color values by heart, but not many equivalent decimal values.... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel