Problem with a loop

Hello All
I'm working on a Flash Gallery and I'm having some issues
with a loop and it's probably something simple I don't know so I
thought I'd see if someone can help me.
the problem is that once the thumbnail panel is populated the
image I want to display from a rollover is no longer defined. As I
mentioned I was hoping someone could shed some light on this.
// create the thumbnail panel
var i = -1;
while(++i<thumbList.length) {
name = "item"+i;
this[name]._x = i*spacing;
this[name].contentPath = "children/" + thumbList
// show the larger pic on rollover
this[name].onRollOver = function() {
picture.contentPath = "children/" + thumblist;
by using this I get an error of: "error opening

mark2685 wrote:
Well, the array of student objects is larger than 2, there are about 6 students so it would have to get the highest from TestScore 1 and the lowests from TestScore 2 out of all of the students, not just those 2. And I want the entire object stored in the chessTeam array. Does this make sense?No you're not reading my code right (BTW - add an open brace on the for loop top and set score2 to 101), or else I'm not understanding you requirements correctly. The student array can hold as many Students as needs be. You stated that you have only two scores that you care about and so that's the 1 and the 2. Based on the Student class you've shown us, this should work, but you'll have to try it before you know.

Similar Messages

  • Qsm pc, problem with stop loop

    i tested queue producer/consument with event case, but i have problem with stop the both loop, can you help me with attachment ?
    Attachments: ‏46 KB ‏3 KB

    thanks for your answer,
    i had problem with upload *.vi (some mistake), so when a upload *.zip it was ok, but i do not know why..
    please, when i put time out constatn, so when i push "stop" then both loops end - it is ok BUT:
    when i push "stop 2" button (for the second loop) so there is error (in attachment), please do you know why?
    i am sorry for a lot of questions but i try understand it..
    thank you
    qsm.jpg ‏31 KB

  • Probably simple problem with while loops

    I was programming something for a CS class and came across a problem I can't explain with while loops. The condition for the loop is true, but the loop doesn't continue; it terminates after executing once. The actual program was bigger than this, but I isolated my problem to a short loop:
    import java.util.Scanner;
    public class ok {
    public static void main(String[] args){
         Scanner scan = new Scanner(;
         String antlol = "p";
         while(antlol == "p" || antlol == "P"){
              System.out.println("write a P so we can get this over with");
              antlol = scan.nextLine(); 
    //it terminates after this, even if I type "P", which should make the while condition true.

    Thanks, that worked.
    I think my real problem with this program was my CS
    teacher, who never covered how to compare strings,Here's something important.
    This isn't just about comparing Strings. This applies to comparing ANY objects. When you use == that compares to see if two references refer to the same instance. equals compares objects for equality in the sense that equality means they have equal "content" as it were.

  • A problem with for loop..

    i have a problem with this code :
         int [] P = new int [M.length];
         System.out.println(P[0]+" "+P[15]);     
         for (int i = 0 ; i < P.length ; i++){
         for (int j = i + 1 ; j < P.length ; j++){
              if (j == (P.length - 1) && M [ i ] != M [ j ]){
                        P [ i ] = M [ i ] ;
                   else if ( M [ i ] != M [ j ] ) continue ;
                   else break;
         for (int i = 0 ; i < P.length ; i++){
              System.out.println(P [ i ]);
    this code to copy distinct values in array M and print them into array P
    M and P are both of size 16
    the problem is the previous code doesn't work for P[15]
    and i don't know way
    if i have in M {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}
    P will be {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0}
    could any body help ?

    I am sorry, but you are not done. May-be your code does what it is supposed to do but it is hard to understand. An important part of programming is not just to get your code to work, but to write code that is easily maintainable. You are probably quite new programming and I do not want to discourage you. Keep working hard and it will come.
    You almost had the solution a while back:
            int [] P = new int [M.length];
         System.out.println(P[0]+" "+P[M.length]);
            boolean unique;
         for (int i = 0 ; i < P.length ; i++){
             // All non-zero entries in P with index less than i are unique in M.
               unique = true; //Assume M[i] unique until contrary has been proven
            for (int j = 0 ; j < P.length ; j++){
              if (i != j && M[i] == M[j]) { //found another entry in M with the same value as M[i]
               if (unique) { // M[i] is unique in M.
                  P[i] = M;
         for (int i = 0 ; i < P.length ; i++){
              System.out.println(P [ i ]);
         }This code executes in time O(n^2). It is possible to achieve O(nlog(n)) by
    1) copy M into P
    2) sort P
    3) iterate through P and set duplicates to 0.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problems with adding loops

    Hey I had my Mac for awhile now (Mac Mini) and I just upgraded to Leopard a few day ago. I'm having problems transferring loops onto the loop index..I tried the drag and drop and sometimes only a few get through but not all. And when I try again a prompt comes up saying there is already a folder with that name...etc. Is there a solution to get all of my loops onto the loop index. Im pretty new to GB and I dont know the best plz!

    If you want to record multiple audio tracks, you have to shift-click on each record button and make sure both are on different inputs.

  • Problem with while loops, please help!

    I am having quite a bit of trouble with a program im working on. What i am doing is reading files from a directory in a for loop, in this loop the files are being broken into words and entered into a while loop where they are counted, the problem is i need to count the words in each file seperately and store each count in an array list or something similar. I also want to store the words in each file onto a seperate list
    read in files...
         //Go through each line of the first file
              while(matchLine1.find()) {
                   CharSequence line1 =;
                   //Get the words in the line
                   String words1[] = wordBreak.split(line1);
                   for (int i1 = 0, n = words1.length; i1 < n; i1++) {
                        if(words1[i1].length() > 0) {
                             int count= 0;
              }This is what i have been doing, but with this method count stores the number of words in all files combined, not each individual file, and similarly list1 stores the words in all the files not in each individual file. Does anybody know how i could change this or what datastructures i could use that would allow me to store each file seperately. I would appreciate any help on this topic, Thanks!

    Don't try to construct complicated nested loops, it makes things a
    tangled mess. You want a collection of words per file. You have at least
    zero files. Given a file (or its name), you want to add a word to a collection
    associated with that file, right?
    A Map is perfect for this, i.e. the file's name can be the key and the
    associated value can be the collection of words. A separate simple class
    can be a 'MapManager' (ahem) that controls the access to this master
    map. This MapManager doesn't know anything about what type of
    collection is supposed to store all those words. Maybe you want to
    store just the unique words, maybe you want to store them all, including
    the duplicates etc. etc. The MapManager depends on a CollectionBuilder,
    i.e. a simple thing that is able to deliver a new collection to be associated
    with a file name. Here's the CollectionBuilder:public interface CollectionBuilder {
       Collection getCollection();
    }Because I'm feeling lazy today, I won't design an interface for a MapManager,
    so I simply make it a class; here it is:public class MapManager {
       private Map map= new HashMap(); // file/words association
       CollectionBuilder cb; // delivers Collections per file
       // constructor
       public MapManager(CollectionBuilder cb) { this.cb= cb; }
       // add a word 'word' given a filename 'name'
       public boolean addWord(String name, String word) {
          Collection c= map.get(name);
          if (c == null) { // nothing found for this file
             c= cb.getCollection(); // get a new collection
             map.put(name, c); // and associate it with the filename
          return c.add(word); // return whatever the collection returns
       // get the collection associated with a filename
       public Collection getCollection(String name) { return map.get(name); }
    }... now simply keep adding words from a file to this MapManager and
    retrieve the collections afterwards.
    kind regards,

  • Problem with one loop in another one

    When I drag and move cursor, X scale position will be show below. And then I click “add data in array”, the data should be put into array. I can move cursor again to add the second , the third ….into array.
    My problem is:
    In block diagram, once loop2 is outside of loop 1, it works. But I really want loop2 is in loop1 regarding to the rest part of the program. However, we I move loop2 into loop1, when I move cursor, nothing happens.
    Please help to make it work or you have different way to do this job.
    Thank you very much
    Attachments: ‏29 KB

    Hey, no need to make it so complicated.  Just add an indicator on the CursLoc.X wire in the  "0 To 5 MHz": Cursor Move  case.
    To answer your questions:
    1) The indicator does not react because you are still within the inner while loop.  It will not change until that loop completes. I.e. the stop button is pressed.
    2) Similarly, the stop 2 button will press, but nothing will happen until the inner loop is done.
    Generally, when I am using an event structure, I try to keep all the changing UI inputs and outputs in the same while loop with the event structure, if not in the event structure itself.  Local variables and property nodes can get the job done, but they are inefficient and can be difficult to debug.  As I am sure you are discovering
    Message Edited by jasonhill on 04-07-2006 12:40 PM
    cursor position indicator.PNG ‏7 KB

  • Problem with animation loop in AS3

    I'm having a problem doing an animation loop (a walk cycle in
    this case) in CS3. I never had this problem in Studio 8 and am
    wondering if I've gone crazy or if something has changed in CS3.
    The animation cycle works fine so long as I have it loop
    without using ActionScript, but when I try to loop it using
    gotoAndPlay it skips the last frame (i.e., the frame that the code
    is on). I tried adding an extra frame at the end and placing the
    code on it... it works a bit better, but there's still a bit of odd
    timing during the looping.
    Interestingly, when I save the fla as a Studio 8 file, it
    works fine (if I include that extra frame at the end). I may be
    misremembering, but it seemed to me that Studio 8 didn't require
    that extra frame before CS3.
    Has anyone else seen this? Anyone have a solution to share
    (I'm planning to use ActionScript3, so saving as Studio 8 won't
    solve my problems)?

    > Interestingly, when I save the fla as a Studio 8 file,
    it works
    > fine (if I include that extra frame at the end). I may
    > misremembering, but it seemed to me that Studio 8 didn't
    > require that extra frame before CS3.
    It shouldn't require that extra frame, but I wonder if
    you've somehow
    configured your FLA's publish settings for a version of
    ActionScript you're
    not actually using.
    > Has anyone else seen this? Anyone have a solution to
    > (I'm planning to use ActionScript3, so saving as Studio
    > won't solve my problems)?
    If your file works fine in Flash 8, then you must be using
    2.0 (or lower) for the time being. Based on what you've
    described, I can't
    imagine what's going awry. Can you make that FLA available
    somewhere? See if you can reproduce this issue with a
    simplified version,
    in case your company's policies (or whatever reason(s)) keep
    you from
    uploading the real file somewhere.
    I'll take a look.
    David Stiller
    Adobe Community Expert
    Dev blog,
    "Luck is the residue of good design."

  • Problem with multiple loops

    Hi all,
    I recently wrote my first VI for a soil consolidation test, which reads voltage measurements from an LVDT, keeps a moving average, and records the LVDT measurements versus time an XY graph.  Everything is contained in a while loop with a stop button and works just fine.  However,I'm having some trouble scaling this approach up for multiple LVDT measurements at once.  What I want to do is this:
    I have a while loop with a relatively short time delay that reads all channels in my SCC system at once.  My DAQ Express VI is set to acquire 1 data point on demand.  Then I send the dynamic data type wire out of the loop and convert the data for each channel to a different scalar value.
    Next, I have another while loop for EACH channel/consolidation test.  I'm doing this because I want each loop to have the potential cycle at a different rate, depending on the soil type I'm testing on that particular LVDT.  For example, on Test 1, I may want to acquire a point every half second, whereas for Test 2 I only want a point every 5 minutes.  I'd assumed the best way to do that would be to have ONE DAQ VI set to acquire all channels at a relatively high frequency (as I mentioned before), and then have each test go "get" the appropriate reading when it needs one.  I don't think I want to use a queue, because I may be skipping quite a few data points in between the ones I actually care about.
    This is the approach I'd thought up, but the concept could be completely wrong.  To make a long story short, I want to acquire time elapsed/voltage data for 5-6 different channels at different rates.  I want each channel/test to be contained in a different loop so that I can compute individual moving averages for each one.
    My problem is getting the multiple while loops to work with one another.  My 'secondary' loops for the individual channels don't seem to be cycling.  If I put a probe on the data tunnels, I get nothing passing out of the first loop containing the DAQ Express VI.  However, everything within that 'primary' loop works just fine.  If anyone has any suggestions, I'd greatly appreciate it.

    Here's what I had in mind (LabVIEW 7.0).
    Message Edited by altenbach on 04-26-2006 01:25 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments: ‏53 KB
    SampleFewer.png ‏9 KB

  • DVD problem with missing loops, instruments

    (trying to get a helpful subject there for those searching for answers)
    the fact that the loops are greyed out and instruments missing in new garagebands is well known. so is the solution of installing from DVD. i cant seem to get that to work for my high school music class.
    back story is that every student has a macbook (yes i know.. amazing). thing is, most students give their macs to the IT department to get their machines 'set up' and the IT department collects their DVDs. i borrowed a bunch of those DVDs from the IT department and inserted the DVD when asked but its just not working..
    any ideas? do i need to get the EXACT DVDs that came with the machine? i doubt that.
    also - why doesnt any of the download options work? does anyone from apple know thats broken?
    lastly - what about instruments? i can get the students some loops by dragging loops of my machine into garageband (using target disk mode), but how do i get instruments? i dont drag them into the loop browser, so where might they get put? should i put them in /Application Support/?
    as we're talking about 37 students (this semster - last semester we had an ugly fix) i thought i'd ask before i did something.
    thanks a bunch..

  • Problem with while loop in thread: starting an audiostream

    Hello guys,
    I'm doing this project for school and I'm trying to make a simple app that plays a number of samples and forms a beat, baed on which buttons on the screen are pressed, think like fruity loops. But perhaps a screenshot of my unfnished GUI makes things a bit more clear:
    Anyway, on pressing the play button, I start building an arraylist with all the selected samples and start playing them. Once the end of the "screen" is reached it should start playing again, this is the while loop:
    public void run(){
            //System.out.println("Wavfiles.size =" + getWavfiles().size());
            if (getWavfiles() == null) {
                System.out.println("Error: list of Wavfiles is empty, cannot start playing.");
                if(!active) return;
                    System.out.println("Wavfiles.size =" + getWavfiles().size());
                    for (int i=0; i<getWavfiles().size(); i++){
                        Wavplayer filePlayer = new Wavplayer(getWavfiles().get(i).getStream());
                        Timer timer = new Timer();
                        //timer.scheduleAtFixedRate(filePlayer, getWavfiles().get(i).getStartTime(),repeatperiod);
                        timer.schedule(filePlayer, getWavfiles().get(i).getStartTime());
                    try {
                    } catch (InterruptedException ex) {
                        Logger.getLogger(LineBuilder.class.getName()).log(Level.SEVERE, null, ex);
        }But once the second iteration should begin, I'm getting nullpointerexceptions. These nullpointerexceptions come exactly when the second period starts so I suppose the sleep works :-) The nullpointerexception comes from the wavfile I try to play. Wavfile class:
    import java.util.TimerTask;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.SourceDataLine;
    import javax.sound.sampled.UnsupportedAudioFileException;
    public class Wavplayer extends TimerTask {
            private SourceDataLine auline;
            private AudioInputStream audioInputStream;
         private final int EXTERNAL_BUFFER_SIZE = 524288; // 128Kb
         public Wavplayer(ByteArrayInputStream wavstream) {
              try {
                   audioInputStream = AudioSystem.getAudioInputStream(wavstream);
              } catch (UnsupportedAudioFileException e1) {
              } catch (IOException e1) {
                    AudioFormat format = audioInputStream.getFormat();
              DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
                    try {
                   auline = (SourceDataLine) AudioSystem.getLine(info);
              } catch (LineUnavailableException e) {
              } catch (Exception e) {
         public void run() {
              int nBytesRead = 0;
              byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];
              try {
                   while (nBytesRead != -1) {
                        nBytesRead =, 0, abData.length);
                        if (nBytesRead >= 0)
                             auline.write(abData, 0, nBytesRead);
              } catch (IOException e) {
              } finally {
    }auline is null on second iteration, in fact, getAudioInputStream doesn't really work anymore, and I don't know why because I don't change anything about my list of wavfiles as far as I know... Any thoughts or extra info needed?
    Edited by: Lorre on May 26, 2008 12:22 PM

    Is my question not clear enough? Do you need more info? Or is nobody here familiar with javax.sound.sampled?
    Edited by: Lorre on May 26, 2008 2:07 PM

  • Problem with While Loop.

    Hi guys,
    i'm doing a pass exam java question, below is the question criteria.
    Write a program that allows a user to enter their mark attained in each unit and displays their grade. After all marks are entered the average mark is displayed.
    The main method should:
    Prompt the user to enter the number of units taken (check for NumberFormatException)
    Write a for loop to repeat for each subject, where each iteration
    Prompts the user to enter a mark ( a double) for unit 1, unit 2 etc. This should be in a while loop so if mark entered is less than 0 or greater than 100 the prompt will be repeated.
    Pass the mark to a method called getGrade.
    Display the returned grade
    Accumulate each mark
    Print the average mark to 2 decimal places
    The getGrade method should:
    Accept the parameter passed from the main method
    Determine the grade according to the following scale
    Return the grade
    The words that i highlighted in bold is the criteria.
    As you can see from the above question, i create an array , even though the question does not prompt me to create as what i know from tackling JavaQuestions "if it does not prompt me to add a criteria, it is ok to add it" :)
    below is my program code , in which the result i get is the same as the question result. BUT, from the above question it ask me to add a while loop, so if mark entered is less than 0 or greater than 100 the prompt will be repeated.
    But instead i use a do loop. :(
    so can anyone help me or show me how to create the while loop for mark entered is less than 0 or greater than 100 the prompt will be repeated, from my program code below. cause i want to know whether it possible to have a while loop instead of do loop for the my program and the while loop can work with an array criteria.
    import javax.swing.*;
    import java.text.DecimalFormat;
    public class Mark
        public static void main (String [] args)
            String unitStr;
            String markEnterStr;
            int validUnit;
            double total = 0;
            boolean validInput = true;
            DecimalFormat fmt = new DecimalFormat("#0.00");
            while (validInput)
            unitStr = JOptionPane.showInputDialog(null,"Enter number of units: ");
            validUnit = Integer.parseInt(unitStr);
            double[] markArray = new double[validUnit];
            validInput = false;
            for (int index = 0;index < validUnit; index++)
                markEnterStr = JOptionPane.showInputDialog("Please enter mark " +(index+1) +":");           
                markArray[index] = Double.parseDouble(markEnterStr);
                while(markArray[index] < 0 || markArray[index] >100);
                String correctMark = getGrade(markArray[index]);
                total = total + markArray[index];       
            double average = (double)total / validUnit;
            System.out.println("Average = " +fmt.format(average));                   
            catch (NumberFormatException e)
            public static String getGrade(double x)
                String grade;
                if (x < 50)
                grade = "Fail";
                else if (x < 60)
                grade = "Pass";
                else if (x < 70)
                grade = "Credit";
                else if (x < 80)
                grade = "Distinction";
                else grade = "High distinction";
                return grade;

    Hope u got it.
               markArray[index] = -1;
                while(markArray[index] < 0 || markArray[index] >100);
                markEnterStr = JOptionPane.showInputDialog("Please enter mark " +(index+1) +":");           
                markArray[index] = Double.parseDouble(markEnterStr);

  • BPM problem with correlation/loop

    I have created a scenario in which I am sending file(using flat file conversion)  to BPM to do a collect and send out to external system.  I have set up a loop which should exit out when counter ="2."  Within the loop, I have my receive step, append to multiline item, and increase counter step.  Outside of the loop I have my transformation and send step.  The problem is that my inbound message does not even enter the BPM once I put the receive step into the loop. I have verified that the inbound message meets the structural requirements.  Can anyone provide a possible explanation as to why message cannot enter BPM once receive step is in loop?

    I have created a scenario in which I am sending file(using flat file conversion) to BPM to do a
    collect and send out to external system. I have set up a loop which should exit out when counter
    Your requirement seems to be similar to the below mentioned help section:
    Make sure that you have done the settings accordingly and also have defined correlation.....
    In IR you can view the BPM under SAP BASIS ---> SystemPatterns

  • Problem with Nested loop in Fox-Formula

    Dear Experts,
    Let s share the scenario :
    MaterialGroups with following Keys for Example AAAA, BBBB, CCCC..., Materialgroups are selected in the 1st input ready query, which is assigned to DataProvider DP_1 in a  webtemplate.
    every Materialgroup has several Materials, for instance:
    Materialgroup AAAA has following Materials: AAAA10, AAAA11, AAAA12, AAAA13...
    Materials are  selected in a second  input ready Query, which is assigned to a second DataProvider DP_2 in the Same Webtemplate as the query 1.
    Both Materialgroup and Material are based on the same Aggreagtion level and same real time cube.
    I want to copy the input values for every  MaterialGroup ( 1st query, DP_1) only to it s own Materials (2cond Query, DP_2).
    To resolve this Issue i wrote the following Fox Formula code with a nested loop, however it does not work properly. when I m debugging the code, i could release that the second Loop was ignored.but wehn i replace the second loop (nested loop) with a fixed value it s seems to work properly
    DATA MG1 TYPE MATG.<------ MaterialGroup
    DATA MT1 TYPE MAT.<----
    To check Materialgroup in debugger
    S1= MG1.
    K = {KEYfIG, #, MG1}.
    FOREACH  MT1.   <----- if i set MT1 to a fixed value like AAAA11 then S3 get the wished value namely AAAA
    S2 = MT1.
    S3 =  SUBSTR (MT1, 0, 4).  
    IF S1 = S3.
    {KEYFIG, MT1, #} = K.
    following Statement is only used To check in debugger if Material has become the same Materialgroup value
    Z = {KEYFIG, MT1, #}.
    Thakns for any help
    Edited by: FRYYYBM on Mar 17, 2011 10:54 PM
    Edited by: FRYYYBM on Mar 17, 2011 11:06 PM

    Please try this way.
    DATA MG1 TYPE MATG.<------ MaterialGroup
    DATA MT1 TYPE MAT.<----
    To check Materialgroup in debugger
    S1= MG1.
    K = {KEYfIG, #, MG1}.
    FOREACH MT1. <----- if i set MT1 to a fixed value like AAAA11 then S3 get the wished value namely AAAA
    S2 = MT1.
    S3 = SUBSTR (MT1, 0, 4).
    IF S1 = S3.
    {KEYFIG, MT1, #} = K.
    following Statement is only used To check in debugger if Material has become the same Materialgroup value
    Z = {KEYFIG, MT1, #}.
    With regards,
    Anand Kumar

  • Problem with BPM loop end condition

    I'm working with PI 7.1 in a BPM process which have a loop. I cant stop this loop in anyway, even, I have put a COUNTER != COUNTER as condition.
    Can someone help me with this issue?
    Alberto Pla.

    The BPM loops are while loop, so it will execute indefinitely if the condition given is true. The condition editor what we have in the BPM is not flexible. Can you just try the drag and drop facility available in the condition editor rather than writing on our own. it should look like this COUNTER!=COUNTER  without any spaces in between.

Maybe you are looking for

  • Video chat connects, but I can't see my buddy.

    Every time I video chat with a friend, it connects and I can hear them and they can see me, but I am unable to see them. Any suggestions?

  • RMIConnectorServer Snafu - java.lang.NoClassDefFoundError:

    All, Your help debugging the following code snippet, which results in a "java.lang.NoClassDefFoundError:" excpetion being thrown (argh!!!), would be greatly appreciated. Thanks in advance. Code snippet: ===================

  • Controlling movieclip from main timeline & Child

    Hi, This code is currently contained within my "mc_1" movieclip. I want to be able to have this code on my main timeline, however no matter what I try I constantly get errors, multiple different versions. I've tried adding mc_1 infront of everything,

  • How to install certificates?

    How can l install the certificates back of my fon coz its saying certificate not on sim or fon Moderator's note: We have edited your post. A more appropriate subject was provided so that other users can easily help you.

  • Printing Gibberish on first attempt

    I'm currently using Adobe Reader 10.1.0 on a Windows XP operating system.  I have processed all updates from Adobe faithfully. Periodically when I print a document, the first copy contains a mixture of weird characters (and a few distinguishable word