Fastest way to print to screen?

I am writing a chess program and I want to print to screen a series of moves, one on each line. E.g.
A1->C3
D2->E3
A3->E3
I am currently using System.out.print() to print each line separately, and I am wondering what is the fastest way to print them out to screen since the list of moves can get pretty long. I tried concatenating all the moves into a single large string then printing it out at once, but that seemed to be slower than printing each line individually.

I wrote a simple program that looped, printing "XX->YY" to the cmd window in XP. A thousand lines printed in 110 milliseconds (1/10 of a second.)
I think thats pretty fast. You probably have some other problem.

Similar Messages

  • How to print the table values in fastest way?

    Dear Friends,
    I'm having table in my application and i need to print the table values. For that I used print() method to print the table values.
    boolean complete = tableObj.print(mode, header, footer, showPrintDialog, null, interactive,
                                  null);But, the time taken for displaying print dialouge box so late and printing operation is done very slowly.
    Could anyone please tell me is there any better way and fastest way to print the table values?
    Thanks in advance

    Hi,
    In the Module pool you will have fields. For those fields you have created the name also. Assign those name to work area and from there to internal table.
    And for your requirement viceversa you need to done.
    With Regards,
    Sumodh.P

  • Print to screen OR file problem, need help please.

    Hiyo!, im doing a certain program the way to Uni wants me to do it so im using a textFile jar file for all the reading writing etc, i know its not standard java but thats not what im having trouble with.
    Im trying to make a prog that will print its results to screen if the only augument on the command line is the file to read from eg.( java ProgramThree input.txt ).
    but if two arguments are written on the command line eg.( java ProgramThree input.txt output.txt ) then it
    will print the results to the file (output.txt) and not display to screen.
    I know that its just that ive messed up a couple of the "args.length" statments in main() , but my brain gets confused easy :[
    Any help would be sweet. Thanks.
    class ProgramThree
            public static String calc(String line)
                String type[] = {"Valid Isosceles","Valid Equilateral","Valid Scalene","Invalid"};
                String result = null;
              int s1 = 0;
              int s2 = 0;
              int s3 = 0;
              try
                   StringTokenizer st = new StringTokenizer(line);
                   s1 = Integer.parseInt(st.nextToken());
                   s2 = Integer.parseInt(st.nextToken());
                   s3 = Integer.parseInt(st.nextToken());
              catch (Exception e) {e.printStackTrace();}
              if ((s1+s2>s3)&&(s1+s3>s2)&&(s2+s3>s1))
                   if((s1==s2)||(s1==s3)||(s2==s3))
                        if((s1==s2)&&(s1==s3))
                             result = type[1];
                        else
                             result = type[0];
                   else
                        result = type[2];
              else
                   result = type[3];
              return result;
            public static void printScreen(String result)
              System.out.println("\nTriangle is: " +result+ "\n");
            public static void main(String args[])
              String line = null;
              String result = null;
                    if(args.length > 2)
                      System.out.println("Too many Filenames Given!");
                      System.exit(1);
                    textFile inFile = new textFile(args[0], 'r');
                    textFile outFile = new textFile(args[1], 'a');
              while(!inFile.EOF())
                   line = inFile.readLine();
                   if(line == null)
                        break;
                   result = calc(line);
                   if(args.length == 0)
                        printScreen(result);
                   else
                                 outFile.writeLine(result);
                        System.out.println("\nResults written to file.");
              inFile.closeFile();
              outFile.closeFile();
              return;
    }

    Thanks for your reply neil!
    But im not to sure how I would impliment your code into my program :0
    The code that I posted before is throwing an arrayOutOfBounds exception at the line
    inFile = new textFile(args[0], 'r');
    outFile = new textFile(args[1], 'a'); <-----------Here
    This happens if I enter none or one auguments on the command line :/
    But if I enter two auguments it works fine and writes to file..
    I know its because when there is one augument on the command line (or none at all) it opens to outFile for nothing, because its printing to screen?
    The thing is i dont know how to fix this :[
    -thanks

  • In Mail, is there a way to print the list of mail activity in a folder without actually printing each email?

    In Mail, is there a way to print the list of mail activity in a folder without actually printing each email?
    Thanks to all.

    Actually, I noticed in "More Like This" questions similar to mine.  One of the suggestions worked perfectly.
    Command Shift 4 turns the arrow into a target scope.  Use it to take a screen shot of the area you want printed.  Thanks to all.

  • Print the Screen from Mobile App

    Hi All,
    As i am creating the new Syclo Mobile application for iPad, and in that i need to print the screen from the application, is it possible to do that or else i need to store in any type of the file then transfer to mail and then prin the document? kindly suggest me if any possible way to do that?
    Tags edited by: Michael Appleby

    Hi Jason,
    Can we take a print out from syclo application using a external printer, if so please share me the link for know the syntax and code snippet if possible.
    Thanks & Regards
    R. Thiyagarajan

  • Is there any way to print a list of what is in your Library?

    Is there any way to print a list from ipod 60gb video (either from the itunes screen or from my documents)? I'd really like to be able to see what I already have without having my ipod plugged in. Thanks!

    Boy I feel stupid! I really thought I'd checked the drop down menus. Oh well. Thanks!

  • Is there any way to print text messages from an iPhone 3gs?

    Is there any way to print text messages from an iPhone 3GS?

    The only ways to print any text messages from any of the iOS devices is to either do a print screen and then print those photos, or you could look for a program called TouchCopy that will allow you to download the SMS to the computer and you can handle them from there.

  • What is the fastest way of getting data?

    With a scanning electron microscope, I need to scan a 512*512 pixel area with a pixel repetition of 15000 (two channels), meaning averaging over 15000 measurements. Simultaneously I have to adjust the voltage output for every pixel.
    I am using a 6111E Multifunction I/O board in a 800MHz P3. The whole task has do be done as fast as possible (not more than 20 minutes altogether).
    What is the fastest way to get this huge amount of data with averaging and output in between? (E.g. do I use buffered read with hardware triggering or is there a faster way?)

    Using the NI-DAQ API (not LabView) will give you a significant amount of more control over what happens and when to the data stream; which translates to a more efficient program. But you need to program in C/C++ or Delphi then. The Measurement Studio provides ActiveX controls that are like the LabView ones for C&C++ (they�re slow like the LabView ones though � not a lot you can do about the Windows GDI).
    What are you trying to sample 15000 times? The 512*512 pixel field?
    That�s almost 15Gigs of data! And it means you need to process data at 12.8MB/s to finish it in 20 minutes. I hope you know C, x86 assembly and MMX.
    I would setup a huge circular buffer (NI-DAQ calls them �double buffers�), about 30 seconds worth or so, to use with SCAN_Start. Then I would proces
    s the actual buffer the card is DMA�ing the data into with a high priority thread. Progressively sum the scan values from the 16bit buffer (the samples are only 12 bit, but the buffer should still be 16bits wide) into a secondary buffer of DWORDs the size of the screen (512*512), and you�ll need two of those, one for each channel. Once the 15000 scans are complete, convert each entry into a float divide by 15000.0f, and store it in a third buffer of floats.
    If you wish to contract this out, send me an email at [email protected]

  • Is there a way to Print one's Purchase History?  I just get a blank page when I click on Print and cannot copy to paste elsewhere.

    Is there a way to Print one's Purchase History?  I just get a blank page when I click on Print and cannot copy to paste elsewhere.

    davidfromloudon wrote:
    Is there a way to Print one's Purchase History?
    Take screen captures and print them.  PITA I know but that is all that is provided.
    I just get a blank page when I click on Print and cannot copy to paste elsewhere.
    Correct.

  • Is there a way to print my Fieldpoint configuration information

    Is there a way to print my Fieldpoint configuration information including communication parameters, module types and names, channel input ranges, etc. other than doing a screen dump for each configuration dialog?
    Anton

    Anton,
    Unfortunately I don't know of any other way to get a printout of all the FieldPoint configuration data.  The iak file is binary so you can't print that and a MAX report does not contain all the information.
    I think this would be a great idea for a product suggestion though.
    Regards,
    Simon H
    Applications Engineer
    National Instruments

  • Testing PS Elements for Scanning  & Printing Checks -is there a way to print as a doc not as a photo

    I am testing PS Elements for Scanning  & Printing Checks -is there a way to print as a doc and not as a photo - it is a waste of ink and time to print as a photo???.  I could do it out of a very old version of Photoshop that came with my computer that ran W97 or 98, my new computer is W7-64 and I am having trouble printing jpg's as anything except a photo.  W-XP pro with old version of PS allowed me to print as a document on plain paper..Please Help.

    RaceRev wrote:
    I am testing PS Elements for Scanning  & Printing Checks -is there a way to print as a doc and not as a photo - it is a waste of ink and time to print as a photo???.  I could do it out of a very old version of Photoshop that came with my computer that ran W97 or 98, my new computer is W7-64 and I am having trouble printing jpg's as anything except a photo.  W-XP pro with old version of PS allowed me to print as a document on plain paper..Please Help.
    You can try two different ways to print your photos as a document:
    1) Download a trial version of Adobe Acrobat XI and you it as your printer.  This creates a pdf file for you and you can just view the file on your screen or print it out using your printer;
    2) Windows 7 comes with Microsoft XPS Document Writer.  You can select it as your printer and save the file as a document by giving it a name;
    Click on this this picture to get the idea:
    Good luck.

  • Is there a way to print something showing all the purchases that have been made and what the total cost is?

    Is there a way to print something showing all the purchases that have been made and what the total cost is?

    While it is not possible to directly print your iTunes account purchase history within the iTunes Store, you can take a screnshot of your purchase history on your computer, and then print that screenshot.
    The following article explains how to review your purchase history:
    http://support.apple.com/kb/HT2727
    This articles explains how to take a screenshot on Mac OS X:
    http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh26782.html
    and this does on windows:
    http://windows.microsoft.com/en-CA/windows-xp/help/setup/take-a-screen-shot

  • Black text prints with screen in non PS digital printer

    I'm trying to find a way to print a color CS3 document to our Panasonic DP-C264 so that the black text prints solid black with no screening. It works if I use the PS driver, but some of the finishing options we need aren't available in that driver. The only other way I've found to get solid black text is to output in grayscale, but obviously that's not acceptable for a color job! So far I've tried making sure the transparency flattening is set to high, set the text attributes to "overprint fill," set text to print black in the print dialog box... but no joy; I always get screened black text.
    Ultimately we want to offer a solution for customers who are creating documents in InDesign (CS through CS3) and creating PDFs for us to print for them. So if there is a way to get the text to go solid black in the PDF process, that would be great to know also.
    Ideas??

    I will check on that when I print from PDF -- I'm starting out by printing directly from InDesign first though. I figure it it doesn't work from the original application there's not much point in going to PDF...!! Thanks for the idea though; I wasn't aware of the Print As Image option.
    Cheers,
    Linda

  • Trying to Print Flash Screen

    Hi,
    I'm trying to print a particular set of objects that show in
    the browser from my flash movie at a particular point in time (I
    don't want to print every frame in the movie). I've created a
    'print this certificate now' button with the following actionscript
    applied to it:
    on(release) {
    print();
    However, I'm not sure what to include inside the print
    method. I have several different objects on the screen I'd like to
    print. Anyone have any ideas?

    the most satisfactory way to print from flash is to create a
    printjob, access its pageWidth and pageHeigth properties and then
    create a movieclip that matches those dimensions and position/add
    whatever you want to include in your printed page to that
    movieclip.
    then add that movieclip to the printjob and start
    printing.

  • Any way to print list of events by year, etc.?

    In iPhote is there any Way to print a list of events by year, etc.?

    No
    A screen shot would be all
    LN

Maybe you are looking for