Overwriting the oldest data in the file

Hi,
  I have a file of 10MB want to write in to file continuously overwriting the oldest data, my file size should be maintained 10MB and program may run for quite long time. since i am new to labview used file operations, shiftregisters and little queues but i am not getting any satisfactory results, hopping my problem is simple and someone could help me on this.
Thanks,
ranjan.

Well, we earlier solved it for the 20MB case, so the 10MB case should be trivial to solve.
What is the structure of the file, are all records of equal lenght?
Yes, most likely the solution is simple! Maybe you can show us your code that produces unsatisfactory results and tell us what kind of results would be satisfactory.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • To retrieve the oldest date in the report

    I have a requirement to retrive the oldest date in the report, I am currently working in BW 3.5
    The scenario is as below
    I have a char infoObject creation date which retrieves the date
    I have a char infoobject status which retrieves open or close
    For eg in my cube I have 5 records
    3 records has the status open and 2 records has the status closed
    When I adding the InfoObject "creation date" which has filtered for the open status , I am getting the result correctly with 3 records
    Now my requirement is I need to have only one row which should get oldest "creation date" out of the 3 records as below
    Rec1 10.10.2006
    Rec2 25.11.2007
    Rec3 20.08.2009
    I need only one count in the creation date which should show me 10.10.2006

    Hi Pavan.
    Can you model the creation date as a key figure as well as having it as a char? If so, you can create a condition on the key figure, to only give you the "Bottom 1" record.
    I think in 3.5 you cannot use a formula variable to read the value of the char in the row, but if you can, you can do it like that with a calculated key figure where you use the formula var and then put a condition on this ckf.
    regards
    Jacob

  • Select the oldest date

    Hi,
    here is my question:
    i create a table. for exemple : create table toto( id number (2)
    , name varchar2 (10)
    date_of_suscription date)
    now i insert in this table :
    insert into toto ( id, name, date_of_suscription ) values (1, 'yan', TO_DATE('12/20/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (2, 'Mathieu', TO_DATE('10/10/2004 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (3, 'Steph', TO_DATE('06/04/1999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (4, 'mejdi', TO_DATE('05/17/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (5, 'jérome', TO_DATE('10/12/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (6, 'Patrick', TO_DATE('01/02/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (7, 'Patrick', TO_DATE('03/12/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    insert into toto ( id, name, date_of_suscription ) values (4, 'mejdi', TO_DATE('04/07/2009 00:00:00', 'MM/DD/YYYY HH24:MI:SS'))
    if i want to get the oldest date_of_suscription for patrick (01/02/2000) without using : where date_of_suscription in min select from statement ? is there another method to do it ??

    Use analytic queries:
    with toto as (select 1 id, 'yan' name,  TO_DATE('12/20/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 2 id, 'Mathieu' name,  TO_DATE('10/10/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 3 id, 'Steph' name,  TO_DATE('06/04/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 4 id, 'mejdi' name,  TO_DATE('05/17/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 5 id, 'jérome' name,  TO_DATE('10/12/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 6 id, 'Patrick' name,  TO_DATE('01/02/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 7 id, 'Patrick' name,  TO_DATE('03/12/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual union all
                  select 4 id, 'mejdi' name,  TO_DATE('04/07/2002 00:00:00', 'MM/DD/YYYY HH24:MI:SS') date_of_subscription from dual)
    -- end of mimicking data
    select id, name, date_of_subscription
    from   (select id, name, date_of_subscription, min(date_of_subscription) over (partition by name) max_dos
            from   toto)
    where  name = 'Patrick'
    and    date_of_subscription = max_dos;
            ID NAME    DATE_OF_S
             6 Patrick 02-JAN-02Edited by: Boneist on 18-Jun-2009 09:52
    D'oh, you wanted the oldest date, not the latest date! Changed the max() to min()

  • Java.io.NotSerializableException when overwrite the JTable data into .txt file

    hi everyone
    this is my first time to get help from sun forums
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
    but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    the following is my code...some of it i create it with the GUI netbean
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    this is the code that suspect maybe some error here
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2);
                   oos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                   return;
              System.out.println("JTable correctly saved to file " + filename);
    }the full code will be at the next msg

    this is the part 1 of the code
    this is the full code...i had /*....*/ some of it to make it easier for reading
    package gui;
    import javax.swing.*;
    import java.io.*;
    public class timetables extends javax.swing.JFrame {
        public timetables() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            jTextField1 = new javax.swing.JTextField();
            jLayeredPane1 = new javax.swing.JLayeredPane();
            jLabel6 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jScrollPane3 = new javax.swing.JScrollPane();
            jTable2 = new javax.swing.JTable();
            jScrollPane4 = new javax.swing.JScrollPane();
            jTable3 = new javax.swing.JTable();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
    /*       org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 400, Short.MAX_VALUE)
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
            String filename1 = "studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable2 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable3 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            jTable2.setRowHeight(20);
            jTable3.setRowHeight(20);
            jScrollPane3.setViewportView(jTable2);
            jScrollPane4.setViewportView(jTable3);
            jTable2.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
            jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
            jTextField1.setText("again n again");
            jLabel6.setText("jLabel5");
            jLabel6.setBounds(0, 0, -1, -1);
            jButton2.setText("jButton2");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
          

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • Photoshop CC on Windows 7 is saving the file "date" as the created date not the modified date

    I have been using a much older version of PS (CS2) and just decided to update to PS CC. I have installed the trial version of PS CC and will begin the CC subscription as soon as the trial expires.
    I have noticed that PS CC saves the (main) date of the files as the "created date" not the "modified date" as it pertains to Windows Explorer and the Windows OS.
    Here is what is happening: I have a file that I created in 2007 that I use for a template. It is sized to specific dimensions, etc. and when I do my save as, it automatically saves into the desired file folder, so that's why I use this as a template. I setup a new photo and then drag and drop it into my template, flatten the image and save as. When doing this with PS CS2, the date for the newly saved file was assigned as the modified date (current date and time). So, when I searched for the file in Windows Explorer or when I went to open the file, the date shown for the file was the modified date. NOW, with PS CC when I perform the exact same process and do a save as, the file date shown in Windows Explorer and/or when I go to open the file is showing as the created date (3/9/2007), the date that I created and saved the template I use. This is aggravating to me because now when I want to open a file and sort by date, the date shown in Windows Explorer is not accurate. As far as I can tell, this only happens in PS CC. When I open an old file with ID CC and do a save as, it applies the current date, not the created date. And, when I was using PS CS2, whenever I did a save as the current date was applied as well.
    In summary, when performing a save as, the created date is being applied as the main date instead of the modified date. The question is: Is there a way to change this so that the modified date can be applied as the main date for the file when performing a save as?

    Below are two files created the exact same way on the exact same computer: the top one was saved in PS CS2 and the bottom one was saved in PS CC. Both were saved using the "Save As" command. You will notice that when the "Save As" command was used in CS2 it updated the "Created:" date, however, in the CC version the "Created:" date was not updated, only the "Modified:" date was updated. Is there a way to update the "Created:" date when performing a "Save As" in PS CC?

  • Aperture Video Import Problem - from Lumix GH4: Imported clips have their dates changed to the import date.  The files show up on the hard drive but many are not showing up in Aperture.

    Aperture Video Import Problem - from Lumix GH4: Imported clips have their dates changed to the import date.  The files show up on the hard drive with import date not created date, but many of these same files are not showing up in Aperture. Sometimes the clips actually show up with the current import but take on the video information from a previously imported file.

    It was suggested I move this question to IPhoto or IMovie which I did. 
    Well moving to a different discussion group did not provide an answer to this question either. But what I finally did was import one batch of photos and videos into IPhoto for a given day at a time. Working with these I could change the date and times in order to get them in the original sequench taken. Then I would create an album with that batch. These would all be on the same day (IMove was closed for this phase). Then I would open IMovie, generate the thumbnails for that album, and select the album I had created. This was necessary because the importing process in IPhoto was using incorrect dates for my video so it was a real struggle finding them in IMove until I developed this approach.
    I believe that this whole process was so screwy because I was importing from an external hard drive not a camera. I had these photos on a PC and did not have the original cameras to use to import directly which I am fairly sure would have made this easier!

  • Check the modification date of a file and compare it to the current date

    Hey everyone,
    I'm writing a script that compares the modification date of a file to the current date, and performs actions based on whether the file was modified 7 days ago or not. I haven't been able to figure out exactly how to do this.
    I haven't been able to find much in the way of this online, and I am not that familiar with manipulating dates and whatnot. I was able to get a bit of it, posted below:
    currentDate=`date +%b-%d`
    fileDate=`ls -l ~/.backup.txt | awk '{ print $6, $7 }'`
    echo "$fileDate"
    echo "$currentDate"
    if [ "$fileDate" <= "$currentDate" ]; then
    echo "old enough to run script"
    else
    echo "not old enough yet"
    fi
    Of course, this doesn't work. Any help would be much appreciated. This is for Leopard.
    TIA,
    Andrew

    find ~/.backup.txt -mtime +7 -exec yourscript {} ;
    You may need to play with the +7 value to get the exact number of days old the file needs to be.
    The find command will accept a directory (actually it is frequently used with directories) and will find all files in that directory and any subdirectories below that match the find selection critiera.
    So you could do something like
    find ~ -mtime +7 | xargs yourscript
    or
    find ~ -mtime +7 -name "*.txt" | xargs yourscript
    and if your script does not accept multiple filenames on the command line, you can use
    find ~ -mtime +7 | xargs -n 1 yourscript
    and if your file names have spaces in them, you can use
    find ~ -mtime +7 -print0 | xargs -0 -n 1 yourscript

  • How to download the script data into pdf file

    how to download the script data into pdf file
    i have one option to download the script data to pdf file --->rstxpdft4 program.
    i have one doubt how to use this proogram.or any function module to download the script data to pdf file.
    Thanks and regards,
    Sri.

    Hi      Sri Sai,
    I know one method to convert the sapscript to pdf file :
    first generate a Spool Request for the required Sapscript
    then goto transaction SP01 and copy the generated Spool Request number
    now execute the SAP report RSTXPDFT4
    here enter the copied Spool request number and the target directory into the parameters
    execute the report
    required pdf file will be generated into the target directory
    i hope it will help you out
    Please refer this simple program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Reward points if found helpful....
    Cheers,
    Eshwar.

  • To get the table data into a file in pl/sql developer

    Hi
    i have table with 90k rows, i want to get the table data into a file like excel....
    i executed the select statement it shows only 5k rows because of buffer problem.
    can u please help me any alternative way to get the table data into a file.
    using cursors like that

    Really? excel for 90K rows :)
    face/desk/floor/"Hi and sorry neighbours below, it's me again"
    Err, I see you point, thanks Dang, I completely missed the 90k recs part, I must be getting old or modern ;)
    @Ramanjaneyulu,
    can u please help me any alternative way to get the table data into a file.You can always dump a query to a file, check these:
    http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkyteflat.html
    How to create Excel file (scroll down when necessary)
    http://forums.oracle.com/forums/search.jspa?threadID=&q=export+to+excel&objID=f137&dateRange=all&userID=&numResults=15&rankBy=10001
    Depending on your database version ( the result of: select * from v$version; ) you might have some other options.

  • What is the Maximum Data can a file adapter can send at a time.

    Hi ,
    What is the Maximum Data can a file adapter can send at a time.Is there any maximum limit data can adapters will send.
    can any one help on this.
    regrads
    Raghu

    Hi Reddy,
    I have raised the same question and I got correct answer.
    Refer the below thread which will give u information.
    Wat is the maximu size of data XI can handle
    Thnx
    Chirag

  • How we will change the lowercase data in flat file to uppercase

    How can i change the lowercase date in flat file  after uploaded, out put should be uppercase.

    Hi ramana,
    See the example.
    DO.
       READ DATASET s_filename INTO I_TEMP.
       IF SY-SUBRC <> 0.
        EXIT.
       ELSE.
         move I_TEMP to I_FINALTAB.
         append I_FINALTAB.
         clear I_FINALTAB.
      ENDIF.
    ENDDO.
         In the above code we are moving the data form file to i_temp and i_temp to I_FINAL.
    Here before moving to i_FINAL.
    use  TRANSLATE i_temp to UPPSERCASE.
    Then move to i_final.
    Pls. reward if useful.

  • Exporting or relocating masters changes the created date on the new image/file/s ?

    When I export or relocate masters onto hard drive (internal or external) it changes the created date? I have tried every option possible with no resolve. Can anyone help? eg. img98007.jpg (arranged by date in aperture and is 12/05/2001) when saved/created on the hard drive the created date will be 27/06/2008????

    I'm afraid you've lost me.
    You started off (it seemed) by asking why the image EXIF date in Aperture was different then the image file date in the Finder.
    The best I can say is that when an image is captured in a camera you get one date. When that image is made into a computer file the file will have another date.
    I want to consolidate/sync all my files over the last decade from iphoto libraries etc. The only way to do this is to import them into aperture then export them to the finder with the correct shot dates so I can sync all images.
    If it changes the created date etc. it will be impossible to do so??
    What do you mean by this? I can understand the consolidate, you want to move all your images from all sources into Aperture, not a problem, but what is the sync part referring to? And why do you feel you need to export them from Aperture once you have imported them?
    And again the created date of a file is the date the file is created it has nothing to do with the image creation date.
    Sorry I can't be of more help,
    regards

  • IS BT CLOUD ALTERING THE "MODIFIED DATE" ON MY FIL...

    Hi
    I have BT Cloud 2GB Free running as both the downloaded "auto sync" software and also using the Chrome Browser Interface. I am on Windows XP.
    I only use Cloud to backup word / excel documents and family photos - basic things I just dont want to risk losing.
    I recently noticed something odd, when I sorted my BT Cloud View by "Date Modified" about twenty very 'old' files suddenly appeared at the top of the view - files I hadnt used in about 5 or 6 years.
    I definitely had not accessed these files yet when I went to look at them in "My Computer" and clicked on "Properties" I could see that the "Modified Date" had changed. In fact it seems that about a dozen or so files had been "modified" over night while my PC was left on in the next room. No other dates had changed on the files - it did not look like they had been "Re-Saved" I dont think since the original author had not changed.
    I started to monitor this and noticed about half a dozen files having their "modified dates" changed every day for the last three or four days. Its only Documents (Word Powerpoint Excel Text etc) that are being modified.
    And heres the thing - I ran a search on my computer of files modified in the last week and the only ones where I could not explain the change were files that are being backed up by "BT CLOUD" so its slightly possible there is a link. Of course this could be coincidence but I thought this might be a good initial avenue to explore since without BT Cloud's interface view of my files I would never have even noticed the problem in the first place.
    I'm pretty sure its not a Virus - I run my own Scanner every few days, its always up to date and I have Real Time Scanning enabled. I also ran a couple of online scans last night (Norton etc) and they found nothing.
    Its a recent development because I use Cloud every week and would have noticed before if things were changing.
    So a couple of questions really:
    Firstly has anyone else experienced this problem - I read somewhere that Some Virus Scanners can alter the Modified Date on your files unintentionally but the MS hotfix says this only happens in Vista/Win 7 I think and I am on XP. Could it be that when BT Cloud Scans the file it affects its modified date on your PC ?
    Secondly Could anyone else access my files in BT Cloud and modify them, and if so would that change to the 'online file' be represented back on my own PC when I "Synced" my backup
    Many thanks in advance for any help anyone can offer.

    I assume your raws are in DNG format? If xmp is in sidecar, it won't change raw file date.
    Anyway, saving xmp does not change any dates in Lightroom, so you should still be able to sort by edit time or capture time...
    But if you want control, you have to save manually instead of automatically.
    Two things that might help:
    1. Filter based on metadata status.
    2. robcole.com - DNGPreviewUpdater
    Rob

  • "Could not get the audio data from the file" error

    Hi
    I get a lot of "Could not get the audio data from the file" errors when opening a project. Sometimes they crash Premiere Pro CC 7.01 (Mac). But if not Premiere works as usual, with the audio.
    I tried to convert the audio files (coming from Audition) from 32 to 16 bit. It worked while opening a project once, but not the following times.
    Where can it come from ?
    Edit: I also get this error when importing audio: "Error: Premiere Pro version 7.0 is not compatible with the Premiere Pro Plug-in version 5.7.4". Maybe it is connected.

    Got it! It was the Smartsound plugin making trouble. Got rid of it and no more errors.

Maybe you are looking for

  • HT3131 Booting in Clamshell Mode with Bluetooth keyboard

    I have a macbook pro with retina display which I am using with two apple 27" monitors. I use a logitech K811 bluetooth keyboard while the macbook is closed. I would like to be able to boot from the keyboard directly. Does anyone know how to do this?

  • PO number with PDF formate

    Hi MM experts, how can i save a PO  pdf formate with po number Exampl :-  po number is  4500000661. but when i am saving as a PDF formate in my system C drive its giving me a name of the file automaticalley E9A9F3F1A0970026B958F18D.pdf   like this. 

  • Photos crashes when Preparing Library from iPhoto

    I have two libraries one is 62GB and the other 500 MB. Both were perfectly tagged and beautiful organised in iPhoto, I've just updated to Photos and on my first try with the big library 10% progress after 2 days. The second library (the smallest one)

  • Safari can't open HTML files on a CD

    After months of work, I prepared a CD with many HTML files for disribution. Now I discover that SAFARI and FIREFOX cannot recognize or open the disk. Heartbroken - and broke.

  • Generic method signatures

    I've searched but can't find that a question I have has been asked (or answered). I apologize in advance if it has. Here is my question. In Java Generics FAQ by Angelika Langer states in FAQ 802 ( [http://www.angelikalanger.com/GenericsFAQ/FAQSection