I set it up so the init function calls the recursive methods
"generateSiteMap" and "generateBreadCrumbs" - those are both stored in the
variables scope of the cfc and an instance of the cfc is persisted in the
app scope. getSiteMap returns the entire site structure in a sorted tree
form ready to us
I know this is likely mentioned in one of the posts and I missed it... but
why wouldn't you just create a UDF that calls itself for the recursive
function? The udf can be run as a part of a CFC and then inside the CFC it
would call itself... right. (Or the primary UDF would call an internal UDF
tha
Sometimes implementing an algorithm with a loop makes for horrendous
code whereas recursive code can be elegant and simple - consider
algorithms for processing tree-structured data!
It depends. Recursion relies on function calls which can be expensive
(creating a stack frame, pushing variables
> Do a walk of the tree, maintaining a list of nodeIDs (pageID or something)
> that grows and shrinks as you walk.
Ummm ... sounds like i SHOULD know what this means but i don't. Not familar
with the term 'walk' in programming speak. How does the list grow and shrink
When you find your node (the
Yeppers, thats what I meant. Thanks again.
Justin
-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 4:45 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Argument Collection?
On Dec 1, 2003, at 2:46 PM, Justin Balog wrote:
> schema.myStore
On Dec 1, 2003, at 2:46 PM, Justin Balog wrote:
schema.myStoredProcFunction(argumentCollection=argument.individualObj.g
etIns
tanceMemento)
Will that work?
You mean getInstanceMemento() I assume. Yes, that should work just fine.
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not an
Pruning a tree is a bitch, let me tell you. I've yet to come up with a
solution that only requires a single walk of the tree.
Do a walk of the tree, maintaining a list of nodeIDs (pageID or something)
that grows and shrinks as you walk. When you find your node (the current
page), abort the walk.
> If you are looking to do a data recursion... you could glean from some
> speedy data tree concepts like this also... if not... it will
> help you with
> data recursion when you get there.
>
> http://www.sitepoint.com/article/1105/2/session
I've just got to say I'm a huge fan of the method descri
I'm caching the results of a few recursive function in an object that create
a tree structure of the site nav and a linked breadcrumb trail for each page
in the site. So the performance hit is only taken once in a great while. I
DO have to agree with Sean that the code is much more elegant, and the
I just used that for illustration. My schema (storedproc functions)
requires args, and not structs. So I wanted to do something like.
schema.myStoredProcFunction(argumentCollection=argument.individualObj.getIns
tanceMemento)
Will that work?
Justin
-Original Message-
From: Sean A Corfi
That works Justin. I have paired arguments in script syntax all over the
place. Just remove the quotes if those are NOT literal values and you're
set.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Justin Balog
> Sent: Monday, December 01, 2003 11:10 P
On Dec 1, 2003, at 2:09 PM, Justin Balog wrote:
I want to rewrite
Any syntax for that?
Why not:
(assuming those really are the 1st and 2nd argument)
Or:
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really
someStruct = StructNew();
someStruct.arg1 = "balh";
someStruct.arg2 = "foo";
myobj.myMethod(argumentCollection=someStruct);
-- Original Message --
From: Justin Balog <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 1 Dec 2003 15:09:49 -0700
>
On Dec 1, 2003, at 1:47 PM, Patrick Branley wrote:
This is a very good point. Anything that can be done with recursion
can also
be done using a loop.
Sometimes implementing an algorithm with a loop makes for horrendous
code whereas recursive code can be elegant and simple - consider
algorithms f
Thanks!
-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 3:14 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Argument Collection?
On Dec 1, 2003, at 2:01 PM, Justin Balog wrote:
> I know it has been asked here before, and I looked throug
I want to rewrite
Any syntax for that?
-Original Message-
From: Kevin Pompei [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 3:12 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Argument Collection?
in CFInvoke use the argumentCollection attribute, and set it to the name of
On Dec 1, 2003, at 2:01 PM, Justin Balog wrote:
I know it has been asked here before, and I looked through the mail
archive
for it. What is the syntax for passing in all arguments at once as a
collection?
func(argumentCollection=someStruct);
Note that it doesn't work for super.func() calls (you
in CFInvoke use the argumentCollection attribute, and set it to the name of the struct
that contains your arguments.
-- Original Message --
From: Justin Balog <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 1 Dec 2003 15:01:32 -0700
>
>Howdy,
It appears that we do have the X libraries on the machine. It also appears
we have fonts on the machine, so I'm still mystified by the problem.
Again, any input from anyone is appreciated.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Barney Boisvert
Howdy,
I know it has been asked here before, and I looked through the mail archive
for it. What is the syntax for passing in all arguments at once as a
collection?
Thanks,
Justin
--
You are subscribed to cfcdev. To unsubscribe, send an em
>It's really simple, but (I thought) it was a great way to show that there
is
>nothing magical about recursion, just a different way of doing a loop.
This is a very good point. Anything that can be done with recursion can also
be done using a loop. Recursion just makes your code cleaner (and mayb
I'm pretty sure you're right. On linux (or any nix, I'd image), you have to
have various parts of X (or some other gui system) installed on the machine
for certain things to work. Fonts, in particular, require font libraries to
be available. I ran into the same problem trying to use CFCHART on a
Well I've made progress - I've got ImageJ up and running but it fails on
writing text onto an image. I'm running RedHat 8.x on an x86 machine.
What I'm getting is java.awt.HeadlessException.
I'm guessing that there's something missing - like font outlines - to do the
rendering with. Anyone kn
If you read the technote I posted on that blog entry, MM basically
says that there's a way to do it without installing xfree86, but you
have to specifiy headless options so that java can pick up the duties
of doing it instead. Please note that if you do this, cfchart will no
longer work.
For
Thanks everyone for the input on this.
Justin
-Original Message-
From: Nando [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 5:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] memento and composition
I don't know if this helps, but even though it looks "complicated", in
pr
Jeff Battershall wrote:
Todd,
Thanks a bunch. Couple of questions - where do you have the ij.jar file
located? What version of the ij.jar are you using?
CFusionMX\wwwroot\WEB-INF\lib\
Whatever the latest is, I haven't been paying attention to imageJ in
awhile so, if there's something new
Todd,
Thanks a bunch. Couple of questions - where do you have the ij.jar file
located? What version of the ij.jar are you using? Other than the fix
described, was there anything else required? In certain posts I've read, it
made it sound like Xfree86 was needed and freetype as well. Where wo
I am wondering how/whether I should expose data
validation information for arguments passed into my
components.
I may be running a risk of being too abstract or
re-inventing the wheel, but it seems to me that since you
want to use your Rules for two different purposes (to Apply
them and to Rend
I did. http://blog.web-rat.com/archives/000171.cfm
Jimg also works as well.
Jeff Battershall wrote:
Hello everyone,
It's 7 months later - did anyone get ImageJ working on Linux?
Jeff Battershall
[EMAIL PROTECTED]
--
Todd Raffe
Hard and fast rule about writing recusive functions and methods: you ALWAYS
have to have a conditional (usually an if statement) based on the function
parameters (directly or indirectly) where one branch calls the function
recusively, and one branch does not. Both branches MUST be possible to
exec
Hello everyone,
It's 7 months later - did anyone get ImageJ working on Linux?
Jeff Battershall
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Westin, Ken
Sent: Friday, April 25, 2003 11:26 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev
If you are looking to do a data recursion... you could glean from some
speedy data tree concepts like this also... if not... it will help you with
data recursion when you get there.
http://www.sitepoint.com/article/1105/2/session
John Farrar
- Original Message -
From: "Sean A Corfield" <
On Nov 30, 2003, at 11:25 PM, Nando wrote:
I got a recursive function working to generate a site map today based
on an
example i found, (very cool how that works! many thanks go to Barney
Boisvert for the original idea), but i'm not sure i could have come up
with
that on my own. Does anyone know
On Nov 30, 2003, at 11:38 PM, Nando wrote:
Is there any way i can find out how much memory this object is taking
up?
Not easily. But I wouldn't worry too much about it. We use server,
application and session scope quite a lot (for heavier tasks than
you're talking about) and at peak traffic we h
I've been developing a cfc that generates various recordsets and structures
to be used by the whole site, basically pertaining to navigation. i've
placed an instance of the cfc in the application scope, and within the cfc,
these structures and recordsets are generated and placed in the variables
sc
I got a recursive function working to generate a site map today based on an
example i found, (very cool how that works! many thanks go to Barney
Boisvert for the original idea), but i'm not sure i could have come up with
that on my own. Does anyone know of any good resources on recursive
functions?
36 matches
Mail list logo