Computers & Internet Logo

Related Topics:

Posted on Aug 12, 2008
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

I'm almost done but there are few problems

I have a stack which inputs an infix algorithm, then when I hit ENTER it converts to postfix then checks if it is legal then if it is legal, then the arithmetic operation solves, else the error dialog message box will occur. But it only happens in one digit positive value. I want it also together with negative value, decimal value, exponential value and more than one digit value... Please help me

1 Answer

Anonymous

Level 3:

An expert who has achieved level 3 by getting 1000 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Brigadier General:

An expert that has over 10,000 points.

  • Master 10,406 Answers
  • Posted on Dec 03, 2009
Anonymous
Master
Level 3:

An expert who has achieved level 3 by getting 1000 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Brigadier General:

An expert that has over 10,000 points.

Joined: Apr 23, 2009
Answers
10406
Questions
1
Helped
2556845
Points
31058

It has been almost 17 months, and nobody has helped you.
By now, you probably have failed the computer-course,
and no longer need any help.

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
2answers

How to configure interspire email marketer on postfix?

You can buy legitimate email lists that will work with your system. Just google for email lists and a bunch of marketing groups URLs will result.
0helpful
1answer

How do i add fractions on this calculator?

Press SHIFT [SETUP] 1 to switch to the MthIO mode if you haven't already done so. Use the stacked-boxes key just below the CALC key to enter fractions. For example, to enter 2/3, press stacked-boxes 2 cursor-right 3. For mixed fractions use SHIFT stacked-boxes. For example, to enter 1 1/2 press SHIFT stacked-boxes 1 cursor-right 1 cursor-right 2 cursor-right.

As a full example, to add 1/2 and 1/3, press stacked-boxes 1 cursor-right 2 cursor-right + stacked-boxes 1 cursor-right 3 cursor-right =

(The final cursor-right just before = is optional.)
0helpful
1answer

How do i add fractions?

Press SHIFT [SETUP] 1 to switch to the MthIO mode if you haven't already done so. Use the stacked-boxes key just below the CALC key to enter fractions. For example, to enter 2/3, press stacked-boxes 2 cursor-right 3. For mixed fractions use SHIFT stacked-boxes. For example, to enter 1 1/2 press SHIFT stacked-boxes 1 cursor-right 1 cursor-right 2 cursor-right.

As a full example, to add 1/2 and 1/3, press stacked-boxes 1 cursor-right 2 cursor-right + stacked-boxes 1 cursor-right 3 cursor-right =

(The final cursor-right just before = is optional.)
0helpful
1answer
0helpful
1answer

Stacking problem

That's exactly what's supposed to happen. When you hit "1" it starts to input the number 1 into X. When you press "ENTER" it finishes the number entry and lifts the stack, copying the 1 in X into Y.
If you press a digit key now it will overwrite the number in X.
If you press "+" now, it will add X and Y, giving 2.
If you press a function it will execute that function on the number in X. For example, pressing LN will give you 0. In this case, you don't need to hit "ENTER" at all. To calculate the natural log of 2, for example, you can simply press 2 LN.
0helpful
1answer

The calculator we made in visual basic can't function all four operations consecutively

You really have to give a lot more information in order to enable me to help you. However, by wild guessing, I am trying to nudge you into the right direction.

I assume you are trying to program a simple + - * / = infix calculator with or without a graphical user interface.

To get operators and operator precedence right, it is a good idea to create to a data structure of type stack. Stacks are abstract containers with operations push(), pop() and isempty().
  • Push() puts a new object to the stack,
  • Pop() removes one object from the stack and returns it, unless the stack is empty, in which case an error is generated,
  • isempty() is a boolean function that checks if the stack is empty.
A nice-to-have convenience extra is an operation top(). It returns the topmost stack element without removing it (you can emulate by a pop(); push() sequence at some performance costs, so its not a strict requirement for a stack).
only
Stacks are LIFO memories, Last In, First Out, so what you push most recently will get returned by pop first. Just like a stack of cards where you can put a new card only to the top and take away from the top, too.

Processing of the input is done according to the "Shunting-Yard Algorithm", invented by Edsger Wybe Dijkstra. The link directs you to the Wikipedia page of the algorithm, which does an extensive discussion, much nicer than what I could do here on FixYa.
0helpful
1answer

How to convert infix to postfix using stacks in java programming?

u can try the follwing coding
import java.io.*;
import java.util.*;
//begin coding for the stack interface
interface Stack<E>
{
public boolean isEmpty();//tests is current stack is empty. Returns true if so, and false if not.
public E top() throws StackException;//retrieves value at the top of the stack. Stack cannot be empty.
public void push(E value) throws StackException;//pushes a value on the top of the stack.
public void pop() throws StackException;//removes a value from the top of the stack. Stack cannot be empty.
}//terminates coding of Stack interface

//begin coding for the objArrayStack class
class objArrayStack<E> implements Stack<E>
{
//constructor
public objArrayStack()
{
topValue=-1;
}//terminates constructor
public void push(E value)throws StackException
{
if(topValue<ArraySize-1)//currrent stack is not full
{
++topValue;
Info[topValue]=value;
}//terminates if
else //current stack is full
throw new StackException("Error: Overflow");
}//terminates push method
public void pop() throws StackException
{
if(!isEmpty())//current stack is not empty
--topValue;
else //stack is empty
throw new StackException("Error: Underflow");
}//terminates pop method
public boolean isEmpty()
{
return topValue==-1;
}//terminates isEmpty method
public E top() throws StackException
{
if(!isEmpty())//stack is not empty
return (E)Info[topValue];
else //stack is empty
throw new StackException("Error: Underflow");
}//terminates top method
//declare instance variables
final int ArraySize=10;
private Object Info[]=new Object[ArraySize];
private int topValue;

//begins coding for the StackException class
class StackException extends RuntimeException
{
//constructor
public StackException(String str)
{
super(str);
}//terminates text of constructor
}//terminates text of StackException class

//method to convert from infix to postfix notation
public static String InToPost(String infixString)
{
//operator stack initialized
objArrayStack<Character> operatorStack = new objArrayStack<Character>();
//postfix string initialized as empty
String postfixString = " ";
//scan infix string and take appropriate action
for(int index = 0; index < infixString.length(); ++index)
{
char chValue = infixString.charAt(index);
if(chValue == '(')
operatorStack.push('(');
else if(chValue == ')')
{
Character oper = operatorStack.top();
while(!(oper.equals('(')) && !(operatorStack.isEmpty()))
{
postfixString += oper.charValue();
operatorStack.pop();
oper = operatorStack.top();
}//end while loop
operatorStack.pop();
}//end else if
else if(chValue == '+' || chValue == '-')
{
if(operatorStack.isEmpty()) //operatorStack is empty
operatorStack.push(chValue);
else //current operatorStack is not empty
{
Character oper = operatorStack.top();
while(!(operatorStack.isEmpty() || oper.equals(new Character('(')) || oper.equals(new Character(')'))))
{
operatorStack.pop();
postfixString += oper.charValue();
}//ends while loop
operatorStack.push(chValue);
}//end else
}//end else if
else if(chValue == '*' || chValue == '/')
{
if(operatorStack.isEmpty())
operatorStack.push(chValue);
else
{
Character oper = operatorStack.top();
while(!oper.equals(new Character('+')) && !oper.equals(new Character('-')) && !operatorStack.isEmpty())
{
operatorStack.pop();
postfixString += oper.charValue();
}//end while loop
operatorStack.push(chValue);
}//end else
}//end else if
else
postfixString += chValue;
}//end for loop
while(!operatorStack.isEmpty())
{
Character oper = operatorStack.top();
if(!oper.equals(new Character('(')))
{
operatorStack.pop();
postfixString += oper.charValue();
}//end if
}//end while
return postfixString ;
}//terminates text of InToPost method

public static void main(String[]args)
{
objArrayStack mystack = new objArrayStack();
System.out.println("Enter a string");
Scanner scan = new Scanner(System.in);
scan.nextLine();
String str = scan.nextLine();
InToPost(str);
}//terminates text of main method
}//terminates text of objArrayStack class
0helpful
1answer

My E-Mail Server is down

the solution i will be posting assumes you already have postfix installed in the new machine and that your new postfix server is able to relay mails. Old configurations has been copied/transported to the new server ( and the only remaining task is to move all the mails to the new postfix server.

copy /home (your maildir) to your new server - check your postfix configuration to verify your maildir

also make sure you have copied

/etc/passwd
/etc/shadow
/etc/group
/etc/gshadow
/var/spool/mail

to your new mail server ( these are your mail related files)

Note: This is assuming you have identical setup you have with your old email server. double check your postfix configuaration before proceeding.

Good Luck

0helpful
1answer

Tree structure

Mor especifics are needed in order to help you.
Not finding what you are looking for?

41 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...