item switch to function index into a text file

I'm having some difficulties here...

What I want to do is replace/switch element to an index in an existing text file. When I read the data from the text file I use 'read worksheet file.vi' and read items as strings, so my idea is to use the "write to worksheet file.vi' when I want to update the text file.

For example, a text file with elements; 1-1-1

2-2-2

3 3 3

An example of what I want to do is to change the place of the first 1 to index (0,0) and the last 3 in index (2.2), which should give me the result in the text file; 3-1-1

2-2-2

3 3 1

Anyone who got advice or ideas? Thank you...

You should really look at the various functions of table available. And rather than use the function Rotate 1-d array , you can try using the first remove table , then insert into the Array function.

Tags: NI Software

Similar Questions

  • LabVIEW data into a text file

    I have a LV program to save the LabVIEW data into a text file. The LV file is attached. My problem is: the first data that are saved after the headers of data, is on the first line of the text rather than the second file. Ideally, it should be line 1, line 2 from data headers. I don't know what is the origin of the data to be concatenated with the headers. Can anyone help on this please.

    Thank you and thank you for your time in advance.

    Hello!

    Your problem seems to be quite simple, if I understand it right.

    All you need is a constant to be concatenated with your header line end.
    The end of the constant line is equal to CRLF.

    So, if you concatenate the header with the CRLF, your concatenated string will be like: "header \n".

    and then, in the following lines (1, 2, 3...) your data will be available as it was already.

    I enclose a snapshot with this change.

    I hope that solves your problem!

    Best regards.

  • is it possible to convert a check into readable text file?

    is it possible to convert a check into a readable text file?

    Also, I can say that the content of the control files you will find in the alert.log?

    Thank you

    PhoenixBai wrote:
    is it possible to convert a check into a readable text file?

    Also, I can say that the content of the control files you will find in the alert.log?

    See previous answers.
    There is also an undocumented option to see a dump of debugging of certain other information in a control file if you have access to your trace files:

    alter session set events 'immediate trace name controlf level 16';
    

    From memory I think level 16 is more complete emptying, but there may be another level this report more.
    Do not experiment with this on a production system.

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    http://www.jlcomp.demon.co.UK

  • Why converts the images into a text file?

    I found that when I opened some art work that I have done in Illustrator CS4 work seems itself have converted into text files.

    Could someone tell me why this is happening. I seem to have lost the work which took many hours. I'm puzzled.

    Grateful for any advice.

    Kind regards.

    What gives you the impression that they are text files? The original format of the files was Postscript, a text format, but who died with AI9. Here is the PDF format.

  • Someone at - it a VBA Excel code saves a pdf file into a text file?

    I use Adobe Reader XI.  I have the directory on my HDD that has two files; the first is an Excel worksheet and the second is a file 'pdf' of Adode.  I wrote a code using VBA Excel that opens the pdf file.  I am looking for a procedure that would save the pdf file to a text file (for example, "*.txt").  So far I found the code to do this, but it is written for Adobe Professional.  Someone has the code that would do the same thing using Adobe Reader XI?

    Not possible with Adobe Reader.

  • I'm trying to extract the strings and load them into a text-helpplease file

    I'm trying to extract the strings and load them into a file text without space between them - see below

    p_csa = ISCC M4 DP

    where p_csa is a tring to load into a text file



    Code:

    SELECT SUBSTR (p_csa, 0, 0) INTO v_telco FROM DUAL;
    SELECT SUBSTR (p_csa, 1, 4) INTO v_comp FROM DUAL;
    SELECT SUBSTR (p_csa, 5.3) INTO v_csa_prefix FROM DUAL;
    SELECT SUBSTR (p_csa, 8, 4) INTO v_csa_type FROM DUAL;

    fileidinvoice: = UTL_FILE. FOPEN (c_data_location, filenameinvoice, 'W');
    fileidlog: = UTL_FILE. FOPEN (c_data_location, filenamelog, 'W');

    UTL_FILE. PUT_LINE)
    fileidinvoice, v_telco | » '|| v_comp | "|" | v_csa_prefix: "| v_csa_type);


    -the content of the file-

    ISCC M4 DP

    =====================
    I want to remove the space between the chain above for the content of the file should look like this:

    -the content of the file-

    GCSIM4DP

    Hello

    976253 wrote:
    I'm trying to extract the strings and load them into a file text without space between them - see below

    p_csa = ISCC M4 DP

    where p_csa is a tring to load into a text file

    Code:

    SELECT SUBSTR (p_csa, 0, 0) INTO v_telco FROM DUAL;

    Is it always NULL?

    SELECT SUBSTR (p_csa, 1, 4) INTO v_comp FROM DUAL;

    You don't need the double table much in PL/SQL. You can simply say

    v_comp := SUBSTR (p_csa, 1, 4);
    

    Almost all integrated single-row functions work in PL/SQL. (NVL2 is the only one I know who does not work in PL/SQL).

    SELECT SUBSTR (p_csa, 5.3) INTO v_csa_prefix FROM DUAL;
    SELECT SUBSTR (p_csa, 8, 4) INTO v_csa_type FROM DUAL;

    fileidinvoice: = UTL_FILE. FOPEN (c_data_location, filenameinvoice, 'W');
    fileidlog: = UTL_FILE. FOPEN (c_data_location, filenamelog, 'W');

    UTL_FILE. PUT_LINE)
    fileidinvoice, v_telco | » '|| v_comp | "|" | v_csa_prefix: "| v_csa_type);

    What are you trying to do here? For example, what you're trying to put between c_comp and v_csa_prefix?

    -the content of the file-

    ISCC M4 DP

    =====================
    I want to remove the space between the chain above for the content of the file should look like this:

    -the content of the file-

    GCSIM4DP

    If you don't want space, then only concatenate all the spaces in the string before you write it and REPLACE allows you to delete all the spaces that have been copied from p_csa. For example:

    UTL_FILE.PUT_LINE ( fileidinvoice
                , REPLACE ( v_telco || v_comp
                                        || v_csa_prefix
                              || v_csa_type
                       , ' '
                       )
                );
    

    I guess you need the v_comp of separate variables, the v_csa_prefix and the v_csa_type for something.

    I hope that answers your question.
    If this isn't the case, after a complete script that people can run to recreate the problem and test their ideas. Display the results you want (in other words, the contents of the file created).
    Always say what version of Oracle you are using (for example, 11.2.0.3.0).
    See the FAQ forum {message identifier: = 9360002}

  • Addition of text files

    Hi all

    I want to insert characters into the middle of a text file without replacing the characters that are already there.  The function "Write to a text file" replaces the old characters with the new.  Is there a way to insert new characters in position and move out old longer than characters, so that the file grows based on the characters that you add?

    Thank you

    FB

    is that what you meant?

  • Problem with end of line in the text file.

    Using LabVIEW 2010 on W7 64 bit in the USA.

    I have an application in which I write in a text file.  I use the function "Write to a text file" to write the text and "Reading a text file" function to read again.  My problem is with the end of line character.  The text that I write is a long chain, not an array of strings.  While building this chain, I insert the constant EOL of the palette of channels function to indicate that a new line is planned.  My tests showed this EOL constant values of consecutive bytes 13 and 10.  After writing all the text in a file, I can open the file with Notepad, or Word, or something else, and it is displayed correctly.  When I read he returned with the function of text file reading, I'm trying to parse the string by searching for the same constant EOL, but it does not work.  A closer examination of the extracted string from the file reveals that the value of end of LIFE has changed for only 10.  The location of the byte to 13 disappeared.  I know there is a note on the writing of the function of text file add/change the EOL characters, which are the default values of the system, but the note specific tables.  I manually put the value in the string.  Does anyone know why this happens and how to fix it?

    Thank you.

    The help of reading from text file function

    The function converts all characters in end of line break characters online platform, dependent unless you right-click the function and remove the check mark next to the menu item Convert EOL .

    Right-click your reading and uncheck the EOL conversion.  I recommend to do the same thing to your writing to text file feature.

  • Write/close text file problems

    There is probably a simple answer to this question, but I can't seem to understand.

    I'm using a controller compact realtime RIO 9068

    I have a program very simple reading of data from a serial port and saving it to a text file.  Before recording starts, I call the function open/create/replace file, then I start reading the port, and I run the function "Write to a text file" whenever I get a certain number of bytes from the serial port.    Everything works fine if I use the program as planned, I press the Start button to start the recording of data and then press the stop button to stop the recording, who runs then the function "close file".  I get a well recorded transcribed text file and all is right with the world.

    This application is intended to save the data for hours unattended, if I want her to be robust for a power failure.  If I pulled the power so that the data connects, I always get the file on the hard drive, but is 0 bytes is no in.  It seems that if I don't run the IA function to "close the file" nothing is saved.  I am confused because I thought the closing of the record vi relases only the file of labview control and don't actually nothing to write to the file.  Anyone have any ideas on what is wrong?

    I'll post photos of the code, but its on a machine of lab that is not connected to the internet.

    Discover the function Flush file in the Advanced queue Functions menu.  Following is the help file for this entry:

    Writes all buffers of the file identified by refnum the disk and update the directory of the file associated with refnumentry.

    The file remains open and refnum remains valid. Data written to a file often reside in a buffer until the buffer fills, or until you close the file. This function forces the operating system to write data from the buffer to the file.

  • Diff data loading while doing through SQL and while doing through text file

    I have an ASO cube data charges every day morning. Loading the data is automated by MaxL and this MaxL files uses a SQL (against teradata) as the source of data and a State of charge for loading data. 1 week incorrect data return has begun to show upward and nothing has been changed. It's strange when I run the SQL in a teradata assistant and copy the results to a text file and load the data via EAS from the text data source file and the same rule that data file appears on the right. Any ideas on why this is happening. So basically when I use a SQL data source and a particular rule file data seems to be missing, where as during the use of the results of the same SQL copied into a text file and load data into the text file and the same rule file it seems to work. I'm on 11.1.1.4 and in this case only a private citizen of the cube.

    Thank you
    Ted.

    Hi Ted, thanks.

    Well, you reset the database before each load that takes the properties 'Overwrite' or 'Add' of the equation which is good. And it looks like nothing of going with several buffers (no parallel loading SQL, right?). That really just leaves box "Aggregate use Last" - did you happen to check this? By default applied your MaxL charge would be "Aggregation Sum" (which is the equivalent of not check "Use Last Aggregate").

    A_defaut, I would suggest that you add a WHERE clause of your SQL query to zoom right down to one of your 'problem' values (you have not really described what you see error data) and a) load just this intersection and b) see the result of the query in the data prep Editor.

  • Need help: UTL_FILE read and write in the text file

    Hello, I'm on version 11 GR 2 by using the UTL_FILE function to read a text file and then write the lines where it starts with the word "foo" and put an end to my writing in the text file where the line with the word "ZEN". Now I have several lines that begin with 'foo' and 'ZEN' allow a paragraph, and in this paragraph, there is a line that begins with "DE4.2". Therefore,.
    I need to write all of the paragraphs that include the "DE4.2" line in their beginning and end of lines 'foo' and 'ZEN '.

    FOR EXAMPLE:

    FOO/234E53LLID
    IT'S MY SECOND LINE
    IT'S MY THIRD LINE
    DE4.2 IT OF MY FOURTH LINE
    IT'S MY FIFTH LINE
    ZEN/DING3434343

    FOO/234E53LLID
    IT'S MY SECOND LINE
    IT'S MY THIRD LINE
    IT'S MY FIFTH LINE
    ZEN/DING3434343

    I'm only interested in writing the first paragraph tha includes line DE4.2 in one of the paragraph of lines not the second ther that does not include the "DE4.2".

    Here is my code so far:

    CREATE OR REPLACE PROCEDURE my_app2 IS
    Utl_file.file_type INFILE;
    outfile utl_file.file_type;
    buffer VARCHAR2 (30000);
    b_paragraph_started BOOLEAN: = FALSE; -flag to indicate which required paragraph is started

    BEGIN
    -Open a file to read
    INFILE: = utl_file.fopen ('TEST_DIR', 'mytst.txt', 'r');
    -Opens a file for writing
    outfile: = utl_file.fopen ('TEST_DIR', "Out.txt", "w");

    -Check the file is open
    IF utl_file.is_open (infile)
    THEN
    -lines in the file in loop
    LOOP
    BEGIN
    UTL_FILE.get_line (infile, buffer);
    APPLICATION STARTING POINT-
    Buffer IF LIKE 'foo %' THEN
    b_paragraph_started: = TRUE;
    END IF;
    -SEARCH FOR GRADS APPS
    IF b_paragraph_started AND buffering LIKE '% 4% ' THEN
    UTL_FILE.put_line (outfile, buffer, FALSE);
    END IF;
    -REQUEST FOR ENDPOINT
    Buffer IF LIKE '% ZEN' THEN
    b_paragraph_started: = FALSE;
    END IF;
    UTL_FILE.fflush (outfile);

    EXCEPTION
    WHEN no_data_found THEN
    EXIT;
    END;
    END LOOP;
    END IF;
    UTL_FILE.fclose (INFILE);
    UTL_FILE.fclose (outfile);
    EXCEPTION
    WHILE OTHERS THEN
    raise_application_error ("-20099, ' UTL_FILE unknown error");
    END my_app2;
    /

    When I run this code I get only one line: DE4.2 it ME LACK THE WHOLE PARAGRAPH

    PLEASE ADVISE...

    I agree with reservations of Justin on the length of a "paragraph" and the number of users that are running at the same time, so here is a version without the collections.

    CREATE or replace PROCEDURE my_app2 IS
       infile utl_file.file_type;
       outfile utl_file.file_type;
       buffer VARCHAR2(30000);
       b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
       b_toprint BOOLEAN := FALSE;
       l_para_start pls_integer;  -- start of "paragraph"
    BEGIN
       infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
       outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
       LOOP
          BEGIN
             utl_file.get_line(infile, buffer);
             IF buffer LIKE 'FOO%' THEN
                b_paragraph_started := TRUE;
                l_para_start := UTL_FILE.FGETPOS(infile) - (length(buffer) + 1);
             END IF;
             IF b_paragraph_started and buffer like '%DE4%' THEN
                b_toprint := TRUE;
             END IF;
             If buffer like 'ZEN%' THEN
                IF b_toprint THEN
                   UTL_FILE.FSEEK(infile, l_para_start);
                   utl_file.get_line(infile, buffer);
                   while buffer not like 'ZEN%' loop
                      utl_file.put_line(outfile,buffer, FALSE);
                      utl_file.get_line(infile, buffer);
                   end loop;
                   utl_file.put_line(outfile,buffer, FALSE);
                end if;
                b_paragraph_started := FALSE;
                b_toprint := false;
                utl_file.fflush(outfile);
             end if;
          EXCEPTION
             WHEN no_data_found THEN
                EXIT;
             END;
       END LOOP;
       utl_file.fclose(infile);
       utl_file.fclose(outfile);
    END my_app2;
    

    Test:

    SQL> !cat mytst.txt
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    DE4.2 THIS IS MY FOURTH LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    
    FOO/234E53LLID again
    THIS IS MY second SECOND LINE
    THIS IS MY second THIRD LINE
    DE4.2 THIS IS MY second FOURTH LINE
    THIS IS MY second FIFTH LINE
    ZEN/DING3434343 again
    
    SQL> exec my_app2;
    
    PL/SQL procedure successfully completed.
    
    SQL> !cat out.txt
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    DE4.2 THIS IS MY FOURTH LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    FOO/234E53LLID again
    THIS IS MY second SECOND LINE
    THIS IS MY second THIRD LINE
    DE4.2 THIS IS MY second FOURTH LINE
    THIS IS MY second FIFTH LINE
    ZEN/DING3434343 again
    

    You may need to change the length (buffer) + 1 depending on your platform and if you want a blank line s NLE out paragraphs, add another call to put_line after that outside of the loop in the fi l_toprint block.

    John

  • Convert a text into an MP3 file in the Alex voice?

    Hello world

    Is it possible to convert a text file to an MP3 file in the Alex voice on the iPad or Windows PC?  Apparently, this can be done on the Mac.

    I use the Alex voice to read the text all the time on my iPad, and I would like to be able to save the text as an MP3 file so that I can play on other devices (for example, iPod, Windows PCs).  So far I could not find built into the functionality of the iPad or iPad app that would allow me to do.  I also was not able to find any program for Windows PC that does this.

    I found various programs that convert text into MP3 files (for example, TextAloud3, Voice Reader home 15, etc.), but I like the Alex voice much more than the voice in these programs, so I really hope that there is a way to do it on the iPad or Windows PC.

    Thank you in advance for your help!

    N ° you can't do on an iPad. I don't think there's a way to do it on a Windows PC since voice is the property of Apple, as far as I know.

  • Automatic text in CS4 flow doesn't flow into master text frames as it did in CS3... What gives?

    I just changed CS3 CS4.

    C3S, I created a master page with a block of empty text. Then I when I use the thing in function of flow auto-text on a standard page, it would automatically generate new pages and throw in my block of text type text, I created the master page. Now, in CS4 when I do exactly the same thing, he throws some text in the new text blocks and NOT my text block type that I created on the mastr page. What gives?

    BTW, these aren't virgins docs I open but models that are already set up and in use by my company, so I can't start a new doc.

    Will there be a new parameter in CS4 that prevents the text flowing into the block of text type that I created the master page?

    It's incredibly disruptive and frustratiing, please help... I just went back in CS3 ID for l ' moment.

    The main text blocks must be EMPTY.

  • The call of the dynamic text file javascript function

    This is probably a fairly easy problem, but it seems to be confusing me. I have a JavaScript function just opens a new window, wrote a little html and captures an image to place in the window. The javascript is on the page my .swf into flash. It looks like this:

    < script type = "text/JavaScript" >
    <!--
    function newWindowLand (picWinLand) {}
    bigpicWindowLand = window.open (", ' picWinLand ',' height = 500, width is 660, scrollbars = no, status = yes, resizable = no" ")
    bigpicWindowLand.document.write ("image window test < html > < head > < title > < /titre > < body bgcolor = #FFFFFF leftmargin = 0 topmargin = 0 marginWidth = 0 marginheight = 0 > < Center > < img src =" + picWinLand + "height = 480 width = 640 border = 0 > < / html >" "")
    bigpicWindowLand.document.close)
    bigpicWindowLand.focus)
    }
    ->
    < /script >

    I got this link in my html page:

    (< a href="javascript:;newWindowLand('static_images/news/test_image.jpg')" > link < /a > test "

    and it works very well. I then pasted this link in my dynamic text file that loads into my .swf, and nothing happens. I see the text "test" and it seems to be clickable, but if we click on it I get nothing. Am I missing something really obvious here? TIA...

    I got mine to work. The problem was the ":;" in my anchor tag original-just need to be a colon by itself. I got it in fact that at the beginning, but my test showed that it works because of the new security with Flash 8 gibberish. As soon as I downloaded everything and lived test everything has worked well...

  • Another key or a function Index Question

    Hello

    I have the following sample tables:
    CREATE THE TABLE1 TABLE:
    (
    NUMBER OF RESOURCE_KEY
    CONSTRAINT TABLE_PK
    KEY ELEMENTARY SCHOOL
    (RESOURCE_KEY)
    )
    /
    CREATE THE TABLE2 TABLE
    (
    RESOURCE2_KEY INTEGER NOT NULL,
    RESOURCE1_KEY INTEGER NOT NULL,
    CONSTRAINT TABLE2_PK
    UNIQUE (RESOURCE2_KEY, RESOURCE1_KEY)
    USING INDEX
    TABLESPACE TRACERT_DATA,
    CONSTRAINT TABLE1_FK1
    FOREIGN KEY (RESOURCE1_KEY)
    REFERENCES TABLE1 (RESOURCE_KEY)
    ON DELETE CASCADE,
    CONSTRAINT TABLE1_FK2
    FOREIGN KEY (RESOURCE2_KEY)
    REFERENCES TABLE1 (RESOURCE_KEY)
    ON DELETE CASCADE
    )
    /
    Insert into TABLE1
    (RESOURCE_KEY)
    Values
    (1) ;
    Insert into TABLE1
    (RESOURCE_KEY)
    Values
    (2) ;
    COMMIT;


    Now comes the tricky part. I want only one of the following inserts to work:
    Insert into TABLE2
    (RESOURCE2_KEY, RESOURCE1_KEY)
    Values
    (1, 2);
    Insert into TABLE2
    (RESOURCE2_KEY, RESOURCE1_KEY)
    Values
    (2: 1);
    COMMIT;


    Any suggestions?

    You can use a single function index based.

    SQL> create table t (x number, y number);
    
    Table created.
    
    SQL> create unique index t_idx on t (greatest(x, y), least(x,y));
    
    Index created.
    
    SQL> insert into t values (2, 1);
    
    1 row created.
    
    SQL> insert into t values (1, 2);
    insert into t values (1, 2)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (TEST.T_IDX) violated
    
    SQL> rollback;
    
    Rollback complete.
    
    SQL> insert into t values (1, 2);
    
    1 row created.
    
    SQL> insert into t values (2, 1);
    insert into t values (2, 1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (TEST.T_IDX) violated
    

Maybe you are looking for

  • inactive microphone

    All of a sudden my microphone is not using the Skype software or natually.  I have windows xp. The microphone is plugged into the outlet.  I tried to install the audio drivers.  Please help and advise. Thank you novice bee

  • Google Chrome does not totally with windows. Now, I can't uninstall Google Chrome. What can I do?

    Detection of interactive services of dialogue - a program can't display a message on your deck plan. This is a message I get on Google Chrome. Files\Google\Chrome\Application\15.0.874.120\Chrome.dllWhat should I do to fix this?

  • I tried to uninstall Explorer 8, should I install Explorer 7 until I have uninstall 8?

    I want to uninstall Internet Explorer 8, should I install Internet Explorer7 before attempting to uninstall? I'm also having a problem with XP, Windows Media Player 11 after I installed it I can not play CD and my player lists are missing?

  • Teredo Tunneling adapter problem

    After you have finished troubleshooting, it is said to be the driver has not been installed correctly. I looked at the details, and said he was there was a problem with the PnP devices. Perhaps it shouldn't be a big problem except now my printer seem

  • Cannot change the default input language

    Hi all I recently had to reinstall windows because my failed (second one) these SSD SSD are not very reliable. but this is not why I'm here. I have windows 7 ultimate 64-bit, and when I installed it I choose 101 Arabic as the input language. After co