Urgent question about following referrals manually (not automatically)

I have a crucial question on the following code from the sun tutorial, for following referrals manually.
The question is below the code:
=================
// Set the referral property to throw ReferralException
env.put(Context.REFERRAL, "throw");
// Create the initial context
DirContext ctx = new InitialDirContext(env);
// Set the controls for performing a subtree search
SearchControls ctls = new SearchControls();
ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
// Do this in a loop because you don't know how
// many referrals there will be
for (boolean moreReferrals = true; moreReferrals;) {
try {
// Perform the search
NamingEnumeration answer = ctx.search("", "(objectclass=*)", ctls);
// Print the answer
while (answer.hasMore()) {
     System.out.println(">>>" + ((SearchResult)answer.next()).getName());
// The search completes with no more referrals
     moreReferrals = false;
} catch (ReferralException e) {
if (! followReferral(e.getReferralInfo())) {
     moreReferrals = e.skipReferral();
// Point to the new context
     if (moreReferrals) {
ctx = (DirContext) e.getReferralContext();
===========
My question:
If I have a ldap directory that holds two entries (or more) of referrals,
according to this program, when the first entry is reached, it is followed,
and then the context (ctx) is already changed to the new context.
In this case the program never reaches the second entry of the referral (or any other object that is still in the NamingEnumeration).
Do I understand correctly?
Shouldn't a stack be used here (in order to continue the search from the previous contexts)?
But then what do we save in the stack:
is it just the naming enumeration and the referral exception?
Best regards,
or_kr

As has been said, you really should check out some of the online tutorials:
LabVIEW Basics
LabVIEW 101
With that said, I think you want to get away from using the DAQ Assistant and use some of the more basic nodes.  You can actually set the sample rate of the DAQ and that will be constant.  So you can then get a sample and compare it.  If the value is in the right range, increment a counter.  If it isn't, reset the counter.  Once the counter reaches a certain amount, you are done.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
High for 10 seconds.png ‏22 KB

Similar Messages

  • I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I c

    I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I can do to repair it

    Please authorize ADE 3 with same credentials that you used with older version of ADE

  • URGENT: Question about User_Exit

    Hello All,
    I have a question about user_exit. Does it share the same transaction context as the calling form??
    If it does, how to implement the same thing in Java.
    Any help or material available somewhere?
    TIA
    Naveen

    Naveen
    Actually what we are doing is converting Oracle Forms code into java code and i cannot open and change the code that is being called by the User_Exit built-in.
    So i want to know is how i can still keep the same functionality, without changing the Pro*C code into java, or some other native code.Since what you have in hand is an user exit I dont think you can use it straight away from Java Forms unless you do not have any Form specific things.
    In User exits we can do thigns like getting and putting values from/to oracle forms items and there are also provision to pass error and other related information between the forms and user exits.
    this is actually accomplished by having some internal API's ( these are invoked by the user_exit builtin in Forms) in Oracle Forms. And this is predefined and there is nothing much to know how this functionality works. And Oracle itself does not support User exits( if there is any interaction with Form) in Oracle Web Forms. And user exit has many Oracle specific libraries linked to it during compilation.
    Knowing this you should first know whether your user exit is Oracle Forms Dependent. If it is I think you dont have much options than rewriting your user exit.
    On the other hand if it does not , then I think you can easily get rid of the error and other handling information( if present in the user exit )and recompile it as a standalone Pro*C executable and the call it natively since it is noting but a C program in the compiled state.
    OK but regarding the connection you have to go back to Java and ask whether there is way to pass a conection context to a native C program( dont mention Proc or Oracle Forms here)
    So start finding whether your exit is Oracle Forms dependent. If not you can take it easy except for the connection thing which I am not . But if it is dependent then I think u have to start rewriting.
    Good Luck
    Vij

  • Sync Outlook contacts and calendar with iTunes between iPhone 4 and Outlook 2010 (32bits) USB only manually, not automatically.

    Hello guys,
    After disabeling and enabeling the option automatic sync iPods, iPhones and iPad in iTunes (settings > devices), my iPhone 4 is only syncing manually and not automatically as before the option change.
    With manually sync I mean connecting the usb cable and pushing the synchronisation button in iTunes. I reinstalled Outlook (Office 2010 32bit) and iTunes but it did not solve the problem and it's still only manually syncing. I also renewed the Windows Profile. Is there an option I missed in iTunes or Outlook? In Outlook is the iTunes Outlook Addin present and enabled....
    How can I solve this problem?
    Thanks, William

    Hi, could you specify what you did. It appears that nothing on my iPhone syncs any more. I have an iMac and iPhone 4 running the latest system updates. Thanks!

  • Urgent questions about XMPL Standalone Deployment

    Hi,
    I've got some urgent questions from customer as below:
    1. Could XMLP be depoyed to BEA Weglogic?
    2. Could customer use Weblogic user to log on to XMLP?
    3. How is the performance of XMLP compared with other reporting tools?
    4. When will XMLP 5.6 release?
    Hope somebody can give me a hand!!!
    Regrads,
    Libra

    i am not sure abt the release date, but XMLP 5.6 Enterprise Edition comes with its own OC4J Component, refer to Mark Rittman's Blog for more details
    http://www.rittman.net/archives/2006/03/taking_a_sneak_peek_at_xml_pub.html

  • Urgent Question about System Center Server Names and Dashes

    Hey guys I have a quick Urgent question that would be awesome if it happens to get answered quickly :). 
    So in the past we had problems with different server names in components of System Center when setting up different servers.... I never myself saw the errors or what it did, but an absentee colleague did. For example is anything wrong with a name setup like
    xx-scom-01 / xx-scom-02  as compared to the standard scom01 scom02? We have a certain naming convention we are moving to and I wanted to see if this was fixed. I wanted to say it had something to do with the hyphens... anyways any foresight anyone can
    provide would be awesome. Thanks!

    Dashes in the name will work fine.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • Urgent - Question about logging and debugging.

    Hi,
    I have a question about the logging and debugging supported by
    Weblogic 6.0. From what I understood by reading the documentation
    it has classes e.g. NotCatalogLogger class for logging the information.
    The class has one method callded
    debug() for writing the debugging information. I want to log the
    debug messages only in some situation. Can I control this using
    some property? Because the documentation says that the debug information
    is logged only if application is running in debug mode. Now how
    do I change the mode of an application??
    Thanks and Reagrds,
    Manoj

    Hi,
    I have a question about the logging and debugging supported by
    Weblogic 6.0. From what I understood by reading the documentation
    it has classes e.g. NotCatalogLogger class for logging the information.
    The class has one method callded
    debug() for writing the debugging information. I want to log the
    debug messages only in some situation. Can I control this using
    some property? Because the documentation says that the debug information
    is logged only if application is running in debug mode. Now how
    do I change the mode of an application??
    Thanks and Reagrds,
    Manoj

  • Quick (and urgent) Question about Intel G5's

    Just a quick question about the new intel G5's.
    I currently have bunch of software for my PPC G5 which is a Dual 2ghz. Software includes Adobe CS2, Macromedia Studio, Quark 6, etc, etc.
    If I purchase the new intel mac, would I be able to use the same software? or would I be forced to purchase a whole new set of everything I currently have?
    If the software will work on the intel G5, would it perform at the same rate/better than how it performs now on my PPC g5?
    Thanks in advance for any help.

    Rosetta:
    Most of the time you get a real 'hit' when a program first opens that is PPC. Very sluggish. They will require and use more memory than otherwise, too.
    Tests from last August aren't as helpful, there have been improvements, letting the Mac Pro pull even further ahead.
    http://www.barefeats.com/quad06.html
    Comparison Mac Models shows scores of all models. So there is 2x as much or more processing power, bandwidth, better video, as well as disk drives. A 'base' configuration would be 4-6GB RAM.
    And there are differences, more than between G4 and G5.
    People with experience would be Mac Pro Discussions
    Don't use Migration Assistant, and upgrade to CS3 etc. reinstall all your applications fresh.
    There are some drivers and plug-ins, that can be problems, and known.
    Mac Pro 2GHz 4GB 10K Raptor RAID Cinema HD   Mac OS X (10.4.9)   WD RE RAID Aaxeon FW800 PCIe MDD-G4 APC RS1500 Vista

  • Question about FCP feature. (Not sure what they call it)

    Hello everyone,
    I have a question. A few times before I have done this thing on FCP where I get 2 clips and run them at the sametime and as they are playing I would click on the angle that I would like at that moment and so on. FCP would automaticly put it in the timeline with transitions once the clips where done. But for the life of me I can't remeber how I did it now. Can anyone refresh my memory? thanks. I do remeber when the previous FCS came out, they had a quicktime video of how it was done on apple.com.

    Your best bet is to set an inpoint on each clip where they should line up. Then select them all in the browser and right-click for Multicam. Take the option for sync at inpoint.
    Then look in the manual... somewhere in II-250ish
    I always get confused after that point.
    CaptM

  • Urgent: Question about Censoring and replacing

    Hello, guys.
    This is my very first time writting a java program. Please tell me what I have done wrong as this is my first time?
    My question is to write a program that asks the user for a word to replace in some text, and the word to replace it with. The program then reads a line of text from the user and echoes the line back to screen replacing all occurrences of the first word with the second word. It only replaces the word being censored when it occurs independently in a line (i.e. not as a part of another word).
    Like:
    Enter word to censor: dumb
    Enter word to replace it: xxxxx
    Enter line of text to censor:
    The guy is dumb but his friend is even dumber.
    The guys is xxxxx but his friend is even dumber.
    Please look at my code now and tell me what is wrong?
    public class censor
       public static void main(String args[])
           String sentence = "Please type a word which you like to censor"
           String ac =  string sentence;
           String[] temp = null;
           temp = sentence.split(" ");
           for (int j = 0; j < temp.length; j++ )
               if (temp[j].equals("bridge"))
                   string sentence = "Censored";
               System.out.println(sentence + " " + string sentence);
    } Edited by: G on Apr 13, 2008 4:04 AM
    Edited by: KevinGupta on Apr 13, 2008 4:05 AM

    Hey guys,
    I'm getting an error where I have added the "ERROR LINE" next to the line where im getting an error..
    What I'm trying to do ?: I'm trying to make it like
    Enter word to censor: dumb
    Enter word to replace it: xxxxx
    Enter line of text to censor: The guy is dumb dumb dumb dumb and his friend is dumber.
    So, this code should replace ALL "dumb" with xxxxx NOT the dumber. But when I try to run this code only one dumb changes to xxxx not all ? So, please help on that. Also, this code doesnt work when I try to write " LIke ThaT " It gives me an exception error ?
    {color:#ff0000}Look at the error below (underneath the code){color}
    import java.util.*;
    public class LineCensor
    public static void main(String [] args)
    System.out.print("Enter a word to censor: ");
    Scanner keyboard = new Scanner(System.in);
    String word = keyboard.nextLine();
    System.out.print("Enter a word to replace it: ");
    String wordC = keyboard.nextLine();
    System.out.println("Enter line of text to censor: ");
    String phrase = keyboard.nextLine();
    String wordLowered = word.toLowerCase();
    String phraseLowered = phrase.toLowerCase();
    int location = phrase.indexOf(word);
    String string1 = phraseLowered.substring(location,(location +
    wordLowered.length()));
    String string2 = phraseLowered.substring(0, location);
    String string3 = phraseLowered.substring(location+word.length());
    System.out.println(string2+wordC+string3);
    string2 = string2.toLowerCase();
    for (int i=0; i < phrase.length; i++)
    (phrase.equals());                        <-------- ERROR LINE.
    phrase = wordC;
    System.out.println(+i);
    }ERROR:
    The error is:
    LineCensor.java:28: not a statement
    (phrase.equals());
    ^
    1 error ANOTher ErroR
    Enter a word to censor: CaT
    Enter a word to replace it: xxxx
    Enter line of text to censor:
    The cAT wAs CuRioUs abOuT otHER CAT's strings
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1932)
    at LineCensor.main(LineCensor.java:17) This error is coming up because of lower and high caps typing. This shouldnt be happening no matter how I type the sentence/word.
    Please help ?
    Edited by: kabootar on Apr 16, 2008 3:20 AM
    Edited by: kabootar on Apr 16, 2008 3:21 AM

  • Urgent: question about timing in LabVIEW

    Good Evening ..
    First of all, I'am a labVIEW beginner so be easy on me!
    I want to check if an input has the same value for a certain amount of time, for example, if some input has a voltage above 2 V for 10 seconds, how can I express that using a formula node ? If it's not possible then what should I do ?
    I wrote the following program:
    int i,j ;
    for (i=1;i<=10;i=i+1)
    if ( A>2)
    j=j+1;
    if (A >2 && j==10)
    { B = 1; }
    else B = 0;
    the value has to match the condition for the whole period, I know that my code doesn't gurantee it but that's what I could think about!
    I need to make the steps between i increments seperated by one second, but I don't know how to make LabVIEW understand that!
    I would appreciate it if someone told me how to do so
    Best Regards

    As has been said, you really should check out some of the online tutorials:
    LabVIEW Basics
    LabVIEW 101
    With that said, I think you want to get away from using the DAQ Assistant and use some of the more basic nodes.  You can actually set the sample rate of the DAQ and that will be constant.  So you can then get a sample and compare it.  If the value is in the right range, increment a counter.  If it isn't, reset the counter.  Once the counter reaches a certain amount, you are done.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    High for 10 seconds.png ‏22 KB

  • Urgent question about resizing videos in Adobe Premiere

    Hello, forgive me for asking such a noob question but i have a presentation due in about 10 hrs and Adobe Premiere is giving me some headaches with the video i'm trying to make!
    I am trying to alter the dimensions of a movie in the 'monitor' window (the objective being to put 2 different movies side by side in the same timeline, but that's irrelevent). Screenshot is below
    http://s5.largeimagehost.com/display...sXUF&skey=nv28
    I've seen it being done before - their should be a border around the frame in the 'Sequence 01' tab that lets you resize it with your mouse. But It's not appearing for me... . is their some hot key or something..? It's probably something really obvious but i can't find it...

    You will also find links to many free tutorials in the
    Premiere Pro Wiki that will quickly
    show you how things are done in PPro, including picture-in-picture effects.
    Cheers
    Eddie
    Forum FAQ
    Premiere Pro Wiki
    - Over 250 frequently answered questions
    - Over 100 free tutorials
    - Maintained by editors like
    you

  • A very urgent questions about AE CS6's GPU!

    For God's sake, ask you to help me!
    I have a Radeon (TM) HD 7670M graphics card,
    Preferences - previews - GPU Information
    Ray-tracing only cpu,
    and GPU not available - incompatible device or display driver,
    But OpenGL is right, why?
    See a lot of information just say AE CS6 Support NVIDIA graphics card,
    Is the AMD graphics do not really have any way?
    Or what time will increase support for AMD graphics?
    We really need for urgent AMD graphics support
    Look forward to your reply and help,
    May God bless you!

    The rayrtracing stuff will never get any AMD compatibility. It's already deprecated in AE CC and nobody cares about it anymore. Any such enhancements will have to come from within Cineware, but currently Cinema 4D doesn't use any GPU features for rendering.
    Mylenium

  • Question about Follow-Up Actions

    Dear all,
    When i define the Follow-Up Actions in QM when the usage decision was made, i met a problem. I want to develop a new function when the usage decision was done.But i don't know how to define the import parameter in the function.Because i don't know SAP standard program how to call the function.
    Another questions, i just curious that because the new function is define by ourself, when the SAP standard program call the function, how can the sap program know how many parameters value need to be exported? Is it means that we should do something in the SAP standard program?
    Thanks for your reply.
    Best regards,

    check this link, its got all the explanation and a sample code as well.
    http://abap4.tripod.com/SAP_and_VBA__Visual_Basic_for_Applications_.html
    Regards

  • Urgent question about two monitors for Sun Ultra 40 M2

    Hello,
    I feel extremely unhappy to ask you the following.
    I bought recently a Sun Utra 40 M2. I thought that with NVIDA Quadro FX1500 one could have two monitors as there are two DVI-D 's to connect with two monitors.
    But today I heard from SUN support that Sun does not support two monitors under SUN Solaris 10. It is possible with Linux on this SUN Ultra 40, but not with Solaris, so it was told to me.
    But: is this true? I still can not believe it.
    with friendly greetings,

    Hello,
    I see, with Windows it is possible just lik that and with Solaris one needs two cards.
    Well, it seems for a one man"s business customer like me: end of story.
    I still can not believe it that Sun would arrange this.
    I will wait and see.
    with friendly greetings,
    P_ter

Maybe you are looking for

  • My iPhone 5 is being very strange...

    Hello all. I have an black iPhone 5 and as of recently, I have been running into a lot of problems with it. When I got off work this evening, my phone started to turn off and on every 5 or 10 minutes or so. I restored it (from a backup and then as a

  • Unable to view recent photos on my Mac in PSE 11 organizer

    unable to view recent photos on my Mac in PSE 11 organizer ..I see them in Iphoto not organizer..Please help

  • Why it is popular applications are not included in the official repo?

    Why it is very popular applications like yaourt (GPL), pacman-color (GPL) and many other free programs are not included in the official repositories? Why not create an official "non-free" repository for popular non-free software?

  • Blank row in table UI Element

    Hi All, I am having a UI table element in my screen. Below that i ve some input fields. When i lead select a row in table, the input field data changes accordingly. When i do not have a row in the table, am getting an error message saying no value fo

  • Deploying Crystal Report 11.5 without using .msm or .msi

    Post Author: kquach CA Forum: Deployment Hi, I am trying to deploy the Crystal 11.5 runtimes .dlls for my project.  I want to deploy the assemblies without using the merge modules or running the .msi project (the .msi and .msm files contains a lot of