Which is a efficient Data Structure to store data in a file

I want tostire a data in file in sorted order. I am thinking about Bainary Search tree & heap sort Which is efficient technique. Please reply..

which is the best data structure to be used in Thread
pool to store the thread instances? and why ?
I have seen lots of people using Queue....Why do you ask? You do know that there are thread pool classes in Java 5?
Kaj

Similar Messages

  • Load data from XML files into BI

    Hi All,
    Can any one guide me through the steps which involve in loading data from XML files into BI?
    Thanks
    Santosh

    Hi James,
    I have followed upto step No: 12 .
    Please could you let me know how to link the XML file on my local drive to BI,
    I am not able to find figure out where to specify the path of the XML file to be loaded into BI.
    Thanks In Advance
    Regards,
    San
    1. Create a Infosource(ZIS), with transfer structure in accordance with the structure in the XML file. (You can open the XML file with MS Excel.This way you can get to know the structure).
    2. Activate the transfer rules.
    3. After activation ;from the Menu Bar , Select Extras>Create BW Datasource with SOAP connection.
    4.Now Activate the Infosurce again, this creates an XML based Datasource(6AXXX...)
    5.These steps would create two sub nodes under the Infosource(ZIS).
    6.Select Myself system and create a data package and execute it run in Init mode(without Data Transfer).
    7. This would create an entry in RSA7(BW delta Queue)
    8. Again create another Delta Infopackage under it, and run it. Now the Datasource(6AXXXXXX..) would turn green in RSA7.
    9.In Function builder(SE37) select your FM( do a search ,F4, on the datasource 6AXXX....) .
    10.Inside this RFC based FM , from the Menu Bar select Utilities>more Utilities>Create Web services>From Function module.
    11.A wizard will guide you through the next steps .
    12.once this is done a Web serrvice would be enabled in WSADMIN. Select your FM and execute it.
    13.From here you can upload the data from XML file into BW delta queue.
    Edited by: Santosh on Nov 30, 2008 2:22 PM

  • Loading data from .csv file into existing table

    Hi,
    I have taken a look at several threads which talk about loading data from .csv file into existing /new table. Also checked out Vikas's application regarding the same. I am trying to explain my requirement with an example.
    I have a .csv file and I want the data to be loaded into an existing table. The timesheet table columns are -
    timesheet_entry_id,time_worked,timesheet_date,project_key .
    The csv columns are :
    project,utilization,project_key,timesheet_category,employee,timesheet_date , hours_worked etc.
    What I needed to know is that before the csv data is loaded into the timesheet table is there any way of validating the project key ( which is the primary key of the projects table) with the projects table . I need to perform similar validations with other columns like customer_id from customers table. Basically the loading should be done after validating if the data exists in the parent table. Has anyone done this kind of loading through the APEX utility-data load.Or is there another method of accomplishing the same.
    Does Vikas's application do what the utility does ( i am assuming that the code being from 2005 the utility was not incorporated in APEX at that time). Any helpful advise is greatly appreciated.
    Thanks,
    Anjali

    Hi Anjali,
    Take a look at these threads which might outline different ways to do it -
    File Browse, File Upload
    Loading CSV file using external table
    Loading a CSV file into a table
    you can create hidden items in the page to validate previous records before insert data.
    Hope this helps,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • Loading data from flat file to ODS

    Hi Experts,
    I have a developed a report, in which Flat file is the datasource and data target as DSO. 
    Here I have one requriment to Increatment the counter value in TVARVC table after every load compleate.
    Can this be done thru Process chain?  I belive this can be done thru process chain by creating variable.
    If this can be done thru Process chains can  any experts send me sample examples code.
    Thanks In Advance.
    Sreedhar.M

    Hi sridhar,
         We have a similar scenario in which we will load data from flat file to datasource the file name (x_20081010.dat) of such format  being fetched from the low value of the TVARVC table ... once successfully executed we had program to increment the value of low which increments by one day adn the next day the file with that will be placed in the application server...
        U can create a abap program varaint and attribute for that and u can achieve that.... this is sample code which searches for the string and after some coding i.e once ur file has been loaded successful code u can write similar code to increment or counter values which u are asking for...
    search s_tvarvc-low for '20'.
            if sy-subrc ne 0.
              sy-msgty = 'E'.
              sy-msgid = 'ZWM1'.
              sy-msgno = '000'.
              sy-msgv1 = 'Unable to find DATE to increment'.
              raise unable_increment.
            else.
              w_date = s_tvarvc-low+sy-fdpos(08).
              w_nextdate = w_date + 1.
              replace w_date with w_nextdate into s_tvarvc-low.
              modify tvarvc from s_tvarvc.
            endif.
    Regards
    vamsi

  • How to store data into a file from a host VI developed for Compact RIO

    Hi,
    I am new to the CompactRIo.I have developed a VI which runs on the FPGA(CompactRIO) which continuously monitors tha data from a system and i have developed a host VI to read the data and i am successfully getting the data into my computer and i want that data to store into a file.When i use the write to spreadsheet VI for writing into a file.The data is not written into file can anybody tell me why this is happening?

    Hi,
    The last one you said is working when i conected through it is working, whatever files i have  used earlier are there.Thanks  for that but i have few queries please answer me so that i acn proceed in my  project.
    1.As you said to connect to ftp://xx.xx.xx.xx i have seen some extra files along with my files waht are they? waether my data files are stored in flash memory of RT controller?if so, how to clear those files?
    2.Suppose i want to clean up the flash memory of RT contrller i.e suppose i have deployed some file earlier , now i want to cleanup those i dumped into the memory how to do that?
    3.How to disable the Application running on the RT controller when it powers on? i.e. when i switch on the power it should be connected but nothing hould be running on.
    4.I mean at the end of the experiment when i stopped the host VI by pressing stop button weather application running on the RT controller will stop and weather FPGA VI runnibg on that also stop if not how to stop?
    5.Suppose next time when i connect to ftp://xx.xx.xx.xx i dont want to keep earlier files there how to delete them?Because my doubt is if i am using the file name which is same as the prevoius one there is aproblem of appending the new data to the old file.?
    Regards,
    Vishnu

  • How to store the data of a file into an ArrayList?

    Hi! everyone.
    I want to know
    if I have a File, and the data in the file are type int, type String...
    And I have a ArrayList which is of type Question
    How do I store the data of that file into the ArrayList
    I tried to use the while loop(use the hasNextLine() to read the data line by line)
    But I cannot add data which are not of type Question to the ArrayList.
    Can you tell me what I should do, please?
    I also wonder that
    The data of the file are of many types, but when I try to read it with the nextLine(), the data all turn out to be of type String. Why?
    Thank you.
    Edited by: Terry001 on Apr 30, 2008 1:13 PM

    No, a line in the file is just part of a question
    The format of the file is like this:
    *<question type code>                    :     String*
    *<question point value>                    :     int*
    *<question category>                         :     String*
    *<question difficulty level>               :     int*
    *<question text>                              :     String*
    *<question correct answer>               :     String*
    *<optional question-specific data>     :     String*
    *<question terminator>                    :     String*
    And here is an example
    TF //TrueFalseQuestion
    5 //points value
    None //category
    3 //difficulty level
    The capital of the United States is Washington, D.C. //question text
    True // answer
    *** //quetion terminator
    I created an ArrayList in the Test class:
    private ArrayList<Question> questions; // Create inside constructor
        public Test (String name, String instr)
            testName = name;
            scoreEarned = 0;
            scorePossible = 0;
            instructions = instr;
            questions = new ArrayList<Question>(); //[MAX_NUMBER_OF_QUESTIONS];
        }And I tried to use the following method to store the data of the file to the ArrayList
    // This method loads a set of questions from a plain text file
        public void loadQuestionsFromFile(String fileName) throws FileNotFoundException
            try
                File fileReader = new File("input.txt");
                Scanner sc = new Scanner(fileReader);
                while (sc.hasNextLine())
                    // I don't know how to pass the data I got from the nextLine() method to the ArrayList because they are of different type
            catch (FileNotFoundException a)
                System.out.println(a);
        }    As all you said, I should create an Question object in the while loop
    Question temp = new Question ();But I have no idea how to pass the int and String to the Question object.
    Thank you

  • What is the best way to store data to a file? Serialization?

    FYI: I am some what of a novice programer. I have almost finished my degree but everything I know about Java is self taught (never taken a course in java). Any way here is my question.
    So I have an example program that I have created. It basically just has three textpanes which also have the ability to contain images. Now I would like to learn how to store data to a file for later retrieval and decided to use a program such as this as an example. I am not sure if I should use the serialization API that java has or some other means such as XML. If I used XML I was not sure how to store the image data that would be contained in the text panes. I figured serialization would take care of that if I just serialized my main class and then restored it. So That is that I tried first. Is this a good direction to go?
    The problem I am having is that I cant seem to get the serialization to work the way I need it to. I am not sure what I am doing wrong because I have read many tutorials and looked at allot of example code but still dont understand. The tutorial I looked at most is [this one at IBM.|http://java.sun.com/developer/technicalArticles/Programming/serialization/]
    The eclipse project folder for my example program can be found here:
    [http://startoftext.com/stuff/myMenuExp/]
    zipped version:
    [http://startoftext.com/stuff/myMenuExp.zip]
    The main class is mainwindow.java. I know the source is kinda dirty. Any comments are welcome but I am most interested in how to solve this serialization problem. Thanks
    -James

    DrClap wrote:
    What will the nature of the data be? Just a handful of strings? A bunch of objects of different types reflecting the current state of your program to great depth and complexity? Something else?The data will be what is contained in three text panes. Each text pane containing rich text and images. For an example take a look at the example program in my first post.
    How will the data be used? Just write it out when the app shuts down, and read it all back in when it starts up? Do you need to query or search for specific subsets of the data? Is there any value in the stored form of the data being human-readable?Basically the data will need to be saved when the application shuts down or when the user selects save from the file menu. The data will be restored when the user opens the file from the file menu. It would be nice if the stored data is human readable but its not of primary importance.
    How often will the data be written and read? How many reads/writes/bytes/etc. per second/minute? Not often. Just a simple open and save from the file menu.
    How large could the data conceivably get?It will probably be a few paragraphs of formated text and less then a dozen images per text pane.
    Will reading and writing of the data need to occur concurrently?no.
    Do you need to add new data to the storage as your app goes along, or just replace what's there with the most current state?Replace with the most current state of the data.
    If it's a simple read once at startup, write once at shutdown, overwriting the previous data, read only by your app, not by humans, then serialization via ObjectInput/OutputStream is probably the way to go. If there are other requirements, you may want to go with XML serialization, a DB, or some other solution.Thanks for the information. Serialization sounds like the way to go. Even if I end up using XML serialization in the end it would still be of interest to me to learn how to use serialization without xml.
    I was trying to go with using serialization in be beginning but I cant seem to get it to work. Would you be willing to take a look at my example program. I attempted to implement serialization but it does not seem to work. Could you take a look and see what I am doing wrong. At this point I am stuck as i cant seem to get serialization to work.
    I am going to go ahead and mark this thread as answered because I think I already got most of the information I was looking for except what I am doing wrong with my attempt as serialization.
    Thank you jverd for your time.

  • How could Ecatt support a FM which has export parameter data type as any

    Hi,
    I have created a FM which has export parameter data type as 'Type ref to data'.
    The actual paremeter value for this export parameter is a dynamically generated internal table, which does not have a abap dictionary data type.
    Could I use the 'FUN' ecatt command to test this FM?  How could I get this reference export parameter?
    Thanks a lot in advance!

    Hi,
    Wouldn't it be enough if you define parameter in test data container as reference to table type with structure of type c(1000)  (or more/less characters depending on how much data you need to pass)?
    I'm not 100% sure if filling this table with data will work (this is reference after all) but if this is an issue than create 2 parameters: 1 of table type and second of reference type. Then inside your script before FUN use ABAP...ENDABAP to assign your table parameter to reference parameter and use second one as input for FUN command.
    I think that either first or second solution should work.
    Best regards
    Marcin Cholewczuk

  • How can I set screen saver clock which show time and date when all screen is black. Other phones have this option but I didn't find on iphone. Pl guide.

    How can I set screen saver clock which show time and date when all screen is black. Other phones have this option but I didn't find on iphone. Pl guide.

    HA!  I figured the find my iphone out!!!!! You can have more than one icloud account in "Mail, Contacts and Calendars".  So my husband's & kids' phone icloud account under "settings, icloud "is their individual @me.com account.  Set it to everything you want EXCEPT Find My Iphone.  Then under "settings, mail/contacts/calendars" you set up both accounts (your @me.com which may already be there), then add another with the main appleID and enable ONLY Find My Iphone.  Now when any of us log into Find My Iphone from any device with our main apple ID for the app store, all the devices show up!!!! YIPPEE.  I made my own day!
    I think the message I got previously was because I hadn't disabled the find my iphone on the @me.com account first.

  • Which one is efficient???

    I have a text file with huge data. I need to generate Oracle report from this file.
    I have two options...
    1. Creating External table and query the data from external table
    2. Directly accessing data from text file.
    Which one is efficient?
    Thank you,
    Prasad

    hello,
    i guess that depends on
    a) how often your data changes
    b) how often your report is run
    c) how often the format of the data changes
    d) is creating the report the only use for that file
    if you have one single file that does not change and you want to use the data from other applications, i would load it intot he database. also if you generate a lot of reports off that data, going the database route would possibly be the best one.
    on the other hand if creating a report off this data is more of an one-off thing and you might create a new version once in a while but don't need the data for anything else, you might want to access the data directly.
    overall it's a performance vs. work issue. you will have to invest a bit of work to load the data into the database, but will have a much better performance if you use the data heavily, but if you only use it once in a while you might not want to invest in creating loader scripts or setting up a warehousebuilder mapping.
    regards,
    philipp

  • Nolock and readpast which one give efficient performance

    Dear All,
    please help me.
    in both nolock and readpast which one give efficient performance.
    mastanvali shaik

    Dear All,
    please help me.
    in both nolock and readpast which one give efficient performance.
    mastanvali shaik
    Both are equally bad and are used by coders who just want to get things done and don't care about data integrity. So bottom line both are bad , avoid it.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS

    Hai Frnds,
    i Attend an interview they asked this questions can u know the answeres . tell me .
    In File to file scenario how can we reprocess records which failed records.
    HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS
    Thanks in advance
    thahir

    Hi,
    Refer these links:
    this might help you
    Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
    Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
    validating against schema file for the output XML file
    Informing the sender about bad records
    Regards,
    Nithiyanandam

  • Need help to join two tables using three joins, one of which is a (between) date range.

    I am trying to develop a query in MS Access 2010 to join two tables using three joins, one of which is a (between) date range. The tables are contained in Access. The reason
    the tables are contained in access because they are imported from different ODBC warehouses and the data is formatted for uniformity. I believe this cannot be developed using MS Visual Query Designer. I think writing a query in SQL would be suiting this project.
    ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2.
    [ABCTABLE]
    ABCORDER
    ABCPART
    ABCSERIAL
    ABCDATE
    [ZYXTABLE]
    XYZORDER
    XYZPART
    XYZSERIAL
    XYZDATE1
    XYZDATE2

    Thank you for the looking at the post. The actual table names are rather ambiguous. I renamed them so it would make more sense. I will explain more and give the actual names. What I do not have is the actual data in the table. That is something I don't have
    on this computer. There are no "Null" fields in either of the tables. 
    This table has many orders (MSORDER) that need to match one order (GLORDER) in GLORDR. This is based on MSPART joined to GLPART, MSSERIAL joined to GLSERIAL, and MSOPNDATE joined if it falls between GLSTARTDATE and GLENDDATE.
    [MSORDR]
    MSORDER
    MSPART
    MSSERIAL
    MSOPNDATE
    11111111
    4444444
    55555
    2/4/2015
    22222222
    6666666
    11111
    1/6/2015
    33333333
    6666666
    11111
    3/5/2015
    This table has one order for every part number and every serial number.
    [GLORDR]
    GLORDER
    GLPART
    GLSERIAL
    GLSTARTDATE
    GLENDDATE
    ABC11111
    444444
    55555
    1/2/2015
    4/4/2015
    ABC22222
    666666
    11111
    1/5/2015
    4/10/2015
    AAA11111
    555555
    22222
    3/2/2015
    4/10/2015
    Post Query table
    GLORDER
    MSORDER
    GLSTARTDATE
    GLENDDATE
    MSOPNDATE
    ABC11111
    11111111
    1/2/2015
    4/4/2015
    2/4/2015
    ABC22222
    22222222
    1/5/2015
    4/10/2015
    1/6/2015
    ABC22222
    33333333
    1/5/2015
    4/10/2015
    3/5/2015
    This is the SQL minus the between date join.
    SELECT GLORDR.GLORDER, MSORDR.MSORDER, GLORDR.GLSTARTDATE, GLORDR.GLENDDATE, MSORDR.MSOPNDATE
    FROM GLORDR INNER JOIN MSORDR ON (GLORDR.GLSERIAL = MSORDR.MSSERIAL) AND (GLORDR.GLPART = MSORDR.MSPART);

  • Implicit Join or Explicit Join...which is more efficient???

    Which is more efficient?
    An IMPLICIT JOIN
    SELECT TableA.ColumnA1,
    TableB.ColumnB2
    FROM TableA,
    TableB
    WHERE TableA.ColumnA1 = TableB.ColumnB1
    Or....An EXPLICIT JOIN
    SELECT TableA.ColumnA1,
    TableB.ColumnB2
    FROM TableA
    INNER JOIN TableB
    ON TableA.ColumnA1 = TableB.ColumnB1
    I have to write a pretty extensive query and there will be many parts and I just want to try and make sure it is efficient as possible. Can I EXPLAIN this in SQL Navigator as well to find out???
    Thanks in advance for your review and hopeful for a reply.
    PSULionRP

    Alex Nuijten wrote:
    The Partition Outer Join is very handy, but it's an Oracle-ism - Not ANSI ...Ooh, "New thing learnt today" - check.
    but then again who cares? ;)Oracle roolz! *{;-D                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Restrict Which Users Can Enter Data In List Form in SharePoint Foundation 2013

    Is there a way to restrict which users can enter data in particular fields in a list item entry form?
    We are using a SharePoint Foundation 2013 list and calendar to manage vacation time. We need to restrict non-supervisor users users from entering a value in a certain field in the vacation request form.
    Here is how the system works now:
    1. Employees complete the vacation request form (which creates a list item)
    2. An email is sent to their supervisor to either approve or decline the request
    3. Approved requests are automatically entered onto the vacation calendar
    We have restricted the list so that only supervisors can edit items (the pending vacation requests). The problem is that all users can mark their own requests as approved when they fill out the request form in the first place. Is there a way to restrict
    which users can enter data in particular fields on a list item entry form?

    Thanks for the suggestion. We ended up 1) hiding the approval column and 2) creating a second list, workflow, etc. The user no longer sees the approval column when filling out the form. Requests are now submitted to list A. Workflow #1 copies the request
    to List B, then deletes the item from List A. Once the request is added to List B, Workflow #2 emails the user that the request has been received and emails the supervisor that a request needs to be approved. Only supervisors have editing permissions on List
    B. Approved requests are automatically added to the vacation calendar (the calendar view of List B).
    We found the following site to be helpful in learning how to hide the list column:
    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2013/06/03/how-to-hide-a-sharepoint-list-column-from-a-list-form.aspx

Maybe you are looking for

  • 2LIS_02_SCL - OLI3BW Doesnt exist

    Hi, Im facing a wear issue, may be you can help me. 1)I have activated 2lis_02_scl in a DEV Environment 2)I transported to TESTING Environment and everything was OK 3)Finally i transported to PRD Environment and here is the issue: When i try to filli

  • There's a maximum size for the header-I need more room

    This is a weird one for me. I am making a worksheet for my students and I'm making them in sets of four so they can work together. About 2/3rds of each page is the same, with a list of different words at the bottom. So I want to put the top 2/3rds of

  • Need to change  no: of entries in WTH tax tab in fv60 while parking

    how can we change the no of entries in withholding tax tab in fv60 when we do the parking of a non PO invoive?

  • GRN prient problem

    When we do GRN for purchase order using MIGO, when GRN is posted system prints one copy of GR by default. is it possible to print two copies of GRN when GRN is posted Rg, kt

  • How can I maximize the window which opened using web.show_document() ?

    My user complain, everytime they want to print the report it didn't show maximize screen, How can I maximize the browser or window which opened using web.show_document() ? Thank you