kingandy: (Wandering Blossom)
[personal profile] kingandy
There are two functions in Coldfusion for searching through a list: ListContains and ListFind.  Their operation is identical, but they differ in one small but fundamental way.

ListFind tells you if the list contains your word as an element.
ListContains tells you if any element in the list contains your word.

This has just cost me half a day's work.

ADDITIONAL: The Sims 2 are one up on City Of Heroes, by releasing their Body Shop as a standalone program (free download, no less). So, be honest. Who thinks this looks anything like me? (Clothing and hair by [livejournal.com profile] anberu!)

Date: 2004-10-13 08:16 am (UTC)
From: [identity profile] richc.livejournal.com
The fundamental existence if lists makes me want to poke whoever wrote the Coldfusion spec in the eye with a pointy stick.
Tha sort of thing above is just trying to be to clever by half, a better way to do that sort of thing is with a simple iterator and regexp, or even recursion if you're feeling like it.

Date: 2004-10-13 08:17 am (UTC)
From: [identity profile] richc.livejournal.com
Thats the language, not Andy, trying to be to clever by half.

Date: 2004-10-13 08:20 am (UTC)
From: [identity profile] stsquad.livejournal.com
Recursion is overrated. There are some places where I've found it useful for example when I wrote a calculator program in my programming for Chemists class. However get it wrong and its an easy way to smash the stack or get something running of into infinity. Like I say Recurision is overrated. There are some places...

Date: 2004-10-13 09:03 am (UTC)
From: [identity profile] richc.livejournal.com
True, but there are places where it is the only choice (XSLT for example).

March 2012

S M T W T F S
    123
45678910
11121314151617
18192021222324
25 262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 30th, 2025 05:28 am
Powered by Dreamwidth Studios