Re: question on cfloop
> > Do you ever manipulate somearray inside the loop? I am not sure if > #ArrayLen(somearray)# is evaluated once or at each looping. > The expressions passed to tags are evaluated first, then passed into the tag code. So in this case it's not the expression "arrayLen(someArray)" that's passed into the tag's code, it's the value of "arrayLen(someArray)", for example "2". So the TO value is immutable once it's first evaluated. A conditional loop is different, in that the string that is the condition is passed into the code, not the result of it at the time the tag is called, eg: It's "someVar LE 3" that's passed to , not the result of "someVar LE 3" (which would be TRUE initially). -- Adam ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354749 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
> I've never used the loop index, and I don't think you should depend on it. > Not sure what documented behavior is, but if it isn't documented in a > specific way, it would be totally appropriate for it to go out of scope in > a future version (kinda surprised it doesn't) > > Instead, use your own counter var. > Sorry mate, I strongly disagree with this. The index variable is * specifically* there to be used. Using an additional counter variable is just tautology. You say "if it isn't documented...", but it is. Clearly so: http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-71aa.html I would potentially agree that using it outside the loop (ie: after the end of it), might not be a good idea, because some languages only maintain the index variable within the loop code. That said, CFML is not one of those languages. -- Adam ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
It's the way index-based loops work. At the first pass of the , the INDEX variable is created with the initial value, and the condition (in this case the condition is an implicit "index variable value <= TO value"). If the condition is true, the loop block is entered. At the bottom of the loop block, execution is returned to the top of the block, the index variable is incremented by the STEP value (the default being 1), then the condition is evaluated again. If the condition is met, we're back into the loop block; if not, processing skips down to the first statement after the block. If you desk-check this, you will see that on the last iteration of the loop, the index value will be incremented beyond the bounds of the TO value, making the loop exit. So its final value will always - intrinsically - be higher than the TO value, by the amount of the STEP value. It's just how these things work. -- Adam On 1 March 2013 00:46, funand learning wrote: > > I am sorry, I wasn't clear. the "to" is arraylen. Sometimes the arraylen is > 1 > > > > > > #j# --this returns 2 > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354747 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: danger of Flash files?
> What danger is there in having Flash FLV files in with your application > code? I know about Flash player vulnerabilities, but are there any issues > with the FLV files themselves? > > Generally we like to keep code and content separate, but the question came > up about security, too. There is no danger to you in having FLV files in the same directory as server-side code. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354746 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
for (var j = 1; local.j lte ArrayLen(local.somearray); local.j++) { WriteOutput(local.j); } Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book "The best way to predict the future is to help create it" On 2/28/2013 7:22 PM, fun and learning wrote: > I have a query on looping in coldfusion.Why does the below loop run twice? > > > #j# > > > I thought the above code should return only 1, but it returns 1 2 > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: question on cfloop
Do you ever manipulate somearray inside the loop? I am not sure if #ArrayLen(somearray)# is evaluated once or at each looping. -Original Message- From: listmas...@houseoffusion.com [mailto:listmas...@houseoffusion.com] On Behalf Of funand learning Sent: Thursday, February 28, 2013 4:47 PM To: cf-talk Subject: Re: question on cfloop I am sorry, I wasn't clear. the "to" is arraylen. Sometimes the arraylen is 1 #j# --this returns 2 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354744 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
Not sure, but I believe the index at loop completion is incremented - that's how it knows how to stop. So it's similar to j=1; while(j<2) { j++; } I've never used the loop index, and I don't think you should depend on it. Not sure what documented behavior is, but if it isn't documented in a specific way, it would be totally appropriate for it to go out of scope in a future version (kinda surprised it doesn't) Instead, use your own counter var. Billy Cravens bdcrav...@gmail.com On Feb 28, 2013, at 6:46 PM, funand learning wrote: > > I am sorry, I wasn't clear. the "to" is arraylen. Sometimes the arraylen is > 1 > > > > > > #j# --this returns 2 > > On Thu, Feb 28, 2013 at 6:34 PM, Phillip Vector > wrote: > >> >> Why are you looping from 1 to 1? That isn't a loop. >> >> On Thu, Feb 28, 2013 at 7:22 PM, fun and learning >> wrote: >>> >>> I have a query on looping in coldfusion.Why does the below loop run >> twice? >>> >>> >>> #j# >>> >>> >>> I thought the above code should return only 1, but it returns 1 2 >>> >>> >> >> > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
I am sorry, I wasn't clear. the "to" is arraylen. Sometimes the arraylen is 1 #j# --this returns 2 On Thu, Feb 28, 2013 at 6:34 PM, Phillip Vector wrote: > > Why are you looping from 1 to 1? That isn't a loop. > > On Thu, Feb 28, 2013 at 7:22 PM, fun and learning > wrote: > > > > I have a query on looping in coldfusion.Why does the below loop run > twice? > > > > > >#j# > > > > > > I thought the above code should return only 1, but it returns 1 2 > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354742 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
not on Railo 4 is this the whole script? is it in at Custom Tag? On 1 March 2013 08:22, fun and learning wrote: > > I have a query on looping in coldfusion.Why does the below loop run twice? > > >#j# > > > I thought the above code should return only 1, but it returns 1 2 > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354741 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: question on cfloop
Why are you looping from 1 to 1? That isn't a loop. On Thu, Feb 28, 2013 at 7:22 PM, fun and learning wrote: > > I have a query on looping in coldfusion.Why does the below loop run twice? > > >#j# > > > I thought the above code should return only 1, but it returns 1 2 > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354740 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
question on cfloop
I have a query on looping in coldfusion.Why does the below loop run twice? #j# I thought the above code should return only 1, but it returns 1 2 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354739 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
question on cfloop
I have a query on looping in coldfusion.Why does the below loop run twice? #j# I thought the above code should return only 1, but it returns 1 2 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354738 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Localization , French Accents...
Thanks Paul! -Original Message- From: Paul Hastings [mailto:p...@sustainablegis.com] Sent: February-27-13 5:31 PM To: cf-talk Subject: Re: Localization , French Accents... On 2/28/2013 3:05 AM, Brook Davies wrote: > > Sorry, Unicode/utf-8 are the same thing...my mistake.. they're not the "same thing". unicode is a *standard* (the unicode consortium produces a book "the unicode standard"). utf-8 (UCS Transformation Format 8 bit) is one *encoding* implementing that standard, there are others. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354737 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: EXF Photo Information
On 2/28/2013 2:28 PM, AJ Mercer wrote: > > Railo 4 is now using Sanselan library > http://commons.apache.org/proper/commons-imaging//index.html that's pretty slick. i've used that lib to write EXIF (geo-locations mainly) to images. the problem is that there are *so* many metadata dirs & tags that beyond the commonly used ones, users have to manually supply dir/tag info. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354736 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm