Recursive Algorithm for Postfix/Infix expressions

For those that are unaware if infix is an expression like (5 + (3 * 2)) or (3 + 5) * 10, then the respective postfix expressions are 5 3 2 * + and 3 5 + 10 *.
Basically I need to do two things if given a postfix expression: 1) determine if it's a valid postfix expression, and 2) if so, evaluate it.
Now, I can (and did) do this with stacks easily. Very easy to understand with stacks. However, I need to do both using recursion, not stacks.
I've tried to work out some kind of algorithm but what i'm doing just isn't working. Can someone help with the necessary algorithm needed for both methods? tia

overrule wrote:
TuringPest wrote:
overrule wrote:
This is an option many regulars here should consider. If you don't know, don't answer. Simple as that.i was attempting to be helpful. just because i misread doesnt mean i dont deserve to post here.
way to be an internet thug though.No it's okay to be stupid. You can even be elected moderator if you can prove it.I thought you liked TuringPest? Well like might be a strong word...

Similar Messages

  • Infix Expression - Postfix Expressions

    Hello
    I have a program that uses 2 stacks (InfixStack and OperatorStack) to evaluate an infix expression that a user inputs. My problem is that i want to also output the postfix form of the infix expression, i know that i need another stack (PostfixStack). I don't know what the algorithm for converting Infix --> Postfix. I would appreciate any help regrading this matter, a description of the algorithum or psdeou code.
    Thanks

    Try these links:
    http://www.cs.uct.ac.za/courses/Course1/116/Tut0/help/inpostalg.html
    http://joda.cis.temple.edu/~koffman/cis223/InfixToPostfix.doc (MS Word DOC)
    This is a really nice paper in PDF:
    http://www.utdallas.edu/~vinod/publications/Prefix.pdf

  • Iterative and Recursive algorithms

    I am fairly new to Java and am currently looking into Data structures, algorithms etc...
    I have designed a very basic ADT (Abstract Data Type) class called Loan which contains the following private instance variables 'loanNo, copyNo, membershipNo, dateDueBack, totalFines'.
    Basically I am trying to devise an iterative and also a recursive algorithm for calculating fines for loans not returned over a given duration. For instance if I was to assume a fixed rate of say 1% for every day the book is overdue how would I go about writing the 2 algorithms.
    Both the algorithm and elements of the java code would be appreciated or any useful articles or websites that can help me to further my limited understanding of this topic.
    All help is greatly appreciated.

    I am very far from being an expert here, but:
    Two important things come to mind;
    1. Try to keep your calculations in one file/class it is tempting to have something like the following:
    class BookTypeA
      float calculateFine()
         loanRate = 2%;
         // stuff
    // and then in another file...
    class BookTypeB
      float calculateFine()
         loanRate = 0.5%;
         // stuff
    }Every time you update the algorithm for calculating the fines, you have to change both files, trust me, someone will notice if your calculations bend a penny one way or another.
    You solve this problem by having a Visitor, there is lots of stuff on the web about the Visitor pattern. Basically:
    class Calculator implements Visitor
       public int calculate( Book book  )
          //stuff here
    class BookTypeA extends Book
       void calculateFine(  Visitor v )
          v.visit( this );
    //main{}
    for(  Book bk : myBooks  )
        bk.calculateFine( calculator );
    // etc.2. Separate your calculations into discreet functions, notice the difference in the following two "calculators"...
    class Calculator
       float getFine( int daysoverdue )
          if(  !senior )
              float result = daysoverdue * 0.01f;
              result += ( int tax = result * 0.08f );
              result += ( previousFines );
              result -= ( float seniorsdiscount = result * 0.10f );
           //etc, etc.
    // The WAY BETTER version
    class Calculator
       float getFine( int daysoverdue )
          if(  !senior )
              float baseAmount = calculateBaseFines( daysoverdue );
              float taxAmount = calculateTax( baseAmount );
              float previousFines = addPreviousFines(  );
               float subTotal = baseAmount + taxAmount + previousFines;
              float seniorsDiscount = applySeniorsDiscount(  subTotal );
           //etc, etc.
          // one calculation per function
          float calculateTax(  float baseamount )
              taxRate = 0.08;
              return baseAmount * taxRate;
          // rest of the functions
    } In short be really explicit. Really clear. Chasing tax rates through program headers, global definitions, main classes is really rough. Put the tax rate right next to the calculation. Perform one calculation per function, stuff like this; int rate += ( amount * tax ) + zot; is impossible to debug.
    Hope that helps some.
    Andrew

  • Recursive algorithm to find maximum

    Hi there,
    I am looking for a recursive algorithm for finding the maximum and minimum values in a double array.
    I did find the code from this forum. It works upto the size of array=200 fine.. it however just waits and waits for larger size of the array.
    The code I am using is:
    public double maxRecursive(double [] array){
    if (array.length==1){
         return array[0];
    double [] next=new double[array.length-1];
    System.arraycopy(array,1,next,0,array.length-1);
    return Math.max(array[0],maxRecursive(next));
    Could anyone help me with a better algorithm? I feel the above code is a overhaul with arraycopy as well as the recursive calls.
    Thanks for all your help!
    JP

    try this exact code, and see the output (System.out.prints). That will explain you the logic.
    public double maxRecursive(double [] array, int pos) {
         if (array.length - 1==pos) {
              System.out.println("So, I read all the elements, Final Value is :"+array[pos]+"\n");
              return array[pos];
         double recMax = maxRecursive(array, pos+1);
         System.out.println("Now I am at "+pos+" Position !!!\n");
         System.out.println("Till now my maximum value is : "+recMax+"\n");
         if(array[pos] > recMax) {
              System.out.println("My previous element is "+array[pos]+" since it is greater than my max value, here onwards, this will be my max value\n");
              return array[pos];
         else {
              System.out.println("My Previous element is "+array[pos]+" since it is less than my max value, my max value will not change\n");
              return recMax;
    }Sudha

  • Logical infix expression to postfix error

    Hi,
    I've got a program which takes input at command line as an infix expressions and then aims to convert it to postfix for later evaluation . I carry this out using two stacks. My coding for this to happen is below( only parts i felt needed):
    private String postfix = "";
        private static Stack<Character> operatorStack = new Stack<Character>();
        private static Stack<Character> operandStack = new Stack<Character>();
                userEntry.trim();
                char[] temp = userEntry.toCharArray();
                for (int i = 0 ; i < temp.length ; i++) {
                    char a = temp;
    System.out.println(a);
    dump(temp);
    if(userEntry.startsWith("end")) {
    finished = true;
    System.out.println("Thank You for using Calculator");
    * dump. Places the input into a char array and push each
    * char to stack.
    * @param temp array of strings to be tokenized and
    * pushed ontop of stack
    private void dump(char[] temp)
    for(char c : temp) {
    Character C = new Character(c);
    String token;
    token = C.toString();
    System.out.println("Testing token "+token);
    //its a number just add to the postfix string
    if (Character.isDigit(C)) {
    postfix = postfix + "" + (Integer.parseInt(token));
    System.out.println("new infix"+ postfix);
    //its an operator so push it to operator stack
    else if (token.equals("(")) {
    operatorStack.push(C);
    System.out.println(operatorStack.peek());
    // pop everthing before the ")" until you hit an "(" , this will be the operands
    else if (token.equals(")")) {
    while ((operatorStack.peek()).charValue() != '(') {
    char ch = operatorStack.pop();
    postfix = postfix + " " + ch;
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println("new postfix 2 "+postfix);
    System.out.println(operatorStack.pop()+"jus kicked somthin off");
    else if (token.equals(" ")){}
    //find the order of operators and put this in to the postfix script, the operators +-,/,- never make it on to the stack
    else {               
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println(C);
    while (!(operatorStack.empty()) && !((operatorStack.peek()).equals('('))
    && ((setPrecedence(C)) <= (setPrecedence((operatorStack.peek()).charValue())))) {
    System.out.println("precedence test"+operatorStack.peek());
    operatorStack.push(C);
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("just pushed operator");
    while (!operatorStack.empty()) {
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("last postfix :"+postfix);
    public int setPrecedence(char x)
    if (x == '+'|| x == '-') {
    return 1;
    if (x == '*' || x == '/' || x == '%') {
    return 2;
    return 0;
    }if i was to enter at the command line ( 2 + 4 ) * 3 ( must have spaces)
    instead of the postfix conversion being "24+3* it results in "243".
    I've got various print statement in my code but  still can seem to figure out what am doing wrong. I believe the problem lies in my else block of statements.
    Example of entering an expression result :
    ( 2 * 4 ) * 3
    2
    4
    3
    Testing token (
    Testing token 
    Testing token 2
    new infix
    Testing token 
    Testing token *
    falseoperator stack is empty
    Testing token 
    Testing token 4
    new infix24
    Testing token 
    Testing token )
    falseoperator stack is empty
    new postfix 2 24
    (jus kicked somthin off
    Testing token 
    Testing token *
    trueoperator stack is empty
    Testing token 
    Testing token 3
    new infix243
    last postfix :243
    If you can see any reason why its producing this instead of the desired or any thing you disapprove of i would be  greatful if you would kindly say so.
    Thanks alot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    * CORRECTED CODING INDENTION sorry* hopefully a little clearer.
    Hi,
    I've got a program which takes input at command line as an infix expressions and then aims to convert it to postfix for later evaluation . I carry this out using two stacks. My coding for this to happen is below( only parts i felt needed):
    private String postfix = "";
    private static Stack<Character> operatorStack = new Stack<Character>();
    private static Stack<Character> operandStack = new Stack<Character>();
                userEntry.trim();
                char[] temp = userEntry.toCharArray();
                for (int i = 0 ; i < temp.length ; i++) {
                    char a = temp;
    System.out.println(a);
    dump(temp);
    if (userEntry.startsWith("end")) {
    finished = true;
    System.out.println("Thank You for using Calculator");
    * dump. Places the input into a char array and push each
    * char to stack.
    * @param temp array of strings to be tokenized and
    * pushed ontop of stack
    private void dump(char[] temp)
    for(char c : temp) {
    Character C = new Character(c);
    String token;
    token = C.toString();
    System.out.println("Testing token "+token);
    //its a number just add to the postfix string
    if (Character.isDigit(C)) {
    postfix = postfix + "" + (Integer.parseInt(token));
    System.out.println("new infix"+ postfix);
    //its an operator so push it to operator stack
    else if (token.equals("(")) {
    operatorStack.push(C);
    System.out.println(operatorStack.peek());
    // pop everthing before the ")" until you hit an "(" , this will be the operands
    else if (token.equals(")")) {
    while ((operatorStack.peek()).charValue() != '(') {
    char ch = operatorStack.pop();
    postfix = postfix + " " + ch;
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println("new postfix 2 "+postfix);
    System.out.println(operatorStack.pop()+"jus kicked somthin off");
    else if (token.equals(" ")) {
    //do nothing
    //find the order of operators and put this in to the postfix script, the operators +-,/,- never make it on to the stack
    else {               
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println(C);
    while (!(operatorStack.empty()) && !((operatorStack.peek()).equals('('))
    && ((setPrecedence(C)) <= (setPrecedence((operatorStack.peek()).charValue())))) {
    System.out.println("precedence test"+operatorStack.peek());
    operatorStack.push(C);
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("just pushed operator");
    while (!operatorStack.empty()) {
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("last postfix :"+postfix);
    public int setPrecedence(char x)
    if (x == '+'|| x == '-') {
    return 1;
    if (x == '*' || x == '/' || x == '%') {
    return 2;
    return 0;
    }if i was to enter at the command line ( 2 + 4 ) * 3 ( must have spaces)
    instead of the postfix conversion being "24+3* it results in "243".
    I've got various print statement in my code but still can seem to figure out what am doing wrong. I believe the problem lies in my else block of statements.
    Example of entering an expression result :
    ( 2 * 4 ) * 3
    2
    4
    3
    Testing token (
    Testing token
    Testing token 2
    new infix
    Testing token
    Testing token *
    falseoperator stack is empty
    Testing token
    Testing token 4
    new infix24
    Testing token
    Testing token )
    falseoperator stack is empty
    new postfix 2 24
    (jus kicked somthin off
    Testing token
    Testing token *
    trueoperator stack is empty
    Testing token
    Testing token 3
    new infix243
    last postfix :243
    If you can see any reason why its producing this instead of the desired or any thing you disapprove of i would be greatful if you would kindly say so.
    Thanks alot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Finding a non-recursive algorithm

    I had a project a year ago that was supposed to teach the class recursion. Already being familiar with the Java language, the project was simple.
    The project was, you ahve a "cleaning robot" which cleans an entire room and then returns to the spot it originally was. The room was inputed as a txt file. Everytime you moved to a spot it was automatically cleaned
    The Robot was given to you. The robot class hasthe following methods:
    void move(Direction)   - moves in the direction you gave it.
    boolean canMove(Direction)    -  returns true if the robot can move there without running into a wall
    boolean hasBeen(Direction) - returns true if the robot has cleaned the spot that is in that directionThe Direction class was given to you. It is an enumerated type with the Directions FORWARD, BACWARD, LEFT, RIGHT.
    now the Recursive algorithm is simple:
    private void clean(Direction c, Direction r)
                 move(c); //clean spot in direction
                 for(Direction d : Direction.values()) //go every direction
                      if(canMove(d) && !haveBeen(d)) clean(d,reverse(d));
                 move(r); //go back way we came
    private Direction reverse(Direction d)
                   switch(d)
                      case FORWARD:  d = Direction.BACKWARD; break;
                      case RIGHT:    d = Direction.LEFT;     break;
                      case BACKWARD: d = Direction.FORWARD;  break;
                      case LEFT:     d = Direction.RIGHT;    break;
                 return d;     
    public void start()
             clean(Direction.FORWARD, Direction.BACKWARD);
        }But I am curious how someone would go about implementing a NON recursive algorithm. I understand it would probably be around 2000 lines to implement it. I am not asking anyone to implement it, nor do I plan on it (well..I may one day if I am bored) I am only asking for mere curiosity how someone would go about implementing this non-recursively.
    I have thought about it and thought about it, and the only thing I come up with is recursion. What are your thoughts?

    then I think it'll work.Almost. Your algorithm is flawed in this section:
    move(c);
          // After everything else, come back.
           backtrace.push(reverse(c));What happens when c is the reverse direction? You add to the stack the reverse of the reverse. This means you will continually go back and forth in an infinite loop. I took what you started with and worked it into a working solution:
    private void cleanAll() {
              //imitate the call stack
              Stack<Stack<Direction>> call = new Stack<Stack<Direction>>();
              //holds all the reverse directions     
             Stack<Direction> backtrack = new Stack<Direction>();
             //starting stack
             Stack<Direction> start = new Stack<Direction>();
             //load the starting stack
             for (Direction d : Direction.values())
                  if(canMove(d) && !haveBeen(d))
                       start.push(d);
             call.push(start);
             while (!call.isEmpty()) {
                  Stack<Direction> s = call.pop();
                  while(!s.isEmpty()){
                       Direction c = s.pop();
                      move(c); //clean in this direction
                      backtrack.push(reverse(c)); //record the reverse
                      Stack<Direction> temp = new Stack<Direction>();
                      call.push(s); //stop the current path
                      //load the new stack
                      for (Direction d : Direction.values())
                         if (canMove(d) && !haveBeen(d))
                              temp.push(d);
                     if(!temp.isEmpty())   
                          s = temp; //make temp the current stack
             if(!backtrack.isEmpty())
                  move(backtrack.pop());// After everything else, come back.
        }The problem with your solution is that you use 1 stack for the entire process. In this case, it does not differentiate between moves, so it doesn't KNOW what is a reverse. You need to seperate the reverse directions and treat the different in the special case. In order to do that, you need to know WHEN to reverse. Well you reverse when you have completed a cleaning "path".
    My algorithm implements that "path" as another stack. And adds it to a stack of stacks. What this does is it allows me to know when to reverse. I pop off a stack from the call stack, and then after I am done with that stack I have to reverse, as shown in the code I posted.
    Thank you so much for enhancing my knowledge of Stacks. You have helped emensely. I will be sure to tell my professor that i implemented a iterative solution in about 50 lines of code (extremely lower than the 2000 he hypothosized)

  • True iterative algorithm/recursive algorithm

    Just confirming that the below is a true iterative algorithm
    public static double someMethod(int n, double t)
      if (n==0)   
        totalNo = n;  
      else  
        totalNo = number;    
        for (int i = 1; i < n; i++)       
          totalNo *= somePercentage;  
      return totalNo;
    }Recursive algorithms differ in the fact that they make a call to themselves. Is this true of any algorithm that makes a call to itself i.e. if an algorithm calls itself elsewhere in the algorithm it is always a recursive algorithm???
    Regards

    Not to be confused with dominition.You mean when Sue gets out her whip and stiletto
    heels?I think it refers to a control structure I once suggested. The traditional definition of recursion doesn't hold under concurrency! It's always implied that the caller waits for the recursive call to return. If it doesn't it's not true recursion. This happens when the recursive calls are spawned off in their own threads instead of beeing pushed onto a call stack.
    I called this dominition because I used the Domino Effect as an example. A domino piece starts to fall, gives the next piece a little push and then continues falling, and so on. I got a lot of flak for it because people couldn't accept to rethink the old definition of recursion and that I also had the nerve to invent a name for it. But the idea wasn't as novel as I first thought and it's also known as recursive parallelism or fork-join.
    Anyway dominition is interesting because by synchronizing the threads you can basically get pure iteration, pure recursion and everything in between. Also when multi-processor systems become more common there's room for new design patterns in wihich dominition probably will play a part.

  • Converting Prefix expression to Infix Expression

    Hi!
    I need a little algorithm to convert a Prefix expression to an Infix expression. If I give the String
    AND(OR(sunday;saturday);OR(coffee;milk))
    the algorithm shoud give an expression of the form
    (sunday OR saturday) AND (coffee OR milk).
    Can somebody help?

    school assignment? I wasn't fond of this one either
    I don't want to give it all away, but the gist of this is that an arithmetic expression can be represented as a tree
    +
    | \
    a b
    To do prefix, input is "read node, get subnode 1, get subnode 2"
    output is "out node, out subnode1, outsubnode2"
    infix input is "read subnode1, read node, read subnode2"
    output is the same sort of thing
    You've got to implement that

  • I have a cable modem for my Time Capsule.  Do I need a separate cable modem for my airport express?

    I have a cable modem for my Time Capsule.  Do I need a separate cable modem for my Airport Express?  (I'm using it to "extend" my network and also for Air Play.)

    No, you connect to your Time Capsule wirelessly to "Extend" the network..
    See this Apple doc:
    http://support.apple.com/kb/HT4259?viewlocale=en_US&locale=en_US

  • My HD died on my iMac. I replaced it and lost everything that was on it. I found my source disks from my original purchase for Final Cut Express HD 3.5.  I now have Maverick ISO and it will not let me load my software so I can continue my film work. ???

    My HD died on my iMac. I replaced it and lost everything that was on it. I found my source disks from my original purchase for Final Cut Express HD 3.5.  I now have Maverick ISO and it will not let me load my software so I can continue my film work. How do I get it too recover it without paying for it again since I paid for it already and have projects in progress that need to be completed?

    1) Partition your hard drive or add an external drive and install Snow Leopard (with the Optional Rosetta) into it and then you can dual-boot (System Preferences:Startup Disk) into Snow Leopard and run FCE 3.5 there.
    2)  Use one of the following methods to install FCE 3.5 into Mavericks:
    a)  Pacifist:  http://www.charlessoft.com/
    b)  Jeremy Johnstone's Terminal method:  http://www.jeremyjohnstone.com/blog/2012-03-11-installing-final-cut-pro-studio-2 -0-on-mac-os-x-10-7-lion.html
    Reports on this forum seem to confirm that Final Cut Studio 2 will continue to operate in Mavericks once it is functionally installed, albeit some plug-ins may fail to function.  FCE 3.5 is the same generation as FCS2, and presumably will continue to operate in Mavericks, as well.

  • Is the NVIDIA GeForce 8800 GS worth the money for Final Cut Express?

    Hi,
    I'm considering a new iMac 24, but not sure if the speedier on is worth the money.
    Currently I use a MacBook Pro 2.2 for Final Cut Express with a 23" cinema (mostly DV, some HD) and that works okay, but won't play back in real time when I composit video.
    Anybody know if the NVIDIA GeForce 8800 GS will help in that area?
    Thanks,
    KC

    The speedier video card is great for 3D stuff, but it won't matter a wink for Final Cut Express, which barely makes use of the video card.
    Keep in mind that Final Cut is using the CPU, not video card, to perform the editing, decoding, and encoding of the video. The only time the video card comes into play is during playback of the video, and any of the video options available for iMacs will handle that just fine.
    When you composite video, the hard-disk throughput will start to come into play. The dinky 5400 RPM disk in your laptop will adversely affect the performance of that.

  • Where can I purchase a replacement CD for the Airport Express Base station A1264?

    Where can I purchase a replacement CD for the Airport Express Base station A1264?
    I'd like to sell my Airport Base Station, but I believe I need a CD with the software on it for the new owner. Anyone know where I can find one?
    Thanks!
    Meredith

    I doubt it is available.. and since a new Mac doesn't even have an optical drive.. there is no need whatsoever today for the cd.. it is all available in the OS or download. In fact the stuff on the cd will now be totally out of date.

  • The result is empty for the XPath expression

    Hi friends
    Please, could anyone help-me with this issue? My BPEL process was working yesterday and stoped today...
    I think I´m facing a namespace problem.
    If I start my process using BPEL Console, filling the "HTML form" option, all works ok.
    If my process is started by a call from another bpel process, my XPath query gives me an error, but the 2 received messages are "almost" egual:
    Using BPEL Console:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage ns1:BatchId="" ns1:PrimaryKey="" ns1:RejectionId="invalid_msg_processName_token1_token2_token3" ns1:BatchInfo="" >
    <MessageHeader/>
    <MessagePayload/>
    <RejectionReason/>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    Started by another BPEL Process:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage RejectionId="INVALID_MSG_BatchTest_Read_20060418_101233_0463" BatchId="" BatchInfo="" PrimaryKey="" >
    <MessageHeader/>
    <MessagePayload> AgICAgICAgICAgICAgICAgIE1aIEpBSVJPUyAg MDYwMzA4MTAwMQ0K </MessagePayload>
    <RejectionReason> ORABPEL-11008</RejectionReason>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    XPath Query:
    bpws:getVariableData('RejectionMessage','message','/ns2:RejectedMessage/@ns2:RejectionId')
    In the first case, it works.
    In the second case, it raises a "The result is empty for the XPath expression" error.
    As you can see, this process is used as a "Rejection Handler" process: It implements the interface defined in RejectionMessage.wsdl
    Could you help me?
    Thanks in advance

    Hi All
    I find a workaround to the problem. I´m almost sure it is a bug in BPEL.
    As you can see on my previous post, the diferences between the two messages is that the attributes have qualified names on one message and unqualified names on the other: ns1:BatchId, ns1:PrimaryKey...
    The schema definition for this message (JCAErrorHandling.xsd) define that attribute names MUST be qualified (attributeFormDefault="qualified"). The problem is that the File Adapter sends the message with unqualified attribute names!!
    So I edited JCAErrorHandling.xsd (<ORACLE_HOME>\integration\orabpel\system\xmllib\jca) file, changing it to attributeFormDefault="unqualified".
    The correct solution is to fix File Adapter to send the message with qualified names, so I´m opening a Service Request at Oracle Metalink.
    Thanks.

  • Airport Utility 6.0.0 breaks support for my Airport Express

    Computer updated to Airport Utility 6.0 but that breaks support for my Airport Express.  When I try to access the Airport Express it tells me I have to download Airport Utility 5.6 - but I can't find that anywhere on the Apple sites to download! 

    My catch-all list of Airport 6.0 & Firmware 7.6.1 problems:
    ~~~~~~~~~~~~~~
    I've compiled a catch-all list of problems and changes with Airport Utility version 6.0 and FW 7.6.1. Some of the items may be relevant to this thread.
    THE PROBLEMS WITH AIRPORT UTILITY 6 AND FIRMWARE 7.6.1:
    Introduction: If you find AirPort Utility v6.0 too limiting or strange, you can ALSO install AirPort Utility v5.6, released alongside v6.0, to maintain all your previous capabilities. It works fine with both Airport g and n devices.
    PLEASE NOTE: According to Apple you must FIRST install Airport Utility v6.0 in order to access and install Firmware upgrade 7.6.1. Do that first. THEN install Airport Utility v5.6 and use it instead if you prefer. HOWEVER: Another user has informed me that they were able to use Airport Utility v5.6 to install Firmware v7.6.1 without any problems! This would mean anyone can avoid Airport Utility 6.0 entirely if they chose.
    ~~~~~~~~~~~~~~~~~~~
    1) According to Apple's documentation, Airport Utility version 6.0 is ONLY for Mac OS X 10.7 Lion. It is NOT for 10.6 Snow Leopard. If you accidentally installed v6, you'll have to dig around in Apple - Support - Downloads for the previous relevant version for your devices and OS version. Here is the relevant page:
    http://support.apple.com/kb/DL1483
    2) The HELP for Airport Utility has been updated. When you first access it you may well be looking at the old Help. It is supposed to update itself spontaneously over the Internet. It took a couple minutes in my case. Be sure you are looking at the NEW Help before you start using it. One way to tell is that the list of help topics essentially doubles from what there used to be. Also, the very first topic in the NEW Help should read:
    "Set up an AirPort device > Set up a new AirPort Base Station or Time Capsule"
    3) The HELP has some WRONG information. Here we go:
    3a) There is NO "Enable Guest Network" setting. You CANNOT create a guest network or name it or give it any settings. Why this is still listed in Help, I have no idea. Why the setting is gone: This is most likely because the technology behind guest networks, WPS, has been thoroughly CRACKED in the wild. Google "WPS cracked" for lots of documentation of the situation. It won't be resolved soon.
    3b) I can't find any 'Setup Assistant". Everything is now manual. This is not to say that there isn't a setup assistant that appears when you FIRST set up your Airport device. I don't know.
    4) After installing Airport Utility v6.0, there is no indication of the accompanying firmware update until you decide to run the new version. Even then, you have to click on the big icon of your Airport device and notice an 'Update' button about halfway down the popup window. You then have to assume that this button is telling you to update your firmware.
    5) After you update your Airport device's firmware, you may well discover an ERROR subwindow popping up inside Airport Utility that says:
    "An error occurred while updating the firmware. -6721"
    Don't panic! All you need to do is go into your Wi-Fi settings, either in your menubar or the Network preferences, and turn OFF Wi-Fi, then turn ON Wi-Fi again. This is part of a long standing bug in Lion's Wi-Fi with which I bet you are already familiar, certainly up through Lion version 10.7.2.
    6) Miscellaneous changes in Airport Utility 6:
    6a) The keyboard command to manually change your Airport devices settings is GONE. You have to click the little 'Edit' button after clicking on the big icon for your device.
    6b) There is no longer any summary window for your Airport device. You have to instead click on the big "Internet" icon for related data, then click on the big icon for your Airport device for local settings data.
    6c) There is no longer any HELP advising users to EXPORT their settings. (The Help only talks about Import of settings). BE SURE TO EXPORT YOUR NEW SETTINGS! I did this immediately after both updates.
    6d) MAC address filtering for Airport devices is GONE.
    6e) All references to IPV6 anywhere are GONE. I have to assume the IPV6 settings are now entirely working and entirely automatic. Let's hope so.
    6f) Signal and Noise data and graphs are GONE. Use Apple's Wi-Fi Diagnostics app instead. Apple have hidden it here in Lion:
    /System/Library/CoreServices/W-Fi Diagnostics
    6g) In order to access the menu items in Airport Utility, you have to first click on the big icon for your Airport device.
    --> No doubt there are other changes, oddities or bugs related to these changes. But this is what I came up with during a cursory strafing of the software.

  • Predictive Algorithm for Churn analysis

    Hi,
    Can anybody help me with the algorithm which I can use for churn analysis?
    Thanks,
    Atul

    Hi Atul,
    For Churn analysis or what is usually referred to as a binary classification problem where the customer is either staying or leaving=churning I would suggest one of the following algorithms:
    CNR Decision Tree - which also provides a decision tree to explain which feature split is influencing the target (churn) the most.
    You could also chose one of the R based Neural Network algorithms, however the produced predictive model & results are usually hard to explain.
    If need be you can enhance the number of available algorithms by adding you own R functions - there are a lot of examples in this community.
    If you have SAP HANA you could also chose:
    Decision Trees:C4.5, CHAID or CART (new in SAP HANA SP08).
    Other supervised learning algorithms for binary classification: Naive Bayes or SVM (Support Vector Machine).
    There are a lot more but this should get you started.
    Best regards,
    Kurt Holst

Maybe you are looking for

  • "Home Sharing? No Home Sharing."

    Home Sharing is not working for me. After reading through these discussions, I'd say there's a chance it's not working for you either. What I've done for us, here, is compile a list of helpful trouble-shooting tips that I've copied and pasted from ot

  • Audigy 4 decoding probl

    Hello all! I just became the owner of an audigy 4 pro and everything seems to be working fine except for the hardware ac3 and dts decoding. Both windows media player 0 and powerdvd 5 behave as if the dvd is scratched (glitchy playback) when i turn on

  • Speech analysis not working, even for english - CC 7.0.1, OSX

    My research around the forum suggests that there IS a bug for this, but only for languages OTHER than english. I beg to differ... In my case, I have not installed any additional language packs, and the "Analyze..." button in the speech analysis part

  • [svn:osmf:] 16068: Update @includeExample to add symbolic "examples" relative path (that is expanded by the build process).

    Revision: 16068 Revision: 16068 Author:   [email protected] Date:     2010-05-12 11:17:11 -0700 (Wed, 12 May 2010) Log Message: Update @includeExample to add symbolic "examples" relative path (that is expanded by the build process). Also added -noswf

  • Can I use Folio Builder with my Adobe ID on another computer?

    I'm working in Windows XP. I have a folio hosted in my free acrobat.com workspace, with the source files on a network drive. If I sit at someone else's computer in my workgroup and log in to Folio Builder, I can see my folio and can edit and save the