Indexing a set of data to take an average

hi,
I am measuring the resistance vs temperature. For this, 10 times resistance are measured and average of this data is plotted vs temperature which is also averaged.
I couldn't do that unfortunately. How can I do that?
thanks
Attachments:
Capture.JPG ‏98 KB

I have attached vi '. There are 2 cycle to check. But I need 10.
Best.
Attachments:
Read Condition_SC_sub.vi ‏74 KB
Stability_control - 5K.vi ‏28 KB
Stability_control.vi ‏30 KB

Similar Messages

  • Problem while having a large set of data to work on!

    Hi,
    I am facing great problem with processing large set of data. I have a requirement in which i'm supposed to generate a report.
    I have a table and a MView, which i have joined to reduce the number of records to process. The MView holds 200,00,000 records while the table 18,00,000. Based on join conditions and where clause i'm able to break down the useful data to approx 4,50,000 and i'm getting 8 of my report columns from this join. I'm dumping these records into the table from where i'll be generating the report by spooling.
    Below is the block which takes 12mins to insert into the report table MY_ACCOUNT_PHOTON_DUMP:
    begin
    dbms_output.put_line(to_char(sysdate,'hh24:mi:ss'));
    insert into MY_ACCOUNT_PHOTON_DUMP --- Report table
    (SUBSCR_NO, ACCOUNT_NO, AREA_CODE, DEL_NO, CIRCLE, REGISTRATION_DT, EMAIL_ID, ALT_CNTCT_NO)
    select crm.SUBSCR_NO, crm.ACCOUNT_NO, crm.AREA_CODE, crm.DEL_NO, crm.CIRCLE_ID,
    aa.CREATED_DATE, aa.EMAIL_ID, aa.ALTERNATE_CONTACT
    from MV_CRM_SUBS_DTLS crm, --- MView
    (select /*+ ALL_ROWS */ A.ALTERNATE_CONTACT, A.CREATED_DATE, A.EMAIL_ID, B.SUBSCR_NO
    from MCCI_PROFILE_DTLS a, MCCI_PROFILE_SUBSCR_DTLS b
    where A.PROFILE_ID = B.PROFILE_ID
    and B.ACE_STATUS = 'N'
    ) aa --- Join of two tables giviing me 18,00,000 recs
    where crm.SUBSCR_NO = aa.SUBSCR_NO
    and crm.SRVC_TYPE_ID = '125'
    and crm.END_DT IS NULL;
    INTERNET_METER_TABLE_PROC_1('MCCIPRD','MY_ACCOUNT_PHOTON_DUMP'); --- calling procedure to analyze the report table
    COMMIT;
    dbms_output.put_line(to_char(sysdate,'hh24:mi:ss'));
    end; --- 12 min 04 secFor the rest of the 13 columns required i am running a block which has a FOR UPDATE cursor on the report table:
    declare
    cursor cur is
    select SUBSCR_NO, ACCOUNT_NO, AREA_CODE, DEL_NO,
    CIRCLE, REGISTRATION_DT, EMAIL_ID, ALT_CNTCT_NO
    from MCCIPRD.MY_ACCOUNT_PHOTON_DUMP --where ACCOUNT_NO = 901237064
    for update of
    MRKT_SEGMNT, AON, ONLINE_PAY, PAID_AMNT, E_BILL, ECS, BILLED_AMNT,
    SRVC_TAX, BILL_PLAN, USAGE_IN_MB, USAGE_IN_MIN, NO_OF_LOGIN, PHOTON_TYPE;
    v_aon VARCHAR2(10) := NULL;
    v_online_pay VARCHAR2(10) := NULL;
    v_ebill VARCHAR2(10) := NULL;
    v_mkt_sgmnt VARCHAR2(50) := NULL;
    v_phtn_type VARCHAR2(50) := NULL;
    v_login NUMBER(10) := 0;
    v_paid_amnt VARCHAR2(50) := NULL;
    v_ecs VARCHAR2(10) := NULL;
    v_bill_plan VARCHAR2(100):= NULL;
    v_billed_amnt VARCHAR2(10) := NULL;
    v_srvc_tx_amnt VARCHAR2(10) := NULL;
    v_usg_mb NUMBER(10) := NULL;
    v_usg_min NUMBER(10) := NULL;
    begin
    dbms_output.put_line(to_char(sysdate,'hh24:mi:ss'));
    for rec in cur loop
    begin
    select apps.TTL_GET_DEL_AON@MCCI_TO_PRD591(rec.ACCOUNT_NO, rec.DEL_NO, rec.CIRCLE)
    into v_aon from dual;
    exception
    when others then
    v_aon := 'NA';
    end;
    SELECT DECODE(COUNT(*),0,'NO','YES') into v_online_pay
    FROM TTL_DESCRIPTIONS@MCCI_TO_PRD591
    WHERE DESCRIPTION_CODE IN(SELECT DESCRIPTION_CODE FROM TTL_BMF_TRANS_DESCR@MCCI_TO_PRD591
    WHERE BMF_TRANS_TYPE
    IN (SELECT BMF_TRANS_TYPE FROM
    TTL_BMF@MCCI_TO_PRD591 WHERE ACCOUNT_NO = rec.ACCOUNT_NO
    AND POST_DATE BETWEEN
    TO_DATE('01-'||TO_CHAR(SYSDATE,'MM-YYYY'),'DD-MM-YYYY') AND SYSDATE
    AND DESCRIPTION_TEXT IN (select DESCRIPTION from fnd_lookup_values@MCCI_TO_PRD591 where
    LOOKUP_TYPE='TTL_ONLINE_PAYMENT');
    SELECT decode(count( *),0,'NO','YES') into v_ebill
    FROM TTL_CUST_ADD_DTLS@MCCI_TO_PRD591
    WHERE CUST_ACCT_NBR = rec.ACCOUNT_NO
    AND UPPER(CUSTOMER_PREF_MODE) ='EMAIL';
    begin
    select ACC_SUB_CAT_DESC into v_mkt_sgmnt
    from ttl_cust_dtls@MCCI_TO_PRD591 a, TTL_ACCOUNT_CATEGORIES@MCCI_TO_PRD591 b
    where a.CUST_ACCT_NBR = rec.ACCOUNT_NO
    and a.market_code = b.ACC_SUB_CAT;
    exception
    when others then
    v_mkt_sgmnt := 'NA';
    end;
    begin
    select nvl(sum(TRANS_AMOUNT),0) into v_paid_amnt
    from ttl_bmf@MCCI_TO_PRD591
    where account_no = rec.ACCOUNT_NO
    AND POST_DATE
    BETWEEN TO_DATE('01-'||TO_CHAR(SYSDATE,'MM-YYYY'),'DD-MM-YYYY')
    AND SYSDATE;
    exception
    when others then
    v_paid_amnt := 'NA';
    end;
    SELECT decode(count(1),0,'NO','YES') into v_ecs
    from ts.Billdesk_Registration_MV@MCCI_TO_PRD591 where ACCOUNT_NO = rec.ACCOUNT_NO
    and UPPER(REGISTRATION_TYPE ) = 'ECS';
    SELECT decode(COUNT(*),0,'PHOTON WHIZ','PHOTON PLUS') into v_phtn_type
    FROM ts.ttl_cust_ord_prdt_dtls@MCCI_TO_PRD591 A, ttl_product_mstr@MCCI_TO_PRD591 b
    WHERE A.SUBSCRIBER_NBR = rec.SUBSCR_NO
    and (A.prdt_disconnection_date IS NULL OR A.prdt_disconnection_date > SYSDATE )
    AND A.prdt_disc_flag = 'N'
    AND A.prdt_nbr = b.product_number
    AND A.prdt_type_id = b.prouduct_type_id
    AND b.first_level LIKE 'Feature%'
    AND UPPER (b.product_desc) LIKE '%HSIA%';
    SELECT count(1) into v_login
    FROM MCCIPRD.MYACCOUNT_SESSION_INFO a
    WHERE (A.DEL_NO = rec.DEL_NO or A.DEL_NO = ltrim(rec.AREA_CODE,'0')||rec.DEL_NO)
    AND to_char(A.LOGIN_TIME,'Mon-YYYY') = to_char(sysdate-5,'Mon-YYYY');
    begin
    select PACKAGE_NAME, BILLED_AMOUNT, SERVICE_TAX_AMOUNT, USAGE_IN_MB, USAGE_IN_MIN
    into v_bill_plan, v_billed_amnt, v_srvc_tx_amnt, v_usg_mb, v_usg_min from
    (select rank() over(order by STATEMENT_DATE desc) rk,
    PACKAGE_NAME, USAGE_IN_MB, USAGE_IN_MIN
    nvl(BILLED_AMOUNT,'0') BILLED_AMOUNT, NVL(SRVC_TAX_AMNT,'0') SERVICE_TAX_AMOUNT
    from MCCIPRD.MCCI_IM_BILLED_DATA
    where (DEL_NUM = rec.DEL_NO or DEL_NUM = ltrim(rec.AREA_CODE,'0')||rec.DEL_NO)
    and STATEMENT_DATE like '%'||to_char(SYSDATE,'Mon-YY')||'%')
    where rk = 1;
    exception
    when others then
    v_bill_plan := 'NA';
    v_billed_amnt := '0';
    v_srvc_tx_amnt := '0';
    v_usg_mb := 0;
    v_usg_min := 0;
    end;
    -- UPDATE THE DUMP TABLE --
    update MCCIPRD.MY_ACCOUNT_PHOTON_DUMP
    set MRKT_SEGMNT = v_mkt_sgmnt, AON = v_aon, ONLINE_PAY = v_online_pay, PAID_AMNT = v_paid_amnt,
    E_BILL = v_ebill, ECS = v_ecs, BILLED_AMNT = v_billed_amnt, SRVC_TAX = v_srvc_tx_amnt,
    BILL_PLAN = v_bill_plan, USAGE_IN_MB = v_usg_mb, USAGE_IN_MIN = v_usg_min, NO_OF_LOGIN = v_login,
    PHOTON_TYPE = v_phtn_type
    where current of cur;
    end loop;
    COMMIT;
    dbms_output.put_line(to_char(sysdate,'hh24:mi:ss'));
    exception when others then
    dbms_output.put_line(SQLCODE||'::'||SQLERRM);
    end;The report takes >6hrs. I know that most of the SELECT queries have ACCOUNT_NO as WHERE clause and can be joined, but when i joining few of these blocks with the initial INSERT query it was no better.
    The individual queries within the cursor loop dont take more then 0.3 sec to execute.
    I'm using the FOR UPDATE as i know that the report table is being used solely for this purpose.
    Can somebody plz help me with this, i'm in desperate need of good advice here.
    Thanks!!
    Edited by: user11089213 on Aug 30, 2011 12:01 AM

    Hi,
    Below is the explain plan for the original query:
    select /*+ ALL_ROWS */  crm.SUBSCR_NO, crm.ACCOUNT_NO, ltrim(crm.AREA_CODE,'0'), crm.DEL_NO, >crm.CIRCLE_ID
    from MV_CRM_SUBS_DTLS crm,
            (select /*+ ALL_ROWS */  A.ALTERNATE_CONTACT, A.CREATED_DATE, A.EMAIL_ID, B.SUBSCR_NO
            from MCCIPRD.MCCI_PROFILE_DTLS a, MCCIPRD.MCCI_PROFILE_SUBSCR_DTLS b
            where A.PROFILE_ID = B.PROFILE_ID
            and   B.ACE_STATUS = 'N'
            ) aa
    where crm.SUBSCR_NO    = aa.SUBSCR_NO
    and   crm.SRVC_TYPE_ID = '125'
    and   crm.END_DT IS NULL
    | Id  | Operation              | Name                     | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT       |                          |  1481K|   100M|       |   245K  (5)| 00:49:09 |
    |*  1 |  HASH JOIN             |                          |  1481K|   100M|    46M|   245K  (5)| 00:49:09 |
    |*  2 |   HASH JOIN            |                          |  1480K|    29M|    38M| 13884   (9)| 00:02:47 |
    |*  3 |    TABLE ACCESS FULL   | MCCI_PROFILE_SUBSCR_DTLS |  1480K|    21M|       |  3383  (13)| 00:00:41 |
    |   4 |    INDEX FAST FULL SCAN| SYS_C002680              |  2513K|    14M|       |  6024   (5)| 00:01:13 |
    |*  5 |   MAT_VIEW ACCESS FULL | MV_CRM_SUBS_DTLS_08AUG   |  1740K|    82M|       |   224K  (5)| 00:44:49 |
    Predicate Information (identified by operation id):
       1 - access("CRM"."SUBSCR_NO"="B"."SUBSCR_NO")
       2 - access("A"."PROFILE_ID"="B"."PROFILE_ID")
       3 - filter("B"."ACE_STATUS"='N')
       5 - filter("CRM"."END_DT" IS NULL AND "CRM"."SRVC_TYPE_ID"='125')Whereas for the modified MView query, the plane remains the same:
    select /*+ ALL_ROWS */ crm.SUBSCR_NO, crm.ACCOUNT_NO, ltrim(crm.AREA_CODE,'0'), crm.DEL_NO, >crm.CIRCLE_ID
    from    (select * from MV_CRM_SUBS_DTLS
             where SRVC_TYPE_ID = '125'
             and   END_DT IS NULL) crm,
            (select /*+ ALL_ROWS */  A.ALTERNATE_CONTACT, A.CREATED_DATE, A.EMAIL_ID, B.SUBSCR_NO
            from MCCIPRD.MCCI_PROFILE_DTLS a, MCCIPRD.MCCI_PROFILE_SUBSCR_DTLS b
            where A.PROFILE_ID = B.PROFILE_ID
            and   B.ACE_STATUS = 'N'
            ) aa
    where crm.SUBSCR_NO  = aa.SUBSCR_NO
    | Id  | Operation              | Name                     | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT       |                          |  1481K|   100M|       |   245K  (5)| 00:49:09 |
    |*  1 |  HASH JOIN             |                          |  1481K|   100M|    46M|   245K  (5)| 00:49:09 |
    |*  2 |   HASH JOIN            |                          |  1480K|    29M|    38M| 13884   (9)| 00:02:47 |
    |*  3 |    TABLE ACCESS FULL   | MCCI_PROFILE_SUBSCR_DTLS |  1480K|    21M|       |  3383  (13)| 00:00:41 |
    |   4 |    INDEX FAST FULL SCAN| SYS_C002680              |  2513K|    14M|       |  6024   (5)| 00:01:13 |
    |*  5 |   MAT_VIEW ACCESS FULL | MV_CRM_SUBS_DTLS_08AUG   |  1740K|    82M|       |   224K  (5)| 00:44:49 |
    Predicate Information (identified by operation id):
       1 - access("CRM"."SUBSCR_NO"="B"."SUBSCR_NO")
       2 - access("A"."PROFILE_ID"="B"."PROFILE_ID")
       3 - filter("B"."ACE_STATUS"='N')
       5 - filter("CRM"."END_DT" IS NULL AND "CRM"."SRVC_TYPE_ID"='125')Also took your advice and tried to merge all the queries into single INSERT SQL, will be posting the results shortly.
    Edited by: BluShadow on 30-Aug-2011 10:21
    added {noformat}{noformat} tags.  Please read {message:id=9360002} to learn to do this yourself                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • af:table with 2 sets of data

    Hi All,
    I have an af table below thats being populated via #{jpabean.myEntityList}. My requirement is to have a search function on this. I created an input text as below that takes the search value, and set the return data which will be #{jpabean.myEmplidList}, I just want to know how to populate my table with this second set of data
    <af:table value="#{jpabean.myEntityList}" var="row" rowBandingInterval="0" id="t1"
    rowSelection="single" columnSelection="multiple"
    columnStretching="column:c4" allDetailsEnabled="true"
    disableColumnReordering="true" fetchSize="100" styleClass="AFStretchWidth"
    partialTriggers="cb2">
    <af:inputText label="Emplid" id="it1" autoSubmit="true"
    valueChangeListener="#{jpabean.valueChanged}"/>

    Hi,
    i will suggest to create search form using ebj/jpa or pojo data control. pls refer the below links for guidence.
    http://www.oracle.com/technetwork/developer-tools/jdev/index-155270.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/73-handson-wsdc-321927.pdf
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/37-adf-pojo-pagination-169179.pdf
    ~Abhijit

  • How do I fix the format of plot lines for an arbitrary number of sets of data plotted on the same x-y graph?

    I have written a VI to control an LCR meter and perform sweep functions. I have two x-y graphs on my front panel (one for each of 2 measured parameters). The VI is designed with a button to take a measurement, plot the data, and then wait for another event (like write data, clear plot, or measure again). The user can take simultaneous measurements and these are plotted on top of the data already there in the same x-y graphs (using an array of clusters with shift registers). There is no limit on how many sets of data can be on the x-y graph. 
    Now, my issue is in formatting the plot lines (color, thickness, marker type). I can fix the first plot line by adjusting the parameters of the x-y graph. However, I also want to control the format of all consecutive plot lines. How can I do this for an arbitrary number of lines? The main thing I want to do is to have all of them show the square marker type (the default is no marker type, just a line). 
    Thanks!

    Hi maximum23,
    You can use properties of plot to format the plot lines. You just have to select Active plot using property and then select color and line width etc..
    You can define color and width etc parameter by asking user or you can just make them default.
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • Problem with JFMERGE using the last set of data on all form sets

    b Here is the scenario...
    I have a file of data in character delimited format. Each record needs to produce the same set of forms. I used the Visual Transformation Editor to define the field nominated data file, including the ^form statements. The transformation agent processes the file of multiple records just fine. I get a file from JFTRANS that contains the set of data & form statements repeated for each record in the file.
    Great so far.
    b Here is the problem...
    Unfortunately, the print agent is repeating the same set of data on every copy of the set of forms that is printed. It uses the data from the last set of forms to be printed.
    b Additional information...
    For ease of building the field nominated file by our custom client program we have standardized on using GLOBAL fields. Therefore, our DAT files contain all the ^global declarations with all the necessary ^form statements at the end. I used the transformation editor to build the same type of file. Therefore the file going to the print agent looks like:
    ^global name1
    data1
    ^global name2
    data2
    ^form form1
    ^form form2
    ^global name1
    newdata1
    ^global name2
    newdata2
    ^form form1
    ^form form2
    The printed result puts "newdata1" & "newdata2" on both sets of form2. Strangely, the correct data values are showing up on both sets of form1.
    The only difference between the two forms is that form1 is not defined with the fields as global where form2 does define them as global. I removed the global flag from form2 but that didn't change anything.
    I think I know what is occurring. JFMERGE is putting the data elements into the global dictionary and when the same name is in the file the latest data value ends up in the dictionary (thus all the forms print using the last data put into the dictionary). I certainly didn't expect this. I thought it would load the dictionary and print the first set of forms, then reload the dictionary and print the next set of forms. At least that is the way I see it occuring based on the order of things in the DAT file. Based on what is occuring it appears that JFMERGE reads the whole DAT file, building the dictionaries and then processes all the ^form statements.
    b My request for help...
    Does anyone know what I can do (such as insert some command) to get the correct data on the forms?
    It looks like using a fixed record format might do the trick but that isn't an option at this time. As things are right now it looks like I'm going to have to take the data file apart, and make lots of files with one line of data per file.
    I have a time deadline to get this printed so if there isn't a way to make JFMERGE operate as I expected it looks like I'll be doing this by hand. Fortunately, there are only 250-300 data lines. Future jobs could have thousands of data lines so if there isn't a way to do it with a multi-line data file I'll have someone create a program for splitting the original file up (and adding the ^job line).

    We don't use subforms so some of what you suggest isn't effective for us. Our forms are a duplication of the paper forms and are not dynamic. We design each form separately and our custom filler software (that builds the DAT file) uses a database with the required forms for each print job defined within it.<br /><br />Since we don't have subforms, our simple method of printing is to declare as GLOBAL all the unique fields used on all the forms to be printed followed by the ^form commands. It was a simple & straightforward method for us to do better than 500 print jobs over that past couple of years. In addition, our custom filler software can easily build the DAT files.<br /><br />Because I need to manually declare all the ^form statements my experience with using ^field is that the form must be declared followed by the appropriate field commands (repeat for all the forms).<br /><br />i <many hours later I continue typing this post><br /><br />Taking the original Transformation Definition File and customizing it for how things need to be when using ^field commands was a time consuming experience (and a learning one). It did the job as I needed but it is an experience I don't want to repeat. There has got to be a better way of building the TDF properly. I'm definately leaning towards a program to split the file into multiple files.<br /><br />Here is what I went through...<br /><br />I did all the editting using Notepad. I changed all ^global to ^field. Then I had to remove the #comment lines. Next was to find any references to fields that had to be global to the top and chang ^field to ^global. Then it was moving the fields around so they were underneath the appropriate ^form statement. Then, since one of the forms was multi-page I had to add the ^page command and sort the fields so they were under the correct page. That was followed by duplicating fields that are used on multiple forms or multiple pages. Then I discovered that the print agent won't do ^page unless "inline processing" is turned off (I did not want to specify the page name as it could change over time) - so I added "^inline off" in front of every ^page. Finally it was removing unecessary field references so the log file would be clean.<br /><br />For those that are interested, the following is an example of my final file. <br /><br />^global nameA<br />data<br />^global nameB<br />data<br />^form nameX<br />^field name1<br />data<br />^field name2<br />data<br />^form nameY<br />^field name1<br />data<br />^field name3<br />data<br />^inline off<br />^page<br />^field name4<br />data<br />^field name1<br />^inline off<br />^page<br />^field name5<br />data<br />^field name6<br />data

  • Cut off some data from a set of data

    I have a set of data our of from power spectral density measurement.
    I want to curve fitting with the data.
    But I want to cut off below a certain frequency.  For instance, the PSD
    data
    contains {(1,10),(2,3),(3,4),(4,3),...} and I want to fit from 3 Hz
    {(3,4),(4,3)...}.
    I tried high pass filter but it does not change.  I tried several ways such
    as
    get time stamp and find the index for the element and remove the array
    using
    'Array'tools.  It cuts off the data sets that I wanted to remove but it
    does
    not remove the frequency values.  So it works like {(1,4),(2,3)....}
    instead of
    {(3,4),(2,3)..}.  Please let me know how I can make this work.
    Thanks.
    Attachments:
    new-PSD-factor-v3.vi ‏522 KB

    Hey Arrow,
    I think I understand your question better now. You'll want to use the "delete from array.vi". It can be found by going to all functions>>Array. You'll need to input the array to be edited, which index to begin deleting from and how many elements to delete. From your application it sounds like you'll want to start from element zero and delete the number of elements that corresponds to 0 through 4 Hz.
    In addition, you'll need to create an array that represents the frequencies you want to plot (4 1000 Hz or your upper limit). There'll need to be one frequency on your x axis for each element in your PSD array. Then bundle the two arrays together and plot them on an XY plot. You can use the "bundle" vi to accomplish this. You can find examples using clusters from help>>find examples. Then navigate to Fundamentals>>Arrays and Clusters.
    Hope this helps out.
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • How to split out a set of data????

    package mitsim_converter;
    import java.io.*;                            // For input & output classes
    import java.util.*;                          // For the Date class
    public class testgod {
    public static void ReadCoFile(String Co_inputFile, String Co_dirName, String Co_outputName)
        throws IOException {
        File aFile = new File(Co_dirName, Co_outputName); // Output Directory location and name
         aFile.createNewFile();         // Now create a new file if necessary
         if(!aFile.isFile())             // Verify we have a file
           System.out.println("Creating " + aFile.getPath() + " failed.");
           return;
    BufferedReader in = new BufferedReader(new FileReader(Co_inputFile));
    BufferedWriter out = new BufferedWriter(new FileWriter(aFile.getPath(), true));
    //Variable declarations
         int a = 0;
         int b = 0;
         int c = 0;
         String text;
       while ((text = in.readLine()) != null)  //multiple line reading
          for(int i = 0; i < text.length(); i++)
              char word = text.charAt(i);
                  if ( word == '{')     //search for the ' { ' charecter
                      a++;              //counting ' { '  unit
          for(int i = 0; i < text.length(); i++)
              char word = text.charAt(i);
                  if ( word == '}')     //search for the ' } ' charecter  
                      b++;              //counting ' } '  unit
          if(a == 1)      //print out the 1st line of a set of data
              String[] sentance = text.split(" ");
              System.out.println(sentance[1]+sentance[3]); 
      if(a == b)        // 1 set of data is counted
          a = 0;        //count the next set of data
          b = 0;
          out.write(System.getProperty("line.separator")); //separate a new set of data
        public testgod() {
        public static void main(String[] args)
      throws IOException
    // Coordinate Table     
           String tra_inputFile = "C:/Documents and Settings/seng/Desktop/testfile/trajectory.txt";     
           String tra_dirName = "C:/Documents and Settings/seng/Desktop/testfile";
           String tra_outputName = "trajectory_output.txt";
           ReadCoFile(tra_inputFile, tra_dirName, tra_outputName);
    } currently i have a set of data as below:
    1 {
    6 0 2 1037.9 24.4187 -5.4961e-05 1
    2 {
    1 0 2 1013.5 24.4187 4.99431e-05 1
    4 0 1 1057.5 24.4187 -2.63508e-05 0
    3 130 264 115.7 14.2425 1.48289e-05 0
    2 136 276 464.7 11.6186 -3.46263e-06 1
    3 {
    1 0 2 989.1 24.4187 -5.4961e-05 1
    4 0 1 1033.1 24.4187 2.13329e-05 0
    5 126 256 1241.4 22.7881 0 0
    3 130 264 101.5 14.2426 5.23758e-07 0
    2 136 276 453.1 11.6186 -3.46263e-06 1
    }i wish to split them and take out the 1st column and 3rd column data, but the my coding fail to do it. may i know how do i can solve for this problem?
    PS: the expected output
    6 2
    1 2
    4 1
    3 264
    2 276
    1 2
    4 1
    5 256
    3 264
    2 276

    import java.util.regex.*;
    public class TestParse {
      public static void main(String[] argv) {
        String testInput = "1 {\n" +
          " 6 0 2 1037.9 24.4187 -5.4961e-05 1\n" +
          "}\n" +
          "2 {\n" +
          " 1 0 2 1013.5 24.4187 4.99431e-05 1\n" +
          " 4 0 1 1057.5 24.4187 -2.63508e-05 0\n" +
          " 3 130 264 115.7 14.2425 1.48289e-05 0\n" +
          " 2 136 276 464.7 11.6186 -3.46263e-06 1\n" +
          "}\n" +
          "3 {\n" +
          " 1 0 2 989.1 24.4187 -5.4961e-05 1\n" +
          " 4 0 1 1033.1 24.4187 2.13329e-05 0\n" +
          " 5 126 256 1241.4 22.7881 0 0\n" +
          " 3 130 264 101.5 14.2426 5.23758e-07 0\n" +
          " 2 136 276 453.1 11.6186 -3.46263e-06 1\n" +
          "}\n";
        Pattern outer =
          Pattern.compile("\\s*(\\d+)\\s*\\{([\\s\\d\\.\\-\\+e]+)\\}");
        Pattern inner = Pattern.compile("LEFT AS EXERCISE");
        Matcher m = outer.matcher(testInput);
        while(m.find()) {
          if (m.groupCount() != 2) {
            System.err.println("Error: found wrong number of groups: " + m.groupCount());
          } else {
            System.out.print("Time: " + m.group(1) + " " + m.group(2));
            Matcher m2 = inner.matcher(m.group(2));
            while(m2.find()) {
              if (m2.groupCount() != 7) {
                System.err.println("Error: found wrong number of groups: " + m2.groupCount());
              } else {
                int i = 0;
                String iDString = m2.group(++i);
                String segmentString = m2.group(++i);
                String laneString = m2.group(++i);
                String positionString = m2.group(++i);
                String speedString = m2.group(++i);
                String accelerationString = m2.group(++i);
                String vehicleTypeString = m2.group(++i);
                System.out.println(
                  "ID: " + iDString + "\n" +
                  "Segment: " + segmentString + "\n" +
                  "Lane: " + laneString + "\n" +
                  "Position: " + positionString + "\n" +
                  "Speed: " + speedString + "\n" +
                  "Acceleration: " + accelerationString + "\n" +
                  "VehicleType: " + vehicleTypeString);
    }

  • How to return a set of data  by using webservice ?

    Hi.
    I am finding how to return a set of data by using java webservice that serves clients written by others such as VB. Net. Please help me !
    Thanks in advance.

    Check the how to on Accessing Oracle9iAS Java Web Service from a .NET Client
    http://otn.oracle.com/sample_code/tech/java/codesnippet/webservices/index.html
    Chandar

  • Best Practices for loading large sets of Data

    Just a general question regarding an initial load with a large set of data.
    Does it make any sense to use a materialized view to aid with load times for an initial load? Or do I simply let the query run for as long as it takes.
    Just looking for advice on what is the common approach here.
    Thanks!

    Hi GK,
    What I have normally seen is:
    1) Data would be extracted from APO Planning Area to APO Cube (FOR BACKUP purpose). Weekly or monthly, depending on how much data change you expect, or how critical it is for business. Backups are mostly monthly for DP.
    2) Data extracted from APO planning area directly to DSO of staging layer in BW, and then to BW cubes, for reporting.
    For DP monthly, SNP daily
    You can also use the option 1 that you mentioned below. In this case, the APO cube is the backup cube, while the BW cube is the one that you could use for reporting, and this BW cube gets data from APO cube.
    Benefit in this case is that we have to extract data from Planning Area only once. So, planning area is available for jobs/users for more time. However, backup and reporting extraction are getting mixed in this case, so issues in the flow could impact both the backup and the reporting. We have used this scenario recently, and yet to see the full impact.
    Thanks - Pawan

  • Datepicker - setting selected date as current date plus 3 days

    Hi,
    I have a datepicker in my visual webpart.
    I want to set by default as "today's date + 3 days".
    Example: if today is 25 Feb, then the datepicker should have selected date as 28
    I am aware of this:
    DTDefaultDate.SelectedDate = DateTime.Today;
    How to add the 3 days to it?
    Thanks

    Hi,
    If you want to set the DateTimeControl to a specific date, please take the code below for a try:
    DateTimeControl1.SelectedDate = DateTime.Today.AddDays(3);
    More information about DateTime.AddDays Method:
    https://msdn.microsoft.com/en-us/library/system.datetime.adddays(v=vs.110).aspx
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • Same set of data should print twice on same page in SAP SCRIPT

    Hi Experts,
    I come across a requirement where I need same set of data in sap script should print twice as it is on same page.
    and if first page overflow, then same scenario should continue till complete data is printed. Basically main window data should print twice in two blocks on same page.
    E.g.
    If I have 10 line item which is to be printed on top window on  first page. Now I want that same 10 lines should be printed in a block below the first block. Data should flow similarly across multiple pages.
    Hope my question is pretty clear. I am expecting suitable answers from experts.
    Thanks in advance.
    Regards,
    Vijay

    Hi
    I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
    If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more. 
    Best regards
    JD

  • GOOP VI "set modified data" locks LabVIEW for seconds

    I use GOOP.
    Sometimes the VI "set modified data" (from now on SMD) of one of my GOOP classes is locked for about 15 seconds, while CPU raises to 100%.
    It happens when SMD is called from a certain VI. It does not happen every time SMD is called from this VI.
    As I have understood GOOP, the VI "get data to modify" tries to access/lock the data members - which might take a while if the the data members are currently locked by another VI - but SMD only sets the data members and removes the lock, which should always be possible (at least if the data set has been locked by this VI, which - yes! - is the case).
    Other VIs are running in parallell, maybe they could cause the CPU to raise to 100% but I find it strange th
    at it only happens when SMD is called from this particular VI.
    I think I need a better understanding for how SMD really works.
    Regards

    Hi,
    Your description of how "get data to modify" (from now on called GDM) and "set modified data" works is correct and you have fully understand how it all works. The only VI that actually may wait is the "get data to modify" (happens if the data for the object is locked by something running in parallell as you describe). The GDM is however reentrant so that it really will be able to wait for seconds (specified by the timeout) and also letting other process wait as well using the GDM. The SDM is not reentrant (does not have to) and should really execute fast (set data and unlock) and never hold execution, just as you describe.
    Are you absolutly sure that it is the SMD that cause the CPU to freak out? Maybe the fact that you unlock the data releases ano
    ther part of your program that were "hanging on the lock" and the problem is actually in another part of the program. Do you have some exceptional large size of your data? Do you somehow elaborate with VI priorities and/or reentrant VIs. This might sometimes really cause strange situations. The situation you describe looks more like a "race" problem.
    The SDM problem you describe is new to me and I have never encounted it. Would it be possible for you to attach some LV code example showing the phenomenon?
    Best regards,
    Mattias Ericsson
    Endevo Sweden
    (member of the GOOP developer team)

  • Return set of data from function

    Dear All
    How can i return set of data from from funtion into database?
    Thanks

    http://asktom.oracle.com/tkyte/ResultSets/index.html
    http://www.oracle-base.com/articles/8i/UsingRefCursorsToReturnRecordsets.php

  • Copy structure of one report to another but with new set of data providers

    Hi,
    I have a requirement to copy the entire structure of a report into another new report but the new report will have a new set of data providers.
    How can we achieve this in BO V5.1.8?
    Thanks in Advance for your help.

    Hi,
    First thing first Take a copy of existing report,
    1.Open the report in edit mode.
    2.Click on the edit query.
    3.Click on the properties tab.
    4.Click on the universe name and change the universe with the new one.
    5.Now map the dimentions and measure of the new data provider to the old one.
    6.Run the report.
    Hope this will help you.
    Cheer,
    Ravichandra K

  • 11g BPM - Setting instance data of a running process instance

    Hi,
    What is the recommended pattern for interrupting a running process instance and changing an instance variable (data object) ?
    Scenario is:
    - process instance is launched with an interactive to look at the instance data
    - an event is triggered, effectively interrupting the instance and changing the instance data
    - next time the user opens the screen for the interactive the data has changed
    Any help much appreciated.
    cheers
    Tony

    Hi Dan,
    Hope all is good with you. Thanks for the response.
    I am using 11.1.1.6 and have tried a few things, one of which was using an event subprocess and correlations but it didnt change the Data Object as I expected. Maybe I got something wrong and will try again. So you expect the following to work:
    - Create a simple process with one string data object, a correlation and one interactive showing the data object.
    - Map the correlation to an input parameter
    - Set the string data object to some initial value
    - Create an event subprocess of the above in the automatic handler swimlane (starts with a message and ends with nothing)
    - have the implementation of the start message take a string and an id
    - map the id to the correlation
    - map the string to the data object in the subprocess
    - Create the simple process from Enterprise Manager passing in a correlation id
    - View the interactive in the BPM Workspace and see the initial string
    - Use EM to fire the event subprocess passing the same correlation id and a new string
    - View the interactive in the BPM Workspace and see the new string
    so, if you set the data object in the event sub process, it is the same value as the initial instance ? or have I misunderstood ?
    I will give it another go, just checking my understanding...
    cheers
    Tony

Maybe you are looking for