Fire an event automatically after reading line from file

Hi all
I am writing a programe in which i need to fire an event automatically after reading each line (i.e. on every EOL) from the file.
Thanks
jon

jonhill wrote:
..I am writing a programe in which i need to fire an event automatically after reading each line (i.e. on every EOL) from the file.Thanks for sharing that with us. Let us know how it goes. If you have any questions, feel free to ask them.
BTW - sounds like a very weird requirement.

Similar Messages

  • I want to read lines from file, count it and extract numbers from a first line.

    i must do un loop?

    HI,
    i try to explain how to use to LABVIEW TOOLS...
    1. USE a for next loop
    2. here you must open the file with the VI. read lines from file.
    you can choos how many lines you read at same time.
    3. the string you can convert into an number.
    4. in the loop is the literal counter... this is you line couter....
    iun schrieb:
    > i must do un loop?

  • Bug: Keywords behave incorrectly after "Read Metadata from File"

    (Happens in LR3.4 RC and probably also in previous versions... but I am not sure if it happened in LR2)
    The problem seems tro be somthing like de-sync of database status and what we see on the screen.
    1) Let's say we have a photo with keyword "abc"
    2) Click in the Keyword List on the arrow around the "abc" keyword to show only photos with this keyword (single one), leave the filter on this settings
    2) Save Metadata to File
    3) Edit XMP in an external application, add new keyword "def"
    4) Read Metadate from File
    5) Now what happens is: The photos disappers from the screen as if it lost the "abc" keyword (weird), but if you look at the Keyword List, the "abc" keyword has still 1 photo attached to it. Also, if you release the filter and find the photo, it clearly has the "abc" and "def" keywords in the Keywording panel. And you can search for this keyword in the text filter (works correctly), but if you click on the arrow around the "abc" keyword, the photo is not shown.
    6) If you restart the Lightroom, it will work correctly again.
    I have an own application that is able to modify the XMP and the modifications may not be perfect, but in my opinion, this shouldn't happen when reading the metadata. If any developer is reading this, I can supply a file with original and changed metadata for debugging.
    It would be great it this could be resolved.
    Thanks!

    Please do report your find with the details you state (well done!) here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Thanks.........

  • Read lines from file

    Hi. I use buffered reader to read from a file. The file contains a line of strings (04/21/2005 some text bla bla here). Each line ends with a \n, to define that its the end of the line. How can i print this out, so each line is printed on a new line? Suggestions?
    String filename = "someFile.txt";
    BufferedReader infile = new BufferedReader(new FileReader(filename));
    String read;
    while ((read = infile.readLine()) != null)
         //print each line, but how?
    infile.close();

    I was wondering if the \n defines that its "end of
    line" so that all strings between the \n is
    understood as one line.Yes. It may also be \r\n, depending on the platform. It's one of the System properties. line.delimiter, I think.
    Allso, when i print with
    System.out.println(infile); only
    java.io.BufferedReader@691177 is printed. Do I have
    to parse it in any way?No. You normally can't "print" an object. All you'll do is print out the result of the object's toString() method, which usually returns the class name and the object's hash code.
    And you should keep in mind that a File object is only a representation of the file's name. It has no access to the file's contents.

  • Read lines from text file to java prog

    how can I read lines from input file to java prog ?
    I need to read from input text file, line after line
    10x !

    If you search in THIS forum with e.g. read lines from file, you will find answers like this one:
    Hi ! This is the answer for your query. This program prints as the output itself reading line by line.......
    import java.io.*;
    public class readfromfile
    public static void main(String a[])
    if you search in THIS forum, with e.g. read lines from text file
    try{
    BufferedReader br = new BufferedReader(new FileReader(new File("readfromfile.java")));
    while(br.readLine() != null)
    System.out.println(" line read :"+br.readLine());
    }catch(Exception e)
    e.printStackTrace();
    }

  • Web dynpro to fire an event automatically via url in iview

    Hi expert,
    I create an iview, and would like to via the application parameter: 'auto = true' to fire an event in htmlb (bsp java) application.
    I have already successful calling the service in my wdDoInit() method.
    but next step is how to fire the event automatically in init method ? any code snippets will be appriciated.
    Ben.J.

    Hi,
    I have 2 main DCs bound. Now from DC2 I have to read the Context of DC1 (which is bounded to another application).
    To bind your context from DC1 to DC2
    Copy the context that you want to expose from the component controller to interface controller of DC1.
    Once this is done you will be able to see the context in DC2.
    Based on your requirement you can set the Input type property of the context node.
    Regards
    Ayyapparaj

  • One of the e-mails in my ipad deletes messages automatically after reading without backup.  what do I do to correct this so that my mails would remain in the inbox after reading for reference purpose

    One of the e-mails in my ipad deletes messages automatically after reading without backup.  What do I do to correct this so that my mails would remain in the inbox for reference purpose?

    As you are on a residential service you have to wait for engineer availability priority is given to Business users as they get a different service level agreement also using a residential line for business use can leave you open for suspension or cancellation of service as it breach's the terms and conditions
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • [Solved] Shell script to read unhashed lines from file.

    Hello.
    I want to write a shell script  (it can be bash,sh,ksh,csh or zsh) that will be:
    1.Read unhashed lines from file named mirrors.conf.
    2.Put them in ~/.profile as PKG_PATH=line catted from mirrors.conf.
    Just like as mirrors.conf file for pacman.
    Now it can cat lines but how to put them in files as PKG_PATH?
    Thanks for answers.
    Last edited by SpeedVin (2010-03-01 17:33:20)

    res wrote:
    ^ IFS is not necessary here; it won't mess with the white space:
    $ echo 'args with formatted spaces ' | while read -r; do echo "$REPLY"; done
    args with formatted spaces
    It matters for leading/trailing whitespace:
    $ echo ' after some ' | while read -r line; do echo "<$line>"; done
    <after some>
    $ echo ' after some ' | while IFS= read -r line; do echo "<$line>"; done
    < after some >

  • Read metadata from file cancel modifications !

    Hi,
    I use Lightroom 1.1 in french. I made some photo (in raw but in jpeg the result is the same) and import them in Lightroom with conversion in DNG. In Lightroom, in develop module, I crop, change contrast and som others.
    After that, I geotag my DNG files with HoudahGeo. HoudahGeo write geotag in the file. So back in Lightroom, I make a 'Read metadata from file' ('Lire les métadonnées depuis les fichiers' in french) for having geotag in Lightroom.
    Geotag are now in Lightoom, nice, but in develop history, I have a new line 'Rénitialiser les paramètres' !!! So I can't see all my modifications... Is it normal ?
    Thank you
    PS: Sorry for my english...

    I think you should test this with one or two pictures - import/convert, save metadata to file, geotag, read metadata. Also try import/convert, make small adjustment, save metadata to file, geotag, read metadata. In iView I often write metadata to DNG's that have been adjusted, then read the metadata in Lightroom - sometimes I add more data in iView and do more adjustments.
    I have seen the problem you describe, but it has been with raw files which I have adjusted in Lightroom but haven't saved out the metadata. I have then created an xmp sidecar in iView, and read the metadata in LR. So the sidecar had no ACR/LR instructions. The result was that my adjustments were wiped out. What I suspect is that something similar is happening with your DNGs - that conversion creates them but doesn't write the ACR/LR fields.
    So try a few alternative sequences.
    John

  • Export with Table Splitting : ORA-01115: IO error reading block from file

    Hello,
    We are in perfroming the last dryrun of our CU&UC conversion.
    The are now in the process of exporting the ECC6 system (Oracle 10.2.0.4.0, HPUX ia64) using sapinst features, "table splitting preparation"
    When doing so, we are facing critical errors :
    Creating file /export_uni/sapinst_splitting/ora_query3_tmp3_1.sql.
    ERROR 2010-08-11 10:27:28.881
    CJS-00084  SQL statement or script failed. DIAGNOSIS: Error message: ORA-12801: error signaled in parallel query server P002
    ORA-01115: IO error reading block from file 90 (block # 16640)
    ORA-27072: File I/O error
    HPUX-ia64 Error: 22: Invalid argument
    Additional information: 4
    Additional information: 16640
    Additional information: -1
    ORA-01115: IO error reading block from file 90 (block # 16640)
    ORA-27072: File I/O error
    HPUX-ia64 Error: 22: Invalid argument
    ORA-06512: at "SAPR3.TABLE_SPLITTER", line 775
    ORA-06512: at line 1
    I have therefore perfmed a dbverify ; no corruption has been recorded.
    When trying to perfrom the EXPORT, without table splitting ; it works fine ...but the processing time is extremely long, as you can imagine. Any help would be highly appreciated.Regards.
    Raoul

    Thank you Stefan,
    Our HPUX Release seems to be indeed 11v3,
    [root@:/root]# uname -a
    HP-UX B.11.31 U ia64 2566039091 unlimited-user license
    I'll check the installation of the  patch and keep you informed
    Thank you
    Raoul
    Edited by: Raoul Shiro on Aug 11, 2010 11:57 AM

  • Reading in from file

    Hi, I've been looking at some resources online but cant seem to understand it very well.
    I have been given partially completed code from my lecturer, and i have to complete this code.
    I'm not looking for solutions but if you would be so kind to either explain or point me into the direction of helpfull resources i would be very gratefull!
    Heres my partially completed code:
           public void load(File file){
                String line;
                String[] fields;
                try {
                    BufferedReader in = new BufferedReader(new FileReader(file));
                    line = in.readLine();
                    this.setName(line);
                    line = in.readLine();
                    fields = line.split(",");
                    HeadOfSchool h = new HeadOfSchool(fields[0], fields[1], fields[2],
                        Integer.parseInt(fields[3]), Integer.parseInt(fields[4]));
                    // COMPLETE THE READING IN FROM FILE
                    // ADD YOUR CODE HERE
                    in.close();
                } catch (IOException e) {
                        // ADD YOUR OWN CODE HERE
        }Here is the contents of the file which is being read in:
    The file which stores information about the school is as shown below
    School of Computing
    Prof Shirley Campbell,Aberdeen,female,45,45000
    8
    Dr John Smith,Aberdeen,male,40,28000
    Dr Joan Simpson,Aberdeen,female,30,27500
    Mr Tony Orlando,Banchory,male,40,27500
    Dr Craig Stuart,Aberdeen,male,38,18500
    Dr Moira Cables,Aberdeen,female,35,22500
    Dr William Green,Aberdeen,male,38,35500
    Mr Henry Brown,Aberdeen,male,37,27265
    Ms Jill Blossom,Aberdeen,female,48,30000
    Course UG1,4
    Alan Smith,Aberdeen,male,35,A
    Mary Grant,Banchory,female,25,B
    Joe Bloggs,Aberdeen,male,42,A
    Jack Hawkins,Stonehaven,male,30,C
    Course UG2,5
    Susan Clark,Aberdeen,female,18,C
    Carol Roberts,Murcar,female,32,B
    Roy Rogers,Ellon,male,37,B
    Melanie Sykes,Murcar,female,22,A
    Colin Firth,Aberdeen,male,27,A
    Course UG3,3
    Cindy Lauper,Aberdeen,female,27,A
    Jim Bowen,Banchory,male,47,C
    Andy Townsend,Arbroath,male,35,BFormat of the file:
    The format if the file is
    Name of school
    Details of the Head of School
    Number of Lecturers
    List of Lecturers
    Name of course1, number of students
    List of Students
    Name of course2, number of students
    List of Students
    Name of course2, number of students
    List of Students
    Name of course3, number of students
    List of StudentsSorry if i havent supplied you with relevant details, just let me know if theres anything else i need to let you guys know
    Thanks

    The code given to you as an example demonstrates how to open the file, read a line of data from it, and split that line into parts.
    You are given the format of the file, and example data.
    So - given that you know how to read a line of data from the file and split it into parts, and given that you know what the lines of the file look like - can you write out in your native language what you need to do, using "read a line", "split the line into pieces", "use the nth piece" operators, to process the file? If you can, then do, and convert that to Java. If you can't, then you need to back up and understand your problem better, then try to write out your solution in your native language.
    If you run into any specific, technical problems come back and ask away
    Good Luck
    Lee

  • Failed to read PID from file /run/nginx.pid: Invalid argument

    Hi,
    tried to get an nginx server running to set up an owncloud environment.
    When starting the nginx server
      $  systemctl start nginx.service
    I get the message: "Failed to read PID from file /run/nginx.pid: Invalid argument"
    [root@klaus /etc/nginx]# systemctl status nginx
    nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled)
    Active: active (running) since Sat 2013-10-12 17:50:46 CEST; 8min ago
    Process: 1823 ExecStart=/usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 1821 ExecStartPre=/usr/bin/nginx -t -q -g pid /run/nginx.pid; daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Main PID: 1825 (nginx)
    CGroup: /system.slice/nginx.service
    ├─1825 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on;
    └─1826 nginx: worker process
    Oct 12 17:50:46 klaus systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
    Oct 12 17:50:46 klaus systemd[1]: Started A high performance web server and a reverse proxy server.
    but /run/nginx.pid is readable:
    # cat /run/nginx.pid
    2058
    # ll /run/nginx.pid
    -rw-r--r-- 1 root root 4 Oct 12 17:39 /run/nginx.pid
    It seems nginx is runnung thought but in my browser I only get a blank page.
    Any help appreciated.
    Last edited by wombalton (2013-10-13 14:17:46)

    Actually it's the first time I tried to set up one.
    I Basically followed this guide [1] adopting it to arch.
    That's where i got my nginx.conf from. Taking the standard nginx.conf that comes by install and replacing the server part.
    After some searching I found the owncloud manual[2] with an example nginx.conf. Comparing that with my one I found some differences. Applying them works out fine.
    I get now the owncloud page.
    The systemd error  still ocurs, but I think it does not matter to run the server.
    Thanks for your help.
    [1] https://docs.google.com/file/d/0B0ZsTQd … ring&pli=1
    [2] http://doc.owncloud.org/server/5.0/admi … figuration
    EDIT:
    Just in case someone stumbles over this and tries to use the config:
    This one [3] really works
    [3] http://doc.owncloud.org/server/5.0/admi … thers.html
    Last edited by wombalton (2013-10-14 13:31:22)

  • Feature Request: save metadata to file, and read metadata from file.

    Please have function to save metadata to file, and read metadata from file.
    This would allow us to write cross-platform plugins that can assure data is up-to-date in the xmp, or modify xmp and have it reinstated in the catalog.
    This would go nicely with the ability to save xmp for virtual copies, dng, and rgb formats.

    Perhaps someone with direct experience with publishing to Smugmug will chime in.  Short of that, some thoughts on your issues:
    Should I not bother to "Save Metadata to File", this seems to be what is messing up the SmugMug publish service?
    I very much doubt that it is messing up the publishing.  What gets saved to the file from the catalog is independent of what gets exported.  Saving metadata to the file is generally a good practice (in case you screw up your catalog backups).  Many, perhaps most, users set the preference Catalog Settings > Automatically Write Changes Into XMP.
    I would have expected it to behave like an export which would write synonyms, exclude keywords that should be excluded, etc, which seems to work ok in point 6 above.
    Yes, that's a reasonable expectation.
    You may have done this already, but double-check: Right-click the Smugmug publishing service in the left-hand column of the Library, select Edit Settings, and in the Metadata section verify that you have Include: All Metadata set.
    Did you download the Smugmug plugin from Smugmug? You might try this Smugmug plugin instead -- the author designed the publishing architecture of LR and has an excellent reputation. 
    Are the publish services more effort than they are worth? So I get SmugMug to work, what happens when I try Flickr?
    I think many users find the publishing services are generally worthwhile.  I publish regularly to Flickr (using the built-in Flickr plugin, which isn't completely reliable) and the Zenfolio plugin from Friedl. 

  • Reading data from file in EJB

    I would like to read data from files in EJBS (Stateless Session Bean I think). I've heard that the EJB sepcifications don't allow to use the java.io package to access the filesystem. How can I resolve this problem? Possible solutions I've thought of are:
    * Use a webserver to store the data
    * put the files in a jar and access them using the getResource() in the classloader class
    Could you comment on this plesae
    greetings

    The specification states:
    "An enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
    The file system APIs are not well-suited for business components to access data. Business components should use a resource manager API, such as JDBC, to store data."
    From this I understand I cannot acces files directly, but it does not specifiy I can't use the java.io package at all. It specifically says not to use the java.io package to acces files and directories, they don't say anything about using the classes for other use.
    however, a litle lower the specification states:
    "The enterprise bean must not attempt to create a class loader; obtain the current class loader; set the context class loader; set security manager; create a new security manager; stop the JVM; or change the input, output, and error streams.
    These functions are reserved for the EJB Container. Allowing the enterprise bean to use these functions could compromise security and decrease the Container�s ability to properly manage the runtime environment."
    I'm not sure how to interpret this, but I believe this rule makes my solution invalid.
    Please comment on this,
    thanks

  • Bug: "Read metadata from file"

    When I add GPS coordinates to a file (with the program Geotagger) and select "read metadata from file" to import the new metadata, a color adjustment badge appears on the thumbnail (even though I didn't adjust any colors). This only happens with files that have a cropping applied to them in Lightroom. If the file doesn't have a custom cropping the color adjustment badge doesn't appear. It happens with both JPG and CR2 files. Seams like a bug to me.
    I'm on a 24" iMac 2.8 with 4 GB and OSX 10.5.5 / Lightroom 2.1

    It also happens with DNG. Anyway, I don't think it has anything to do with the GPS, but the issue has been around right back through version 1.x Try the following:
    1. Select an image that has no crops or develop adjustments
    2. Switch to Develop module
    3. Apply a crop
    4. Save metadata to file (Cmd+S)
    5. Read metadata back from file (Metadata menu - "Read Metadata from file"
    Please report what happens?
    At my end the Crop badge remains but a Develop Adjustment badge also appears - IMO it shouldn't, but as stated above it has for a VERY long time. I'll bug it again and see what happens.

Maybe you are looking for

  • How to read serial number of adobe air runtime / flash plugin

    Hi Question: Is there a way of extracting a unique serial number (or assembly number) from the air runtime and the flash player. Background: I asked this question on Experts Exchange and the consensus was that it's not possible. However, I thought I

  • The number of photos in photos tab is lager than in all photos album

    I have enabled the iCloud photo library and disabled my photo stream. i Have 308 photos and 3 videos. Then I checked the iCloud usage, especially the photo library, there are totally 308 photos and 3 videos in iCloud photo library which is correct. N

  • S_ALR_87012360 : Transfer postings for diferred taxes

    Hi, When i run Tcode S_ALR_87012360 The taxe of some postings is not transfered, the system shows this error : Code error 2 The document contains items whose posting key is marked as payment Please can you explain me the signification of this message

  • Unit price getting changed

    Hello All, Scenario-1: Log into SRM --> Select Internal Goods/Services --> Select a G.Code --> Enter the quantity as 15 and Price as 3128.98 per 100 and then click on Check Result: The price in the line item changes to 3129.00 Scenario-2: Log into SR

  • Clean win7 bootcamp on MBPr

    Here are my notes from clean install win7 to macbook pro retina 10.8 for only $99 purchased Windows 7 Home Premium SP1 (64-bit) (OEM)   http://bit.ly/RD26mM using another computer with dvd drive, insert win7 installer disc and using disc utility crea