How to print the content in Reverse which is read from the file

i have written a program to display the content of the file using files concept. now the task is how to display it in reverse order i.e from last to first which is read from the file.

If it will all fit in memory read the file as you are doing now appending everything into a StringBuilder. Then use the reverse() method of that class to obtain your output.
http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html#reverse()

Similar Messages

  • How to print a list of keyword tags in PSE7 from the XML file?

    When choosing keyword tags to add to photos it would be useful to have a printed list, structured in categories and sub-categories. The "Save Keyword Tags to File" command just produces an XML file that seems to have all the data, but I don't have any applications that will open it properly. IE and Netscape just show the XML tags without interpreting them. Netscape complains about the lack of styles. Is that what I need?

    Hello Fred
    This is what I do in Windows XP Home.
    Click on Start
    Click on Run
    In the Open window type: C:\psedbtool\psedbtool-csv file
    (yes, that is a space between csv and file)
    Click on OK
    You then get a black window that steadily gets filled up with information. If you've got a PSE catalog the size of mine, when it says "Checking for missing files" and "Writing files" you may think everything has stopped, but wait, percentages will appear, working up to 100%. You will find the four files in a folder called C:\psedbtool
    Take note of what John Ellis says in the .html document about using csv files.
    Good luck

  • How to have dynamic content in a Keynote presentation (ie from XML file) ?

    Hi,
    I need to update automatically the content of a Keynote presentation from an extrenal file (ie XML). The update can be executed when the presentation is launched, it is not necessary to do it during it runs.
    Is it possible and how ?
    Regards,
    Pierre

    If it will all fit in memory read the file as you are doing now appending everything into a StringBuilder. Then use the reverse() method of that class to obtain your output.
    http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html#reverse()

  • Recently my keyboard on my macbook pro died. i backed up the machine to my Seagate 500GB hard drive, successfully, and sent the notebook in for repairs. Now that the macbook is repaired, i can read from the seagate, but not write to it. It says read only.

    Recently my Macbook Pro's keyboard failed. Using my wireless keyboard, i managed to backup everything to my 500gb Seagate external hard drive. I sent the machine in, had the keyboard repaired, and now the machine is back, and i am loading my content back onto the macbook. My problem is that the drive is now read only, and i have searched for all the obvious fixes. The lock on the permissions secion of the info block on the drive. (not present). I have even tried disk utility, but all the options are greyed out.
    I am a graphic designer, and so i use my external drive extensively to move artwork around, so it is important that i can make it writable. It worked perfectly on this very same machine, two weeks ago, and nothing has changed on the drive, so i can only assume it is a software issue on the operating system.
    I have read through all the forums, etc, and can find nothing that works. I am loath to change anything on the drive, as it was working perfectly on this system before the system went in for its repair.
    Any help would be greatly appreciated.
    -Captain Zub-

    Please post a screenshot of Disk Utility that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • Encoding Failed- Could Not Read from the Source

    I have a quickly approaching deadline for the short film I am working on, and it would be greatly appreciated if anyone knew anything of my predicament.  Everytime I try to export anything from Premiere Pro (CS4 of course), when I start the queue it says "Could Not Read from the Source.  Please check if it has been moved or deleted."  The files, of course, have not been moved or deleted, and the raw footage for the film is in the same place as everything else.  All my scratch disks are set to the same folder, etc.  I don't understand, and it won't even let me export to my camera.  It says it does, but when I check my camera, it's nothing but blank tape.  Any (quick) help would be very much appreciated!
    Thank you.

  • While reading from the pl/sql cursor i got "Invalid column index" exception

    Hi,
    I got the "Invalid column index" exception while reading from the cursor.
    Please advice.
    Thanks in advance
    siva

    I suppose one (or more) index in your query is in a bad state.
    Possible solutions: rebuild (with 'ALTER INDEX <index> REBUILD ...')
    drop and recreate (it's the same as above, but a little more long)

  • How to Print a Character in Reverse video ...?

    Hi Could any one of you help me " How to print a character in Reverse Video " in SMART Forms and in SAP Scripts.
    Regards,
    Saravanan
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Mar 26, 2009 5:31 PM

    deepak_c3 wrote:
    Thanks for the info.,
    where should the page number n-1-i be returned ?
    Which method implementation of Pageable interface should return the page number ?w.r.t. your first question: don't return that number but return page n-1-i when page i is requested; your document will be printed in reverse order. Your class should implement the entire interface and wrap the original Pageable. (for that number n your class can consult the wrapped interface; read the API for the Pageable interface).
    kind regards,
    Jos

  • How to print HTML contents

    can anyone tell me how to print HTML contents...i needed it urgently
    Thanks

    actually i have a print button on html page....when i click on print button using window.print(); the html page gets printed...but along with it print button is also printed...i dont want print button to be printed...
    this is the issue...
    please resolve it
    Thanks a lot...

  • How to print Iview contents only

    Hello All,
    How to print IView contents only instead of the whole portal. If I use javascript function, it prints whole screen. I want to print only the IVIEW contents. IView has tableview.
    Thanks in advance,
    Praveen

    Hi,
    we are using a 7.0 SP 16 Portal.
    If you have an light portal with an low EPCF level maybe the option will not be shown.
    Try it with the default SAP Portal Style as admin in that case you have an high EPCF level and you also should see the print option.
    If your iview is embeded inside a page this can have different effects. Please test it with an stand alone iView before.
    So with the high EPCF level the default portal style a single portal iView and the print option set to true you should see and use the print option.
    The option "Show print option" is not for every iView type avaible for example web dynpro iViews has that option this i know for sure, because i use this option with web dynpro iViews.
    Maybe you can build this function by your own i did this also with the following code. Maybe you can adapt that code:
    String p1 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("PagePath");
    String p2 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-ext-sid");
    String p3 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-wd-cltwndid");
    String[] url = wdThis.wdGetAPI().getComponent().getApplication().getURLService().getGeneralService().getAbsoluteWebResourceURL(wdThis.wdGetAPI().getComponent().getDeployableObjectPart().getName()).split("/");
    parameter = p1 + "&iview_mode=default&sap-wd-renderMode=print&sap-wd-cltwndid=" + p4 + "&sap-wd-cltwndid-print=" + p4 + "&sap-wd-pb-ext-sid=" + p2 + "--" + p3 + "--&IviewPrint=true";
    String newUrl = "http://" + url[2]+ "/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.IviewModeProxy?iview_id=" + parameter;
    kind regards
    Fabian
    Edited by: Fabian Eidner on Mar 23, 2009 3:40 PM

  • How I download a MP4 series of videolectures (that the seller has stored in Amazon S3 and has sent to my iPad email address--which is different from the one I use from the MacBookPro) from my iPad to my MacBookPro-.

    How I download a MP4 series of videolectures (that the seller has stored in Amazon S3 and has sent to my iPad email address--which is different from the one I use from the MacBookPro) from my iPad to my MacBookPro (so that I can the save them in iTunes and then synchronize some of the videolectures to the iPad?)

    To set it up as POP you need to delete the account, reboot the phone by holding the HOME and SLEEP buttons at the same time until an Apple logo appears (about 10 seconds), then add it back following these instructions: Forcing creation of a POP or IMAP email account
    I understand that you have used the same account for many years, but the technology is also changing constantly. Years ago the standard was POP (Post Office Protocol), which was designed at a time when it was inconceivable that anyone would access their email from more than one device. When people started using multiple devices, for the most part they wanted to see changes on one device mirrored on another. A new standard, IMAP (Internet Mail Access Protocol) was developed. With iMAP the master copy of all messages resides on a server, and multiple devices are kept in sync with the server. So if you delete a message from one device it is removed from the server, and then removed from all other devices when they next sync. This is the same way Microsoft Exchange works. Other benefits of IMAP include the ability to have multiple mail folders that are kept in sync across devices. In your case you could use this to create a separate folder for each family member, so they could move messages to their own folder and not clutter up the shared Inbox. Most computer mail readers can even automatically sort incoming mail into folders based on the contents of the message.
    IMAP is considered a "higher level" standard than POP. When you create a mail account iOS devices query the server and ask what it supports; if it says it supports IMAP then the account is automatically configured for IMAP. So if you really want POP you must fool it, as described in the link above. In my experience Android devices default to the highest level protocol also, and I suspect newer Blackberries do (although it has been 15 years since I used a BB).

  • How to catch Exception in backingbean which is thrown from the Model layer.

    Hi,
    JDev Ver: 11.1.1.2.0
    In my application there are two layer viewcontroller & model.
    In model layer I have created JPA service facade which does the database operation like persist, merge & remove entity.
    I am calling this service facade method from backing bean via below standard code.
    public static Object invokeMethod(String methodName, String mapKey,
    Object object){
    BindingContext bcx =
    DCUtil.getBindingContext((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest());
    JUFormBinding bc1 = (JUFormBinding)bcx.getCurrentBindingsEntry();
    FacesCtrlActionBinding reassignOperationBinding =
    (FacesCtrlActionBinding)bc1.findControlBinding(methodName);
    if (mapKey != null && object != null) {
    Map params = reassignOperationBinding.getParamsMap();
    params.put(mapKey, object);
    Object result = reassignOperationBinding.execute();
    return result;
    This is a static method which I am calling from backingbean to invoke service facade persist, merge or remove entity method
    I have written throws in all the methods signature of service facade.
    The exception which is thrown from the service facade are not comming back to backingbean catch block.
    Is there any way to catch this exception in backingbean.
    regards,
    devang

    Hi,
    2 things to check
    1 - does reassignOperationBinding has errors. You can check on the component
    2 - does the exception show on the binding layet. See the Fusion Developer guide for how to define an error handler on the databindings.cpx file
    Frank

  • How to stop the restructuring (ran manually)  which is running in the backg

    How to stop the restructuring (ran manually) which is running in the background.
    Tried stop the data base from EAS , but got error message saying that it is not acceptiong any commands.

    The only way I know to do it is to stop the application through task manager(Windows) or Kill(Unix). First you have to figure out what PID it is, then kill it. It does come with risk of corrupting the application depending on what step it is in. If you go this route, you should clean up the new created temporary files (Otn, Esn, etc) Some newer versions don't need this last step and will clean up when the application restarts, but I'd rather make sure things look good myself.

  • When I try opening iPhoto on my iMac (OSX 10.9.2) it says I must first update the application; when I try doing so from the App store, it says there are no updates available. I have not renamed or moved iPhoto which was preinstalled. How to solve?

    When I try opening iPhoto on my iMac (OSX 10.9.2) it says I must first download the update; when I try doing so from the App store, it says there are no updates available.  Stuck in a classis Catch-22 - any ideas how I might solve the problem?

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • How can i watch purchased tv shows which are stored on the cloud on my laptop?

    how can i watch purchased tv shows which are stored on the cloud on my laptop?

    Hi Miriam1972,
    Thanks for visiting Apple Support Communities.
    You can use iTunes on your laptop to download the tv shows for viewing. See this article for the steps to download the shows:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Best,
    Jeremy

  • Hi. I clicked some snaps from my iphone and post that without copying it i restored the iphone with all apps etc available from the backup taken. How do i get back the photos which were clicked earlier. Is there a way to get it back?? Please help

    Hi. I clicked some snaps from my iphone and post that without copying it i restored the iphone with all apps etc available from the backup taken. How do i get back the photos which were clicked earlier. Is there a way to get it back?? Please help

    Yes i had not taken back up before restoring it. However i was just going through some links on the net and there is a software available for MAC to retrieve such lost data. But the point is will the said software work on iphone as the OS is not MAC..
    Will have to give a try to this. If successful will share it with all. Anyone else has any idea about this please so share.

Maybe you are looking for

  • How do I transfer my iTune to another computer?

    Usually for Apple products, it can only sync to one library at a time. If you tried to sync it to another library, it would only allow you if you erase all the contents on your item (iPhone in my case) to replace it with the contents on the other iTu

  • XDB.DBMS_XMLDOM crashes

    Oracle 9.2.0.1.0 here's the test procedure create table aclob (res clob); create or replace procedure xmltest is    outDoc dbms_xmldom.DOMDocument;    outNode dbms_xmldom.DOMNode;    curNode dbms_xmldom.DOMNode;    xmlElem dbms_xmldom.DOMElement;   

  • 11g conversion server

    Does anyone know if you can use a 11g conversion server and 11g DAM with a 10g content server?

  • Problem with contact list in email w/ 3.0

    After upgrading to 3.0 I'm having a problem with the "To" in emails. I start typing in a name in the "To" field and it does not bring up matching entries in my contact list (it used to do so with the previous version SW). I have to try to send the em

  • Importing PDF fillable forms

    Hi all, I am using RH7 and I am tryuing import pdf documents (some are fillable forms) in to my Webhelp project. I have tried different options. 1. Import as a PDF Document itself which doesnt solve the issue as its either creating HTML or an image .