Help with java coding involving stacks and queues.

I was wondering if anyone can help with tips on what to fill in for the coding.
My project is to creating a word processor by the process of 2 stacks. The methods are given, but I'm not really sure what goes in them. So I was wonder if anyone can answer this for me, or give tips that would be great thanks.
Example Code, similar to what were suppose to do, but instead it's CHARACTER stacks rather than String.
[http://www.cs.jhu.edu/~jason/226/hw3/source/EditableString.java]

/** Stack of Characters to the left of the cursor; the ones
   * near the top of the stack are closest to the cursor.
  private Stack left;
  /** Stack of Characters to the right of the cursor; the ones
   * near the top of the stack are closest to the cursor.
  private Stack right;Do you know how a stack works?
No - Google it
Yes - Continue on with this post
/** Another constructor.
   * @param left The text to the left of the cursor.
   * @param right The text to the right of the cursor.
  public EditableString(String left, String right) {
    // fill this in
  }Do you know how to read?
No - How did you answer this question then?
Yes - Then why can't you read the comments above each method. Is it really that hard to understand?
Mel

Similar Messages

  • Need help with java coding

    Hi i have a problem with some coding on my assingment can some expert help me please. i have been trying to work on it for days. Thanks :-
    public class AnnualHireRevenue
    private static final int vehicleno = 12;
    double[]numbers = new double[vehicleno];
    public AnnualHireRevenue()
    for(int i =0; i<vehicleno; i++)
    numbers[i] = new double();
    public void setRevenue()
    for(int i=0; i<vehicleno; i++)
    System.out.println("Please Enter Vehicle No"+(i+1));
    numbers[i] = EasyIn.getDouble();
    if (numbers <=12)
    System.out.println("Please Enter Vehicle Yearly Revenue");
    numbers[i] = EasyIn.getDouble();
    else
    System.out.println("InvalidNumberPleaseEnteragain");
    numbers[i] = EasyIn.getDouble();
    I am trying to create to arrays the first one works but this one don't the first on is a String array with int for loop.
    This one is a double array and having problems for some reason.
    I would be great full if some one can help me thanks
    my email is [email protected]

    public class AnnualHireRevenue
    private static final int vehicleno = 12;
    double[]numbers = new double[vehicleno];
    public AnnualHireRevenue()
    for(int i =0; i<vehicleno; i++)
    numbers[i] = new double();
    public void setRevenue()
    for(int i=0; i<vehicleno; i++)
    System.out.println("Please Enter Vehicle
    icle No"+(i+1));
    numbers[i] = EasyIn.getDouble();
    if (numbers <=12)
    System.out.println("Please Enter Vehicle Yearly
    arly Revenue");
    numbers[i] = EasyIn.getDouble();
    else
    System.out.println("InvalidNumberPleaseEnteragain");
    numbers[i] = EasyIn.getDouble();
    I am trying to create to arrays the first one works
    but this one don't the first on is a String array with
    int for loop.
    This one is a double array and having problems for
    some reason.
    I would be great full if some one can help me thanks
    my email is [email protected]
    Get rid of your constructor. That's the 1st problem.
    public AnnualHireRevenue()
    //for(int i =0; i<vehicleno; i++)
    //double is a primitive type, so 'new' won't work.
    //    numbers[i] = new double();

  • Help regarding Stacks and Queues.!!!!!!Please....

    I have a working program right now..But it lacks some things to be done..It already does the stacks and queues..But still it doesnt print the info on the desired output file outTwo.dat..Both the stacks and queues should be printed on it..Also it has to compute the total commission on categories 1 and 2...and put it again on the outTwo.dat..Any kind hearted people would want to help me here?Here's the assignment detail...Thank YOU!!!!
    Q2. Linked List
    a.     create a compile AStack class, and a AQueue class similar to the text
    b.     provide an application that will:
    �     instantiate an AStack object and an AQueue object
    �     create a property object for each data line read from the input file assign4.dat
    �     push it ti the stack if its is category 1 property; queue if its is category 2; ignore all others
    �     print a title called category 1 to an output file called outTwo.dat
    �     after printing a few blank lines to outTwo.dat, print a title called category 2 to outTwo.dat
    �     traverse the queue and print it to the same output file outTwo.dat
    �     print the total commission earned on this category of property to outTwo.dat
    Note that for this question you should also print out and submit outTwo.dat. Have Fun!
    //This is the program I have done so far....
    import java.io.*;
    import java.util.StringTokenizer;
    public class TestSQ {
         public static void readFileSQ(AStack s, AQueue q)
              try {
    FileReader inStream=new FileReader("assign4.dat");
    BufferedReader ins= new BufferedReader(inStream);
    FileWriter outStream=new FileWriter("outTwo.dat");
    PrintWriter outs= new PrintWriter(outStream);
    String line;
    int category;
    double price;
    String categoryString;
    String priceString;
    StringTokenizer st;
    while((line=ins.readLine())!=null) {
    st=new StringTokenizer(line," ");
    if(st.countTokens()==2){
    categoryString = st.nextToken();
    priceString = st.nextToken();
    try{
    category = Integer.parseInt(categoryString);
    price = Double.parseDouble(priceString);
    Property myProperty = new Property(category, price);
    myProperty.setCommissionRate();
    myProperty.getCommission();
         if(category==1)
    s.push(myProperty);
    outs.println(s.toString());
    if(category==2)
                             q.insert(myProperty);
                             outs.println(q.toString());
    }catch(NumberFormatException nfe){
    System.out.println("error while parsing Integer: "+categoryString+"/"+priceString);
    else
    System.out.println("invalid number of elements in line: " +st.countTokens());
    catch (IOException e) {
    System.out.println("i/o error:"+e.getMessage());
    e.printStackTrace();
         public static void showStack(AStack s){
              while(!s.isEmpty()){
                   Object line=s.pop();
                   System.out.println(line);
    public static void main(String args[])
         AStack stackOfProperty=new AStack();
         AQueue queueOfProperty=new AQueue();
         readFileSQ(stackOfProperty,queueOfProperty);
         showStack(stackOfProperty);
         System.out.println();
         System.out.println(queueOfProperty.toString());
    }

    import java.io.*;
    import java.util.StringTokenizer;
    public class TestSQ {
         public static void readFileSQ(AStack s, AQueue q)
              try {
                FileReader inStream=new FileReader("assign4.dat");
                BufferedReader ins= new BufferedReader(inStream);
                FileWriter outStream=new FileWriter("outTwo.dat");
                PrintWriter outs= new PrintWriter(outStream);
                String line;
                int category;
                double price;
                String categoryString;
                String priceString;
                StringTokenizer st;
                 while((line=ins.readLine())!=null) {
                    st=new StringTokenizer(line," ");
                    if(st.countTokens()==2){
                        categoryString = st.nextToken();
                        priceString = st.nextToken();
                        try{
                            category = Integer.parseInt(categoryString);
                            price = Double.parseDouble(priceString);
                            Property myProperty = new Property(category, price);
                            myProperty.setCommissionRate();
                            myProperty.getCommission();
                                if(category==1)
                            s.push(myProperty);
                          //  outs.println(s.toString());
                            else if(category==2)
                                 q.insert(myProperty);
                                 outs.println(q.toString());
                        }catch(NumberFormatException nfe){
                            System.out.println("error while parsing Integer: "+categoryString+"/"+priceString);
                    else
                        System.out.println("invalid number of elements in line: " +st.countTokens());
                outs.close();
                ins.close();
            catch (IOException e) {
                System.out.println("i/o error:"+e.getMessage());
                e.printStackTrace();
         public static void showStack(AStack s){
              while(!s.isEmpty()){
                   Object line=s.pop();
                   System.out.println(line);
        public static void main(String args[])
             AStack stackOfProperty=new AStack();
             AQueue queueOfProperty=new AQueue();
             readFileSQ(stackOfProperty,queueOfProperty);
             showStack(stackOfProperty);
             System.out.println();
             System.out.println(queueOfProperty.toString());
       }//This is the updated version of my program..Now the ouput file works now, but then it shows different ouput..Thats only for the queue.I dont know about the stack..Tnx for looking...

  • Stacks and Queues

    Hello, I am new to Java and am working out an assignment. I need to manipulate some stacks and queues in various ways.
    I need to reverse a stack in three different ways:
    1. using two additional stacks.
    2. using one additional queue.
    3. using one additional stack and some additional non-array variables.
    I think I have ways to do 1 and 2 but I'm a bit confused about 3.
    For 1, I would pop the the elements off of the full stack A, and push them onto B. Then pop them from B and push them to C. Then pop them from C and push them to A, thus reversing the order.
    For 2, simply pop the elements from the stack and enqueue them in the queue. Then dequeue them and push them back to the stack.
    For 3, not really sure where to start or how? I could think of how to do it with an array but I'm drawing a blank on this. I don't want anyone to write the code for me just maybe point me in the right direction?
    The assignment then carries on to sorting in ascending order using a stack and then just using non-array variables. I feel like if I can figure out number 3 above the rest will be along similar lines.
    Any help is greatly appreciated.

    The restrictions might be nudging towards a constant-storage algorithm. In which case, try the following.
    You can move any element to the top of the stack using a stack and non-array variables. Take the 4th element for example:
    Pop 3 elements from the stack and push onto the other.
    Pop the next element and store in a variable.
    Pop the 3 elements from the second stack and push back on the first.
    Push the value from the variable onto the first stack.
    This can be used for reversing and sorting the stack.

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Need help with XML Coding

    I'm trying to write an IF statement similar to <?if:QUANTITY='0'?> but would like to say 'is greater than' 0. I'm not very familiar with the coding in XML and what characters I'm able to use since I can't use <> in the coding. Can anyone help?
    Thanks,
    Susan

    Hello,
    If you want to represent '<' and '>' in xml you must entity encode them with &amp;lt; and &amp;gt; respectively.

  • Oracle Help for Java 4.2.0 and 4.1.17

    Attention to all: Oracle Help for Java 4.2.0 and 4.1.17 are now available for download at
    http://otn.oracle.com/software/tech/java/help/content.html
    OHJ 4.2.0 features a new Ice Browser and enhancements related to the known modal dialog problem. It requires JDK 1.3 and is a recommended upgrade for all clients using JDK 1.3 or higher.

    4.1.17 appears to work correctly with RoboHelp.
    4.2 gives an error when attempting to generate fts.idx via RoboHelp.

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • Need help with how to reset bios and admin password to reformat hard drive in 8440p elitebook.......

    need help with how to reset bios and admin password to reformat hard drive in 8440p elitebook? removal of cmos, resetting laptop, using cccleaner, windows password recovery and hiren's was noneffective, any help is appreciated. thanks

    Hi,
    As your notebook is a business class machine, security is more stringent - the password is stored in non-volatile memory and there are no 'backdoor' passwords.  Your best option would be to contact HP regarding this.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.01 Updates on Iphone 4?

    Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.06 Updates on Iphone 4?
    I have tried the following all ready:
    Resetting Phone
    Resetting Settings on phone
    Change Headsets to speakers
    Reinstalled Phone
    Updated to IOS 7.1
    No of the above has resolved the issue does anyone have any ideas?

    Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.06 Updates on Iphone 4?
    I have tried the following all ready:
    Resetting Phone
    Resetting Settings on phone
    Change Headsets to speakers
    Reinstalled Phone
    Updated to IOS 7.1
    No of the above has resolved the issue does anyone have any ideas?

  • Our Java application is built with java 1.4 version and oracle 10g

    Our Java application is built with java 1.4 version and oracle 10g version database, is it possible to upgrade oracle database to 11g?

    is it possible to upgrade
    Yes. SE and the other editions have a migration/upgrade utility, not seeing any mention of that program in the XE license docs. To upgrade to 11gR2 from 10g, the 10g instance must be at patch 10.2.0.2 or higher.
    So if you're a GUI dba, might be out of luck. But the the XE install has the catalog upgrade scripts that need to be run, there is a MOS note explaining the manual upgrade steps.
    Or set up a brand new 11g database instance and datapump your user schema(s) from the 10g instance to the new 11g instance. The database doesn't care what java version you're using, it just does what its told with the data. DDL, DCL, DML ... its not much different. Quite a few new features in 11g.
    But if you're after JVMs that piece is not supported with XE.

  • Hi i would like help with:  When I draw circle and add stroke I can not see stroke  I use Photoshop CS 5

    Hi i would like help with:
    When I draw circle and add stroke I can not see stroke
    I use Photoshop CS 5

    Make sure the stroke is set to a color and not to the symbol that appears here for Fill

  • Stack and queue problem

    hi i am trying to change infix expression to postfix and also the opposite, like
    ((a+b)*(a-c*d)/(b+d*e)) to ab+acb*-bde+/
    using stack and queue
    I am so confuse

    Hello,
    See this URL :
    http://www24.brinkster.com/premshree/perl
    You will find the algorithms here.
    Here is a Perl version :
    #     Script:          infix-postfix.pl
    #     Author:          Premshree Pillai
    #     Description:     Using this script you can :
    #               - Convert an Infix expression to Postfix
    #               - Convert a Postfix expression to Infix
    #               - Evaluate a Postfix expression
    #               - Evaluate an Infix expression
    #     Web:          http://www.qiksearch.com
    #     Created:     23/09/02 (dd/mm/yy)
    #     � 2002 Premshree Pillai. All rights reserved.
    sub isOperand
         ($who)=@_;
         if((!isOperator($who)) && ($who ne "(") && ($who ne ")"))
              return 1;
         else
              return;
    sub isOperator
         ($who)=@_;
         if(($who eq "+") || ($who eq "-") || ($who eq "*") || ($who eq "/") || ($who eq "^"))
              return 1;
         else
              return;
    sub topStack
         (@arr)=@_;
         my $arr_len=@arr;
         return($arr[$arr_len-1]);
    sub isEmpty
         (@arr)=@_;
         my $arr_len=@arr;
         if(($arr_len)==0)
              return 1;
         else
              return;
    sub prcd
         ($who)=@_;
         my $retVal;
         if($who eq "^")
              $retVal="5";
         elsif(($who eq "*") || ($who eq "/"))
              $retVal="4";
         elsif(($who eq "+") || ($who eq "-"))
              $retVal="3";
         elsif($who eq "(")
              $retVal="2";
         else
              $retVal="1";
         return($retVal);
    sub genArr
         ($who)=@_;
         my @whoArr;
         for($i=0; $i<length($who); $i++)
              $whoArr[$i]=substr($who,$i,1);
         return(@whoArr);
    sub InfixToPostfix
         ($infixStr)=@_;
         my @infixArr=genArr($infixStr);
         my @postfixArr;
         my @stackArr;
         my $postfixPtr=0;
         for($i=0; $i<length($infixStr); $i++)
              if(isOperand($infixArr[$i]))
                   $postfixArr[$postfixPtr]=$infixArr[$i];
                   $postfixPtr++;
              if(isOperator($infixArr[$i]))
                   if($infixArr[$i] ne "^")
                        while((!isEmpty(@stackArr)) && (prcd($infixArr[$i])<=prcd(topStack(@stackArr))))
                             $postfixArr[$postfixPtr]=topStack(@stackArr);
                             pop(@stackArr);
                             $postfixPtr++;
                   else
                        while((!isEmpty(@stackArr)) && (prcd($infixArr[$i])<prcd(topStack(@stackArr))))
                             $postfixArr[$postfixPtr]=topStack(@stackArr);
                             pop(@stackArr);
                             $postfixPtr++;
                   push(@stackArr,$infixArr[$i]);
              if($infixArr[$i] eq "(")
                   push(@stackArr,$infixArr[$i])
              if($infixArr[$i] eq ")")
                   while(topStack(@stackArr) ne "(")
                        $postfixArr[$postfixPtr]=pop(@stackArr);
                        $postfixPtr++;
                   pop(@stackArr);
         while(!isEmpty(@stackArr))
              if(topStack(@stackArr) eq "(")
                   pop(@stackArr)
              else
                   $temp=@postfixArr;
                   $postfixArr[$temp]=pop(@stackArr);
         return(@postfixArr);
    sub PostfixToInfix
         ($postfixStr)=@_;
         my @stackArr;
         my @postfixArr=genArr($postfixStr);
         for($i=0; $i<length($postfixStr); $i++)
              if(isOperand($postfixArr[$i]))
                   push(@stackArr,$postfixArr[$i]);
              else
                   $temp=topStack(@stackArr);
                   pop(@stackArr);
                   $pushVal=topStack(@stackArr).$postfixArr[$i].$temp;
                   pop(@stackArr);
                   push(@stackArr,$pushVal);
         return((@stackArr));
    sub PostfixEval
         ($postfixStr)=@_;
         my @stackArr;
         my @postfixArr=genArr($postfixStr);
         for($i=0; $i<length($postfixStr); $i++)
              if(isOperand($postfixArr[$i]))
                   push(@stackArr,$postfixArr[$i]);
              else
                   $temp=topStack(@stackArr);
                   pop(@stackArr);
                   $pushVal=PostfixSubEval(topStack(@stackArr),$temp,$postfixArr[$i]);
                   pop(@stackArr);
                   push(@stackArr,$pushVal);
         return(topStack(@stackArr));
    sub PostfixSubEval
         ($num1,$num2,$sym)=@_;
         my $returnVal;
         if($sym eq "+")
              $returnVal=$num1+$num2;
         if($sym eq "-")
              $returnVal=$num1-$num2;
         if($sym eq "*")
              $returnVal=$num1*$num2;
         if($sym eq "/")
              $returnVal=$num1/$num2;
         if($sym eq "^")
              $returnVal=$num1**$num2;
         return($returnVal);
    sub joinArr
         (@who)=@_;
         my $who_len=@who;
         my $retVal;
         for($i=0; $i<$who_len; $i++)
              $retVal.=$who[$i];
         return $retVal;
    sub evalInfix
         ($exp)=@_;
         return PostfixEval(joinArr(InfixToPostfix($exp)));
    sub init
         my $def_exit="\n\tThank you for using this Program!\n\tFor more scripts visit http://www.qiksearch.com\n";
         printf "\n\tInfix - Postfix\n";
         printf "\n\tMenu";
         printf "\n\t(0) Convert an Infix Expression to Postfix Expression";
         printf "\n\t(1) Convert a Postfix Expression to Infix Expression";
         printf "\n\t(2) Evaluate a Postifx Expression";
         printf "\n\t(3) Evaluate an Infix Expression";
         printf "\n\t(4) Exit this Program";
         printf "\n\t(5) About this Program\n";
         printf "\n\tWhat do you want to do? (0/1/2/3/4/5) ";
         $get=<STDIN>;
         chomp $get;
         if(!(($get eq "0") || ($get eq "1") || ($get eq "2") || ($get eq "3") || ($get eq "4") || ($get eq "5")))
              printf "\n\t'$get' is an illegal character.\n\tYou must enter 0/1/2/3/4/5.";
         if(($get ne "4") && ($get ne "5") && (($get eq "0") || ($get eq "1") || ($get eq "2") || ($get eq "3")))
              printf "\n\tEnter String : ";
              $getStr=<STDIN>;
              chomp $getStr;
         if($get eq "0")
              printf "\tPostfix String : ";
              print InfixToPostfix($getStr);
         if($get eq "1")
              printf "\tInfix String : ";
              print PostfixToInfix($getStr);
         if($get eq "2")
              printf "\tPostfix Eval : ";
              print PostfixEval($getStr);
         if($get eq "3")
              printf "\tExpression Eval : ";
              print evalInfix($getStr);
         if($get eq "4")
              printf $def_exit;
              exit 0;
         if($get eq "5")
              printf "\n\t======================================================";
              printf "\n\t\tInfix-Postfix Script (written in Perl)";
              printf "\n\t\t(C) 2002 Premshree Pillai";
              printf "\n\t\tWeb : http://www.qiksearch.com";
              printf "\n\t======================================================\n";
              printf "\n\tUsing this program, you can : ";
              printf "\n\t- Convert an Infix Expression to Postfix Expression.";
              printf "\n\t Eg : 1+(2*3)^2 converts to 123*2^+";
              printf "\n\t- Convert a Postfix Expression to Infix Expression.";
              printf "\n\t Eg : 123*+ converts to 1+2*3";
              printf "\n\t- Evaluate a Postfix Expression";
              printf "\n\t Eg : 37+53-2^/ evaluates to 2.5";
              printf "\n\t- Evaluate an Infix Expression";
              printf "\n\t Eg : (5+(4*3-1))/4 evaluates to 4";
              printf "\n\n\tYou can find the algorithms used in this Program at : ";
              printf "\n\t-http://www.qiksearch.com/articles/cs/infix-postfix/index.htm";
              printf "\n\t-http://www.qiksearch.com/articles/cs/postfix-evaluation/index.htm";
              printf "\n\n\tYou can find a JavaScript implementation of 'Infix-Postfix' at : ";
              printf "\n\t-http://www.qiksearch.com/javascripts/infix-postfix.htm";
         printf "\n\n\tDo you want to continue? (y/n) ";
         my $cont=<STDIN>;
         chomp $cont;
         if($cont eq "y")
              init();
         else
              printf $def_exit;
              exit 0;
    init;

  • Collage Students need help with Java project(Email Server) whats analysis?

    Hi im studying in collage at the moment and i have just started learning java this semester, the thing is my teacher just told us to do an project in java , since we just started the course and i dont have any prior knowledge about java i was wondering if some one could help me with the project.
    i choose Email Sevice as my project and we have to submit an analysis and design document , but how the hell am i suppose to know what analysis is ? i just know we use ER diagrams & DFD's in the design phase but i dont know what analysis means ?
    could some one tell me what analysis on an email service might be? and what analysis on a subject means? is it the codeing involved or some thing coz the teacher told us not to do any codeing yet so im completly stumped,
    oh and btw we are a group of 3 students who are asking u the help here coz all of us in our class are stupmed ?

    IN case any one is interested this is the analysis i wrote
    ANALYSIS
    Analysis means figuring out what the problem is, maybe what kinds of solutions might be appropriate
    1.     Introduction:-
    The very definition of analysis is an investigation of the component parts of a whole and their relations in making up the whole. The Analysis done here is for an emailing service called Flashmail, the emailing service is used to send out mails to users registered with our service, these users and there log activities will be stored in some where, the most desirable option at this time is a Database, but this can change as the scope of the project changes.
    2.     Customer Analysis:-
    We are targeting only 30 registered users at the moment but this is subject to change as the scale changes of the project .Each user is going to be entitled to 1MB of storage space at this time since we lack the desired infrastructure to maintain anything higher than 1MB but the end vision of the project is to sustain 1000 MB of storage space while maintaining a optimal bandwidth allocation to each user so as to ensure a high speed of activity and enjoyment for the Customer.
    The Service will empower the user to be able to send, read, reply, and forward emails to there specified locations. Since we are working on a limited budget we can�t not at this time enable the sending of attachments to emails, but that path is also left open by modularity of java language, so we can add that feature when necessary.
    3.     Processor Load Analysis:-
    The number of messages per unit time processing power will be determined on hand with various algorithms, since it is best not to waste processor power with liberally distributing messages per unit time. Hence the number of messages will vary with in proportion to the number of registered users online at any given time.
    4.     Database Decision Analysis:-
    The High level Requirements of the service will have to be decided upon, the details of which can be done when we are implementing the project itself. An example of high level requirements are database management, we have chosen not to opt for flat files because of a number of reasons, first off a flat files are data files that contain records with no structured relationships additional knowledge is required to interpret these files such as the file format properties. The disadvantages associated with flat files are that they are not fast, they can only be read from top to bottom, and usually they have to be read all the way through. Though there is are advantages of Flat files they are that it takes up less space than a structured file. However, it requires the application to have knowledge of how the data is organized within the file.
    Good databases have key advantage over flat files concurrency. When you just read stuff from file it�s easy, but tries to synchronize multiple updates or writes into flat file from scripts that run in different process spaces.
    Whereas a flat file is a relatively simple database system in which each database is contained in a single table. In contrast, relational database systems can use multiple tables to store information, and each table can have a different record format.
    5.     Networking Analysis:-
    Virtually every email sent today is sent using two popular protocols known as SMTP (Simple Mail Transfer Protocol) and MIME (Multipurpose Internet Mail Extensions).
    1.     SMTP (Simple Mail Transfer Protocol)
    The SMTP protocol is the standard used by mail servers for sending and receiving email. In order to send email we will first establish a network connection to our SMTP server. Once you have finished sending your email message it is necessary that you disconnect from the SMTP server
    2.     MIME (Multipurpose Internet Mail Extensions)
    The MIME protocol is the standard used when composing email messages.

  • Help with java code

    im pretty new to java coding and im having trouble getting one method to work. I would appreciate it ifsum could look at the following code in the runpayroll method to see where im going wrong as it will not compile
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.BufferedReader;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.File;
    * Textfile-based staff list with payroll, appointment, and redundancy functions
    * @author Andrew Mackel
    * @version 1.0
    public class StaffList
    // CONSTANTS ***************************************************************
    final String STAFF_FILE = "staff.txt";
    final String TEMP_FILE = "temp.txt";
    final int[] PAYSCALE = {1000, 1050, 1100, 1150, 1200,
    1300, 1400, 1600, 1800, 2000, 2500};
    final int SEVERANCE_MULTIPLE = 3;
    // INSTANCE VARIABLES ******************************************************
    // CONSTRUCTORS ************************************************************
    * Constructor
    StaffList ()
    // no actions
    // METHODS *****************************************************************
    // TO DO: write addStaffMember() method which appends a line to the staff
    // file containing the number, name and grade of the new member
    // of staff (tab separated)
    // TO DO: write runPayroll() method which prints a header saying
    // "XXX Payroll" where XXX is the month, then reads each record
    // in the staff file and for each prints an advice of the form:
    // Salary advice for Freda Bloggs
    // Employee number: 42
    // Employee grade: 6
    // Monthly salary: �1400
    // and finally returns the total cost of the month's payroll
    * Remove staff member from file and calculate severance payment
    * @param pNum staff number
    * @return severance payment due (or -1 if pNum not found in staff file)
    public int makeRedundant(int pNum)
    String inputLine;
    String[] inputFields;
    int staffNum;
    int staffGrade = -1;
    int severance;
    try
    FileReader fr = new FileReader(STAFF_FILE);
    BufferedReader br = new BufferedReader (fr);
    FileWriter fw = new FileWriter(TEMP_FILE, false);
    PrintWriter pw = new PrintWriter(fw);
    inputLine = br.readLine();
    while (inputLine != null)
    inputFields = inputLine.split("\t");
    staffNum = Integer.parseInt(inputFields[0]);
    if (staffNum == pNum)
    staffGrade = Integer.parseInt(inputFields[2]);
    else
    pw.println(inputLine);
    inputLine = br.readLine();
    fr.close();
    fw.close();
    if (staffGrade != -1)
    File staffFile = new File(STAFF_FILE);
    File tempFile = new File(TEMP_FILE);
    staffFile.delete();
    tempFile.renameTo(staffFile);
    severance = PAYSCALE[staffGrade] * SEVERANCE_MULTIPLE;
    else
    severance = -1;
    return severance;
    catch (IOException ioe)
    User.message("Unable to read/write from staff file");
    User.message("EXCEPTION: " + ioe);
    return -1;
    public void addStaffMember (int pNum, String pName, int pGrade)
    try
    // create writers for output file (to append not overwrite)
    FileWriter fw = new FileWriter(STAFF_FILE, true);
    PrintWriter pw = new PrintWriter(fw);
    // print pNum, pName and pGrade (TAB-separated) and close file
    pw.println(pNum + "\t" + pName + "\t" + pGrade);
    pw.close();
    catch (java.io.IOException ioe)
    // there has been an output error - display message and details
    User.message("ERROR: unable to write to staff file");
    User.message("EXCEPTION: " + ioe);
    * Display a list of all invoices and total on system console
    void runPayroll(String pMonth)
    String inputLine;
    String[] inputFields;
    int pNum;
    String pName;
    int pGrade;
    int total=0;
    System.out.println("Payroll for the month of: " + pMonth);
    try
    // create readers for input file
    FileReader fr = new FileReader(STAFF_FILE);
    BufferedReader br = new BufferedReader(fr);
    // read first line
    inputLine = br.readLine();
    // read lines of input until EOF
    while (inputLine != null)
    // split input line by tabs and assign fields to variables
    inputFields = inputLine.split("\t");
    pNum = inputFields[0];
    // print invoice details and add to total
    System.out.println("Staff Member: " + pNum + pName + pGrade + " - Salary: " + PAYSCALE);
    total = total;
    // read next line of input
    inputLine = br.readLine();
    // close file and print total
    fr.close();
    System.out.println("TOTAL: " + total);
    catch (java.io.IOException ioe)
    // there has been an input error - display message and details
    User.message("ERROR: unable to read invoice file");
    User.message("EXCEPTION: " + ioe);
    }

    1) use code tags
    2) who or what is ifsum ? (In other words spell things out and make your message clear
    3) it won't compile so it's likely giving you errors - those help people help you lots.
    4) keep the code short - in other words if you are having problems in runpayroll post that to start as the rest is just taking attention away from your problem.

Maybe you are looking for

  • ECM application in VC

    Hi Experts If suppose you use ECM for VC Selection condition which is written in BOM or Routing, suppose if I Make a Change for existing selction condition,how it shall consider  Existing Sale Orders which are open/Released in productiom, for Release

  • Pages '09: Can't Embed Link to Map in PDF

    I'm really stumped. Links to web pages that I embed in my Pages publishing docs operate as expected when I export the document to PDF. However, I'm having no success with links to Google, Mapquest or Yahoo maps. The links are live in Pages, but are d

  • Skipped items in import manager

    Hi, If i have around 10000 masterdata and in that i impoted around 8000 through import manager and 2000 i skipped as duplicates, Is there a way to check that this 2000 records will there be any way to track this as below, 10000 record recd in import

  • Cant load movies to apple tv

    I have a problem with my apple tv.. after i watch a movie, listen to a song etc from my itunes library, the thing i am trying to open wont open!! it just stayes with the loading screen forever. I then restart my apple tv and it works again for 1 movi

  • Increment the number with date/time string. when ever the next date come's it should reset again with initial number

     i want to store the number of records in a file. Every time when ever i run the program the record will be incremented well i using forloop with count value 1 as a constant .in the for loop i am using autoincrement with the  feedback node . to view