String won't copy to array

I had to create an applet that would take in two binary numbers from the keyboard and would add/subtract/multiply them. To do this we needed an int array. But when i tried doing the method shown to us, it didnt work and it would literally output garbage. It was already due and i submitted it as is but this'll bug me unless i figure it out. The calculations should work (i think) but once i get the array problem fixed i could debug that. Thanks in advance.
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class proj2 extends JApplet implements ActionListener{
    JLabel p1, p2,answer;
    JTextField i1,i2;
    JButton plus, minus, multi;
    public void init(){
        p1=new JLabel("Enter first integer");
        p2=new JLabel("Enter second integer");
        i1=new JTextField(20);
        i2=new JTextField(20);
        plus=new JButton("+");
        minus=new JButton("-");
        multi=new JButton("*");
        answer=new JLabel("Answer is          ");
        JPanel north=new JPanel();
        north.setLayout(new GridLayout(2,2));
        north.add(p1);
        north.add(i1);
        north.add(p2);
        north.add(i2);
        JPanel south=new JPanel();
        south.setLayout(new GridLayout(1,3));
        south.add(plus);
        south.add(minus);
        south.add(multi);
        Container c=getContentPane();
        c.setLayout(new BorderLayout());
        c.add(north,BorderLayout.NORTH);
        c.add(answer,BorderLayout.CENTER);
        c.add(south,BorderLayout.SOUTH);
        plus.addActionListener(this);
        minus.addActionListener(this);
        multi.addActionListener(this);
        }//end init
            public void actionPerformed(ActionEvent x){
                String a=i1.getText();
                String b=i2.getText();
                int[] top=new int[20];
                int[] bottom=new int[20];
                int[] ans=new int[20];
                int[] one=new int[1];
                one[0]=1;
                int len=a.length();
                int len2=b.length();
                for (int i=len-1;i>=0;i--)
                        char c=a.charAt(i);
                        top[len-i]=(c-48);
                for (int i=len2-1;i>=0;i--)
                        char c=b.charAt(i);
                        bottom[len2-i]=(c-48);
                if (x.getSource()==plus){
                ans=addbin(top,bottom);
                answer.setText("The sum of "+top+" and "+bottom+" is "+ans+".");}
                else if (x.getSource()==minus){
                bottom=flipbits(bottom);
                bottom=addbin(bottom,one);
                ans=addbin(top,bottom);
                answer.setText("The difference of "+a+" and "+b+" is "+ans+".");}
                else {
                for(int i=0;i<20;i++)
                    if (bottom==1)
ans=addbin(ans,top);
top=shift(top);
answer.setText("The product of "+a+" and "+b+" is "+ans+".");
}//end actionPerformed
public int[] addbin(int[] x, int[] y){
int carry=0;
int[] ans=new int[20];
for(int i=0;i<20;i++)
int sum=x[i]+y[i]+carry;
ans[i]=sum%2;
carry=sum/2;
return ans;
}//end addbin
public int[] flipbits(int[] x){
for(int i=0;i<20;i++)
x[i]=(x[i]+1)%2;
return x;
}//end flipbits
public int[] shift(int[] x){
int len=x.length;
int[] newarray=new int[len+1];
for(int i=0;i<len;i++)
newarray[i]=x[i];
newarray[len]=0;
return newarray;
}//end shift
}//end class

jlicata89 wrote:
int[] ans=new int[20];
answer.setText("The sum of "+top+" and "+bottom+" is "+ans+".");}
answer.setText("The difference of "+a+" and "+b+" is "+ans+".");}
answer.setText("The product of "+a+" and "+b+" is "+ans+".");
You can't just append an array to a string. Arrays don't have a custom "toString" method, so its string representation is the default one, which looks like "garbage" to you. Depending on what you want to do, you can use Arrays.toString(), or write a custom method to turn it into a string representation of your choice.
l33tard wrote:
Try changing all occurrences of this:
top[len-i]=(c-48);to:
top[len-i] = (int)(c) - 48;
That is completely useless. char's are automatically promoted to int's.

Similar Messages

  • PL/SQL function to read a string of characters into an array

    I was wondering if there is an easier way than using the substr function multiple times. Here is the example:
    Suppose you have a varchar2 variable that contains the word 'Apple'. The function should take it and produce an array. We would invoke it like this:
    <what data structure?> a := stringunpackerfunction(x);
    // x is the varchar2 containing 'Apple'.
    The resulting a would be such that a[0] is 'A', a[1] is 'p', a[2] is 'p', a[3] is 'l' and a[4] is 'e'.
    If there is no direct function to do this in a single invocation, is there a function to simply read a string of characters and return 'the next character'?
    Thanks,
    Regards,
    Srini

    There is a procedure out there called PS_PARSE which takes a string and converts to an array provided with an identified separator. Works for us pretty well.
    I just grabbed this off of google. I am presuming this should work fine. It has been sometime since we implemented ours that I forget if there were any additional modifications that we made. I think there was one regarding the size of the string that could be handled. I forget precisely. Anyways... take a peek at it. Its makes things easy in that your logic is pretty streamlined.
    Barry C
    http://www.myoracleportal.com
    create or replace PACKAGE PS_Parse
    IS
         || PL/SQL table structures to hold atomics retrieved by parse_string.
         || This includes the table type definition, a table (though you can
         || declare your own as well, and an empty table, which you can use
         || to clear out your table which contains atomics.
         TYPE atoms_tabtype IS TABLE OF VARCHAR2(60) INDEX BY BINARY_INTEGER;
         atoms_table atoms_tabtype;
         empty_atoms_table atoms_tabtype;
         || The standard list of delimiters. You can over-ride these with
         || your own list when you call the procedures and functions below.
         || This list is a pretty standard set of delimiters, though.
         std_delimiters VARCHAR2 (50) := ' !@#$%^&*()-_=+\|`~{{]};:''",<.>/?';
         /* Display contents of table using DBMS_OUTPUT */
         PROCEDURE display_atomics
              (table_in IN atoms_tabtype, num_rows_in IN NUMBER);
         || The parse_string procedure: I provide two, overloaded definitions.
         || The first version puts all atomics into a PL/SQL table and would
         || be used in a PL/SQL Version 2 environment. The second version places
         || all atomics into a string, separating each atomic by a vertical bar.
         || (My code does NOT do any special handling when it finds a "|" in
         || the string. You have to deal with that when you extract the atomics.
         ||
         || See the program definition for more details on other parameters.
         PROCEDURE parse_string
              (string_in IN VARCHAR2,
              atomics_list_out OUT atoms_tabtype,
              num_atomics_out IN OUT NUMBER,
              delimiters_in IN VARCHAR2 := std_delimiters);
         PROCEDURE parse_string
              (string_in IN VARCHAR2,
              atomics_list_out IN OUT VARCHAR2,
              num_atomics_out IN OUT NUMBER,
              delimiters_in IN VARCHAR2 := std_delimiters);
         /* Count the number of atomics in a string */
         FUNCTION number_of_atomics
              (string_in IN VARCHAR2,
              count_type_in IN VARCHAR2 := 'ALL',
              delimiters_in IN VARCHAR2 := std_delimiters)
         RETURN INTEGER;
         /* Return the Nth atomic in the string */
         FUNCTION nth_atomic
              (string_in IN VARCHAR2,
              nth_in IN NUMBER,
              count_type_in IN VARCHAR2 := 'ALL',
              delimiters_in IN VARCHAR2 := std_delimiters)
         RETURN VARCHAR2;
    END PS_Parse;
    create or replace PACKAGE BODY PS_Parse
    IS
    /* Package variables used repeatedly throughout the body. */
    len_string     NUMBER;
    start_loc     NUMBER;
    next_loc     NUMBER;     
    || Since the PUT_LINE procedure regards a string of one or more
    || spaces as NULL, it will not display a space, which is in
    || PS_Parse a valid atomic. So I save a_blank in the PL/SQL
    || table instead of the space itself.
    a_blank CONSTANT VARCHAR2(3) := '" "';
    /*--------------------- Private Modules ---------------------------
    || The following functions are available only to other modules in
    || package. No user of PS_Parse can see or use these functions.
    FUNCTION a_delimiter
    (character_in IN VARCHAR2,
    delimiters_in IN VARCHAR2 := std_delimiters)
    RETURN BOOLEAN
    || Returns TRUE if the character passsed into the function is found
    || in the list of delimiters.
    IS
    BEGIN
    RETURN INSTR (delimiters_in, character_in) > 0;
    END;
    FUNCTION string_length (string_in IN VARCHAR2)
    RETURN INTEGER
    IS
    BEGIN
    RETURN LENGTH (LTRIM (RTRIM (string_in)));
    END;
    FUNCTION next_atom_loc
    (string_in IN VARCHAR2,
    start_loc_in IN NUMBER,
    scan_increment_in IN NUMBER := +1)      
    || The next_atom_loc function returns the location
    || in the string of the starting point of the next atomic (from the
    || start location). The function scans forward if scan_increment_in is
    || +1, otherwise it scans backwards through the string. Here is the
    || logic to determine when the next atomic starts:
    ||
    ||          1. If current atomic is a delimiter (if, that is, the character
    ||               at the start_loc_in of the string is a delimiter), then the
    ||               the next character starts the next atomic since all
    ||               delimiters are a single character in length.
    ||
    ||          2. If current atomic is a word (if, that is, the character
    ||               at the start_loc_in of the string is a delimiter), then the
    ||               next atomic starts at the next delimiter. Any letters or
    ||               numbers in between are part of the current atomic.
    ||
    || So I loop through the string a character at a time and apply these
    || tests. I also have to check for end of string. If I scan forward
    || the end of string comes when the SUBSTR which pulls out the next
    || character returns NULL. If I scan backward, then the end of the
    || string comes when the location is less than 0.
    RETURN NUMBER
    IS
    /* Boolean variable which uses private function to determine
    || if the current character is a delimiter or not.
    was_a_delimiter BOOLEAN :=
    PS_Parse.a_delimiter (SUBSTR (string_in, start_loc_in, 1));     
    /* If not a delimiter, then it was a word. */
    was_a_word BOOLEAN := NOT was_a_delimiter;
    /* The next character scanned in the string */
              next_char VARCHAR2(1);
    || The value returned by the function. This location is the start
    || of the next atomic found. Initialize it to next character,
    || forward or backward depending on increment.
    return_value NUMBER := start_loc_in + scan_increment_in;
    BEGIN
    LOOP
    -- Extract the next character.
    next_char := SUBSTR (string_in, return_value, 1);
    -- Exit the loop if:
    EXIT WHEN
    /* On a delimiter, since that is always an atomic */
    a_delimiter (next_char)
    OR
    /* Was a delimiter, but am now in a word. */
    (was_a_delimiter AND NOT a_delimiter (next_char))
    OR
    /* Reached end of string scanning forward. */
    next_char IS NULL
    OR
    /* Reached beginning of string scanning backward. */
    return_value < 0;
    /* Shift return_value to move the next character. */
    return_value := return_value + scan_increment_in;
    END LOOP;
    -- If the return_value is negative, return 0, else the return_value
    RETURN GREATEST (return_value, 0);
    END;
    PROCEDURE increment_counter
    (counter_inout IN OUT NUMBER,
    count_type_in IN VARCHAR2,
    atomic_in IN CHAR)
    || The increment_counter procedure is used by nth_atomic and
    || number_of_atomics to add to the count of of atomics. Since you
    || can request a count by ALL atomics, just the WORD atomics or
    || just the DELIMITER atomics. I use the a_delimiter function to
    || decide whether I should add to the counter. This is not a terribly
    || complex procedure. I bury this logic into a separate module,
    however,
    || to make it easier to read and debug the main body of the programs.
    IS
    BEGIN
    IF count_type_in = 'ALL' OR
    (count_type_in = 'WORD' AND NOT a_delimiter (atomic_in)) OR
    (count_type_in = 'DELIMITER' AND a_delimiter (atomic_in))
    THEN
    counter_inout := counter_inout + 1;
    END IF;
    END increment_counter;
    /* ------------------------- Public Modules -----------------------*/
    PROCEDURE display_atomics
    (table_in IN atoms_tabtype, num_rows_in IN NUMBER)
    || Program to dump out contents of table. Notice I must also pass in
    || the number of rows in the table so that I know when to stop the
    || loop. Otherwise I will raise a NO_DATA_FOUND exception. For a more
    || elaborate display_table module, see Chapter 7 on PL/SQL tables.
    IS
    BEGIN
    FOR table_row IN 1 .. num_rows_in
    LOOP
    DBMS_OUTPUT.PUT_LINE (NVL (table_in (table_row), 'NULL'));
    END LOOP;
    END;
    PROCEDURE parse_string
    (string_in IN VARCHAR2,
    atomics_list_out OUT atoms_tabtype,
    num_atomics_out IN OUT NUMBER,
    delimiters_in IN VARCHAR2 := std_delimiters)
    || Version of parse_string which stores the list of atomics
    || in a PL/SQL table.
    ||
    || Parameters:
    ||          string_in - the string to be parsed.
    ||          atomics_list_out - the table of atomics.
    ||          num_atomics_out - the number of atomics found.
    ||          delimiters_in - the set of delimiters used in parse.
    IS
    BEGIN
    /* Initialize variables. */
    num_atomics_out := 0;
    len_string := string_length (string_in);
    IF len_string IS NOT NULL
    THEN
    || Only scan the string if made of something more than blanks.
    || Start at first non-blank character. Remember: INSTR returns 0
    || if a space is not found. Stop scanning if at end of string.
    start_loc := LEAST (1, INSTR (string_in, ' ') + 1);
    WHILE start_loc <= len_string
    LOOP
    || Find the starting point of the NEXT atomic. Go ahead and
    || increment counter for the number of atomics. Then have to
    || actually pull out the atomic. Two cases to consider:
    ||          1. Last atomic goes to end of string.
    ||          2. The atomic is a single blank. Use special constant.
    ||          3. Anything else.
    next_loc := next_atom_loc (string_in, start_loc);
    num_atomics_out := num_atomics_out + 1;
    IF next_loc > len_string
    THEN
    -- Atomic is all characters right to the end of the string.
    atomics_list_out (num_atomics_out) :=
    SUBSTR (string_in, start_loc);
    ELSE
    || Internal atomic. If RTRIMs to NULL, have a blank
    || Use special-case string to stuff a " " in the table.
    atomics_list_out (num_atomics_out) :=
    NVL (RTRIM (SUBSTR (string_in,
    start_loc, next_loc-start_loc)),
                                       a_blank);
    END IF;
    -- Move starting point of scan for next atomic.
    start_loc := next_loc;
    END LOOP;
    END IF;
    END parse_string;
    PROCEDURE parse_string
    (string_in IN VARCHAR2,
    atomics_list_out IN OUT VARCHAR2,
    num_atomics_out IN OUT NUMBER,
    delimiters_in IN VARCHAR2 := std_delimiters)
    || The version of parse_string which writes the atomics out to a packed
    || list in the format "|A|,|C|". I do not repeat any of the comments
    || from the first iteration of parse_string.
    IS
    BEGIN
    /* Initialize variables */
    num_atomics_out := 0;
    atomics_list_out := NULL;
    len_string := string_length (string_in);
    IF len_string IS NOT NULL
    THEN
    start_loc := LEAST (1, INSTR (string_in, ' ') + 1);
    WHILE start_loc <= len_string
    LOOP
    next_loc := next_atom_loc (string_in, start_loc);
    num_atomics_out := num_atomics_out + 1;
    IF next_loc > len_string
    THEN
    atomics_list_out := atomics_list_out || '|' ||      
    SUBSTR (string_in, start_loc);
    ELSE
    atomics_list_out :=
    atomics_list_out || '|' ||      
    NVL (RTRIM (SUBSTR (string_in,
    start_loc, next_loc-start_loc)),
                                       a_blank);
    END IF;
    start_loc := next_loc;
    END LOOP;
    /* Apply terminating delimiter to the string. */
    atomics_list_out := atomics_list_out || '|' ;
    END IF;
    END parse_string;
    FUNCTION number_of_atomics
    (string_in IN VARCHAR2,
    count_type_in IN VARCHAR2 := 'ALL',
    delimiters_in IN VARCHAR2 := std_delimiters)
    RETURN INTEGER
    || Counts the number of atomics in the string_in. You can specify the
    || type of count you want: ALL for all atomics, WORD to count only the
    || words and DELIMITER to count only the delimiters. You can optionally
    || pass your own set of delimiters into the function.
    IS
    return_value INTEGER := 0;
    BEGIN
    /* Initialize variables. */
    len_string := string_length (string_in);
    IF len_string IS NOT NULL
    THEN
    || This loop is much simpler than parse_string. Call the
    || next_atom_loc to move to the next atomic and increment the
    || counter if appropriate. Everything complicated is shifted into
    || sub-programs so that you can read the program "top-down",
    || understand it layer by layer.
    start_loc := LEAST (1, INSTR (string_in, ' ') + 1);
    WHILE start_loc <= len_string
    LOOP
    increment_counter (return_value, UPPER (count_type_in),
    SUBSTR (string_in, start_loc, 1));
    start_loc := next_atom_loc (string_in, start_loc);
    END LOOP;
    END IF;
    RETURN return_value;
    END number_of_atomics;
    FUNCTION nth_atomic
    (string_in IN VARCHAR2,
    nth_in IN NUMBER,
    count_type_in IN VARCHAR2 := 'ALL',
    delimiters_in IN VARCHAR2 := std_delimiters)
    RETURN VARCHAR2
    || Find and return the nth atomic in a string. If nth_in is greater
    || the number of atomics, then return NULL. If nth_in is negative the
    || function counts from the back of the string. You can again request
    || a retrieval by ALL atomics, just the WORDs or just the DELIMITER.
    || So you can ask for the third atomic, or the second word from the end
    || of the string. You can pass your own list of delimiters as well.
    IS
    /* Local copy of string. Supports up to 1000 characters. */
    local_string VARCHAR2 (1000) :=
    LTRIM (RTRIM (SUBSTR (string_in, 1, 1000)));
    /* Running count of atomics so far counted. */
    atomic_count NUMBER := 1;
    /* Boolean variable which controls the looping logic. */
    still_scanning BOOLEAN :=
    local_string IS NOT NULL AND nth_in != 0;
    /* The amount by which I increment the counter. */
    scan_increment INTEGER;
    /* Return value of function, maximum length of 100 characters. */
    return_value VARCHAR2 (100):= NULL;
    BEGIN
    IF nth_in = 0
    THEN
    /* Not much to do here. Find 0th atomic? */
    RETURN NULL;
    ELSE
    /* Initialize the loop variables. */
    len_string := string_length (local_string);
    IF nth_in > 0
    THEN
    /* Start at first non-blank character and scan forward. */
    next_loc := 1;
    scan_increment := 1;
    ELSE
    /* Start at last non-blank character and scan backward. */
    next_loc := len_string;
    scan_increment := -1;
    END IF;
    /* Loop through the string until the Boolean is FALSE. */
    WHILE still_scanning
    LOOP
    /* Move start of scan in string to loc of last atomic. */
    start_loc := next_loc;
    /* Find the starting point of the next atomic. */
    next_loc      :=
    next_atom_loc (local_string, start_loc, scan_increment);
    /* Increment the count of atomics. */
    increment_counter
    (atomic_count,
    UPPER (count_type_in),
    SUBSTR (local_string, start_loc, 1));
    || Keep scanning if my count hasn't exceeded the request
    || and I am neither at the beginning nor end of the string.
    still_scanning :=
    atomic_count <= ABS (nth_in) AND
    next_loc <= len_string AND
    next_loc >= 1;
    END LOOP;
    || Done with the loop. If my count has not exceeded the requested
    || amount, then there weren't enough atomics in the string to
    || satisfy the request.
    IF atomic_count <= ABS (nth_in)
    THEN
    RETURN NULL;
    ELSE
    || I need to extract the atomic from the string. If scanning
    || forward, then I start at start_loc and SUBSTR forward.
    || If I am scanning backwards, I start at next_loc+1 (next_loc
    || is the starting point of the NEXT atomic and I want the
    || current one) and SUBSTR forward (when scanning in
    || reverse, next_loc comes before start_loc in the string.
    IF scan_increment = +1
    THEN
    RETURN
    SUBSTR (local_string, start_loc, next_loc - start_loc);
    ELSE
    RETURN
    SUBSTR (local_string, next_loc+1, start_loc - next_loc);
    END IF;
    END IF;
    END IF;
    END nth_atomic;
    END PS_Parse;
    /

  • IPhone 4 camera video won't copy to computer, file 500M

    I have just recorded several videos with the iphone 4 camera.
    They all playback fine on the phone.
    I can copy all the videos except 1.
    The file in question is 503MB.
    When i go to copy this file, it shows the file transfer box (Windows XP) for a few seconds and then disappears, leaves a file behind with the size of 0.
    I've also tried this on a mac and it won't copy the video, iphoto gives an error, unable to transfer file or something like that.
    Any suggestions would be appreciated.
    It just happens to be the only video i want to access.

    Let your iphone do a full synchronise with iTunes. Once that's done close iTunes then go to the folder where the files are synched to on the PC. With XP it is something like C:\Documents and Settings\Paul\Application Data\Apple Computer\MobileSync\...Backup\ then a long string of characters. On Vista/7 it will be in Users somewhere. The folder will contain lots of files with meaningless names. List them by date then copy all the large ones from today somewhere else. Rename them to something ending with .mov and at least some of them should play.
    This method worked for me on a 1.2Gb video I had recorded, Hope this helps.

  • How do I copy an array from a website to Excel using Firefox

    Was running Firefox on Windows Vista. I could copy an array from finance.yahoo.com into an Excel spreadsheet by selecting the array with control key down then clicking on edit - copy selected cells, then pasting into an Excel sheet. I only had to tell it the upper left cell and the whole array went in properly
    Now trying to do the same thing on a new machine running Windows 7, but the "copy selected cells" option is not available in the edit menu. Is there a way to copy an array with Firefox and Windows 7? These are big arrays. One cell at a time is out of the question.

    Try this Add-on --> https://addons.mozilla.org/en-US/firefox/addon/dafizilla-table2clipboard/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Itunes won't copy over some of my podcasts and purchases since I have moved it to an external hardrive

    So I Have moved over all my purchases and everything to an external hardrive. I did everything right and my itunes story works perfectly fine. However one of my podcasts (yugioh the abridged series) won't copy over along to the ipod saying its file type is not supported by the ipod. It only does this with the first 8 episodes (if you find it you will see them) one of which (the bbt movie) worked perfectly fine on my ipod before but now for some reason it won't. It also won't work on a few of the tv shows that are in hd and one music album that had american boy in it. I'm wondering what I can do to solve this problem. My itunes and my computer (windows vista operating system) is up to date and I have an ipod classic with plenty of room what should I do.

    This doesn't work. The iOS4 upgrade has wiped out synchronization to Outlook to the phone and back. There are many threads on this here, and Apple has yet to address this issue.

  • HP Officejet 4620 won't copy or scan but will print

    My HP Officejet 4620 all in one printer won't copy or scan, but it will print.  When trying to scan, my computer first shows a window "preparing to scan" then it changes to a window "scanner unreachable".  When trying to copy the printer indicates "now copying page 1/1" but it never produces a copy.  The light never goes across the flat glass, photographing the image to be scanned or copied.

    Hello @Alan_Mc,
    Welcome to the HP Forums!
    I understand when you scan a document it states scanner unreachable and you cannot copy a document either. I will do my best to assist you! I would recommend following this entire HP document on A 'Scanner Unreachable' or 'An error occurred while scanning' Message Displays when Scanning on the ....
    Since you cannot copy a document either, there might be something wrong with the scanner glass. Also, the light doesn't appear. If so, then follow this entire HP document on A 'Scanner Failure' Message Displays on the All-in-One Control Panel and You Cannot Scan, Copy, or F...
    I will be looking forward to hearing from you. Have a great night!
    I worked on behalf of HP.

  • Track names won't copy and can't be found

    I burned an album (fleetwood mac) from my old laptop to a disk - all tracks are correctly named. I copy the disk to my new laptop with itunes and my new itouch but the track names won't copy and when I search for them they are not found on itunes. so instead of song titles, I have track 1, track 2, etc on my new laptop even though the cd I burned has the song names. Anyone know what I am doing wrong?
    don

    Couple ways to do it.
    Best way is burn a Data disc. All the info i part of the song file itself and will transfer when you copy the file.
    Another way is after you burn the CD in your old computer, select the CD then go to menu Advanced -> *Submit CD track names*.
    This will send the info to Gracenote and when you insert the CD on a different computer, iTunes will look it up and put in the correct info.

  • Win XP Won't install, won't copy system files

    I'm putting together an A64 system w/ a WD 36gb raptor on sata1.
    I've done all of the things posted on this board (changed bios settings, used the floppies to install the sata drivers during windows setup).  Everything is fine up until the xp setup is copying the setup files from the cd.  It stops at every other file and says that it can't copy that file.  Sometimes I can press enter and it will copy it on the second try but it always stops partway through and won't copy any more files.  I've tried 2 different windows xp pro cds, and i know my cd rom drive doesn't have problems reading the files.  This has only happened when I swapped out my WD 250gb ata drive for the sata raptor.
    My power supplies (came with chieftec case from newegg) settings are as follows (as I've heard this may be a problem):
    +3.3V = 22.0a, +5v = 36.0a, +12 = 18a
    I'd love any suggestions.  I've already flashed the bios to 1.2 and it doesn't seem to help.  Thanks.

    I've taken one stick of ram out (it occured to me to do this just after i posted!), and it seems to be installing.  I am still getting the "cannot copy file" errors, but if i have it retry a couple of times, it will usually go through.  After that though, it still gives me "fatal errors" because it didn't copy all of the setup info onto the hd.
    I was hesitant to put the system specs in my sig because i'm buidling this for someone else, but here they are:
    A64 3200+
    512 (1 stick) corsair twinx 3200LLPT DDR
    WD 36gb raptor - connected to sata 1
    plextor dd rom drive
    floppy drive
    and 2 case fans and the cpu heatsink/fan
    Do you guys think that the power supply is the root of the problem as I've heard suggested?  I thought this Chieftec rated at 450W would be enough.  I will try and pick up a case with an Antec 380w PSU and try it out.  I know that it's not a problem with the cd because i've used it to install on the same system, except it was on a WD 250gb ATA drive.  Everything went fine on that installation.  I've only been having this problem when trying to install on the raptor through sata.

  • Folders of picture scans won't copy

    I have several folders of pictures, scans of slides, when I try to move the folder to copy to anothr hard drive it just freezes. I tried disk utility, disk warrior, techpro all of these say the folder and items are fine. They open fine but won't copy. Why? Can I force this issue? How?

    James:
    Download and run BatChmod on the folder containing the files with the settings shown here, putting your administrator login name, long or short, in the owner and group sections. You can either type in the path to the folder or just drag the folder into that field. Then see if you can move them. Disk Utility primarily repairs permissions on applications and system files.
    Another test would be to boot into Safe Mode and then see if you can move the files. If you can then there's something that's getting loaded when you boot normally that's the culprit.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • ITunes 11.1.5.5 in Windows 8.1 won't copy to my 160GB iPod Classic.

    I have an iPod Classic 160GB and iTunes (Windows 8.1 64bit Computer) won't copy songs to it. It either goes incredibly slow or it just hangs. I can connect the same iPOd to another computer, running Windows 7 64bit, iTunes 11.1.5.5, etc. and it all works perfectly. Is there a Windows 8.1 driver problem with Windows 8.1 and the iPod Classic?

    Think you might find it has something to do with AVG.
    iTunes worked effortlessly with Norton anti-virus or Windows Firewall on my Windows 8.1 machine but once I installed AVG Internet security everything in iTunes is very laggy.
    All AVG settings are set to allow anything to do withTunes and Apple but problems still exist.
    iPhone4, 4S, iPod touch 3 and 4 work OK but the Nano doesn't show up at all. I've uninstalled and reinstalled iTunes, etc., but the problems still exist.
    There have been reports on this forum before about this.

  • HT1977 I downloaded an app on my PC, signed into my iTunes account, but when I connect my iPhone and click sync, it won't copy to my phone. How can I get this app to install on my phone?

    I downloaded an app on my PC, signed into my iTunes account, but when I connect my iPhone and click sync, it won't copy to my phone. How can I get this app to install on my phone?

    Your phone connected, iTunes running, under the "Apps" tab, you've selected this app to install on your phone, correct? Hit the "Apply/Sync" button, lower right on the Apps tab, what happens?

  • I have a video clip on IPhoto that is MPG file.  It won't copy to the IPAD.  How can I make it work on IPAD?

    I have a video clip on IPhoto that is an MPG file.  It won't copy to the IPAD.  How can I make it work on IPAD?

    http://www.apple.com/ipad/specs/
    Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format.

  • New HP office jet 5745 won't copy or scan from glass

    Brand new officejet 5745 won't copy or scan anything from the glass.  I insert paper, choose copy and the document feeder from above runs, lightbar doesn't move and it produces a blank page.  When trying to scan from computer, I get an error message to insert document into document feeder. Help.
    thanks.
    This question was solved.
    View Solution.

    Hello cdnmaggies,
    Welcome to the HP Support Forums!
    I understand that the Officejet 5745 will only attempt to scan or copy from the ADF. There could be some packing material or tape triggering the sensor in the ADF. Open the ADF and look for anything that got missed.
    If it is clear, load a plain piece of paper into the ADf and tell it to copy. When the paper is fed through and done copying, ensure that there is not message on the screen that an original is loaded. If this is displayed, remove the power from the back of the printer to reset the memory.
    Ensure the printer is connected to a wall outlet directly and then connect the power back to the printer. If the there is no  message, try copying from the glass.
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Hp officejet j6480 will print docs, but now it won't copy since i did sys recovery -did driver 3xs

    i had to do a system recovery according to Dell tech support. Downloaded driver for my officejet j6480 3 times twice from HP and one from the orig disk. It'll print fine, but won't copy from glass or feeder. copy is just black nothing else-any ideas.

    Hi there ppgg,
    This article covers copy and scan outputs that are completely black and has a number of useful steps. Give the steps outlined a shot and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • SONGS WON'T COPY TO IPOD

    For the first time (I've had iTunes and an iPod for a long time), I'm getting an error message when I sync my iPod that says that "[s]ome of the items in the iTunes library...were not copied to [my iPod] because you are not authorized to play them on this computer."
    Umm, what the f---? Why is this happening?
    There are 103 songs that won't copy, and at first glance it appears that the first 103 songs I ever purchased are the very 103 that won't copy onto my iPod.
    Anyone have any ideas about what is going on here? I am reasonably sure that I haven't copied all 103 of these songs to disc 5 times, or whatever the limit is.
    Thanks in advance to all who answer.
    TW

    b noir:
    your initial reply, which at first seemed promising, has now taken me to a whole other level of difficulty. allow me to elaborate.
    1) i have attempted to play one of the aforementioned purchased songs in my itunes library, per your advice (not on my ipod, but on my imac). upon doing so, i get the error message:
    "This computer is not authorized to play "______." Would you like to authorize it? The message box displays the Apple ID and asks me for the password.
    2) all well and fine, except that the email address which displays in the message box as my Apple ID is old and obsolete--way obsolete. So of course, if I enter my present password, it will not match this old ID.
    3) i attempted to change this old ID to my present ID. when I did so, my present ID, which DOES match my present password (and, thus, which i DON'T want to change), showed up as the ID to change.
    4) what do i do? at this point i'm stuck.

Maybe you are looking for