Anyways if you are looping why don't u add it like a key of structure in that
case all keys are your unique email id's.
On May 5, 2012, at 2:41 PM, Les Mizzell lesm...@bellsouth.net wrote:
I did two test using the basic code below.
First test exactly like below using a list.
2nd test,
I did two test using the basic code below.
First test exactly like below using a list.
2nd test, modifying the below to build an array instead of a list and
checking for a duplicate value in the array
The query used returned a list of close to 14,000 email addresses
Average total time in
ArrayFind() is case senstive, that is why there is an ArrayFindNoCase().
--
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543
On Fri, May 4, 2012 at 1:24 PM, Leigh cfsearch...@yahoo.com wrote:
Ever since ColdFusion 6,
ArrayFind() is case senstive, that is why there is an ArrayFindNoCase().
Yes but the indexOf(..) method is _always_ case sensitive. Also, unlike
arrayFind/FindNoCase it is data type sensitive as well. ie indexOf(15) does not
produce the same results as indexOf(15). So it is good to be aware
Not sure how you tested this, but if you have
cfset myArray = [1,2,3,4] /
cfoutput
#myArray.indexOf(1)+1#
/cfoutput
It returns the index of the value, secondly if you wish to do a case
insenstive index then it is still possible.
Lets take the following code for example that returns true or
Not sure how you tested this
Define a variable representing a number as a double:
cfset y = val(15)
cfset arr = [y]
Now run indexOf(15). The value is not found because unlike CF functions, java
lists also consider data type when determining element equality.
15
Grr.. my responses keep getting cut off. Anyway, the very last sentence was:
Honestly, I do not see the benefit of down to the java level for this.
If you are going to end up looping anyway, may as well use a native
cfloop array= It is simpler and is less code.
-Leigh
The point is that it is still possible...
--
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543
On Fri, May 4, 2012 at 8:15 PM, Leigh cfsearch...@yahoo.com wrote:
Grr.. my responses keep getting cut off. Anyway, the very last
The point is that it is still possible...
{tap, tap} Is this thing on?
-Leig
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
Leight I am not going to get into any more of a debate over this, the point
that I made is that you can use Java to do the ArrayFind to be used in
ColdFusion 6 - 8, now although you have brought up a good point any decent
developer can run with this, and write an ArrayFind to do the same thing.
Andrew - Sorry if you misunderstood me. It is not a debate. It is a simple
explanation of how the method actually works. As the earlier example
demonstrated, indexOf does not behave in a typeless manner - as most would
expect from CF - and as arrayFind/FindNoCase do. So it does quite nicely
Yeah I know which is why I agree with that point you made, I have created a
new blog post where I have taken the code for indexOf() from java and
modified it to work in this manner for ColdFusion.
--
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+:
Thanks for this post. I've not had time to get back into this yet, but
will run some experiments against the data I've got to see what actually
works best. Worst case would be three or four email addresses being
searched for in a result list of 4000 or so returned from the database.
I have
As Andrew says, it's best done in the DB before your data becomes a list.
If you can't do that for some reason, convert your list to an array and loop
over that. Arrays are much faster than long lists. The longer the list/array,
the bigger the performance difference.
- Cameron
On May 3,
When getting the information out of the database, us distinct on the
field.
Only one list is coming from the database, the other is from a
completely different source.
convert your list to an array and loop over that
The small list is the one that will have the operations done to it. The
In reading through this thread, it appears as though one of your lists (not
clear whether it's the short or long list) is sourced from database, and the
other not. But if you've got one list of key column values in a CF List var,
then you should be able to query the database to pull out
On Thu, May 3, 2012 at 12:10 PM, Les Mizzell lesm...@bellsouth.net wrote:
convert your list to an array and loop over that
The small list is the one that will have the operations done to it. The
large list is the one that I need to search for duplicate values. If the
server was running
You could also use a query-of-queries with where biglistitem not in
(smalllistitems).
On 5/3/12 1:29 PM, Cameron Childress wrote:
On Thu, May 3, 2012 at 12:10 PM, Les Mizzelllesm...@bellsouth.net wrote:
convert your list to an array and loop over that
The small list is the one that
Ever since ColdFusion 6, ColdFusion has always had the feature to do an
ArrayFind()
http://www.andyscott.id.au/2012/5/3/ColdFusion-and-using-ArrayFind-prior-to-ColdFusion-9
--
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543
Ever since ColdFusion 6, ColdFusion has always had the feature to do
anArrayFind()
True. Though indexOf() has a few additional nuances over arrayFind. It is both
case and data type sensitive.
-Leig
~|
Order the Adobe
Got an app that sends out email to various lists - CF8
I'm checking to be sure there are any duplicates between the two lists
req.this list - usually pretty small - ten or so email addresses
req.groupLIST - is the problem - it could be a500 or more addresses at
times.
cfloop
When getting the information out of the database, us distinct on the field.
--
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543
On Thu, May 3, 2012 at 2:37 PM, Les Mizzell lesm...@bellsouth.net wrote:
Got an app that sends out
22 matches
Mail list logo