Creating a PostFix Expression!

Hi guys I've been working in this project all day and I still can't really come up with a solution.
What I'm doing is allowing the user to enter a infix expression such as a + b * c and an output with the postfix expression should appear in this order.
A - Will go to a string
+ To Stack
B To String
* To Stack
Then With a presedence method I should be able to determine if which operator has a higher value.
Output Should look like:
abc * +
Here is my code so far I will appreciate some help or advice. Thank you
import java.util.*;
class Expression
     private String inFixString;
     private String postFixString;
     private String stringToken;
     public Expression()
         inFixString = "";
          postFixString = "";
     public void getInfix(String inFix)
          inFixString = inFix;               
     public void showInfix()
          System.out.println("This is the In Fix Expression : ");
          System.out.println(inFixString);
     public void showPostFix()
          System.out.println(postFixString);
     public void convertToPostFix()
          //Parsing out the string store in InFixString.
          StringTokenizer tokenizeString = new StringTokenizer(inFixString);
          Stack putInFixInStack = new Stack();
          boolean status = tokenizeString.hasMoreTokens();
          boolean stackStatus = putInFixInStack.isEmpty();
          String currentOp = "";
          while(tokenizeString.hasMoreTokens())
               stringToken = tokenizeString.nextToken();
               //Reading Current Token if is a letter add it to postFix Expression
               if (Character.isLetter(stringToken.charAt(0)))
                    postFixString += stringToken;     System.out.println("Number : " + stringToken + " was appended to Post Fix");    
              }//ABC          [     *+]
              switch (stringToken.charAt(0))//   A + B  * C   post  AB + C -  |||||||||||||||||  GETTING ABC -+
                    case '(': System.out.println("( " + " was Push into Stack");
                         putInFixInStack.push("(");
                    break;
                    case ')':System.out.println(")" + " was Push into Stack");
                         putInFixInStack.push(")");
                    break;
                    case '+':
                         if (putInFixInStack.isEmpty())
                              putInFixInStack.push("+");
                              System.out.println("+" + " was Push into Stack");          
                         else
                              putInFixInStack.push("+");
                              System.out.println("+" + " was Push into Stack");
                              while(stackStatus)
                                       currentOp = putInFixInStack.peek().toString();
                                   if (precedence(currentOp.charAt(0)) == 1)
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 2)
                                        putInFixInStack.pop();
                                        postFixString += currentOp;
                                   else if (precedence(currentOp.charAt(0)) == 3)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 4)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   else
                                   stackStatus = putInFixInStack.isEmpty();
                    break;
                    case '-':
                         if (putInFixInStack.isEmpty())
                              putInFixInStack.push("-");
                              System.out.println("-" + " was Push into Stack");
                         else
                              putInFixInStack.push("-");
                              System.out.println("-" + " was Push into Stack");
                              while(stackStatus)
                                       currentOp = putInFixInStack.peek().toString();
                                   if (precedence(currentOp.charAt(0)) == 1)
                                   putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 2)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 3)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 4)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   stackStatus = putInFixInStack.isEmpty();
                    break;
                    case '*':
                         if (putInFixInStack.isEmpty())
                              putInFixInStack.push("*");
                              System.out.println("*" + " was Push into Stack");
                         else
                              putInFixInStack.push("*");
                              System.out.println("*" + " was Push into Stack");
                              while(stackStatus)
                                       currentOp = putInFixInStack.peek().toString();
                                   if (precedence(currentOp.charAt(0)) == 1)
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 2)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 3)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   else if (precedence(currentOp.charAt(0)) == 4)
                                        postFixString += currentOp;
                                        putInFixInStack.pop();
                                   stackStatus = putInFixInStack.isEmpty();
                    break;
                    case '/':System.out.println("/" + " was Push into Stack");
                         putInFixInStack.push("/");
                    break; default:
          postFixString += putInFixInStack.peek().toString();
          stackStatus = putInFixInStack.isEmpty();
          System.out.println();
          System.out.println("Post Fix Has : " + postFixString);
     private int precedence(char in)
        switch(in)
              case '/':
                   return 5;
              case '*':
                 return 4;
            case '+':
                    return 3;
            case '-':
                return 2;
            case '(': case ')':
                return 1;
          return 0;
    public boolean isOperator()
         String[] operators = { "+" , "-" , "/" , "*" , "(" , ")" };
         boolean isOp = false;
         for( int i  = 0; i < operators.length;i++)
              if (operators[i] == "+" )
              isOp = true;
              else if (operators[i] == "-" )
              isOp = true;
              else if (operators[i] == "/" )
              isOp = true;
              else if (operators[i] == "*" )
              isOp = true;              
              else if (operators[i] == "(")
              isOp = true;
              else if (operators[i] == ")" )
              isOp = true;
              else
              isOp = false;
         return isOp;
     public  boolean equals(String otherElement)
          // If Current Token == Other Element return true otherwise False
          if (stringToken == otherElement)
          return true;
          else
          return false;
}

Here is the another java program
which implements same algorithm & it works!!!
Hope that it helps.
I have run your program but it does not print anything!!!
So I wrote my own!!!!
//By Prafulla V Tekawade
//[email protected]
import java.util.*;
class MyExpression
     public String inFix;
     public String postFix;
     public MyExpression(String str)
          inFix="("+str+")";
          postFix="";
     public void convert()
          Stack opstk=new Stack();
          int m=inFix.length();
          int i;
          for(i=0;i<m;i++)
               if(!isOperator(inFix.charAt(i)))
                    if(inFix.charAt(i)!=')')
                         postFix += inFix.charAt(i);
               if(inFix.charAt(i) == '(')
                    opstk.push(inFix.charAt(i));
               if(isOperator(inFix.charAt(i)))
                    if(opstk.isEmpty())
                         while(getPriority((Character)opstk.peek()) >= getPriority(inFix.charAt(i)))
                              postFix += opstk.pop();
                    opstk.push(inFix.charAt(i));
               if(inFix.charAt(i) == ')')
                    char ch=(Character)opstk.pop();
                    while((ch != '(') && (!opstk.isEmpty()))
                         postFix += ch;
                         ch=(Character)opstk.pop();
          while((!opstk.isEmpty()))
               char ch=(Character)opstk.pop();
               if(ch!='(')
                    postFix += ch;
     public boolean isOperator(char ch)
          switch(ch)
               case '+':
               case '-':
               case '/':
               case '*':
               case '(':
                         return true;
               default:
                         return false;
     public int getPriority(char ch)
          switch(ch)
               case '(':
                         return 0;
               case '+':
               case '-':
                         return 1;
               case '*':
               case '/':
               case '%':
                         return 2;
          return -1;
     public void printPostFix()
          System.out.println (postFix);
     public static void main(String []args)
          MyExpression obj=new MyExpression("(a+b)*c");
          obj.convert();
          obj.printPostFix();
Output
Infix     := a+b*c
PostFix     := abc*+
Infix      := (a+b)*c
PostFix := ab+c*
Infix:=  (a+((b*c+(p*q)))+(a+(b-c)))+(d+w)+(d*q)
PostFix= abcpq*+*abc-+dw+dq*++++
*/

Similar Messages

  • Need help with creating a postfix evaluator WILL GIVE DUKE DOLLARS

    I know this is long but it needs to be so that you may understand:
    I was given a template for a class PostFixEvaluator and need to create a method for a postfix evaluator named evaluatePostfixExpression that reads the expression of single number digits and operands into a stringbuffer. I have an algorithm for the process which is :
    a) append a right parentheis to end the postfix expression. when it is encountered no further processing is necessary.
    b) if the right parenthesis is not encountered, read the expression from left to right. if the current char is digit then pust its int value on the stack otherwise if the char is an operator pop the two top elements off the stack into variables x,y. calculate y operator x. push the result of the calculation onto the stack.
    c) when the right parenthesis is encountered, pop value off the stack. this is result of the postfix expression.
    this is what i have, can you please let me know where i am going wrong?:
    public class PostfixEvaluator
    public static void main (String [] args)
    StringBuffer expression = new StringBuffer(
    JOptionPane.showInputDialog( " Enter a positive expression: " ));
    int answer = evaluatePostfixExpression(expression); // I GET AN ERROR HERE
    System.out.println(" The value of the expression is: " + answer + "\n");
    System.exit(0);
    public int evaluatePostfixExpression(String str) {
    StringBuffer postfix = new StringBuffer(str);
    StringBuffer digits;
    IntegerStack is = new IntegerStack(256);
    int x, y;
    char current = postfix.charAt('0');
    postfix.append(')');
    for(int i=0; current != ')'; i++) {
    if (Character.isDigit(current)) {
    digits = new StringBuffer();
    if (Character.isDigit(current)) {
    do {
    digits.append(current);
    i++;
    } while (Character.isDigit(current));
    i--;
    is.pushInt(Integer.parseInt(digits.toString()));
    } else if (current == '+' || current == '-' || current == '*'
    || current == '/' || current == '^' ) {
    y = is.popInt();
    x = is.popInt();
    is.pushInt(calculate(x, y, current));
    return is.popInt();
    private int calculate(int op1, int op2, char oper) {
    switch(oper) {
    case '+':
    return op1+op2;
    case '-':
    return op1-op2;
    case '*':
    return op1*op2;
    case '/':
    return op1/op2;
    case '^':
    return (int) Math.pow(op1, op2);
    return 0;
    class IntegerStack extends StackInheritance
    public int stackTop()
    int temp = popInt();
    pushInt(temp);
    return temp;
    public int popInt()
    return ((Integer)super.pop()).intValue();
    public void pushInt (int c)
    super.push(new Integer(c) );

    last time i checked String was not the same as StringBuffer.
    maybe you would like to turn your expression into a String?!!
    for that you need to check the API, for what methods might help you on doing that...
    just maybe you find in java.lang.StringBuffer's specification that it has some method called to_string() or something very similar....
    then you could do the following:
    int answer = evaluatePostfixExpression( expression.to_string() );of course "to_string" would need replacement by method name you find from the API...

  • How do I create "Oracle Application Express Adminstrator" in APEX 3.2.1?

    Hello,
    Quite the newbie so I appreciate any assistance with this.
    How do create "Oracle Application Express Adminstrator" in APEX 3.2.1? I am not talking about a workspace adminstrator but an Entire APEX instance administrator or "superuser"?
    I log into APEX_ADMIN as ADMIN and understand how to create a new user. But how do I grant the new user DBA or "super user" privlidges? It was easy to do when I first installed XE, I would just "check" the "DBA" when I created the user. But when I upgraded to APEX 3.2.1 the function does not seem to be there?
    Thank you for any help you can provide!

    Hi,
    I think you can not grant DBA role from Apex anymore.
    You need connect to database e.g. with SYS user and grant that role.
    http://www.oracle.com/technology/products/database/application_express/html/3.2_and_xe.html
    Br, Jari

  • Problem in creating a Regular Expression with gnu

    Hi All,
    iam trying to create a regular expression using gnu package api..
    gnu.regex.RE;
    i need to validate the browser's(MSIE) userAgent through my regular expression
    userAgent is like :First one ==> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    i wrote an regular expression like this:
    Mozilla.*(.*)\\s*(.*)compatible;\\s*MSIE(.*)\\s*(.*)([0-9]\\.[0-9])(.*);\\s*(.*)Windows(.*)\\s*NT(.*)\\s*5.0(.*)
    Actaully this is validating my userAgent and returns true, my problem is, it is returning true if userAgent is having more words at the end after Windows NT 5.0 like Second One ==> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Testing
    i want the regularExpression pattern to validate the First one and return true for it, and has to return false for the Second one..
    my code is:
    import gnu.regexp.*;
    import gnu.regexp.REException;
    public class TestRegexp
    public static boolean getUserAgentDetails(String userAgent)
         boolean isvalid = false;
         RE regexp = new RE("Mozilla.*(.*)\\s*(.*)compatible;\\s*MSIE(.*)\\s*(.*)([0-9]\\.[0-9])(.*);\\s*(.*)Windows(.*)\\s*NT(.*)\\s*5.0(.*)");
         isvalid = regexp.isMatch(userAgent);
         return isvalid;
    public static void main(String a[])
         String userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)";
         boolean regoutput = getUserAgentDetails(userAgent);
         System.out.println("***** regoutput is ****** " + regoutput);
    }please help me in solving this..
    Thanks in Advance..
    thanx,
    krishna

    Ofcourse, i can do comparision with simple string matching..
    but problem is the userAgent that i want to support is for all the MSIE versions ranging from 5.0 onwards, so there will the version difference of IE like MSIE 6.0..! or MSIE 5.5 some thing like that..
    any ways i will try with StringTokenizer once..!
    seems that will do my work..
    Thanks,
    krishna

  • How to access tools create or edit express vis in LV8.20 ?

    Hi All,
                 I am a LabVIEW professional working in LabVIEW 8.20. I would like to know how Express vis are working and I am going thro' the Express vi developement manual. I don't find the item "create or edit  express vis" from the Tools. How can I access it?
    Any information to explain how express vi's are working also invited.
    Thanks,
    Pandiarajan R

    hi,
    it is called "Express VI development" and it is located on the toolkit CD we got with our developer suite, so maybe it is part of that?
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Infix to postfix expression

    Hi all!
    I'm currently trying to finish up an assignment that is due in a few hours. Here's my delimma, according to the text book and the professor the following algorithm to convert an infix to postfix is as follows:
    1. Two stacks will be used in the conversion(expressionStack and operatorStack)
    2. if an operand is encountered, push onto expressionStack
    3. if an operator is encountered, including the "(" push onto the temporary stack
    4. if a ")" is encountered, pop each operator off the temporaryStack and push it into the expressionStack until a "(" is encountered in the temporaryStack. Once a "(" is encountered, pop that off the temporaryStack.
    Traverse through the infix expression until the end is reached then pop everything from the temporaryStack onto the expression stack.
    Here's the code I wrote for it:
    public String convertInfixToPostfix() throws PostfixConversionException {
      //if there is an unbalace set of parenthesis, throw exception
        if(!isBalance()) {
          throw new PostfixConversionException("Unable to convert infix expression");
        for(int i = 0; i < this.infixExpression.length(); i++) {
          char ch = this.infixExpression.charAt(i);
          //if ch is an operand, push onto stack
          switch(ch) {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            this.expressionStack.push("" + ch);
            break;
            //if ch is an operator or a '(', push onto temporaryOperator stack
            case '+':
            case '-':
            case '*':
            case '/':
            case '%':
            case '(':
              this.temporaryOperator.push("" + ch);
              break;
            /*if ch is ')' push all operators from temporaryOperator stack onto expressionStack until
             * until a matching '(' is encountered*/
            case ')':
              //while the top does not equal "(" pop everything off temporaryOperator stack and onto expression stack until a '(' is encountered
              while(!"(".equals(this.temporaryOperator.top())) {
                this.expressionStack.push(this.temporaryOperator.pop());
              //removes one open matching '('
              this.temporaryOperator.pop();
              break;
            default:
              System.out.println("Unable to converted due to invalid characters entered");
              break;
        //while expressionStack is not empty, push everything into temporaryOperator stack
        while(!this.expressionStack.isEmpty()) {
          this.temporaryOperator.push(this.expressionStack.pop());
        while(!this.temporaryOperator.isEmpty()) {
          this.postfixExpression = this.postfixExpression + this.temporaryOperator.pop();
        return this.postfixExpression;
      }The problem is, unless I did the code wrong (which I don't think i did), the method incorrectly converts the infix to the postfix expression. Meaning the algorithm provided by the text book and professor is incorrect. Are there other ways of converting an infix to postfix expression?

    Well using 2 stacks is same as 1 stack and 1
    StringBuffer. So I'd get rid of your temporary stack.
    Tokens either get pushed onto the operator stack or
    postfix stack.I wish I could get rid of the temporary stack and use a StringBuffer, but the professor wants two stacks used.
    Brackets are only slightly more difficult. If you
    have opening bracket, simply push it onto the
    operator stack. If you have a closing bracket pop
    tokens off the operator stack onto the postfix stack
    until you encounter an opening bracket then you
    simply pop it off the stack and discard it.So basically what you're saying is exactly what my code is doing, only with two stacks. However it only works if the infix entered has to do only one operations like 4-8 or 8+3, etc..but when it converts a longer expression like 0-(((7-8+3*(9/1)*2)+5)*6), postfix is 078391/2**-56*- and result is 300. but when I entered the infix in a calculator, the result is -384. I check my compute method and Im pretty sure that is correct. So that leaves the conversion method. In any case heres the compute method, I might be wrong, but I'm pretty sure I got that down.
    1. when a operand is encountered, push it into stack
    2. when an operator is encountered, pop two operands off and compute, then push it back into the stack.
    public double computeResult(String postfix) throws PostfixArithmeticException {
        //local variables
        Stack computePostfix = new Stack();
        int countOperators = 0;
        int countOperands = 0;
        //goes through the postfix and determines number of operators and operands
        for(int i = 0; i < postfix.length(); i++) {
         char ch = postfix.charAt(i);
         if(ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '%') {
           countOperators++;
         else
           countOperands++;
        //test if there are enough operators and operands, number of operators should be 1 less than operands
        if((countOperators + 1) != countOperands || postfix.length() == 1) {
          //throw PostfixArithmeticException if there are not enough operators or operands
          throw new PostfixArithmeticException("Unable to compute postfix expression.");
        //otherwise, compute postfix expresstion
        for(int i = 0; i < postfix.length(); i++) {
          char ch = postfix.charAt(i);
          //if the character is not a operator, push onto a stack
          if(ch != '+' && ch != '-' && ch != '*' && ch != '/' && ch != '%') {
            computePostfix.push("" + ch);
          //otherwise, if an operator, pop two operands off the stack, compute with operator and push back on stack
          else {
            double operand2 = Double.parseDouble("" + computePostfix.pop());
            double operand1 = Double.parseDouble("" + computePostfix.pop());
            switch(ch){
              case '+':
                this.result =  operand1 + operand2;
                break;
              case '-':
                this.result =  operand1 - operand2;
                break;
              case '*':
                this.result =  operand1 * operand2;
                break;
              case '/':
                this.result =  operand1 / operand2;
                break;
              case '%':
                this.result =  operand1 % operand2;
                break;
            computePostfix.push("" + result);
        //return the result of the computation
        this.result = Double.parseDouble("" + computePostfix.pop());
        return result;
      }Also, I've tested that there should be the correct number of operators to an operand (which is the number of operators is always one less than number of operands)

  • Postfix Expressions Problem

    I wrote a program for my AP Comp Sci A class that takes a postfix expression (e.g. 32+) and converts it into an infix expression (e.g. 3+2) and then solves it. It worked before I converted it into the 'solve' method, but now I did (because its required), it keeps giving me an EmptyStackException on the line "if(comparingyay.compareTo("+")==0)
                         stk.push(stk.pop()+stk.pop());"
    If anyone can help me debug this, I would be forever greatful.
    import java.util.*;
       import java.io.*;
        public class PostfixExpressions                                                                                                                             
           public static void main(String[] args)
             Scanner scan=new Scanner(System.in);
             String in=scan.next();
             int answer=solve(in);
             System.out.println(answer);
           public static int solve(String y)
             Stack<Integer> stk= new Stack<Integer>();
             for(int x=0;x<y.length();x++)
                char chars1=y.charAt(x);
                if(Character.isLetterOrDigit(chars1))
                   Integer ints=new Integer(0);
                   stk.push(ints.valueOf(y.substring(x,x+1)));
                String comparingyay=y.substring(x,x+1);
                if(comparingyay.compareTo("+")==0||comparingyay.compareTo("-")==0||
                   comparingyay.compareTo("*")==0||comparingyay.compareTo("/")==0)
                   if(!stk.isEmpty())
                      if(comparingyay.compareTo("+")==0)
                         stk.push(stk.pop()+stk.pop());
                      else if(comparingyay.compareTo("-")==0)      
                         int b=stk.pop();
                         int a=stk.pop();
                         stk.push(a-b);
                      else if(comparingyay.compareTo("/")==0)
                         int b=stk.pop();
                         int a=stk.pop();
                         stk.push(a/b);
                      else if(comparingyay.compareTo("*")==0)
                         stk.push(stk.pop()*stk.pop());
             return stk.pop();
       }

    You don't check for the number of elements in your stack, you just check whether it's empty and, if not, pop 2 elements (though it might be only 1) off it.
    Your program looks rather C-ish; equality checking on Strings is done via equals(), compareTo() is, uhm, unconventional. Though you don't need to check Strings at all while you have chars1.
    The Integer conversion part could be done this way:
    stk.push(new Integer(chars1 - '0'));Edit: apart from these comments, your program works for me with the input "32+".

  • Problem creating a regular expression

    Hi Everyone
    I am trying to create a regular expression for validating a password string for the following given rule -
    It must contain atleast any two of following 4 classes of characters -
    1. lowercase letters.. a - z
    2. uppercase letters.. A - Z
    3. digits.. 0 - 9
    4. Special characters.. !@#$%^&*()/?><
    I m having a hard time creating such regular expression. I will really appreciate if someone can help me with this.

    [http://google.com/search?q=regular+expression+password+validation+site:forums.sun.com]

  • PROBLEM IN CREATING A REGUALR EXPRESSION-VERY VERY URGENT.

    I WANT TO CREATE A REGUALAR EXPRESSION THAT WILL CHECK WHETHER THE FIRST AND THE LAST CHARACTER OF A STRING CONTAIN ANY SPECIAL CHARACTERS LIKE #,!,@ .
    EX- IF I GIVE THE INPUT "#java#", it will give me error,
    whereas IF I GIVE THE INPUT "java", it will not give me error.
    CAN ANYBODY PLZ HELP ME OUT WITH THE REQUIRED CODE.

    This guy's been shouting questions at us for over a month now. We should stop making fun of him and start helping him:
    import java.awt.*;
    import java.awt.event.*;
    public class StopShouting {
        public static void main(String[] args) {
            Toolkit kit = Toolkit.getDefaultToolkit();
            kit.setLockingKeyState(KeyEvent.VK_CAPS_LOCK, false);
    }

  • SSRS Variance expression problem. Create a Variance expression. Compare current month with same month from previous year.

    Hello,
    I am using VS2010 shell.  I have a matrix report where I have a row group by Year.  Then I have a column group by Month. 
    When I run the report, I get 2013 data on top of 2014 data.  Now I need to create a variance by year for each month.
    So in the example below, I need to create an expression that will pull the variance for Oct 01... subtracting 2013 from 2014 for the months.  So I need to Subtract 8,222 - 4290.  I have no clue.
    Here is what my rdl looks like.
    Thank you for your help. 

    Hi Adrian,
    If I understand correctly, you want to calculate the difference order between 2013 and 2014 for every month. And there are only two years in the FISCAL_YEAR field.
    If in this scenario, we can simply use the following expression to achieve your requirement:
    =first(Fields!ORDER.Value)-last(Fields!ORDER.Value)
    The following screenshot is for your reference:
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to create database in express edition

    I have downloaded and installed Oracle10g Express edition. As the tutorial suggests using windows /start/all program/oracle10g Express edition/go to Database home page, I am able to login as well.
    My problem is How can I create a new database in oracle 10g express edition,
    I want learn to create and manage a small database on this software.

    You are aware that XE comes with a "seed db" that is restored during the installation process, right? If you try creating your own database, you'll lose at least the management user interface, since there are no seperate install files for APEX. One could of course try to install the APEX package that is provided for other database versions, although I'm not sure if that would work. Hmmm, there's a thought ...
    C.

  • How to create user in Express database through express command

    Hi
    In our application we need add/delete new user to the OFA. Is there any way of doing this through the automated express.? Is there any Express command to add new user ?
    If so,Please let me know how to do that.
    Thanks
    Murugesan

    Murugesan ,
    You are using pure Express and OFA, and you are not using Oracle OLAP, right ?
    If you create an user in OFA super administrator database, using the front-end as usual, you could see using express monitor command RECAP what commands were performed thru the API. But don´t forget to check which command fires the task USER_UPDATE that goes to the task processor, to update user information at the shared database.
    You can also take a look at the OFA API document available for download at metalink, it could give you some more help.
    Flavio

  • Error ORA-20001 when Creating an Application Express Workspcce

    I have a 11.1.0.6.0 Enterprise Edition database running on a Fedora 10 box that was created using dbca. At the time, I did not select Oracle Application Express for installation. However, I can configure APEX and start it with URL http://<host>:8080/apex/apex_admin and log in as ADMIN. Looks like I'm ready to go... Database accounts APEX_PUBLIC_USER, FLOWS_030000 and FLOWS_FILES existed at the time I configured APEX.
    Following the 2 Day + Application Express Developer's Guide, I get error "ORA-20001: Unable to create user. ORA-01935: missing user or role name" when I attempt to create a workspace for the demo application. In an attempt to resolve this, I've run dbca again to install Application Express in the database, and I then get "ORA-04063: package body "FLOWS_030000.WWV_FLOWS" has errors: ORA-06508: PL/SQL: could not find program unit being called: "FLOWS_03000.WWV_FLOW" ORA-06512: at line 2". DBA_OBJECTS reports table WWV_FLOWS owned by this user, but no package body of the same name.
    Can anyone advise what I need to do to resolve the ORA-20001 error when I attempt to create a APEX workspace, or resolve the ORA-04063 error when I attempt to use dbca to install APEX in the database?
    TIA
    Jon

    ..and show me the results, I might know what is wrong.SQL> alter session set current_schema = flows_030100;
    Session altered.
    SQL> select distinct provisioning_company_id from wwv_flow_companies;
    PROVISIONING_COMPANY_ID
    0
    10
    11
    9.4232E+14
    9.5741E+14
    1.7393E+15
    (I imported the file to my workspace http://apex.oracle.com/pls/otn.... it loaded succesfully but couldn't login.)
    I found a site where the file might have been downloaded from:
    [http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#CUST]

  • 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

  • Airport Express flashing amber; help to create an Extreme/Express network

    I am a novice with wireless networks, so please bear with me....and I appreciate any advice that is in laymens terms.
    I bought an iMAC G5 and a MacBook Pro (both with airport cards installed). I set up an Airport Extreme base station and have my G5 connecting to this wirelessly. This works fine. I also bought an Airport Express to extend the wireless reach within my house and to eventually hook in my stereo.
    Problem 1 - my Airport express keeps flashing amber and is not being recognized. It was briefly recognized last night (although flashing amber) but this has been very rare. I've reset it, plugged it/unplugged it, but nothing stops the flashing or recognizes the express.
    Problem 2 - Since I'm using an Extreme as the base station and Express to extend the network reach, what selection do I choose in the Airport Setup Assistant screen to connect the Extreme - "Set up new Airport base station" or Change settings on an existing Airport base station"? I think the latter, but want to be sure.
    Problem 3 - I want to establish a network so I can use email, share files between my G5 and laptop, etc but am not clear how to do so. Airport has the option "creat network", but I really don't know what this accomplishes. I'd realy like to bring my laptop somewhere and be able to access files that are on my G5.
    So basicaly, HELLLPPP.
    G5 and MacBook Pro   Mac OS X (10.4.5)  

    Still flashes...hard reset didn't work...and last night I even went back to factory reset. I went to the Apple store (genius bar??) and they said to bring it in if I can't fix it. We shall see.
    Re the network set up..I'm starting to get there, but I've hit a stopping point. I made sure my G5 will allow file sharing, and I can see that computer in my "network", but when I aatempt to connect it asks me "Connect to the file server [computer name]" and asks me for a password. Nothing I've tried works. I just get a dialogue box that says "Connection Failed: Unknown user, incorrect password, or login is disabled....."
    Anyone know how to activate a login, if it is in fact disabled???
    Thanks in advance.

Maybe you are looking for