Re: all possible letter combinations

2008-02-14 Thread Greg Morphis
: Wed 2/13/2008 4:57 PM To: CF-Talk Subject: all possible letter combinations Given a string, e.g. ABCD I need to come up with all combinations of letters eg ABCD ABDC ACBD ACDB . And exlude strings like '', 'AAAB' unless you pass a string with duplicate characters If I

Re: all possible letter combinations

2008-02-14 Thread Ben Doom
that table to itself, three other times. Concatenate the fields and you should have each combination. That would get the first part without consideration of the second part. m!ke _ From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Wed 2/13/2008 4:57 PM To: CF-Talk Subject: all possible

Re: all possible letter combinations

2008-02-14 Thread Greg Morphis
should have each combination. That would get the first part without consideration of the second part. m!ke _ From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Wed 2/13/2008 4:57 PM To: CF-Talk Subject: all possible letter combinations Given

Re: all possible letter combinations

2008-02-14 Thread Ben Doom
To: CF-Talk Subject: all possible letter combinations Given a string, e.g. ABCD I need to come up with all combinations of letters eg ABCD ABDC ACBD ACDB . And exlude strings like '', 'AAAB' unless you pass a string with duplicate characters

Re: all possible letter combinations

2008-02-14 Thread Jeff Price
Try this chunk of code. I leave it up to you to add in a remove duplicates feature. Check cflib.org for some handy functions to do that. NOTE: I found it easier to build a list instead of an array simply because I could recurse with ListAppend but if I recurse with ArrayAppend it starts making

Re: all possible letter combinations

2008-02-14 Thread Greg Morphis
Hey that's pretty smooth. I appreciate it!! On Thu, Feb 14, 2008 at 1:27 PM, Jeff Price [EMAIL PROTECTED] wrote: Try this chunk of code. I leave it up to you to add in a remove duplicates feature. Check cflib.org for some handy functions to do that. NOTE: I found it easier to build a list

RE: all possible letter combinations

2008-02-14 Thread Bobby Hartsfield
Actually, permutation is your friend... and there are tons of code samples and algorithms out there. I'd start here. http://www.google.com/search?hl=enclient=firefox-achannel=srls=org.mozill a%3Aen-US%3Aofficialhs=mXkq=permutation+coldfusionbtnG=Search ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield

all possible letter combinations

2008-02-13 Thread Greg Morphis
Given a string, e.g. ABCD I need to come up with all combinations of letters eg ABCD ABDC ACBD ACDB And exlude strings like '', 'AAAB' unless you pass a string with duplicate characters If I pass the string AAAB then it'd return: AAAB AABA ABAA BAAA

Re: all possible letter combinations

2008-02-13 Thread Greg Morphis
yes, I know that and it's that part that I need help with which is why I posted here. Thanks On Feb 13, 2008 5:34 PM, Mark Mandel [EMAIL PROTECTED] wrote: Recursion is your friend ;o) Mark On Feb 14, 2008 9:57 AM, Greg Morphis [EMAIL PROTECTED] wrote: Given a string, e.g. ABCD I need

Re: all possible letter combinations

2008-02-13 Thread Mark Mandel
Recursion is your friend ;o) Mark On Feb 14, 2008 9:57 AM, Greg Morphis [EMAIL PROTECTED] wrote: Given a string, e.g. ABCD I need to come up with all combinations of letters eg ABCD ABDC ACBD ACDB And exlude strings like '', 'AAAB' unless you pass a string with duplicate

Re: all possible letter combinations

2008-02-13 Thread Mark Mandel
What have you got so far? Mark On Feb 14, 2008 10:58 AM, Greg Morphis [EMAIL PROTECTED] wrote: yes, I know that and it's that part that I need help with which is why I posted here. Thanks On Feb 13, 2008 5:34 PM, Mark Mandel [EMAIL PROTECTED] wrote: Recursion is your friend ;o) Mark

Re: all possible letter combinations

2008-02-13 Thread Greg Morphis
This is what I have so far.. cffunction name=createWordList returntype=array cfargument name=wordArray required=yes type=array / cfargument name=strbase default= required=yes type=string / cfargument name=remainingchars default= required=yes type=string / cfset var j

RE: all possible letter combinations

2008-02-13 Thread Dawson, Michael
each combination. That would get the first part without consideration of the second part. m!ke _ From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Wed 2/13/2008 4:57 PM To: CF-Talk Subject: all possible letter combinations Given a string, e.g. ABCD I need to come up with all