Need help on how to construct proper data structure using vector

I have several data files need to be loaded to my application. The data file has only 2 columns: "mean" and "standard deviation". The data file is looking like following:
mean standard deviation
217.0 27.3
312.1 31.5
I used two vectors to store the mean data and standard deviation data.
Vector meanVec = new Vector();
Vector stdVec = new Vector();
the file is loaded once a time. so how to make a vector of vector to store the data like a matrix?
In another word, when multiple files need to be loaded, how can I keep track and store these data to display in two table (or files) which can display mean data from all the files and std from all files, like the following:
table1 or file1
mean1 mean2
217.0 282.3
table2 or file2
std1 std2
27.3 27.9
Any suggestion is greatly appreciated!

If your application doesn't require to keep track of which mean (or std.dev.) values come from which file, whatever you are doing is just fine.
Use ArraList in place of Vector, as Vector being part of older collection framework is avoided in newer programs (as far as I know).
While reading each file line by line in a loop, store the first value on each line in one list and the second value in the other. After reading all the files, you would have two lists containing the mean and std. dev. values.

Similar Messages

  • Need help on how to create the simple mapping using ORACLE DATA INTEGRATOR

    Hi guys,
    am new to learn odi.. please share me or steps how to develop the simple mapping using ODI...

    Hi,
    I am a newbie to Oracle Data Integrator as well. You should have a look here first; http://www.business-intelligence-quotient.com/?p=379
    Try to play around with ODI and then come back if you have specific questions. You should better move to this ODI-forum; Data Integrator
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • Need help on How to delete duplicate data

    Hi All
    I need your help in finding the best way to delete duplicate data from a table.
    Table is like
    create table table1 (col1 varchar2(10), col2 varchar2(20), col3 varchar2(30));
    Insert into table1 ('ABC', 'DEF','FGH');
    Insert into table1 ('ABC', 'DEF','FGH');
    Insert into table1 ('ABC', 'DEF','FGH');
    Insert into table1 ('ABC', 'DEF','FGH');
    Now I want a sql statement which will delete the duplicate rows and leaves 1 row of that data in the table. ie.in the above example delete 3 rows of duplicate data and leave a row of that data in the table. My oracle version is 8i.
    Appreciate your help in advance.

    Either of these will work, the best approach will depend on how big the table is, and how many duplicates there are.
    SQL> SELECT * FROM table1;
    COL1       COL2                 COL3
    ABC        DEF                  FGH
    ABC        DEF                  FGH
    ABC        DEF                  FGH
    ABC        DEF                  FGH
    ABC        DEF                  IJK
    BCD        EFG                  HIJ
    BCD        EFG                  HIJ
    SQL> DELETE FROM table1 o
      2  WHERE rowid <> (SELECT MAX(rowid)
      3                  FROM table1 i
      4                  WHERE o.col1 = i.col1 and
      5                        o.col2 = i.col2 and
      6                        o.col3 = i.col3);
    4 rows deleted.
    SQL> SELECT * FROM table1;
    COL1       COL2                 COL3
    ABC        DEF                  FGH
    ABC        DEF                  IJK
    BCD        EFG                  HIJ
    SQL> ROLLBACK;
    Rollback complete.
    SQL> CREATE TABLE table1_tmp AS
      2  SELECT DISTINCT * FROM table1;
    Table created.
    SQL> TRUNCATE TABLE table1;
    Table truncated.
    SQL> INSERT INTO table1
      2  SELECT * FROM table1_tmp;
    3 rows created.
    SQL> SELECT * FROM table1;
    COL1       COL2                 COL3
    ABC        DEF                  FGH
    ABC        DEF                  IJK
    BCD        EFG                  HIJThere are other approaches as well (e.g. see the EXCEPTIONS INTO clause of the ALTER TABLE command), but these are the most straightforward.
    HTH
    John

  • I need help in "HOW TO EXTEND THE DATA TYPE SYSTEM"......

    Hi All,
    I need to add new data type like SDO_GEOMETRY in spatial Oracle.
    I don't mean the User-Defined Datatype but new datatype embed in the database.
    I read the Data Cartridge Developer's Guide but it has info how to use more efficiently UDT through indexes.
    Anybody used the “Type System” under Databases and Extensibility Services?
    It might be written in C++ or Java but I do not know how.
    Any hints and help will be appreciated.
    Thanks,

    > In Figure 1-1 Oracle Services, there is a "Type System" as Oracle Services.
    The "Type System" is merely a compartmentalising the data type handling and implementation code/modules in Oracle.
    This covers all types. Oracle native types, user defined types (UDTs), etc.
    Saying that you want to create a new type in the "Type System" is basically saying you want to use the CREATE TYPE SQL command in Oracle.
    > So, I want new_type1 and new_type2 behave like other built-in types, just the way
    SDO_GEOMETRY works in Oracle Spatial Cartridge.
    Not familiar with the SDO_GEOMETRY. Why do you mention this type specifically? What do you want to do similar?
    > I have already done it with user-defined types. Now I need to do this way so that I can
    compare and contrast in terms of speed, space...etc for part of my research.
    Hmm.. I'm not sure what you are trying to compare ito of a UDT and Data Cartridge extensions. It is not one or the other. What research is this if I may ask?
    Simplistically you extend the Type System with a new UDT/ADT. And there you have a new type data can be used in the SQL Engine and the PL/SQL engine. The OCI (Oracle Call Interface) supports such types via the OCI object API calls - which means this new type can also be used from Oracle clients written in Delphi, C++, Java, etc.
    That new type can be a complex type. This type may need specific management code (memory management, context management, internationalisation, etc). To support this you can extend the UDT/ADT further by developing Cartridge Basic Service interfaces for the type - designing and writing management code to, for example, support specific internationalisation requirements when dealing with multibyte character sets.
    You can also extend the UDT/ADT to be custom managed ito indexing, determining query optimisation, computing costs of custom methods/functions/operators on this custom data type. These extensions are done by developing Data Cartridge interfaces for the type.
    Thus I cannot see what you are trying to compare. It is not one layer/interface versus another. These layers exist for all Oracle types (in the Type System). Oracle not only allows you to add to the top layer by adding/defining a new data type. It also allows you to customise (if needed) the layers below it.

  • I Need help on how to write a simulation program using Java

    I am currently working on my final project and i will be grateful if i can get any help on the needed resources that i will require for my code

    Benny,
    If that means you want someone to work for you, then you better have deep pockets, most of the developers' time goes for 100+ an hour.
    But if you mean you would like to ask quesitons about code you have written and get advice on how to continue or fix a problem you are having, then post the relavant code piece and ask away. There are many that will be glad to help you in that manner.
    But this is NOT a do my homework for me board and unless you can clue your Prof in that your work is not your own, then you would be cheating for a grade you do not deserve, and in that case--please just go else where or drop out--either one will make no difference to me or most of the developers on this board.

  • Hi, I need help on how to remove my credit card data on my friend's iPad?

    Hi, my friend borrowed my credit card to purchase smart office 2. I need help on how to change or remove my credit card details on her iPad. It turned out when I tried purchasing a game that i was again automatically charged. Thanks for helping me.

    Settings->iTunes and App Stores->Apple ID->View Apple ID->Payment Information, Set the Payment Type to "None".

  • Please i need help to how to recover my camera roll photos i deleted them yersterday by accident im need with the ipod and i took the pictures with ipod but i want to know how to recover my photos in a easy fast FREE way as soon as porssible pleasse???

    please i need  help to how to recorver my cameral roll photos from my ipod in a easy FREE way as soon as possible

    Restore from backup if they are in a backup. Otherweise I know of no free way. These are paid and no one has said that they worked.
    iPhone Recovery Stick - recover deleted text messages & more
    Recover files from iPod Touch | Restore data iPod | iPod touch undelete, unformat

  • Need help on how to handle zip & text/csv as a resposne payload from Concur RestWebservice

    Hi All,
    We are getting zip(if there are multiple files) and test/csv(single file) as a response payload from the concur rest API and need your help on how to handle in NWBPM and SAP PO.
    Zip response coming in response looks like below -
    PKÀ˜F7extract_attendee_detail_p0600908soav_20150424022159.txts� rt©1204Õ50Ñ52©1¨áåPKzà@ÆPKÀ˜F2extract_CES_SAE_v3_p0600908soav_20150424022148.txts� rt©1204Õ50Ñ52©1¨©1ãåPKå늟PKÀ˜Fzà
    Text/csv response looks like below -
    Extract|2015-24-40|20|0
    Need you help on how to handle the zip content response.
    Also need help on how to handle when text/csv response comes and when zip response comes.
    As per the scenario, there are 4 calls to be made and we are using NWBPM and in the last call the actual respons (text/csv or zip) will come.
    Please provide your inputs.
    Thanks
    Narayanareddy B

    Hi Aaron,
    Thanks for your reply.
    I tried with Payload zip bean and the java mapping as mentioned in the response mapping of OM.
    Payload zip bean - Zip  zip.mode  unzip
    I am getting the error below in the receiver rest channel -
    "Transmitting the message using connection JPR failed, due to: com.sap.aii.af.lib.mp.module.ModuleException: Zip: error occured during processing: java.util.zip.ZipException: invalid stored block lengths"
    Java Mapping - used the java mapping in the response of Operation mapping
    Here also i am seeing the same error in the channel log as it is synchronous step and the message got cancelled.
    "Transmitting the message using connection JPR failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeApplication mapping program com/equalize/xpi/esr/mapping/java/UnzipAndAttach throws a stream transformation exception: Exception: invalid stored block lengths"
    The below is the response i am seeing and is it proper zip response payload(any encryption) , kindly advise.
    PKâE�F:ws_extract_attendee_detail_p0600908soav_20150424083413.txts� rt©1204Õ50Ñ52©1¨áåPKzà@ÆPKâE�F5ws_extract_CES_SAE_v3_p0600908soav_20150424084014.txtíTß��@~oÒÿ�÷Fº»ìV}ëòCÏz Qljß8ÜöL�`N�ùão8�Ò«�´M�Ü@�awvçûfgÇùâϤå#Ttï0Ø�B�²·olÇ�£[4Ï](L�]«�ÑbÀôÁÒc�0ÀÏdAªÙТ¨Ìû�Êv¡�b¤eJA%��=Þ7Í>PÚ=í2��7ò[�¼¡=q/°¶�*ø)
    K|<`BgÉÔºÜWs[§J�&Ñ:Ìá:´�ç«�RÐv�ÚÅAD'\�ÁtR²*DP3gî:B@JëhU�Ò'¬�ùQ\�È\D{·O×±JS\ï�-ò�¸�Þ²êó�{Å¡2®â,MmÉù XAzßüBn&®Sl-§�l¶A�×ú½³ÙFI®0¿©Ú¯¤�oT�iV²RÀJ��¼«`õ»�í Ûéwa#�àpY�««óq)U°JaøÁA�ûì>Ù³üHåÒe¾�7��Ð/§£u°Nzã÷ç4×·èãþ�¾}õ0ÙµYÄ�+J��eX\�E±ïsR%®yÜÕðsªáÚ$qÚÎÇ�Û$^%1¸AF*ý¶VÑêxÏZÏ¢U½T~Ñ®ØkW5ç×®õ¿w5¬zò:oN»�ô���íø÷úÛÙ=¬å�[ôÚ�þmczPKhÏ��i PKâE�Fzà@Æ:ws_extract_attendee_detail_p0600908soav_20150424083413.txtPKâE�FhÏ��i 5�ws_extract_CES_SAE_v3_p0600908soav_20150424084014.txtPKËö
    Thanks
    Narayanareddy B

  • Need Help ! how can I Pass Variable from JApplet to PHP?

    I think I post to the wrong forum and I don't know how to change.
    Sorry for messing thing.
    I try to send variable for applet to php but the result is no data was recorded in my database.
    I think the data did not transfer to php.
    I am familiar with php but new to java.
    Actually, I don't know how to send the variable for applet.
    For example, in PHP will receive $_POST['score'] so in applet, I need to send the variable name "score".
    In the book that I use for self-study, mention about servlet but I think PHP is much easier to me.
    So I need to know how set this request data to my applet.
    In internet, I still not get what is clear for me to understand.
    Or I may search with worng keyword or way.....
    Can someone please help me?
    public class test extends JApplet { public test(){ JButton myButton = new JButton("sendData");         myButton.setFont(new Font("Sansserif", Font.PLAIN, 14));         myButton.setSize(15, 10);                 myButton.addActionListener(new button());         add(myButton); } private class button implements ActionListener {         public void actionPerformed(ActionEvent e) {         PostMsg(10,"hello");         } } public void PostMsg(int score, String name){ try {             String data = "name=" + name + "score=" + score;                    byte[] parameterAsBytes = data.getBytes();      // Send data     URL url = new URL("http://localhost/addtest.php");     URLConnection con = url.openConnection();     ((HttpURLConnection) con).setRequestMethod("POST");          con.setDoOutput(true);          con.setDoInput(true);          con.setUseCaches(false);          OutputStream wr = con.getOutputStream();              wr.write(parameterAsBytes);     wr.flush();     // Get the response     BufferedReader rd = new BufferedReader(new InputStreamReader(con.getInputStream())); wr.close();     rd.close(); } catch (Exception e) { System.out.println("ERROR"+e.getMessage()); } } }
    <html> <title>Untitled Document</title> </head> <body> include("../connectionJAVA/connect.php"); $name = $_POST['name']; $score =$_POST['score']; //insert data $sql = "insert into java values(null,'$name','$score')"; mysql_query($sql) or die("error=$sql"); </body> </html>

    rinJava wrote:
    I think I post to the wrong forum and I don't know how to change.Yep wrong forum. This is probably a html/applet/web service sort of question.

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

  • TS2755 Hi all, I bought one iphone and 3 ipads, i set up all on one apple ID. Now i have a problem when using messages: when sending message from one device it appears again on screen from the other 3 devices. I need help of how to set up messages on each

    Hi all, I bought one iphone and 3 ipads, i set up all on one apple ID. Now i have a problem when using messages: when sending message from one device it appears again on screen from the other 3 devices. I need help on how to set up messages on each device separately and to start using messages app on each device independently. Thanks

    search google for "iphone remove picture from contact"

  • Need help with how to reset bios and admin password to reformat hard drive in 8440p elitebook.......

    need help with how to reset bios and admin password to reformat hard drive in 8440p elitebook? removal of cmos, resetting laptop, using cccleaner, windows password recovery and hiren's was noneffective, any help is appreciated. thanks

    Hi,
    As your notebook is a business class machine, security is more stringent - the password is stored in non-volatile memory and there are no 'backdoor' passwords.  Your best option would be to contact HP regarding this.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • I'm new to SQL Server Integration Services and I need help on how to begin learning SSIS. Is there any training for it besides msdn?

    I'm new to SQL Server Integration Services and I need help on how to begin learning SSIS. Is there any training for it besides msdn?

    Check this thread where people have already given their suggestion on learning SSIS
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f2cc1cf3-204d-454a-a189-47df87a3aa23/i-want-to-learn-ssis?forum=sqlintegrationservices
    I would suggest to go for You tube videos (type learn SSIS or begin SSIS step by step) you will get lot of good tutorials to start with.
    Happy Learning!!
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • All of my apps on my new ipad2 are not working. I had this iPad about 4 months and nothing bad has happened before this. I need help on how to make my apps stop crashing. All my built in apps are fine though.

    All of my apps on my new ipad2 are not working. I had this iPad about 4 months and nothing bad has happened before this. I need help on how to make my apps stop crashing. All my built in apps are fine though. WHATBCAN I DO TO MAKE MY APPS STOP CRASHING. I ALREADY TURNED IT OFF THEN ON AGAIN AN IT STILL CRASHES. HELPPP!!!!

    Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple logo. Ignore the red slider.

  • Need help figuring how to track DVD drive usage

    I work at a public library and need to track how often the DVD drives are used by our patrons.  Is there some count somewhere of how many times the drive is accessed?  The only other way I can think of to do this is to run a script that will check
    if any files exist at E:\ and then sleep for 1 minute and check again. Then, create a log in a central location that the script can update if the file exists. 
    Anyone able to come up with a better idea?  I would really appreciate any input.
    Thanks
    Tamara

    Yes, I am a technician.  I work at the library that I am attempting to collect this usage info from.  I just need to know how often our patrons use the drives because we may not offer the drives in the future and I would like to track a couple
    months of usage to determine how this will affect the patrons. 
    Yes, the PCs are very locked down, but since I am the one that locked them down, I can get the script to run.
    Thanks for the info about the event log.  I will work on a script to filter those events.  Seems like that would give me my answer!
    Thanks again for the help!
    Tamara

Maybe you are looking for

  • Reconcilation of subcontracting challan

    All SAP Gurus, We are having following error while reconcilation of subcontracting challan. Material XXXXXXXX is not assigned fully, short by 1.000 NO Message no.: 8I574 Why this error may be coming? Regards,

  • Slowdown which is dependant on which User is Logged In

    When I log in as one user, the Macbook Pro is fine. If I log in as the second user, the spinning beach ball appears for ages. The macbook cannot function when signed in as the second user. Also, if I go to Activity Monitor, I cannot see Disk Usage, o

  • Firmware Update on Air Port Extreme w/o Password

    Hi, is there the possibility to update the firmware if I have forgotten my password? I don`t want to change my running system but I would like to get the latest update. Thanks!

  • Have the world gone crazy?

    Since September 11th I am wondering about the topics in this and other forums. Is it because we can not concentrate on java anymore? Concerning me I think it's a little bit this way. Seems I'm not the only one. NullPointerExceptionHow about you?

  • Complex Arch Install

    Ok so first some system spec. Processor: 2500k 4.6 GHz Motherboard: ASUS P8P67 Pro RAM: Corsair DDR3 1600 MHz HDD's: Seagate Baracuda 1 TB, Western Digital Green Caviar 1.5TB 1.5 TB WD GC HDD: 1 Partition with Windows 7 Professional 64-bit and 185GB