Error 1603: Need some help with this one

When installing iTunes I first get an error box saying
"Error 1406: Could not write value to key \Software\classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that key, or contact your support personnel."
The second one (after I click on Ignore on the last box) I get it this one:
"Error: -1603 Fatal error during installation.
Consult Windows Installer Help (Msi.chm) or MSDN for more information"
Strange thing is that I do have full access to my computer (or atleast in all other cases I have had since I am the only one with an account on it).
I have done my best in trying to solve it myself but I'm running out of ideas. I have downloaded latest versions from the website and tried installing Quicktime separately. I have also tried removing Quicktime using add/or remove programs though I just I didn't dare to take full removal because it said something about system files.
Anyway I really need some help with this, anyone got any ideas?
Greets,
Sixten
  Windows XP Pro  

Do you know how to count backwards? Do you know how to construct a loop? Do you know what an autodecrementor is? Do you know how to use String length? Do you know Java arrays start with index 0 and run to length-1? Do you know you use length on arrays too? Do you know what System.out.println does?
Show us what you have, there isn't anything here that isn't easily done the same as it would be on paper.

Similar Messages

  • Could i get some help with this one

    the aim of this project is to make a n by n maze and traverse this. if, while traversing the maze the system realises that there is a dead end it turns back. My problem is that sometimes it turns back and sometimes it doesnt. Here, below is the method for traversing the maze. Could i get a second pair of eyes to help me out a bit with this code?
         * Prints out the current maze
        public void show()
             for (int i=0;i<array.length;i++)
                for (int j=0; j<array.length;j++)
    System.out.print(array[i][j]) ;
    System.out.println();
    * traverses through the maze
    * @param row: the current row
    * @param column: the current column
    public void traverse(int row, int column)
    if ((row==3)&&(column==column-1))//checks if the array has reached the end
    System.out.println("array is solved");
    }else
    if(array[row-1][column]=='.')//checks if should move up
    array[row][column]='x';//marks path
    array[row-1][column]='x';//marks path
    System.out.println();
    show();
    traverse(row-1,column);
    }else
    if (array[row+1][column]=='.')//checks if should move down
    array[row][column]='x';//marks path
    array[row+1][column]='x';//marks path
    System.out.println();
    show();
    traverse(row+1,column);
    }else
    if(array[row][column+1]=='.')//checks if should move left
    array[row][column]='x'; //marks path
    array[row][column+1]='x';//marks path
    System.out.println();
    show();
    traverse(row,column+1);
    }else
    if ((row!=3)&&(column!=0))
    if(array[row][column-1]=='.')//checks if should move right
    array[row][column]='x'; //marks path
    array[row][column-1]='x';//marks path
    System.out.println();
    show();
    traverse(row,column-1);
    }else/*1*/ if((array[row-1][column]=='#')||((array[row-1][column]=='*'))&&(array[row+1][column]=='#')||(array[row+1][column]=='*')&&(array[row][column+1]=='#')||(array[row][column+1]=='*'))
    //checks if up is clear to move back
    //checks if down is clear so could move back
    //checks if right is clear to move back
    if(row==3&&column-1==0)//checks if at the beginning of the array
    System.out.println("MAze cannot be solved");
    }else
    if (array[row][column-1]=='x')//checks if behind has a x to move
    array[row][column]='*';//prints dead end
    array[row][column-1]='.';
    System.out.println();
    show();
    traverse(row,column-1);
    }else/*2*/ if((array[row+1][column]=='#')||(array[row+1][column]=='*')&&(array[row][column-1]=='#')||(array[row][column-1]=='*')&&(array[row][column+1]=='#')||(array[row][column+1]=='*'))
    //checks if left is clear to move back
    //checks if right is clear to move back
    //checks if up is clear to move back
    if(row-1==3&&column==0)//checks if at the begining of the maze
    System.out.println("MAze cannot be solved");
    }else if (array[row-1][column]=='x')//checks if behind as been marked
    array[row][column]='*';//marks as dead end
    array[row-1][column]='.';
    System.out.println();
    show();
    traverse(row-1,column);
    }else/*3*/ if((array[row+1][column]=='#')||(array[row+1][column]=='*')&&(array[row][column-1]=='#')||(array[row][column-1]=='*')&&(array[row][column+1]=='#')||(array[row][column+1]=='*'))
    //checks if right is clear to move back
    // checks if left is clear to move back
    //checks if up is clear to move back
    if (array[row-1][column]=='x')//checks if behind as been marked as a path
    array[row][column]='*';//marks as dead end
    array[row-1][column]='.';
    System.out.println();
    show();
    traverse(row-1,column);
    } else/*4*/ if((array[row][column-1]=='#')||(array[row][column-1]=='*')&&(array[row+1][column]=='#')||(array[row+1][column]=='*')&&(array[row-1][column]=='#')||(array[row-1][column]=='*'))
    //checks if right is clear to move back
    //checks if down is clear to move back
    //checks if up is clear to move back
    if (array[row][column+1]=='x')//checks if behind has been marked as a path
    array[row][column]='*';//marks as dead end
    array[row][column+1]='.';
    System.out.println();
    show();
    traverse(row,column+1);

    morgalr wrote:
    That is truely one of the better threads that I've seen on the net for maze traversal.Forget "for maze traversal". That was one of the most interesting of all the threads I've seen here in quite a while. My sincerest admiration to those who contributed and eventually worked it out (and it wasn't me that's for sure), and especially to Keith. Impressive!

  • I have a iphone 4  and when i call people then cant hear me  and the mute is off ..  need some help with this problem

    i have a iphone 4 and when i call people about 70 percent of the time then cant hear me and the mute is not on ,  need some help

    Please see the  More Like This  section on the right.

  • Need some help with this Design.  Not sure if it can be done.

    I am a full time RVer. I have a complex system installed in my RV. I am trying to share a wireless or use my AE to feed internet to the devices in my rack and allow my Apple TV to connect to my MBP over gigabit for streaming reasons.
    Is there a way to share my internet to the AE so that it will feed the 3 ports? Can I somehow connect to a hotspot and share that internet connection to the other devices on my network wired and wireless?? I am mainly concerned with getting internet to the ATV while connected to it via ethernet for the gigabit connection.
    It seems that I can connect the AE to a hotspot or WAP, but then I loose the ability to turn bridged mode off so that it will hand out DHCP ip addresses to the ethernet devices. I cannot extend any network unless the hotspot is using an apple device for its WAP. This is what apple told me when I was trying to extend my Linksys WAP4400N.
    Any ideas or advice here would be great. I am just stuck for a solution to what I want to accomplish.
    Thanks

    One possible solution....(if I understand correctly what you're trying to accomplish with what you have to work with) I'm assuming that the Linksys has no internet connection in the RV and isn't really needed in my idea below.....or do you have a satellite connection (or some other internet source besides a public wireless network?
    You could have your MBP join the wireless network, set up internet sharing (see OS X help) and share from airport to ethernet, connect an ethernet cable from MBP to WAN port on the Extreme, set the Extreme's connection sharing to "share a public IP", ignore the double NAT error (or you may be able to bridge it, I can't remember if the MBP will hand out several IPs but I think it will), and plug your Apple TV into a LAN port on the Extreme. Come to think about it, you really don't even need the Extreme unless you need other clients to connect, just plug the Apple TV into the MBP.
    hope it helps

  • Need some help with this code.

    var myDoc = app.documents[0]
    var mySel = app.selection[0]
    var myStory = mySel.parentStory; // Now we are pointing to the entire story
    var myHolidayStyle1 = "Holiday-Header" // Header 'day of the week'
    var myHolidayStyle2 = "Holiday-Sub-Heading-Date" // Header 'month and day'
    var myHolidayStyle3 = "Holiday-Header-Body" // Lead Paragraph 'default paragraph style'
    if (mystory = "Monday" ) {
        paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Tuesday") {
        mystory.paragraphs(0). appliedparagraphstyles = myHoldiayStyle1;
    else if (mystory = "Wednesday") {
        mystory.papragraph(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Thursday") {
        mystory.paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Friday")  {
        mystory.paragraphs(0).appliedparagraphstyle = myHolidayStyle1;
    else if (mystory = "Saturday") {
        mystory.paragraphs(0).appliedparagrahstyles = myHolidayStyle1;
    else if (mystory = "Sunday") {
        mystory.paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    // it finds if in the selection of the month and day if they equal for example Decmeber 15 then applies the HolidaySub-Heading-Date
    if   (mystory = "December 15") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 15") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 16") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 17") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 18") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 19") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 20") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 21") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 22") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 23") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 24") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 25") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    // If text doesn't  equal Day of the week like Monday and doesn't equal month and date like Decmber 14
    // then the document loops into doing the the rest of the document in Holiday-Header-Body
    // not sure if this loop will stop once it reaches another day of the week and then repeat the above tasks again.
    if (mystory =!  [myHolidayStyle0], [myHolidayStyle1]) { // not sure if I did this IF selection not equal Holidaystyle 0 and style 1 then perform loop, correctly???
        for (loop=0; loop<myStory.paragraphs.length; loop++)
      myStory.paragraphs[loop].appliedParagraphStyle = myHolidayStyle3;
    =============================
    ==========================
    I'm getting a error saying Paragraph is not a function, but nor is mystory.paragraph(0) , so i'm just trying to figure out what synax goes before that.
    =============================
    The text that is bold is the prolbem i'm having. I just got  a Javascript bible on how to program in javascript. How would i make that function work. I'm sure its simple. I'm just hoping I have If some Then ({) command follow by what I want it to do is correct. And I'm understanding this. there is so many different syntax's to choose from, any help would be appreciated. I work for a Newspaper company, and Indesign CS3 Javascript coding is a bit diffrent from normal javascript.

    Okie, I'm making progress now. Because well it didnt crash, but then again, LOL the script didnt apply the paragraph styles when I selected the text!
    any suggestions?
    I'm also getting a weird error now with the loop, but I also dont think its working because maybe the myStyle and myStle1 aren't applying themselves correctly, in the first part of the script.
    this is the Error Message:
    Error Number : 30477
    Error String: Invalid value of set propert 'appliedParagraphStyle'. Expected ParagraphStyle or String, but Recieved nothing.
    Line: 110
    Source: myStory.paragraphs[loop].appliedParagraphStyle = myStyle3;
    //var myDoc = app.documents[0]
    var mySel = app.selection[0];
    var myStory = mySel.parentStory; // Now we are pointing to the entire story
    var myStyle = app.activeDocument.paragraphStyles.item ( "Holiday-Header" ) ;
    var myStyle1 = app.activeDocument.paragraphStyles.item ( "Holiday-Sub-Heading-Date" ) ;
    var myStyle3 = app.activeDocument.paragraphStyles.item ( "Holiday-Header-Body" ) ;
    if (myStory.contents == "Monday" ) {
        myStory.paragraphs.appliedParagraphStyle = myStyle;
    else if  (myStory.contents == "Tuesday") {
        myStory.paragraphs[0]. appliedParagraphStyle = myStyle;
    if  (myStory.contents == "Wednesday") {
        myStory.papragraph[0].appliedparagraphstyle = myStyle;
    else if (myStory.contents == "Thursday") {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    if  (myStory.contents == "Friday")  {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    else if (myStory.contents == "Saturday") {
        myStory.paragraphs[0].appliedparagrahstyle = myStyle;
    if  (myStory.contents == "Sunday") {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    // it finds if in the selection of the month and day if they equal for example Decmeber 15 then applies the HolidaySub-Heading-Date
    if   (myStory.contents == "December 2") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 3") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 4") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 5") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 6") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 7") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 8") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 9") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 10") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 11") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 12") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 13") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 14") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 15") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 16") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 17") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 18") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else  if (myStory.contents == "December 19") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 20") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 21") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 22") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 23") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 24") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 25") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    // If text doesn't  equal Day of the week like Monday and doesn't equal month and date like Decmber 14
    // then the document loops into doing the the rest of the document in Holiday-Header-Body
    // not sure if this loop will stop once it reaches another day of the week and then repeat the above tasks again.
    // not sure if I did this IF selection not equal mystyle and mystyle1 then perform loop, is done correctly???
    if (myStory.contents !=  (myStyle && myStyle1)) {
       for (loop=0; loop<myStory.paragraphs.length; loop++)
      myStory.paragraphs[loop].appliedParagraphStyle = myStyle3;
        I'm truly grateful for the Support and Assistance everyone has been providing me, I'm learning, and I thank you all for your help.

  • Need some help with this new setup I have

    This is what I got for my new setup
    A64 3000 939
    K8N Neo4 Platinum MSI
    1 gig of Mushkin duel chan. ddr 400
    Gigabyte GeForce 6600 GT PCI-E
    The ram I have is duel chan. I have no idea what this means  Or what the ram needs to be set to is it faster than non duel ddr? 

    Quote from: igmox
    it is like water flowing through two parallel pipes instead of one.
    Quote from: mrbell84
    Another example you could think of duel channel memory could be like a 2 lane motorway.  You close one lane and cars can only go down 1 lane, but when you open another lane up thats another path for the cars to travel
    Quote from: omnikron
    One more thing is my psu going to be ok with that setup
    Quote from: mrbell84
    Yes your Power supply has 24 pin atx connector and also its a ATx2.0, which means its SLI/PCI-E Complient

  • Really need some help with this low earpiece volume issue.

    I'm taking my iPhone to an Apple Store Genius tomorrow to check out the low volume in the earpiece. Has anyone else taken their phone in to an Apple Store and had the issue addressed? Are Geniuses just saying it is within spec? Has Apple published an article on this?
    I realize that people are also frustrated over the low speakerphone volume, but the low volume in the earpiece is particularly concerning.
    While traveling down the road it is very difficult to hear the person on the other end of the phone when using just the earpiece (no earbuds, no BT headset). The volume while using the earbuds is plenty loud.
    Can anyone please shed some new light on this? I have had my iPhone for one week and I've got a bad feeling in my gut that this is a hardware issue and the earpiece speaker can't go any louder. Bummer.
    (Obviously, all of my volume settings are maxed out).
    -Joe

    When the iPhones were first released, some people reported on their posts that they were able to take them to the Genius Bar, have a tech test it out, the tech would agree that the volume sounded low, and get their phone swapped right away. Unfortunately, there is no cut and dry answer because people have reported all sorts of different things- that the various software updates have fixed their volume, messing with the volume setting within iTunes, etc.
    Personally, I think it is a software glitch. Why? I did this: I was playing the iPod without the earbuds and the volume was only set midrange. I covered the speaker on the bottom, cranked up the volume, and the sound coming out of the receiver was MUCH louder than it ever is when I am using the iPhone on a call. That to me indicates that the low volume it just a glitch that can be fixed, because it CAN obviously sound louder, just within a different function. Hope that makes sense.
    Good luck tomorrow.

  • Need some help with this project (methods)

    Ok. in this project it states the following:
    Write an application that rolls a die and displays the reuslt. Let the user pick the number of sides on the die. Use the Die Class to represent the die in your program.
    This is what i have so far, but im confused on how to utilize the Die class because it keeps giving me errors:
    P4_3.java:
    Code:
    import cs1.Keyboard;
    import java.util.Random;
    // extends the Die class...
    public class P4_3 extends Die
    public static void main (String[] args)
    { // asks the user how many sides of the die there is.
    int userSides;
    System.out.println("How many sides of the die do you want?");
    userSides = Keyboard.readInt();
    System.out.println ("You rolled "+Die.die);
    }Die.java:
    Code:
    // the die class
    import cs1.Keyboard;
    import java.util.Random;
    public class Die extends P4_3
    public static void Die()
    // rolls the dice
    Random generator = new Random();
    int die;
    die = generator.nextInt(P4_3.userSides) +1;
    }It keeps giving me:
    cannot resolve symbol
    symbol : variable die
    location: class Die
    System.out.println ("You rolled "+Die.die);
    ^
    cannot resolve symbol
    symbol : variable userSides
    location: class P4_3
    die = generator.nextInt(P4_3.userSides) +1;Can somebody point me in the right direction?
    Thanks, ps2cho
    (PS: Please keep it as simple as possible, dont give me some crazy wacky tough code because i wont understand a word of it, no matter how hard you try to explain it. Simple simple simple!)
    Thanksss

    import java.io.*;
    import java.util.Random;
    public class DieTest
        public static void main(String[] args)
            boolean more = true;
            BufferedReader br = null;
            try
                br = new BufferedReader(
                     new InputStreamReader(System.in));
                while(more)
                    System.out.println("enter number for die sides, \"q\" to quit");
                    String line = br.readLine();
                    if(line.equalsIgnoreCase("q"))
                        break;
                    int sides = Integer.parseInt(line);
                    Die die = new Die(sides);
                    for(int j = 0; j < 5; j++)
                        System.out.println("die roll " + (j+1) + " = " + die.roll());
                br.close();
            catch(IOException ioe)
                System.err.println("read error " + ioe.getMessage());
                more = false;
    class Die
        int sides;
        Random seed;
        public Die(int n)
            this.sides = n;
            seed = new Random();
        public int roll()
            // 0 <= seed.nextInt(sides) <= sides-1
            // 1 <= return value <= sides
            return 1 + seed.nextInt(sides);
    }

  • Concentric Circles---I need some help on this one...

    I'm trying to figure out how to change the color of my concentric rings. Here is my code:
    import java.applet.*;
    import java.awt.*;
    public class SvnRings extends Applet {
    public void paint(Graphics g) {
    int RectLeft, RectTop, RectHeight, RectWidth;
    int AppletHeight = this.getSize().height;
    int AppletWidth = this.getSize().width;
    for (int i=8; i >= 0; i--) {
    if ((i % 2) == 0) g.setColor(Color.red);
    else g.setColor(Color.white);
    RectHeight = AppletHeight*i/8;
    RectWidth = AppletWidth*i/8;
    RectLeft = AppletWidth/2 - i*AppletWidth/16;
    RectTop = AppletHeight/2 - i*AppletHeight/16;
    g.fillOval(RectLeft, RectTop, RectWidth, RectHeight);
    Can anyone tell me what I am forgeting?

    Well, what colours do you want them to be?
    You could generate them randomly, based on a sequence or from an array. I'll do the latter 'cos it's easiest.
    // 9 colours (for the 9 rings)
    private Color[] colors = new Color[] {Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.CYAN, Color.PURPLE, Color.PINK, Color.WHITE};
    for(int idx = 8; idx >= 0; idx--) {
      g.setColor(colors[idx]);
    }If you want a mathematical approach then you've got to create a new color in each iteration of the loop based on the loop value.
    Hope this helps.

  • Need some help with threads...

    Hello all,
    I am working on a project at work, and I am not the best programmer in the world. I have been trying to get my head around this for a couple of days and just cannot get it to work.
    I am writing an instrumentation control program that will have three threads. One is the GUI, one will receive control information and set up the hardware, and one will check the hardware status and report it to the GUI periodically. I plan on using the invokeLater() method to communicate the status to the GUI and change the status display in the GUI. Communication from the GUI to the controller thread and from the status thread to the controller thread I had planned on being piped input/output stream as appropriate. I have a control class and a status class that need to be communicated over these piped streams. In some trial code I have been unable to wrap the piped input/output streams with object input/output streams. I really need some help with this. Here is the main thread code:
    package playingwiththreads1;
    import java.io.*;*
    *public class PlayingWithThreads1 {*
    public static void main(String[] args) {*
    * PipedOutputStream outputPipe = new PipedOutputStream();*
    * ObjectOutputStream oos = null;*
    * ReceiverThread rt = new ReceiverThread(outputPipe);*
    // Start the thread -- First try*
    * Thread t = new Thread(rt);*
    t.start();*
    // Wrap the output pipe with an ObjectOutputStream*
    try*
    oos = new ObjectOutputStream(outputPipe);*
    catch (IOException e)*
    System.out.println(e);*
    // Start the thread -- Second try*
    //Thread t = new Thread(rt);*
    //t.start();*
    /** Send an object over the pipe. In reality this object will be a
    class that contains control or status information */
    try
    if (!oos.equals(null))
    oos.writeObject(new String ("Test"));
    catch (IOException e)
    try
    Thread.sleep(5000);
    catch (InterruptedException e)
    I read somewhere that it matters where you start the thread relative to where you wrap piped streams with the object streams. So, I tried the two places I felt were obvious to start the thread. These are noted in the comments. Here is the code for the thread.
    package playingwiththreads1;
    import java.io.*;
    public class ReceiverThread implements Runnable {
    private PipedInputStream inputPipe = new PipedInputStream();
    private ObjectInputStream inputObject;
    ReceiverThread (PipedOutputStream outputPipe)
    System.out.println("Thread initialization - start");
    try
    inputPipe.connect(outputPipe);
    inputObject = new ObjectInputStream(inputPipe);
    catch (IOException e)
    System.out.println(e);
    System.out.println("Thread initialization - complete");
    public void run()
    System.out.println("Thread started");
    try
    if (inputObject.available() > 0)
    System.out.println(inputObject.read());
    catch (IOException e)
    System.out.println(e);
    Through testing I have determined that no matter where I start the thread, the thread never gets past the "inputObject = new ObjectInputStream(inputPipe);" assignment.
    Could someone please help me with this? There are other ways for me to write this program, but this is the one that I would like to make work.
    Many thanks in advance,
    Rob Hix
    Edited by: RobertHix on Oct 6, 2009 3:54 AM

    Thanks for the help, but that did not work. I tried flushing the ObjectOutputStream and it is still hanging when initializing the thread.
    Here is a better look at the code since I was helped to figure out how to insert it:
    The main method:
    package playingwiththreads1;
    import java.io.*;
    public class PlayingWithThreads1 {
        public static void main(String[] args) {
            PipedOutputStream outputPipe = new PipedOutputStream();
            ObjectOutputStream oos = null;
            ReceiverThread rt = new ReceiverThread(outputPipe);
            // Start the thread -- First try
            //Thread t = new Thread(rt);
            //t.start();
            // Wrap the output pipe with an ObjectOutputStream
            try
                oos = new ObjectOutputStream(outputPipe);
                oos.flush();
            catch (IOException e)
                System.out.println(e);
            // Start the thread -- Second try
            Thread t = new Thread(rt);
            t.start();
            /* Send an object over the pipe.  In reality this object will be a
             * class that contains control or status information */
            try
                if (!oos.equals(null))
                    oos.writeObject(new String ("Test"));
                    oos.flush();
            catch (IOException e)
                System.out.pringln(e);
            try
                Thread.sleep(5000);
            catch (InterruptedException e)
    }The thread code:
    package playingwiththreads1;
    import java.io.*;
    public class ReceiverThread implements Runnable {
        private PipedInputStream inputPipe = new PipedInputStream();
        private ObjectInputStream inputObject;
        ReceiverThread (PipedOutputStream outputPipe)
            System.out.println("Thread initialization - start");
            try
                inputPipe.connect(outputPipe);
                inputObject = new ObjectInputStream(inputPipe);
            catch (IOException e)
                System.out.println(e);
            System.out.println("Thread initialization - complete");
        public void run()
            System.out.println("Thread started");
            try
                if (inputObject.available() > 0)
                    System.out.println(inputObject.read());
            catch (IOException e)
                System.out.println(e);
    }Does anyone else have and ideas?

  • Need some help with ".png" image.

    Good day everyone. Here's the run down. I need to add an
    image (image "A") ontop of another image (image"B"). Image "B" is a
    paterned background. And Image "A" a logo with a transparent
    background.
    As it stands I have image "A" as a "png" and as you know....
    they are fri**ing huge! Haveing it as a "gif" only presents me with
    the IE6 problem of it adding a colored background to the image.
    So I'm stuck! Can any one tell me or point me in the
    difection of a tutorial to tell me the best way to add an image
    with a transparent background in Dreamweaver.
    Really need some help with this!
    Thanks all!

    >Right you can see the work in progress here>
    http://www.stclairecreative.com/DoughBoys_Site_Folder/home.html
    Before going much further I'd recommend reconsidering the use
    of a textured background. They are usually included for the benefit
    of the site owner only, and likely to annoy visitors. Studies on
    the subject suggest they often lead to usability problems. I do
    like to header graphic, but at 200K it's kinda heavy and can
    probably be optimized.

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • Need some help with a Macally enclosure and a spare internal drive

    Need some help with a Macally enclousure
    Posted: Oct 1, 2010 10:55 AM
    Reply Email
    Aloha:
    I have a Macally PHR-S100SUA enclousure that does not recognise,my WD 1001fals hard drive. It has worked just fine with other internal drives, but not this one?
    This is a spare internal drive that I am trying to make an external drive to store back ups for a lot of data. But so far I can not get it recognized by the computer. Maybe I need different drivers?
    Any suggestions?
    Dan Page

    Hi-
    Drivers aren't typically needed for external enclosures.
    Macally has none listed for that enclosure.
    The same is true for the WD drive, internal or external; no drivers.
    With the exception of high end PM multi drive enclosures, I can't think of any that use drivers.
    How is the external connected?
    Have you tried different cables, different ports?
    Bad/damaged cables are fairly common.
    Have you verified connections inside of the enclosure?

  • Need some help with putting a folder in users directory

    I'm not sure how to do this, but what I want to do is put this file in C:/My Documents, but I need to be able to verify that C://My Documents exists, if not put it in C:/Program Files.
    Can any one help me out?
    try {
                        String[] contactArray = parseDatFile(fc.getSelectedFile());
                        Document document = createXMLDocument(contactArray);
                        saveToXMLFile(
                        document,
                        new File(
                        "C:/Program Files/xxx/",// looks for directory for list
                        "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
                    } catch (Exception exc) {
                        File f = new File("C:/Program Files/xxx/");// setting directory for list if not there
                        boolean yes = true;
                        yes = f.mkdir();// creating directory
                        try {
                            String[] contactArray = parseDatFile(fc.getSelectedFile());
                            Document document = createXMLDocument(contactArray);
                            saveToXMLFile(
                            document,
                            new File(
                            "C:/Program Files/xxx/",// used only if the directory didn't exist
                            "xxxxxxxxxxxxxxxxxxxxxxx"));

    Need some help with putting a folder in users directoryI recomend using System.getProperty( "user.home" ) not a hard-coded value.
    This will use the users home folder ( C:\My Documents ) on Win9X (I guess), C:\Documents and Settings\<current user> on Win2K +, and ~ on Unix-a-likes.

  • Need some help with MDX formula

    Hello, I am not finding any good documentation on MDX formulas, there is a specific one that I need some help with....could someone please elaborate what exactly does this formula mean? thanks.
    (MEASURES.[SIGNEDDATA],
    CLOSINGPERIOD([%TIMEDIM%].
    [%TIMEBASELEVEL%]))

    If new MEASURE gets added to Measure's table , in BPC Client , etools->client Options-> Refresh Dimensions should get the new measure into the CurrentView .IF not try  etools->client Options-> Clear Local application information .
    Formula 2 : 
    (MEASURES.SIGNEDDATA,
    CLOSINGPERIOD(%TIMEDIM%.
    %TIMEBASELEVEL%))
    This formula is used to retrieve AST & LEQ account values.
    If current time member is at monthlevel ,ie  ClosingPeriod of  2011.FEB is  the current member it self ,and would retrieve 2011.FEB value.
    If Current time member is at quarter level then ClosingPeriod of 2011.Q1 is 2011.Mar  ,and would retrieve 2011.MAR value.
    If Current time member is at year level then ClosingPeriod of 2011.TOTAL is 2011.DEC  ,and would retrieve 2011.DEC value.
    Formula 1 :
    MEASURES.SIGNEDDATA
    Irrespective of the level of the Time , MEASURES.SIGNEDDATA would retrieve current Time member value.This formula is used to retrieve INC & EXP account values
    if current time member is at month level,2011.FEB , 2011.FEB value is retrieved.
    if current time member is at quarter level,2011.Q1 , 2011.Q1(JANFEBMAR)  value is retrieved.
    if current time  member is at year level,2011.TOTAL , 2011.TOTAL(JAN,FEB,....,DEC)  value is retrieved.
    Hope this helps.

Maybe you are looking for

  • HP G60 Problems with internet browsers after Vista OS recovery

    I just did a Vista OS Recovery, IE won't upgrade to IE9, problem running Chrome, it crashes as soon as I open it  and in Firefox,  I am seeing youtube videos not showing properly, the graphics is good but the videos are showing choppy, pausing freque

  • How do i drag plugins into the right folder? so they show up in effects?

    ok i did it once but my friend told me. i think it was something like go into the mac hd then go into the library folder....and something?? i am trying to make it so that the plugin effects are inside final cut pro when i open the app. thanks. if

  • Could not install solaris 8 on my sparcstation-20

    Hi, I tried to install solaris 8 on my sun machine. It failed, with the error message, saying that it can't find the kernel file. Then I tried to install solaris 6. It succeeded. I could not figure out why, anyone can help me? Following is the output

  • Error encountered initializing users and groups ... Class not found.

    Hi, I am trying to set up the example provided in Frank Nimphius and Duncan Mills great article about 'Declarative J2EE authentication and authorization with JAAS' (http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm) on iAS 1

  • Lost my 3rd party plug-ins with upgrade to CS4

    The 3rd party (Boris) files are still in the program files, but they are no longer in my effects panel. How can I get them back? Do I have to reload original software and complete all the updates again? Thanks