Separate words

if i have a string words = "hello world"
how do i separate the string to display
hello
world
in 2 lines?
thanks...

how do i store hello and world into a 2D array?
eg.string[][] a = { {"hello", "world"}};or if there are 2 strings, "hello world", "I'm fine" where "hello world" == a line of words from a textfile
my 2D array becomes:
string[][] a  = { {"hello", "world"}, {"I'm", "fine"}};Part of my current code is :
int i=0,j=0;
              String[][] data={};
              while ((word = b.readLine()) != null) // word is the line of 
                                                  //words retrieved from a textfile
                   StringTokenizer st = new StringTokenizer(word);
                   while (st.hasMoreTokens()) {
                        data[j] = st.nextToken();
          System.out.println("i " + i + " " + st.nextToken());
          i++;
     j++;
But it couldn't work... due to array out of bounds exception... can anyone help me modify / point out my error in my codes? thanks.

Similar Messages

  • Can I generate separate Word docs and retain cross-references?

    I've poked around the forum and am seeing an answer to this, so forgive me if it's already been answered.
    I'd like to generate separate Word documents from within RH8 (as opposed to a single Word doc of the entire help system) and yet retain the functional cross-references across documents.
    As it is, if I generate the help as a group of Word docs, only cross-references having destinations within the same Word document are present. That's not hugely surprising, but it would help me a great deal if intra-document cross-references were present in the generated Word docs.
    Any ideas how I can do this?

    I believe that might work if you used the master document method. That said I strongly recommend that you research Word's master document method as everything I have read indicates the Word gurus suggest it has problems.
    Why would you want all these links working? If that is needed, shouldn't the user be accessing the online help?
    See www.grainge.org for RoboHelp and Authoring tips
    Follow me @petergrainge

  • How do you select multiple / separate words in Pages?

    Hi, I currently have Pages 5.5 (2109)
    and the title is self-explanatory.
    I'm trying to shift over from Microsoft Word, but this one function seems not to be at present.
    Can somebody help me?
    If it does not exist, is there any way you can dictate it?
    Thank you,
    Henry

    Use Pages '09.
    Peter

  • The subtitles are too tall and skinny (4 lines) and separate words

    Whenever I watch a show and I have the subtitles on they will be in the bottom centere and take up sometimes 4 lines up into my screen and seperate words
    Example:
    Inexu
    sable!

    Steven,
    The "too complex" error is probably the one mentioned in post #5 of the "EncoreDVD 2.0 Subtitles" thread. This is not an Encore issue, but a limitation set by the DVD-Video specification. It doesn't matter whether the subtitles are imported via a text script or as bitmap images; if any (horizontal) line exceeds 1440 bits it exceeds the spec maximum.

  • TS2128 How can I select multiple SEPARATE objects/words in Pages (Mavericks version)?

    When I type a document and decide to italicise a couple of separate words throughout the document how can I select them at once? Pressing Shift selects all the words between the first and the second, that does not help me. In Pages 09 it worked with either cmd or ctrl or alt (I don't remember which, but one of them worked) but I tried all of them now and nothing happens.
    Can anyone help me?
    Thank you!

    You can't do it anymore. Pages 5 is a stripped application and has lost about 90 feature that Pages 09 has. Read more about it in other threads in this forum.

  • Need assistance embedding separate files into a PDF

    All,
    I am using Adobe Acrobat X Pro (Version 10.1.2).  I followed the instructions below to try and embed separate Word, Excel, PowerPoint, and PDF files into my PDF document as thumbnails, but the only problem is, this only works on my computer because the files are saved on my machine.  As soon as I move my PDF file which contains the links, the links will not open.
    How do I essentially do the same thing but have the thumbnail links be viewable by anyone, no matter their location?
    Create a link using the Link tool
    Choose Tools > Content > Link. The pointer becomes a cross hair, and any existing links in the document, including invisible links, are temporarily visible.
    Drag a rectangle where you want to create a link. This is the area in which the link is active.
    In the Create Link dialog box, choose the options you want for the link appearance.
    Select one of the following link actions: 
    Go To A Page View
    Click Next to set the page number and view magnification you want in the current document or in another document (such as a file attachment), and then click Set Link.
    Open A File
    Select the destination file and click Select. If the file is a PDF, specify how the document should open (for example in a new window or within an existing window), and then click OK. 
    Note: If the filename is too long to fit in the text box, the middle of the name is truncated.
           Open A Web Page
                     Provide the URL of the destination web page.
           Custom Link
                     Click Next to open the Link Properties dialog box. In this dialog box, you can set any action, such as reading an article, or executing a menu command, to be associated with the link.

    Hi George,
    I just tried adding the files as attachments; however I didn't like doing that because it increased the file size of my PDF document quite a bit. 
    I'm not sure if you're familiar with the "Insert Object" command in MS Word, but I want to do the same thing in my PDF document...but the key is, anyone must to be able to open the embedded file from any location.
    I created an MS Word document with several embedded objects.  I was later asked to PDF the Word document, but since embedded MS Word objects do not migrate to the PDF, I am now trying to embed the same files I embedded into my Word document into my PDF document over top of the icon image.  The file types I'm trying to embed include MS Word, Excel, PowerPoint, and Adobe PDF.  Does this make more sense?  I want to create a hyperlink over top the icon image that was PDF'd from the MS Word document which allows any user to click on the link and open the separate file.

  • How can I find the words which spans across end of line to next line in pdf ?

    I am using Acrobat Adobe X Pro version for our form development and maintanence. I am writting a Acrobat JAVA batch script which reads through all the words and execute spell check and reports the mispelled words in a excel sheet. Since I am running this script in batch mode for more than 1000 pdfs - I am getting many words joined together. When I looked in to those pdfs all such words are looking okay because it is appearing in end of right margin and the next word is in the next line. Since there was no space between them it was extracted as a single word. Hence the failure.
    I used wordf = this.getPageNthWordQuads(i,j)  to get the word begin and end coordinates. when I closely observe the values are creating a rectangle and that doesnt span across lines. I got the coordinates for the regular word and the word which span acoross two lines. both of the coordinates are same.
    I think I am screwed - I have 8000 such words and no clue of how to get rid of them from the actual misspelled words.
    please help. let me know if any class /method if I call will give me the end of line or do I need to go to next layer to find this split.
    the addnot is somehow marking the words using this coordinates - please hellp me understand how this works. Thanks.
    // for all pages
    for (var i = 0; i < this.numPages; i++ )
    // For all the words
    pg += 1;
    numWords = this.getPageNumWords(i);
    for ( j = 0; j < numWords; j++)
    //get the spell check 
    ckWord = spell.checkWord(this.getPageNthWord(i,j))
    if ( ckWord != null )
    jn=0
    ml=0
    // if mispelled word found.
    wordf = this.getPageNthWordQuads(i,j)
    swordf = wordf.toString()
    var st = swordf.split(",")
    var diffx0 = parseInt(st[0])-8
    var diffx1 = parseInt(st[1])-8
    var diffx2 = parseInt(st[2])-8
    var diffx3 = parseInt(st[3])-8
    var diffx4 = parseInt(st[4])-8
    var diffx5 = parseInt(st[5])-8
    var diffx6 = parseInt(st[6])-8
    var diffx7 = parseInt(st[7])-8
    if (cWord == csword)
    jn = 1
    if ( st[1] != st[3] )
    ml = 1
    //dataLine += "\r\n write "
    else
    ml=2
    dataLine += "\r\n"+this.documentFileName
    + "\t" + this.getPageNthWord(i,j)
    + "\t" + pg
    + "\t" + j
    + "\t" + ml
    + "\t" + jn
    + "\t st[0] " + diffx0 + "\t st[1] " + diffx1 + "\t st[2] " + diffx2 + "\t st[3] " + diffx3 
    + "\t st[4] " + diffx4 + "\t st[5] " + diffx5 + "\t st[6] " + diffx6 + "\t st[7] " + diffx7 
    ck=1

    If Acrobat is reading each word part as separate words, you have a problem.
    The way I approached it in some of my tools was to check if a word ends
    with a hyphen, and if so, to check if it's the last on the line. If both
    conditions are true, combine with the next word on the next line. This is
    not fool proof, of course, as there are documents with columns are other
    structural elements that prevent this from working. Better than nothing,
    though...
    However, it is also possible that Acrobat does see both parts as parts of
    the same word. In that case, getPageNthWordQuads() will return multiple
    quads arrays. As you know, that method returns an array of quad arrays.
    There's usually only one, but in principle there could be more... Something
    to check before giving up.

  • Displaying Word Document from a Database

    Let me try to explain this.
    I can upload and store a Word Document in an Oracle database
    (BLOB column) but now I need to extract that Word document and
    place a pointer to it on the Web. Can someone explain to me how
    this is done?
    I'm trying to do something like have an image displayed on
    the Web and when you click on it the Word Document is opened.
    Follow me on that? So, if there are 15 Word documents in the
    database, then the web page would have 15 images all pointing to
    each separate Word document.
    Has anyone done this?

    Don't take my word on this, but I think this should work;
    I've done this in the past to send dynamically-generated CSV files
    to the user, which is in a way (at least at the perspective of
    what's being outputted to the user) the same thing.
    First, obviously, you need to retrieve the Word document data
    from the database. We'll say you put that in a variable called
    'wordDoc'.
    <cfset wordDoc = someQuery.wordDataObj />
    Next, we need to set the 'Content-disposition' HTTP header,
    to tell the client's browser that we're sending a file, and that we
    want you to call it somefile.doc by default. We'll do this with the
    <cfheader> tag (note that if you use <cfflush> in the
    application, this tag (and thus, this approach)
    will not work.
    <cfheader name="Content-disposition" value="attachment;
    filename=somefile.doc" />
    Almost there. Now we need to set the Content-type HTTP
    header, to tell the browser what kind of data is coming, and then
    give it the actual file data. We'll use the <cfcontent> tag
    to do both of these things.
    <cfcontent type="application/msword"
    reset="yes">#wordDoc#</cfcontent><cfabort>
    If memory serves, this should be all you need. Note the
    <cfabort> after the closing <cfcontent> tag, I've had
    problems in the past with additional output on the page after these
    tags being appended to what gets sent to the browser, so I use a
    <cfabort> afterwards to make sure nothing more gets sent
    after the data we want. Also, at least with CFMX7, I've noticed
    that debugging output tends to get added in too regardless, so I
    typically put a <cfsetting showdebugoutput="false" /> at the
    top of the file, too.
    I can't guarantee this will work, I haven't tested this
    particular situation, but if it doesn't, it ought to be close. Let
    me know if I'm wrong.
    Attached is what should be the code without my commentary /
    rambling interspersed.

  • Word 2010 AAX Cross-references gone

    I have 13 documents - "Word 10/AAX (all updates installed)", with many cross-references.
    Links correctly translate to PDF including headings, TOC, websites, and cross-references WITHIN the same document, but cross-references between the 13 docs do not work.
    The PDF shows the colour change, but there is no clickable link.
    I am "Saving as PDF", have checked the PDFMaker settings, and have tried creating the PDF directly from AAX.

    Hi Pranav,
    Yes, this is already selected. All links are correctly created, except those which cross-reference other Word 2010 documents.
    I need the PDF to maintain the cross-reference as is found in the Word Doc (which is simply a link to a specific bookmark in a separate Word Doc). 
    In summary: One Word Doc references a specific bookmark in a separate Word Doc - so when the PDF's are created: PDF references the specific bookmark in a separate PDF.
    Any other ideas would be most appreciated. Thanks!

  • Export text from ID5 (Windows) to MS Word 2010

    Hi, everybody. My problem goes like this:
    I have around 1000 pages of a book in several PageMaker 7.0 files (1 chapter per file).
    I have converted the files to ID5 and now I need to export the text and the images to get one Word file for each chapter of the book.
    The objective is a major revision/modification.
    Eack chapter has a lot of pictures placed inline that flows with the text.
    What I need is to put everything in word files in a way that would make life easier for people that is going to make modifications to the text but want to see the images (in screen resolution).
    I have no problem exporting the text from ID 5 (rtf files).
    Any ideias for putting the images on the Word file without having to do, at least, screen captures with Snagit and placing manually a representation of the images, one by one, in each of the Word files?
    Best regards and thank you in advance

    Hi Maria,
    Not sure how image captions crept into this discussion, but I guessing a language confusion.
    Essentially my application works as follows:
    It gathers a list of all open documents and their stories, and all the graphics within the stories. Each graphic is checked to make sure it is linked (not embedded), and is inline (not floating) and gives a warning if there is a problem.
    Once activated, it finds all the inline graphics,
    deletes them and replaces them with the full path to the linked file, wrapped in double < and > symbols. I use this symbol pattern because it is never used in any of our material.
    The stories are then exported to rtf files, and all the documents are closed (without saving).
    The exported stories are then opened into Word and each placeholder is found using <<*>>, this gives the location for the graphic, and the path can be extracted from the content of the find. The graphic is then inserted, replacing the placeholder text, and repeated until there are no more find results. There may be an easier way to do this bit, but this work for me.
    A Word version of the InDesign styles are merged from a separate Word template file to fix other layout incompatibilities.
    The files are then saved as Word files.
    The application also performs few more functions happening in the background as well to compensate for compatibility problems between the InDesign and Word styles.
    This is all done with a combination of AppleScript and Javascript. You should be able to achieve the same with Visual Basic.
    Hope this makes it a bit clearer on what to do, and private message me if you need me to talk to your programmer on any details.
    Regards.

  • Can you use Find/Change to search for many different words at once?

    I have an 80 page catalogue in Indesign (CS5) - it has several thousands of catalogue numbers listed as text within it. I've just been given a list of 1000 catalogue numbers to search for and if they appear, remove them - is there any way to search for them all in one go, rather than one by one?
    I've started using Find/Change to search for the catalogue numbers but seem to only be able to search one catalogue number at a time that way.
    Any ideas welcome!
    Thanks

    GREP can search for more than one phrase "at once" (i.e., in one operation), like this:
    word1|word2|word3
    -- the pipe | delimits the separate words. Then again, GREP Is Not Magic™. This --
    ...  a list of 1000 catalogue numbers to search for ...
    is a bit too much to copy-and-paste into the single Find What line. There is a limit of ten or twelve (or something) OR phrases you can use in GREP.
    On the other hand: GREP is great at finding numbers. If all of your catalogue numbers obey some basic rule, for instance "all of them consist of 6 digits and there are no other numbers with exactly 6 digits", well, that we can probably work with.

  • With Yahoo! Mail attachments are put together in zip format I can't open, but when I switch to Internet Explorer these same attachments open easily as Word or PDF files; how cn I fix?

    Two recent emails (Yahoo! Mail) each contained multiple attachments which were presented to me as zip files which were in a format that my computer could neither open or convert to files I could open. One was two Word documents; the other was five one-page PDFs. I tried with Firefox on two different computers with same results. When I switched to Internet Explorer, I was able to open the attachments each as separate Word or PDF files, with no trouble. Am I doing something wrong?

    instead of writing such an essay, you could have explained better what you tried to do to get them.

  • Linking Word Docs in RH8 - Need Workflow Critique, Best Practices Tips, etc.

    Me: TCS 2
    Writer 2: Word 97, Acrobat Pro 8
    Software industry
    Help File Specs: Using RH8 to output to AIR Help (prior to current project = CHM), approx. 500 topic legacy help system (apparently created several years ago from the Word U.G; no CSH, index, or glossary); project uses one master page and one CSS
    Project Challenges: Big new features being added at the 9th hour, deadline moved UP by two months, have just been given a writer to help document new features but she only has Word and Acrobat (and we both work from our home offices)
    After reading everything in the RH Help on Linking Word docs, Peter's info (RH8 Tour on Grainge.org), the related posts I found here, and watching RJ's demo on Linking vs. Importing, I've come up with a tentative workflow. Going to do some tests, but wanted to get this posted in the meantime.
    Workflow
    1. Generate separate Word file for each of the existing RH topics Writer 2 will need to update.
    2. Apply template to Word files that matches my CSS styles (?)
    3. Create Word template matching my CSS styles for Writer 2 to use for new topics.
    4. Writer 2 updates/creates content. Each Word file =One RH Topic.
    5. I delete the existing topics she now "owns" from the project.
    6. When she's done with her first pass, I link all of these into the project.
    7. When she supplies revised files, I drop them into the folder, then do "Update" (or "Force Update"?)
    8. She also supplies a commented PDF version of each file to me to say "XYZ.jpg goes here" or "Make sure to include this topic in the TOC". (From what I've read, images from Word to RH = headache, and I don't enjoy files names such as "Image0001"...already a big pain since this project originated in Word and my client is in love with screen captures...trying to "wean" them off.)
    Questions/Comments
    - I know you can bring TOC entries over from Word, but think I'll spend more time messing with trying to integrate into the "master" TOC than just manually doing it.
    - Can I just have Writer 2 use the Word Comments feature to pass info on to me, or would those show up in my output or cause some other issue?
    - Can Writer 2 use Word cross-references that would become hyperlinks to the correct topics in RH given above (or would all of her "topics" have to be in one Word file to do this)? Any way she can "code" text to end up creating a link to one of my topics, or am I going to have to do this?
    - Would I be better off generating one big Word file for her to edit, then telling RH to break it at a certain heading style instead of the 1-to-1 ratio I had in mind?

    Hi there
    In my own opinion, Panning is a nice attempt, but just doesn't cut the mustard. It's nowhere near as good as the panning one sees with Camtasia Studio.
    I might suggest combining Camtasia with Captivate for the ultimate development set. There are aspects Captivate shines in when compared with Camtasia, and there are aspects Camtasia shines in when compared with Captivate. So I say if you can afford it, go for it!
    Now I know that both packages are sort of pricey and not everyone can afford both. In that case you might want to try Jing, which is free to use. I've not looked very deeply at it, but it may offer some of what Camtasia does. You could then use that for your panning and enhance Captivate that way.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Is there a way to copy non-contiguous words from a PDF

    Is there a way to copy non-contiguous words from a PDF?  Is there a way to use a template or mask that will isolate certian areas to be copied with spaces in between the words so that when you go to paste the contents into multiiple fileds, the separate words will pop into the appropriate fileds.  The fields will be in a submission form.
    Please let me know if this is possible.
    Thanks
    Linda

    No it's not.

  • How to highlight non-consecutive words - Illustrator

    You know how if you hold down command while you highlight separate words, for example, in TextEdit (see screenshot)?  How can you do this in an Illustrator text box? When I try to do it, it keeps trying to grab the text box as if it was the arrow tool.

    Great idea though would be nice to be able to do a noncontiguous text selection.
    The command key in illustrator is a shortcut to switch to the pointer tool, and you cannot disable that using edit >> keyboard shortcuts.

Maybe you are looking for