Copy and paste forum code

I don't mean to sound stupid but I'll have a go at it anyway:
Can somebody tell me a good way to copy code from a forum post and paste it into something like TextPad? When I try I don't get any linebreaks and it is a pain to put them in manually...
I'm using IE 5.5 on WinNT if your familiar with that setup.

Before I wised up (a little) like EvilEdna and switched to linux I wrote this. Not very elegant but it works, wrote it a long time ago. yawmark is right about saving to wordpad to add newlines too.
  import java.io.*;
  public class MakeNewline {
     static String lineEnd =  System.getProperty("line.separator");
         public static void main(String[] args) throws IOException {
                // Count and print the number of command line arguments
     int numberofArgs;
     numberofArgs = args.length;
     System.out.println("Number of command line arguments =  " + numberofArgs);
     if (numberofArgs == 1){
                     // If only input file is specified on command line,                                                                // use the specified input file
                     // & 'outagain.txt' as an output file
                        File inputFile = new File(args[0]);
                     File outputFile = new File("outagain.txt");                                                               FileReader in = new FileReader(inputFile);                                                                FileWriter out = new FileWriter(outputFile);
                     // below calls a class method to step through input                                                                // file and add vertical spacing
                    MakeNewline.addspaces(in, out);
     else if (numberofArgs ==2){
                                                                 // If 2 filenames are command line arguments
                      // use them as input and output files
                        File inputFile = new File(args[0]);
                     File outputFile = new File(args[1]);     
                                                                 FileReader in = new FileReader(inputFile);                                                                FileWriter out = new FileWriter(outputFile);
                                                                // below calls a class method to step through input                                                                // file and add vertical spacing                                      
                       MakeNewline.addspaces(in, out);
     // If there is an improper number of command line args print some error messages
     else{ System.out.println("There must be at least 1 file name, but no more than 2 as command line args");
              System.out.println("For example:   java MakeNewline InputFileName.java OutputFileName.java");
              System.out.println("If you do not specify a 2nd file name the output will be placed in a file named 'outagain.txt'");
static public void addspaces (FileReader in, FileWriter out) throws IOException {
                      int c;
           int numNewLines = 0;
                      while ((c = in.read()) != -1){
                         if (c == 10) {
                                     numNewLines++;
                                       out.write(lineEnd);       
                              else{ out.write(c);}
                    System.out.println(" Number of new lines added, including blank lines: "+numNewLines);     
                       in.close();
                       out.close();
  }

Similar Messages

  • HT4480 When I enter my redemption code I get a message that says the code is not recognized, even when I copy and paste the code.

    When I enter my redemtion code in the app store I get a message that says code not recognized, even when I copy and paste the code.

    Use the email form to contact Apple here >  Apple - Support - Mac App Store - Contact

  • Problem in copy and paste html code generated from google adsense

    tell me where can i paste the html code in mozila .
    I am having account in googlemadsense and whenever i try to copy and go to paste in html it dosent work.please reply me.

    Hi Thanks for reply,but my dear freind as I written in my previous mail also that I am having account in google adsense and as per the given instructions only,when i try to paste the html code,which was generated from their adsense adposting , i try to paste that code after opening the html sources box,that code was not accepted.The html source window was slightly blocked.
    And for your information i am not try to paste any other code from any otherwebsite like word press etc
    Waiting for your reply soon.
    Kavitha

  • Copy and paste html code

    When i paste and copy the html code (web widget- snipet) from ebay to my iweb site it converts the price from uk £'s into US $'s. How can i stop this.
    thanks paul

    Hi Thanks for reply,but my dear freind as I written in my previous mail also that I am having account in google adsense and as per the given instructions only,when i try to paste the html code,which was generated from their adsense adposting , i try to paste that code after opening the html sources box,that code was not accepted.The html source window was slightly blocked.
    And for your information i am not try to paste any other code from any otherwebsite like word press etc
    Waiting for your reply soon.
    Kavitha

  • Olap worksheet copy and paste fails hard parse

    Hi
    i've noticed something strange in the AWM olap worksheet that may help anyone using it.
    when you copy and paste some code to be executed it fails with strange errors however if you then type the code it runs without problem.
    bizarrely if you copy and paste the code in again it works..
    shown below is the console: 1st is pasted, 2nd typed, 3rd pasted... had me bashing my head against the screen a few times before i worked out what was going on.
    ->ROW 'SMOOTHING' FCQUERY(fc smoothing trial loopindx)
    ERROR: (ORA-33776) ROW is not a command.
    ORA-33776: ROW is not a command.
    ->ROW 'SMOOTHING' FCQUERY(fc smoothing trial loopindx)
    SMOOTHING no
    ->ROW 'SMOOTHING' FCQUERY(fc smoothing trial loopindx)
    SMOOTHING no
    ->
    I assume this is a parsing problem (i'm cutting and pasting from notepad btw).
    Once typed and parsed properly it doesn't do a hard parse again perhaps.
    In any case watch out for it, especially when copying example programs from the help text :), you have to type them a la spectrum48k. (10 print 'start' .....;)

    If you are copying and pasting from the OLAP DML Help then this is a known issue. The DML Help contains hidden characters that stop the code from executing.
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Firefox Sync setup says "Incorrect words, try again" after receiving message "Your answer was correct. Please copy and paste the text in this text box into the box below."

    When setting up Firefox Sync, I get all the way to the "Please Confirm You're Not a Robot" screen in the wizard, and enter the captcha values. I then receive in a small scrollable text area the message "Your answer was correct. Please copy and paste the text in this text box into the box below."
    I copy and paste the code, in this case "03AHJ_Vuv1gStVScBWSYWw6M4_KKQ4wzhCDSzKqiCfv57XXGyvHtOk4ixehysQhOTIf-lsL41lc5n-piztjYJSKu6urCeRvETVfpzRDh7OmHCDZiIBZv9Qg4oyrmWDMu6JA7Eh-4C8aZn4" into the only other visible text box, and click the next button, only to receive the message "Incorrect words, try again."
    My only option is to cancel at that point. I have tried this three times, once even starting the entire process over from the start, and it ends up with the same outcome each time.

    When setting up Firefox Sync, I get all the way to the "Please Confirm You're Not a Robot" screen in the wizard, and enter the captcha values. I then receive in a small scrollable text area the message "Your answer was correct. Please copy and paste the text in this text box into the box below."
    I copy and paste the code, in this case "03AHJ_Vuv1gStVScBWSYWw6M4_KKQ4wzhCDSzKqiCfv57XXGyvHtOk4ixehysQhOTIf-lsL41lc5n-piztjYJSKu6urCeRvETVfpzRDh7OmHCDZiIBZv9Qg4oyrmWDMu6JA7Eh-4C8aZn4" into the only other visible text box, and click the next button, only to receive the message "Incorrect words, try again."
    My only option is to cancel at that point. I have tried this three times, once even starting the entire process over from the start, and it ends up with the same outcome each time.

  • Don't Cut-and-Paste "unlock code"!

    After getting the unlock code via email I tried numerous times to cut and paste it into the Unlock Code field provided but the "Unlock Now" box remained greyed out, leaving only the "Edit Without Registration" button available. Frustrating.
    Solution: Don't copy-and-paste the code. Type it in. The "Unlock Now" button will no longer be greyed out, and you can complete the process. At least that worked for me.
    MouseB

    Hi:
    That exactly what I have. I type textually from the e-mail sent by Adobe, all in caps lock on, as included instructions say, but nothing: no "Unlock now" available.
    What else can I do?
    Please help
    Thanks,
    Alexander "desperated" Alvarez

  • Cannot Copy and Paste anything in "Code" screen

    Hi - something happened, not sure what I did but pressed some
    button on the keyboard or combo of buttons, and first when I press
    F8 to open up the files - instead of opening up an external window
    it locks it in also I cannot paste anything when in "code" mode.
    Not sure if the two are related, but need to fix both - any help
    would be great.
    -E

    Hello,
    Do you have the same problem with IE or Safari? Please try using a different browser to see if you can copy and paste your content. The current version of Firefox is 3.6. Do you have the same problem if you update Firefox?
    What operating system are you running?
    Best regards,
    Corey

  • I own acrobat 9 pro and had to re-download the program from a computer issue but when i get the serial code from the adobe website it give me serial code invalid error.  i am using copy and paste to prevent miss typing the code.

    i own acrobat 9 pro and had to re-download the program from a computer issue but when i get the serial code from the adobe website it give me serial code invalid error.  i am using copy and paste to prevent miss typing the code.

    Hi Lawrence,
    Please try the steps mentioned in the KB: https://helpx.adobe.com/creative-suite/kb/error-invalid-serial-number-acrobat.html
    Regards,
    Rave

  • Unable to copy and paste code or text in the post

    hi
     i am unable to copy or paste the code or text from my notepad/word to this editor when i am trying post questions  etc.
    is this feature blocked my MS ?
    If i add a html code windows , i am able to paste the  code and text. can anyone pls confirm why they have removed copy-paste operations from the normal window

    Did you try to paste by right-clicking or by typing Ctrl + V ?
    Sometimes the former doesn't work but the latter works.  -- My own experience.
    Alexis Zhang
    http://mvp.support.microsoft.com/profile/jie
    http://blogs.itecn.net/blogs/alexis
    | i am unable to copy or paste the code or text from my notepad/word to this editor when i am trying post questions etc.

  • I get error code -8058 when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder

    I get "error code -8058" when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder. "Alt +Drag" works. Any ideas?

    Have a look at the 'More Like This' to the right - seem to be some solutions offered: >>>>>>>>>>>>>>>>>

  • I want to copy and paste within an online forum - firefox wont allow it

    i often use an online forum for work with the OU and am unable to copy and paste within the forum - if i wish to copy from one thread to another, i have to copy to word then re copy and paste to another thread - annoying

    See http://kb.mozillazine.org/Clipboard_not_working
    http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
    AllowClipboard Helper - https://addons.mozilla.org/firefox/addon/852

  • Can't copy and paste codes since upgrade

    When I upgraded my itunes I haven't been able to copy and paste codes every since, I have to type each letter/number in. I'm losing free codes. Anyone have a fix? thanks

    First, Try using Disk Utility to repair your startup disk (hard drive) as shown in Dr.Smokes Resolving Disk, Permission, and Cache Corruption. This should be done before every update. And repairing permissions should be done before and after. They are both covered in Smokes link.
    If you still have trouble, download the combo update from this site (yours may be corrupt), not Software Update, disconnect all firewire + USB devices except keyboard + mouse, Repair Permissions, re-install update, Repair Permissions again + try. Yours is the 10.4.6 Combo update (this is for non-intel Macs). Others reading, download the Combo that applies to your system.
    Cheers!
    DALE

  • How to copy and  paste the data directly from the excel to the PDF?

    hi,
    I have found the same question on the link:
    How to copy excel sheet to pdf form?
    But I didnt get my answer through that forum.
    My requirement is dat I should copy the data from excel sheet and directly paste it to PDF form.
    When I am trying to copy and paste ..all the data is getting pasted into a single block only.
    Kindly help.
    Thanks & Regards,
    Lina

    So you want the user/person to do the "cut&paste" action (ie. ctrlc ctrlv) and have the data paste itself across rows correctly much like Excel does. I don't think this "intelligence" is built into Adobe table controls as it is in Excel (and Excel is smart enough to even handle it different ways depending on how the user selects cells).
    The only thing I can think of is that you could "capture" the user trying to paste into a cell/row in your table (maybe in the onFocus or onClick events), then grab the data, parse it out (but looking for some character) and then have your code distribute the data across the rows. However, I personally think that would be a lot of overkill and prone to other issues and errors.

  • How to copy and paste web design styles from the web

    I am not doing so well with the web style templates provided in the latest versions of IWeb.
    Is there a way to copy and paste the html code from some site who's design I like then paste it into my Iweb and then put in my content to the style that was up?
    I used to be able to do do this about 10 years ago with a Claris Homepage program, don't see how to do it with IWeb.
    It's like I have to do everything from scratch, draw background boxes, don't see frames.
    Thanks everyone..
    Jack E.

    Welcome to the Apple Discussions. No you can't copy the code form a site and use it in an iWeb page. To use frames you would use an HTML snippet and this code:
    <IFRAME SRC = "URL OF PAGE YOU WANT TO FRAME" WIDTH="XXXpx" HEIGHT="XXpx" FRAMEBORDER="0" --if "0" no border, otherwise "1" with border MARGINWIDTH ="0px" MARGINHEIGHT="0px" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>
    You can get more info at this site:iFrame code.
    I've creates a demo site which describes many of the features and tricks I've learned from this forum. This iWeb FAQ site is a wealth of information on using iWeb and all of it's capabilities.
    OT

Maybe you are looking for

  • "su - user" takes a long time

    I just installed the Solaris 8 for Intel and created a new user using the admintoo. However, I find that when I (logged in as root) want to "su - new_user", it will wait a long time (at least 30 seconds or more) before the command prompt appears agai

  • Creating a new instance of a class within a superclass

    I have a class with 2 subclasses and in the top classs I have a method that needs to create a new instance of whihc ever class called it. Example: class Parent      void method()           addToQueue( new whatever type of event is calling this functi

  • Can't delete or import event

    I'll create a new event in my iMovie library (let's call it DVD1) and I'll import video from my video folder from iSkySoft Video Conversion.  The video will upload fine.  But then once I exit out of iMovie and go back into it, the event title (DVD1)

  • A tree node

    does a certain class has to implement or extend any interface or class in order to e used as a tree node?

  • Going crazy trying to take songs and albums from itunes to my ipad

    going crazy trying to take songs and albums from itunes to my ipad