Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Neotoxin #1
Nested arrays & probability
Let say I have a 2D array;
myarray[1][1]="A"
myarray[1][2]="B"
myarray[1][3]="C"
myarray[2][1]="D"
myarray[3][1]="E"
myarray[3][2]="F"
Neotoxin Guest
-
Nesting Arrays within arrays.
How do i nest an array inside another array? something like array(i).aray2(j); Can I do that? -
XMLConnector complex example with nested arrays
I'd like to use an XMLConnector and a dataset to consume the following XML structure: <dataset timestamp="2005-12-16T15:23:15.00"> --<region... -
simple probability problem using PERL
Hi If I want to randomly generate a dice (4 side) roll, I can use the following expression: $roll = 1 + int( rand(4)); This assumes that... -
#25262 [Bgs]: Nested arrays in POST not processed correctly
ID: 25262 User updated by: jal at ambitonline dot com Reported By: jal at ambitonline dot com Status: Bogus Bug... -
Make Huge $$$$'s through Statistics & Probability
First off, I don't need your money, What I need is for you to PAY ATTENTION. THAT IS ALL. I will show you how I make a 100% profit on 75% of my... -
jdeline #2
Re: Nested arrays & probability
First of all, you can not use the "+" to concatenate two alphabetic strings. You must use "&":
nextarray[1]=myarray[1][1] & myarray[2][1] & myarray[3][1] &...
jdeline Guest
-
Neotoxin #3
Re: Nested arrays & probability
Ok. I'll take note, but can someone show me how to make those loops...
Neotoxin Guest
-
Neotoxin #4
Re: Nested arrays & probability
Btw, I forgot to mention that the same thing can be done using index looping,
if I'm using 1D array that contain lists, for example:
<cfset myarray=ArrayNew(1)>
<cfset myarray[1]="A,B,C,D">
<cfset myarray[2]="E,F">
<cfset myarray[3]="G,H,I">
<cfloop index="p" list="#myarray[1]#" delimiter=",">
<cfloop index="q" list="#myarray[2]#" delimiter=",">
<cfloop index="r" list="#myarray[3]#" delimiter=",">
<cfoutput>#p##q##r#<br></cfoutput>
</cfloop>
</cfloop>
</cfloop>
The only problem is, by using that method, the number of nested loops depend
on the myarray's length. What if the myarray's length is dynamic (could be
1,2,3,...or 100 maybe)?. Is it possible to use a predefined template and use
<cfinclude> inside the loop? If it is, how would I do it?
Neotoxin Guest



Reply With Quote

