Reading to a certain point in a txt file

I am trying to read to a certain point in a txt file. I want it to read until it reaches say password, then check to see if the text is the same as say "bob" an dif not go on to the next password. This is what i have so far:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class Read extends JFrame implements ActionListener {
     private JButton act;
     private JTextArea show;
     public Read() {
          setSize(new Dimension(300, 300));
          act = new JButton("GO");
          act.addActionListener(this);
          show = new JTextArea("push the button");
          JPanel pane = new JPanel(new GridLayout(0, 1));
          getContentPane().add(act, BorderLayout.NORTH);
          getContentPane().add(show);
     public void actionPerformed(ActionEvent e) {
          try {
               BufferedReader reading = new BufferedReader(new FileReader("dat.u.txt"));
               String file;
               while ((file = reading.readLine()) != null) {
                    show.setText("");
                    show.append(file + " finished append");
          catch (FileNotFoundException ioe) {
               show.setText("error finding the file name");
          catch (IOException ioe) {
               show.setText("IO Error");
     public static void main (String args[]) {
          new Read().setVisible(true);
}P.S I gave this is just a test file to test. I also gave examples at the top. Thanx for the help!!

What are you doing with file everytime it reads a line? Displaying it in the JTextArea. You do no checking to see if the line read contains what you are looking for.
if(file contains what I am looking for) {
    //process file
    break;
}BTW, if it is a password you are searching for, displaying it in a text area for all the world to see is not a good idea.

Similar Messages

  • How to read and write a string into a txt.file

    Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
    I hope someone can answer my question as soon as possible
    Thank you very much.

    Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
    On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
    Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
    Edited by: m0smith on Mar 12, 2008 5:18 PM

  • How to use certain entries from a txt file as metadata?

    So during my plugin development I stumbled on a problem.
    I have created a txt file for each picture telling me who's in the photos. So the first column in the file shows all the names that appear in the photo.
    I want to add those names into LR for each photo. I thought using them as metadata would be a good idea. Then I could let the user enter a name of some person and create a smart collection having all photos with that person in them.
    But putting it into practice isn't that easy.
    So I started with the classic metadata definition:
    metadataFieldsForPhotos = {
      id = 'Person',
      title = 'Person'
      dataType = 'string',
      searchable = true,
      browsable = true,
    Now I don't know how to actually read only the column entries of the txt file and displaying all the names appearing in it. Another problem is that each photo has its own txt file in "nameofphoto.jpg.txt" So LR must know which txt file belongs to a photo.
    I know my question isn't very specific but it would be great if someone could help...

    Thank you for the reply. Reading the file how I wanted worked fine and I chose to use keywords, as you suggested.
    So now I tried to add the keywords to the pictures and I get:
    "LrCatalog:withWriteAccessDo: could not execute action 'keywordProvider'. It was blocked by another write access call, and no timeout parameters were provided."
    There's my function so far:
    function Finder.findPerson(smartCollectionName)
         local catalog = LrApplication.activeCatalog()
         local photos = catalog:getMultipleSelectedOrAllPhotos()
           LrTasks.startAsyncTask( function()
                for i=1,#photos do
                     local photo = photos[i]
                     local photopath = photo:getRawMetadata("path")
                     local photoname = photo:getFormattedMetadata("fileName")
                     local folderpath = string.sub(photopath, 1, string.len(photopath) - string.len(photoname))
                     local metadataPath = folderpath .. "\.metaface\\" .. photoname .. ".txt"
                     local text = LrFileUtils.readFile(metadataPath)
                     local metadataValues = stringSplit(text)
                     for i = 0, #metadataValues do
                          catalog:withWriteAccessDo( "keywordProvider", function()
                               local keywords = catalog:createKeyword(metadataValues[i])
                               photos:addKeyword(keywords)
                          end)
                     end
               end
          end)
    end
    So what am I doing wrong?

  • Reading a PublicKey \ PrivateKey type from a txt file

    Hi,
    i want to read a PublicKey \ PrivateKey type from a txt file and input it into a method.
    How can i read the data from the file while keeping or converting back to PublicKey \ PrivateKey type?
    I'm working with the following:
    generate = KeyPairGenerator.getInstance("ECDSA", "FlexiEC");                              
    generate.initialize(ecParams, new SecureRandom());
    KeyPair keyPair = generate.generateKeyPair();
    ............continues
    **and then i write the keys to the a simple txt file.**
    thanks!
    Edited by: sk16 on Apr 8, 2010 10:03 PM

    So, if i work with the two above is it ok, like:
    generate = KeyPairGenerator.getInstance("ECDSA", "FlexiEC");
                   generate.initialize(ecParams, new SecureRandom());
                   KeyPair keyPair = generate.generateKeyPair();
                   // Pub. and Priv. key objects.
                   PublicKey publicKey = keyPair.getPublic();
                   PrivateKey privateKey = keyPair.getPrivate();
                   // Write keys to separate files.
                   FileOutputStream fos = new FileOutputStream(publicKeyFile);
                   fos.write(publicKey.getEncoded());
                   fos.close();
                   FileOutputStream fos1 = new FileOutputStream(privateKeyFile);
                   fos1.write(privateKey.getEncoded());
                   fos1.close();
    and then for example>>>
    DataInputStream in = new DataInputStream(
              new FileInputStream("publicKeyFile.txt"));
              byte[] encodedPublicKey = new byte[1024];
              in.read(encodedPublicKey);
              in.close();
              X509EncodedKeySpec encodedPublicKeySpec = new X509EncodedKeySpec(encodedPublicKey);
              KeyFactory keyFactory = KeyFactory.getInstance("ECDSA", "FlexiEC");
              publicKey = keyFactory.generatePublic(encodedPublicKeySpec);

  • Read until a certain point in txt file

    I need to know how to read in until a '|' how do i do this? (in a txt file)

    get your file input stream and just read char at a time until u reach the |
    while(in.readChar() != '|' ){
    // do nothing
    [\code]                                                                                                                                                                                                                                                                                   

  • Payslip Programme unable to read beyond a certain Point(points guaranteed)

    Hi
    My client is unable to get the payslip  for employees beyond a certain period.I have used Transaction SARA and PC_PAYRESULT but still unable to find out the real reason.My questions:
    i.How do I find out till how much the data is archived?
    ii.Is the payslip programme RPCETD00 unable to read the arcfived data?
    iii.Can archived data be read from the clusters?
    Thanks and Regards
    Aniket C

    Hallo Aniket,
    My experience is that you can read archived data from transaction pc_payresult
    Also H99CWTR0 report can retrieve archived data.
    However, I am looking for a payslip report that can retrieve archived data. I have not found it yet.
    Regards Bente

  • How to skip certain lines for a txt file and insert into array

    so here is my question:
    i had a file to read, and it requires to input into the array starting from a certain line
    example:
    4
    john 25 M
    mary 22 F
    lee 20 M
    faye 10 F
    faye john
    mary john
    mary faye
    i want to insert the friend list, starting 5th line into a 2d array, which is the int from first line +1.
    can someone help me with it?
    i believe there is a skip method and stuff..
    but just dont know how to use it
    may someone tell me how to do tat?

    the thing is i think that takes too long and it is not efficient..
    however...i just solved it with a better method
    Scanner in = new Scanner (reader);
    int size = Integer.parseInt(in.next());
    BufferedReader insert = new BufferedReader(new FileReader(new File(input)));
    String line = null;
    int count = 0;
    int startAtLineNo =size+1; // 0-based
    while ((line = insert.readLine()) != null) {
    if (count >= startAtLineNo) {
    /* do stuff */
    System.out.println(line);
    // else ignore
    count++;
    thanks anyways

  • How to read this kind of array from a txt file?

    I have been trying to read this file given below.
    Please have a look at 4th line, there is a gap between 89 and 32.
    I want to read a gap as a "0" value, and convert all values to integer.
    I have been using split function, but I still don't know how to figure the gap problem.
    Please help me, thanks.
    1 60 72 88 41 58
    2 50 45 37 86 13
    3 44 41 99 54 24
    4 12 89 32 89
    5 48 97 25 85 55
    6 22 46 34 90 98
    7 75 85 5 1
    8 86 23 39 69 52
    9 42 18 75 13 72
    10 24 77 27 18 30
    11 34 42 5 12
    12 31 87 47 75 8
    13 19 16 74 55 77
    14 26 57 5 63 81
    15 51 7 95 100 8
    16 33 93 82 85 72
    17 55 21 49 25 3
    18 15 29 33 18 61
    19 33 42 64 66 63
    20 51 36 97 39 19
    21 51 60 32 25 51
    22 88 34 29 76 10
    23 37 93 9 38 100
    -------------------------------------------

    scan each line with the following code
    it adds each line to a new array
    //scan file
            try {
                Scanner Filescan = new Scanner(new File("directory"));
                while (Filescan.hasNextLine()) {
                Array.add(Filescan.nextLine());
                catch (Exception e)
                System.out.println (" File has not been found");
                } 

  • Search a txt file

    how can i search for a certain word in a txt file?

    import java.awt.*;
    import java.io.*;
    import hsa.Console;
    public class Duel_Prac
        static Console c = new Console ();
        static BufferedReader file;
        static String f_name;
        static String l_name;
        static String option = "";
        static String filedata;
        static public void main (String[] args) throws IOException
            startup_page ();
            main_menu ();
        static void startup_page ()
            c.clear ();
            c.println ("Prac");
            c.println ();
            c.println ("Before we begin, please provide us with the following information about you: ");
            c.println ();
            c.print ("First Name: ");
            f_name = c.readLine ();
            c.print ("Last Name: ");
            l_name = c.readLine ();
        static void main_menu () throws IOException
            c.clear ();
            c.println ("Prac");
            c.println ();
            c.println ();
            c.println ();
            c.print ("1) shop");
            do
                c.setCursor (3, 1);
                c.print ("What do you want do ? ");
                option = c.readLine ();
                if (option.equals ("1") == true || option.equalsIgnoreCase ("shop") == true)
                    break;
            while (!option.equals ("1") && !option.equalsIgnoreCase ("shop"));
            if (option.equals ("1") == true || option.equalsIgnoreCase ("shop") == true)
                shop ();
        static void shop () throws IOException
            try
                file = new BufferedReader (new FileReader ("Card Data/EP1-EN.masterlist"));
                if ((filedata = file.readLine ()) == null)
                    file.close ();
            catch (IOException e)
                c.println ("Data is corrupt");
            String l = "Light";
            if (filedata.equals (l))
                c.println ("Congratualations, your code is correct");
            else
                c.println ("Too bad, your code has bugs");
    }here is the code. what is wrong with it?

  • Retrieve data from txt file to generate CWGraph plot

    Please help...I'm not sure this is even possible, but here is what I need to do.  I wrote a DAQ program that utilizes the CWGraph control.  Each second a data point is collected by the program and displayed in one of the CWGraphs.  The only problem I have is that if the program is closed or crashes for some reason, I lose the data plot in my CWGraphs.  The data points are collected in a txt file which is then later worked up in Excel.  My question is, is there a way to retrieve these data points from the txt file and re-generate the plots when the program is opened back up?  The program would then take back over and plot along in realtime.  I hope this is clear enough to understand.  Feel free to ask any questions and any input would be greatly appreciated!

    Hi Chris,
    There is not a shipping example that would demonstrate exactly what you are looking for in your application.
    The reading and writing to a file will require general VB 6.0 programming as Measurement Studio does not provide a feature to assist you with that.  If you are not familiar with File I/O in VB 6.0, this site may be a good starting point: File I/O - VisualBasic Examples .
    Once again, parsing the input from the text file will also require general VB 6.0 programming.  I am not sure how your text file will be delimited, but you can use this example as a guide to parsing the input from the file: Parse String Using A Specific Delimiter .
    To convert from strings to numbers in VB 6.0, you can use the Val() function.  More information about how to use that function can be found on MSDN: Val Function .
    Once you have an array of doubles, you can plot the data on your waveform graph as usual.  If you are not familiar with how to plot an array to a CWGraph, please take a look at our shipping examples.  The Simple Graph example is a great starting point.
    Jessica
    National Instruments
    Product Support Engineer

  • Enquiry on converting a *.txt file to a *.pdf file

    Enquiry on converting a *.txt file to a *.pdf file
    Aim of this software: Let the user to choose a *.txt file to convert it to a *.pdf file.
    1. User clicks a choose file button. [chooseFileButton]
    2. User clicks the Export 2 button [exportButton2]
    3. User clicks the Text -> PDF button [pdfConverterButton]
    After choosing the file and click the choose file button:
    System prints out (for debbuging use...)
    ---------------------------Print from Trans.java - method transMemory--------------------
    File's name: file.txt
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    After clicking the Export 2 button, system prints out:
    ---------------Print out the File's name - from DataOut.java - getData() Method-------------------------
    File's Name: file.txt
    ----------------Print out the file's path - from DataOut.java - getData() Method--------------
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    The file now being read by the system: transNameData.txt
    The data being copied to this file: copyOfFileName.txt Destination
    This file has been copied: file.txt Original
    The following content has been copied:
    ---start of content - from TheFile.java - save2() method---
    Some content.....................................
    --------end of content--------
    Jul 18, 2010 3:32:04 PM mainFrame1 exportButton2ActionPerformed
    SEVERE: null
    java.io.IOException: Permission denied
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:199)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    at TheFile.save2(TheFile.java:144)
    at mainFrame1.exportButton2ActionPerformed(mainFrame1.java:168)
    at mainFrame1.access$200(mainFrame1.java:30)
    at mainFrame1$3.actionPerformed(mainFrame1.java:79)
    at java.awt.Button.processActionEvent(Button.java:392)
    at java.awt.Button.processEvent(Button.java:360)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    After clicking the text -> PDF button, system prints out:
    The following data is called by the PDF converter button...
    ---------------Print out the File's name - from DataOut.java - getData() Method-------------------------
    File's Name: file.txt
    ----------------Print out the file's path - from DataOut.java - getData() Method--------------
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    MakePdf.java is loading... - createPdf() method
    File you have chosen and this file will be converted to a PDF file: file.txt
    And the content of the file is:
    ---start of content--- (Info from MakePdf.java)
    Some content.....................................
    ---end of content---
    Print out the content again: Some content..................................... ---> Info from SubClass DocToPdf of MakePdf.java
    Exception in thread "AWT-EventQueue-0" ExceptionConverter: java.io.IOException: The document has no pages.
    at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source)
    at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
    at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
    at com.lowagie.text.Document.close(Unknown Source)
    at MakePdf$DocToPdf.createDoc(MakePdf.java:140)
    at MakePdf.createPdf(MakePdf.java:97)
    at TheFile.forPdfUse(TheFile.java:267)
    at mainFrame1.pdfConverterButtonActionPerformed(mainFrame1.java:184)
    at mainFrame1.access$300(mainFrame1.java:30)
    at mainFrame1$4.actionPerformed(mainFrame1.java:86)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6263)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    BUILD SUCCESSFUL (total time: 1 minute 41 seconds)

    Source code: MakePdf.java
    import com.lowagie.text.DocumentException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import java.lang.String;
    import java.io.*;
    public class TheFile {
    String pathData;
    String nameData;
         public void PrepareJFileChooserData2(){
            try {
                // Create a object for JFileChooser.
                final JFileChooser choose = new JFileChooser();
                choose.showOpenDialog(null);
                File file = new File(choose.getSelectedFile(), "");
                pathData = file.getPath(); //get the path of the chosen file
                nameData = file.getName(); //get the name of the chosen file
                //Try to copy file to a temp file.
                Cfile2 cfile = new Cfile2();
                cfile.writeFile(nameData); // write nameData into the temp.txt file.
                //return pathData;
            } catch (IOException ex) {
                Logger.getLogger(TheFile.class.getName()).log(Level.SEVERE, null, ex);
          public String getPathName(){
                return pathData;
          public String getNameData(){
              return nameData;
        public class Cfile2{
        public void writeFile(String fName) throws IOException {
            PrintWriter pr = new PrintWriter(new File("temp.txt"));
            pr.println();
            pr.print("\n");
            pr.write("-------------------From SubClass - Cfile2 in TheFile.java----------------------");
            pr.write("File Name: " +nameData); // write the value of nameData to temp.txt
            pr.print("\n");
            pr.write("File's Path: "+pathData); // write the value of pathData to temp.txt
            pr.print("\n");
            pr.print("-------------------------------------------------------------------------------");
            pr.flush();  // Flush the data.
            pr.close();  // Close to unlock and flush to disk.
        public void save2() throws FileNotFoundException, IOException{
           // Copy and print out the file's name only
           String fileName = "transNameData.txt";
           File originFile = new File(fileName); //open the file to read
           System.out.println("The file now being read by the system: " +originFile);  //originFile = transNameData.txt
           File destinationFile = new File("copyOfFileName.txt"); // open another file and prepare to write in
        try {
            //Start trying to write data to file - copyOfFileName.txt
          byte[] readData = new byte[2048];
          FileInputStream fis = new FileInputStream(new File(fileName)); // Seems it writes the value of transNameData.txt to copy.txt
          int count = fis.available();
          if(count>0){
          FileOutputStream fos = new FileOutputStream(destinationFile);
          int i = fis.read(readData);
          while (i != -1) {
            fos.write(readData, 0, i);
            i = fis.read(readData);
          System.out.println("The data being copied to this file: " +destinationFile+ " Destination");
          fos.flush();
          fos.close();
          fis.close();
            }else{
              System.out.print("Error");
        } catch (IOException e) {
          System.out.println(e);
        // Copy the content of the file only
        FileInputStream fstream = new FileInputStream("transNameData.txt");
        // Get the object of DataInputStream
        DataInputStream in = new DataInputStream(fstream);
        BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        //Read File Line By Line
        while ((strLine = br.readLine()) != null)   {
          // Print the content on the console
          System.out.println ("This file has been copied: " +strLine+ " Original"); //Work successfully, strLine has the value [file's title]
          File newDestinationFile = new File("ContentCopy.txt"); //Open the newCopy.txt file
          byte[] newReadData = new byte[2048];
          FileInputStream newFileInputStream = new FileInputStream(new File(strLine)); // See whether it can write it in... ok done!
          //String newString = newReadData.toString();
          //System.out.print("Content that has been copied: " +newString); //It prints out data in byte form...?!
          FileOutputStream newFileOutputStream = new FileOutputStream(newDestinationFile);
          int i = newFileInputStream.read(newReadData);
          while (i != -1) {
            newFileOutputStream.write(newReadData, 0, i);
            i = newFileInputStream.read(newReadData);
        FileInputStream newfstream = new FileInputStream(strLine);
        // Get the object of DataInputStream
        DataInputStream newin = new DataInputStream(newfstream);
            BufferedReader newbr = new BufferedReader(new InputStreamReader(newin));
        String content;
        //Read File Line By Line
        while ((content = newbr.readLine()) != null)   {
          // Print the content on the console
            System.out.println("\n");
            System.out.println("The following content has been copied: ");
            System.out.println(" ");
            System.out.println("---start of content - from TheFile.java - save2() method---");
            System.out.println(" ");
            System.out.println(content);
            System.out.println(" ");
            System.out.println("--------end of content--------");
        //Close the input stream
        in.close();
        //Close the input stream
        in.close();
    //----------- start PDF parser  ---> to txt format -------
       public void pdf() throws FileNotFoundException, IOException{
        //-----again--
       FileInputStream inStream = new FileInputStream("transNameData.txt");
        // Get the object of DataInputStream
        DataInputStream in = new DataInputStream(inStream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        //Read File Line By Line
        while ((strLine = br.readLine()) != null)   {
          // Print the content on the console
          System.out.println ("Watch out: " +strLine+ "  ---> It should be printed successfully!!"); //Work successfully
        //---again......
        PDFTextParser pdftextparser = new PDFTextParser();
        pdftextparser.pdftoText(strLine);
        public void forPdfUse() throws FileNotFoundException, IOException, DocumentException{
            MakePdf makePdf = new MakePdf();
            makePdf.createPdf();
    }

  • Notes & .txt files

    I have an annoying issue with both Pages and Textedit. Both applications don't have an option to save a file as a simple text file or .txt. The best Textedit can do is rtf and if I just change the suffix I get all the rich text information that I don't want and my Nano can't read.
    the 5th gen. nano manual states .txt files when none of my text applications can save in that format. Thus anything I put in my notes folder is terribly confusing with all that nonsense useless information that the iPod can't use. Any ideas or workarounds would be appreciated.

    Thanks for the response. I looked at it and it was useful where they suggest to make plain text in Textedit, but I have already found another solution myself. You do what you need in Pages then export as a text file and this works too. Now I am trying to find out what is the largest font size I can use in these notes. That latter piece of information still eludes me.

  • AIR application crashes at certain point in windows vista

    Hi Dudes,
    I am facing a problem in Window vista. It always crash when we open the window component using Adobe AIR. I am creating the Dynamic window and adding the child component as window.rawChildren.addChild(object) like this.. we made the setup , it is running perfect in all OS except Windows vista 32/64 bit.
    When we work with our AIR application in conjunction with our own h/w product(Tablet Driver).[without connection of Tablet slate with PC it works fine but with it not].
    S/w Details:- AIR Installer above 2 and SDK above 2.
    OS- Win-Vista 32/64 bit.
    AIR application crashes at certain point and shows the error like:-
    Problem signature:
      Problem Event Name:                        APPCRASH
      Application Name:                             GTMP.exe
      Application Version:                           0.0.0.0
      Application Timestamp:                     4bde2f02
      Fault Module Name:                          Adobe AIR.dll
      Fault Module Version:                        3.1.0.4880
      Fault Module Timestamp:                  4eb760e8
      Exception Code:                                  c0000005
      Exception Offset:                                003ca9be
      OS Version:                                          6.1.7601.2.1.0.768.3
      Locale ID:                                             2057
      Additional Information 1:                  0a9e
      Additional Information 2:                  0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:                  0a9e
      Additional Information 4:                  0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    I found one more error in debugging mode..the Alert message is
    Microsoft Visual C++ Runtime Library
    R6025 -
    pure virtual function Call.
    As per my view it is about some .dll and .CPL file makes some issues with AIR Frameworks is it? !!!!..
    Please give some ideas to resolve it.
    by
    Beerahamedkhan

    Could you try this against the released 3.2 version of AIR and our 3.3 beta to see if it still occurs?  If so, please open a new bug report on this over at bugbase.adobe.com?  Include any sample code or application to help us easily reproduce the problem.  If you'd like to keep your code private, please feel free to send it to me directly at [email protected]  In addition, if you can give us a .dmp of this crash it could be very helpful. 
    Please post back with the URL so that others affected can add their comments and votes.

  • Reading certain lines of a text file and boundary testing ...

    Hi all, 
    This is only my second post so please be gentle ;P
    Basically, my problem is that i want to read certain chunks of a text file into different text boxes. For example, this may be 50 lines in textbox1, then 50 in textbox2, then the rest in textbox3. i know this would involve using a splitter, but i have absolutelyno
    idea how i would go about implementation this. any help would be greatly appreciated on this.
    my second problem is that i also need to carry out testing on my system. one page in this is the login page. I understand that normal data would be all correct fields and erroneous data would be blank field(s). however, i dont really know what would be boundary
    testing for this. The only thing i could think of is correct username but incorrect password but i dont think this is correct. again, any help would be appreciated. 
    thanks, 
    LTID

    Hi all, 
    This is only my second post so please be gentle ;P
    Basically, my problem is that i want to read certain chunks of a text file into different text boxes. For example, this may be 50 lines in textbox1, then 50 in textbox2, then the rest in textbox3. i know this would involve using a splitter, but i have absolutelyno
    idea how i would go about implementation this. any help would be greatly appreciated on this.
    my second problem is that i also need to carry out testing on my system. one page in this is the login page. I understand that normal data would be all correct fields and erroneous data would be blank field(s). however, i dont really know what would be boundary
    testing for this. The only thing i could think of is correct username but incorrect password but i dont think this is correct. again, any help would be appreciated. 
    thanks, 
    LTID
    I suppose there would be a reason for needing to read some amount of lines into each textbox. But you make no mention of why that would be necessary.
    There is such a thing as a delimited text file. Each line would contain a delimiter of some character between fields on each line. That file could be used for displaying information in separate controls on a Form.
    But you only mention TextBox's and reading x amount of lines from a file into each TextBox as if you are perhaps providing certain information for each TextBox.
    If that is what you want then provided replies will work. If you want to explain what you need to do with regard to information in a file and displaying it otherwise then please explain so that a better method could be provided.
    Example using Text Field Parser.
    https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser(v=vs.110).aspx
    Option Strict On
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.Location = New Point(CInt((Screen.PrimaryScreen.WorkingArea.Width / 2) - (Me.Width / 2)), CInt((Screen.PrimaryScreen.WorkingArea.Height / 2) - (Me.Height / 2)))
    Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("c:\Users\John\Desktop\DelimitedTextFile.Txt")
    MyReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
    MyReader.Delimiters = New String() {"|"}
    Dim currentRow As String()
    While Not MyReader.EndOfData
    Try
    currentRow = MyReader.ReadFields()
    ListBox1.Items.Add(currentRow(0))
    ListBox2.Items.Add(currentRow(1))
    ListBox3.Items.Add(currentRow(2))
    Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
    MsgBox("Line " & ex.Message & " is invalid. Skipping")
    End Try
    End While
    End Using
    End Sub
    End Class
    Text in text file DelimitedTextFile.Txt. Delimiter is vertical bar.
    Bill|Home Depot|Garden Department
    Cheryll|DirectTV|Installer
    Charlie|C&K Automotive|Owner
    Zorro|Television|Masked Avenger
    Samantha|Mayo Clinic|Nurse Practitioner
    Mona|Bahia Honda Key State Park|Park Ranger
    La vida loca

  • Utl_file how to start reading from a certain position?

    Hi all,
    i'm currently using utl_file to read a text file and import to db. i have managed to do it. however i would like to avoid reading the first line as it is the header. i would also like to avoid the last line as it is the footer.
    how do i use the function of get line to start reading at a certain position? i am also able to get the length but i do not know how to make it start reading from a certain position.
    the length of the first line will always be 9 and length for the last line would be 51.
    here's my code so far:
    set serveroutput on
    declare
    vSFile   utl_file.file_type;
    vNewLine VARCHAR2(4000);
    file_name VARCHAR2(200) := 'read.txt';
    v_exist     BOOLEAN;
    v_length number;
    blocksize   NUMBER;
    temp_value varchar2 (4000);
    BEGIN
      vSFile := utl_file.fopen('MYDIR', file_name,'r');
      IF utl_file.is_open(vSFile) THEN
        LOOP
          BEGIN
            utl_file.get_line(vSFile, vNewLine);
            IF vNewLine IS NULL THEN
              EXIT;
            END IF;
          EXCEPTION
            WHEN NO_DATA_FOUND THEN
              EXIT;
          END;
        END LOOP;
        UTL_FILE.FGETATTR('MYDIR',file_name,v_exist,v_length,blocksize);
        dbms_output.put_line(v_length);
        COMMIT;
      END IF;
      utl_file.fclose(vSFile);
    END read_demo;

    Hi,
    utl_file has an fseek procedure for moving the file pointer around in a file, either absolute or relative number of bytes.
    It's in the documentation, I'm surprised you didn't see it there when you looked before going to the hassle of asking us a question.
    Andre

Maybe you are looking for

  • Laser jet pro 100 color mfp m175nw software will not install

    During the prepare to install stage before I have connected the printer I get at 85% on the blue extracting bar: ERROR A problem occurred while preparing to install softwar on your system. Please restart your computer and run this installer again. If

  • How packages A uses packages B, Please?

    Dear All I have two packages and like to have the classes in A uses the Classes in B, A and B are seperate packages and each is compsed of many classes. My IDE is NetBeans 4.0, just if that important. Please let me know how I can uses Package B class

  • 11.2 new features for OLTP compression, datapump compression

    Hi All, I am working related to datawarehouse and i am looking forward to impliment 11.2 new OLTP compression features. When i am reading some articles its telling me that i need seperate license for that. What about datapump compression and do i nee

  • Which should we use: TFS or RoboSource Control?

    We have two authors working on one project. Our dev team uses TFS. I don't have a preference for which source control solution we use, I just want it to be easy to work on our topics. From the search I've done, it looks like both are accessed from wi

  • OS X Lion Issue

    anyone having issues with Mac Pro App Store not working on os x lion?