Is there a way to test for the first call of a function?
HelloI created a function (using other functions I created) to generate a dynamic hierarchy tree menu based on parentID and itemID etc etc - I'm sure you are familiar with this concept. It works very well, and there is no problem.
However, I do all this build in a string, and then dumped on the page. Again, this works very well. However, because the function is called recursively, my class, the class = 'tree' repeat itself in each occurrence of the opening UL tag.
I want to only this class to be applied to the first UL, but because it is recursive, I don't know how to detect if the function is called for the first time or 5th time, etc.. I mean something like:
< cfif myFunction is called the first time >
Add the class
< cfelse >
do not add the class
< / cfif >
Please see my attached code. It is fully functional. Please don't worry that all the other functions do etc, they work very well, but I need a way or a variable to test against.
Any ideas?
Thank you very much
Michael.
Kapitaine wrote:
> Hmmm, I bet that the solution is simple, but my mind is frazzled! Haha.
>
Yes, it's simple, you test the Boolean value and it will be true if it is
set to true for a recursion.
Tags: ColdFusion
Similar Questions
-
Geocoding takes VERY long for the first call in each session
Hello
We are moving to a system of very short response time where the user sends a query via mobile phone to our based Oracle server and the response THAT SMS must return a list of points of interest at a certain distance from the mobile phone.
Previously we were using Oracle 9i, now we went to 10g (EE 10.2.0.4.0). Given that 10g supports geocoding out of the box, we intend to use it. What we are experiencing, this is when we create a new session, and then the first geocoding/reverse_geocode call takes about 1 minute in our test environment (that means 100% CPU load on the side of Oracle Server), the following calls are in the [http://0.1.. 0.6] second intervals. We only use sdo_gcdr.reverse_geocode () and sdo_gcdr.geocode () procedures.
In a space book, we found:
+ "Note: the first call to a function of geolocation in a session requires several time (is longer) than subsequent calls." +
"+ Is because the function must load and analyze arrays of profile". +
Profile of tables do not change, why is he not analyzed at the start of the RDBMS and only once, not for each session?
Is there a solution?
Kind regards
Tamas Szecsy
Published by: Tamas Szecsy on March 7, 2009 10:30
Published by: Tamas Szecsy on March 7, 2009 10:30
Published by: Tamas Szecsy on March 7, 2009 10:41The patch that I suggest is precisely to allow the geocoder to work effectively in many countries. Its effect is to only load the profile for the country being geocoded. If profiles are loaded progressively as needed, avoiding the High overload at the beginning. With this patch, the first geocode a meeting is second.
The time you specify (a minute for the first geocoded in a session) clearly indicate a problem. If this problem is not with bad indexes on the table of the region, you can check the box caching (CACHED_ADMIN_AREA_LEVEL in GC_COUNTRY_PROFILE should be 0).
I think yiou need to capture a complete SQL trace of this first geocoded, so we can diagnose accurately what is happening.
Albert
-
Is there a way of locking for the Evaluation Version?
Hi guys,.
I was wondering if there is the "Lockdown" Mode for the trial version of ESXi 4.1 version? I can't seem to allow option as when I F2 to customize the system, the option is not selectable, and there is no option found in the vSphere 4.0. Any help would be appreciated. Thank you!
As mentioned, lock Mode have meaning when it is managed by vCenter. I think you're confused vCenter, vSphere and vSphere vSphere Client is simply the name of the 4th generation, before the vSphere platform, he was named Virtual Infrastructure. ESX and ESXi are the hypervisor platform and vCenter is the management system that allows you to manage multiple ESX (i) hosts. You can also directly connect to a host ESX (i) using the customer who is just a client based on windows to connect to your vSphere host. You can use the same client to connect to a vCenter server that have different capabilities for a single host.
When you join a host to vCenter, a special user account is created called "vpxuser" in configuration and change management can be delegated to the host rather than using the root account. It also prevents users to connect directly to the host to make the changes, all connections must be made by vCenter to perform operations on a given host. For ESXi, you then have the option to activate the Mode of locking as described above. You cannot activate the lock Mode is because it is not attached to vCenter, it is a requirement to make this feature available.
I hope that makes sense.
Here is a screenshot of what you would see if you have joined your ESXi, vCenter for the first time host: http://virtualizationreview.com/blogs/everyday-virtualization/list/~/media/ECG/vrt/090910vr_van01.ashx
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
is there a way to tell if the person calling me is really using an iPhone.
A person calls me a phone which, said, is an iPhone, yet when I text, my outgoing text does not appear in blue, what he does with everyone who has an iPhone. In addition, I get the text of the message undeliverable. So my questions are: 1) is there a way for me to verify that the person calling is the use of an iPhone, and 2) if indeed it is an iPhone, why the text would not delivered? Even if the person was using a droid, the text should go.
There is no way to determine what type of phone a person uses when they call you. As iMessage versus SMS is, if the person who uses an iPhone does not choose to have iMessage activated, so you would not get the opportunity to send a message as an iMessage, he would send as a normal SMS. If the message is not delivered, it could be for any number of reasons, connection problems, the lack of a SMS plan on one of the devices, etc. Can send you a SMS? If so, can answer you?
-
Is there a way to automatically assign the first fields of each page for each participant?
I send you a document to three people to sign and each person needs to initial each page. Is it possible to automatically add an initial field on each page for each participant, or do I have to drag the initial field to each page for each participant?
It is a unique document, BTW.
Hello Joannaw75509803,
You must manually add each original field at the location in the document and also, if you wish, you can use text tags that you add to the document before downloading in EchoSign and form fields would be created automatically. This is the same documentation:
https://helpx.Adobe.com/document-cloud/help/adding-Esign-services-agreement-fields.html
Kind regards
-Usman
-
Hello.
I need to find 500 + images of lightning, generated with the 'advanced Flash' effect in AE6. I need to have the output vector in the form of a record of centrline. Is it possible to achieve by automation, as I don't have the luxury of time to accomplish this task by hand. Thanks in advance for any advice
Andy
I THINK - I don't know for sure – you can copy traces of EI mask in Illustrator. If it is possible, here's what I'd do to remove a part of boredom.
Remove any sort of glow of the lightning. Do the pure white bolt lightning. Then use the AE Autotrace. The resulting layer will be traced to mask for lightning... you could use in Illustrator.
This is not automatic, but it's better than a poke in the eye with a sharp stick.
-
00 days remind I havnt yet used, I just downloaded, crazy
Hi annoyedd080,
If the trial version shows as expired, then it expired. There is no way to prolong the trial.
You will find more details on the Adobe trial software has expired at the beginning -http://helpx.adobe.com/x-productkb/global/trial-software-expired-early .html.
-
When I try to download the trial version or whatever it is on the page of adobe it brings me to a blank page and nothing happens. What should I do?
Hi maple,
try to download creative Cloud Dekstop applications and run it, you can install after effect here.
concerning
Deto
-
Is there a way to "TURN OFF" the concept of cloud for another user does not see a confidential pdf in their queue?
I tried to contact technical support to the 800-833-6687 but was put through several automatic guests and disconnected.
Hi plumasca,
Refer to this topic for help disable features/services online in Acrobat/Reader DC?
Kind regards
Nicos -
Is there a way just to have one or two applications, for example first pro cc or the two sequels. But I see LL is Photoshop for 9.99 per month, is there a way I can get just first pro cc only for 9.99 or something like that? I don't
# Photography is one of its kind special promotion. There is no other package prioritized at a similar discount. You can get single app or CC full plans.
Mylenium
-
Is there a way to pay for multiple images to in the same transaction rather than one by one?
Is there a way to pay for multiple images to in the same transaction rather than one by one?
Right now only at a time is supported.
-
I created a form with fields default text for a user to update/customize. Is there a way to style of the text, so I can quickly identify the changes to the default text in a field?
You can use a validation script customized to each text field that looks like:
event.target.textFont = event.value = event.target.defaultValue? font. HelvI: fonts. Helv;
This will make the text italic (Helvetica) when the field value is the value default and regular otherwise. There are other properties that you can use instead, as the field color, border width, background color, text or text size...
-
Search for "blackle". Is there a way to auto-noir the bottom of each page visited?
I like the idea of using a black background instead of white on my devices. I'm saving the planet and my eyes. Is there a way to display all the origins of the auto-noir site? And I suppose that, by extension, the white of the text? I understand the images on the page would remain in their original colors, and that's fine. I see a blank page and I want to paint it black.
People have experimented with modules in this direction over the years. Some who always seem to be maintained are:
https://addons.Mozilla.org/firefox/addon/night-mode-Pro/
https://addons.Mozilla.org/firefox/addon/aniverto/
https://addons.Mozilla.org/firefox/addon/eyeguard/
This allows you to switch between different color profiles and is probably a little more of "brute force":
-
I bought a gift card from Apple Store by mistake - I was intending to buy an iTunes gift card. Is there a way I can exchange the Apple Store Gift card for iTunes card?
You must ask to whom he sold.
-
IS THERE A WAY TO MAKE EDITING THE PARAMETERS EASIER TO HAVE FCP TO PUBLISH EACH SCHOOL SETTING?
IS THERE A WAY TO "PUBLISHED IN THE WORLD" A WHOLE PROJECT OR AT LEAST PARAMETERS?
Is it wise to publish all THE settings of a plugin?
I prefer to reduce the options, for example I'm rigging 'size' to distribute only one of them-in my eyes - range 'useful '; or create by rigging the drop-down menu 'plans', for example for the color selections...
In any case...
'Major settings' as Transform or filling or 3D can be published, just click Reset arrow, and all the "sub menu" get published too... can't imagine how to make the publication easier...
BTW: CAPS means YELLING on the boards...
be nice... what goes around, comes around ...
Maybe you are looking for
-
I can't save new bookmarks or delete existing ones.
My bookmark system worked until a few days ago and now will not let me save new pages or delete existing ones. Tried both methods described on the main site, neither worked.
-
Measures of reliability does not
Hello Recently, I get an error message: measures of reliability does not. This message is repeated every half hour on my Vista and started last week. The solution gives to think that I have installed the latest updates I did. The problem is not yet s
-
8460p: keep the smart card reader attached, even if the card is removed
HP EliteBook 8460p Win 7 Pro 64-bit When a smart card is inserted, you are able to see your smart card reader in Device Manager. When you remove your card chip, the chip card reader disappears in Device Manager. Is it possible to always keep the smar
-
What will I do to install the Arabic language in my computer
Original title: Hello Sir IAM using windows vista home basic and I lost the language Arabic but Arabic in my computer, I tried to add the language that is not in the list of languages and I tried to download the language of microsoft, but I think I'v
-
Impossible to install the latest version of Flash Player on Mac (OS 10.9.5)
Asked me to install the latest version of Flash Player on my Mac (OS 10.9.5). First of all, everything went as usual: I downloaded a disk image, called "AdobeFlashPlayer_22au_a_install.dmg", and when I click on that I get a "Adobe Flash Player Instal