Help me choose a datastructure please - urgent

hi all,i have a very serious problem,to which i am not able to find the solution.the problem is as follows
i have a large number of datas in a database table.now i need to query that table so many times,so to improve the performance i thought i can retrieve the datas and put them in a datastructure so that the system need not query the database again and again.the table structure has two fields.one number and the other string.the numbers are not unique,and i need to have these numbers ans strings in the single datastructure.i saw that all the util datastructures have their own indexes and so they do not allow me to enter my numbers and strings from the table in the same datastructure.which structure will allow the flexibility that i need,or is there any other way to do it.please reply soon,bye thiyagu.

Not exactly sure what you're looking for in terms of a data structure... but I'll just give you what I think the simplest solution is to your problem.
Define a new object (i.e. MyData) which has variables, theNumber (an int or float or whatever yer number is) and theString. Then, all you need to do is query your database, create new MyData objects for each record, and put them into an ArrayList.
public class MyData {
private int theNumber;
private String theString;
public MyData(int number, String str) {
theNumber = number;
theString = str;
public int getNumber() {
return theNumber;
public String getString() {
return theString;
Thats my solution...

Similar Messages

  • Help me choose a motherboard [please]!

    Hi, I live in Canada and would like to buy a motherboard from MSI. I just want someone to direct me to the least expensive motherboard that has a socket for the E6300 Core 2 Duo CPU, 4 slots for DDR2 RAM, SATA and PATA compatibility, PCI Express 16x graphic card slot, built-in LAN (doesn't have to be GIGABIT LAN), and, a built-in sound card (nothing special needed, all I need is to hear sound).
    I will not overclock at all, so...someone please help me!
    Thanks in advance!

    Quote from: jabiru on 07-December-06, 19:31:05
    Hi all,I'm also looking for m/b but i'm put of by max fsb of 333 ATM. assuming i'm reading the forum threads correctly.
    Regards Jabiru
        in your opinion what should a board clock to! for the record i mean.

  • Help me choose a technology please ??

    Hi, I am a MSc (Software Development) student from University of Huddersfield, UK. I have to submit a final year project proposal by the end of July.
    My real client is a pharmaceutical company with many offices in many cities. They maintain a central database in one city. The need is to develop a means of accessing this database via a Java technology over the Internet as well as Intranet. The use of applets and web pages is discouraged by the non-technical company advisors. I wonder what can be the solution ?? Please guide me in the right direction and kindly point a right Java technology to be used in a Java Application for this need.
    The relevant detail is:
    1). Back end Database is in ORACLE.
    2). Front END is supposed to be an Internet + Intranet enabled Application.
    3). The choice of technologies to be considered:
    RMI ??? (may be a rediculous question)
    EJ Beans ??
    Servelets ??
    What should I think of ?? Please help me out as the time to decide is slipping out of my hands.
    Regards,
    Shahzad.

    Hi,
    First (non-technical people - like overpaid business managers) don't usually have a clue what they are talking about.
    So, first, you need to make a case fro using simple well-known technology eg a tomcat server and the new buzz-word is SOAP (well it's not that new, but then the internet is getting old too).
    Three web sites in 1996 (I quote Bill Clinton in the Dimbly lectures), maybe it was four!
    On to SOAP, do a google/msn search on the subject.
    It is a way of running a thin client/ server operation, passing all data as text or maybe xml (another buzzword?) through good old html.
    You can therefore bypass firewalls with any data sent, there is not a need for expensive pcs (front-end users machines). The server does all the processing and returns a response as either a text response, an xml response, or just maybe a href link to a resource.
    Just some ideas to think about.
    Hope this helps
    best
    kev

  • Help me choose my laptop please

    Afternoon guys,
    Im after a little advice.
    I have used PC for 12 years and have decided to try mac for my next laptop.
    It will mainly be used to create YouTube videos and photo editing using Final Cut Pro X and Photoshop. This is just as a hobby, it is not my profession So I don't need Hollywood level results.
    I Have spoken to Apple Live support and after a lengthy conversation they suggested the £999 base 13 inch MacBook Pro. I am impressed with their suggestion as I told them I had up to £2000 to spend and they didn't milk me for everything I had.
    I Just wanted to double check that this machine will be fine for video rendering and photo editing from the machines user base.
    What do you guys think ?

    I Tried those Steps But When I Get to the Credit Card Part it Doesn't Have the Option to Choose None. It Says Visa. MasterCard.  Anecdotes and Discover . I'm Also in the United States.

  • I just paid my monthly fee but it keeps saying i haven't, so i can't use the apps?? please urgent help...

    i just paid my monthly fee but it keeps saying i haven't, so i can't use the apps?? please urgent help...

    Hi there
    Your Adobe ID is still associated with an older expired membership.  Please sign out of the CC desktop app and sign in again with your Adobe ID to activate the new membership plan.
    Sign out, Sign in | Creative Cloud Desktop app
    Thanks
    Bev

  • Option key can't function to access start up manager, so i can't choose startup disk. please help me

    option key can't function to access start up manager, so i can't choose startup disk. please help me

    If you have Apple Care, call them and get a case number.  Otherwise, take the computer to an Apple store or an AASP.  Whichever is more convenient for you. 

  • Please Help in this webcam problem,Its Urgent

    Hi,
    I have a final yr project by which I can see the picture(whenever I want) of a webcam of a Home PC from my mobile device.
    For that I have to write a Java program which will capture the picture from webcam and changed the file format to PNG and then saved it to some directory.Whenever I will run the Java program it will automatically save a picture in the directory and it will do continuously after 5 sec and overwrite the older picture.
    Can anyone help me with the code or some sorts of code.
    Please help me as it is quite urgent.

    Sorry, this forum is for solving specific problems, not for begging for help. If you have a specific problem you need help with, then ask...but I doubt anyone is going to put in the time to help you with a project you havn't put in the time to have specific problems with.

  • Hello, I want to switch form a individual account to a team/business account? Can you please help me? I need this urgent Thank you!

    Hello, I want to switch form a individual account to a team/business account? Can you please help me? I need this urgent Thank you!

    Hi Koen,
    Please refer the following help article under "Purchasing Creative Cloud for Team".
    Creative Cloud Help | Creative Cloud for teams
    Hope this helps.
    Regards,
    Sumit Singh

  • I have Mac mini and there is partition of boot camp but some miss understanding the osx 10.8.2 is deleted and while I m going to recovery mode the portition can not removing and the also cant repaired what I do I need urgent help ???? Please ?????

    I have Mac mini and there is partition of boot camp but some miss understanding the osx 10.8.2 is deleted and while I m going to recovery mode the portition can not removing and the also cant repaired what I do I need urgent help ???? Please ?????

    Do you have a Time Machine backup or clone?  If not,
    all is lost if you have in fact deleted your OSX partition
    and you will have to do a reinstall from Recovery HD
    and install all else.

  • Urgent help for extremely new newbie - please.

    I have been asked to set up a Labview program to graph and log
    thermocouple temperature measurements from two Keithley 2001 Multimeters
    and a DC voltage from HP 34420A nano Volt/Micro Ohm Meter. All three are
    instruments are IEEE interfaced to a Windows 98 machine running Labview
    (version 5.0 I think.) I have a couple of weeks to get the job done.
    The problem is that I have never used Labview. I am an experienced C,
    Fortran, BASIC programmer but this graphical system is completely new.
    My situation is complicated because I am told the experienced person who
    was originally going to set this up left under bad circumstances and
    took many of the manuals. I would greatly appreciate any and all help I
    can get.
    Please feel free to send responses directly to me.
    [email protected]
    Thanks,
    Stan Thomas

    In article
    <[email protected]>,
    Stan Thomas
    wrote:
    > I have been asked to set up a Labview program
    to graph and log
    > thermocouple temperature measurements from two
    Keithley 2001 Multimeters
    > and a DC voltage from HP 34420A nano Volt/Micro
    Ohm Meter. All three are
    > instruments are IEEE interfaced to a Windows 98
    machine running Labview
    > (version 5.0 I think.) I have a couple of
    weeks to get the job done.
    > The problem is that I have never used Labview.
    I am an experienced C,
    > Fortran, BASIC programmer but this graphical
    system is completely new.
    > My situation is complicated because I am told
    the experienced person who
    > was originally going to set this up left under
    bad circumstances and
    > took man
    y of the manuals. I would greatly
    appreciate any and all help I
    > can get.
    >
    > Please feel free to send responses directly to
    me.
    >
    > [email protected]
    >
    > Thanks,
    >
    > Stan Thomas
    >
    >
    All manuals are available at
    http://www.natinst.com/manuals/
    They also have an example program database at
    http://www.natinst.com/support/epd/
    Sten Karlson
    D/A Production AB
    SWEDEN
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

  • HT1918 hey am stranded its like a month now my account does not have  the None in the payment type section i had put my visa info but not now i want to remove them please urgent help

    hey am stranded its like a month now my account does not have  the None in the payment type section i had put my visa info but not now i want to remove them please urgent help

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Help me choose a 865PE board

    Hi,
    I need some help in choosing the best(most feature packed, fast etc.) MSI 865PE motherboard.
    There are two boards that are pretty identical and trying to find the difference between them has been difficult. They are the Neo2-FIS2R and Neo2-PFISR.
    Which one of these two should I buy? They cost about the same. What are the major differences between them?
    Please help me in choosing.
    Thanks!

    Quote
    Originally posted by Danny
    In finding this link for you I see MSI have changed the table again:
    http://www.msi.com.tw/program/products/mainboard/mbd/pro_mbd_cpu_support_detail.php?UID=prescott
    The faster Prescott's are no longer shown, so maybe they are being re-spec'd again.
    Great, I did see this link earlier but I'm confused by several things and please excuse my ignorance but I have been out of the Hardware scene for 4-5 months which is a long time in hight tech.
    First thing on this table that I see on the P version is "P4EE Support" what is this? and why does the first table not support it?
    On the first table it had a column "PCB Ver." what is this and where can it be found on my computer or Mobo?
    So from looking at this link then I can safely say that I can buy a prescott CPU and it will run fine on my neo2 FIS2R?
    faster Prescott's, so are there variations in the CPU and will my board be able to handle the faster ones?
    Sorry about all the questions but if I can get answers to these then it would be extremely helpful.
    rAd
    UPDATED:
    I do find these two tables very confusing and there is little explanation, To me the first table is saying that all the boards only support P4's and not prescott? the second table is saying that only the Extreme Edition supports prescott?
    but the second table also lists the FIS2R etc so its all very confusing????

  • Need help with choosing a 6 cell and 9 cell battery (mo06, mo09)

    Hey hi all,
    I have a pavilion m6 series notebook which comes with mo06(6 cell) battery by default.
    I need to replace the battery with a new one and I've come across a mo09 (9 cell) battery with the same price as that of mo06.
    I've no idea if mo09 batteries can be used instead of mo06.
    If anyone who knows anything about this please help me choose.
    Here's the link
    http://hpshopping.in/Accessories/Batteries
    Thanks a lot in advance

    Hi
    Sorry was the delay wanted to make sure the battery should work fine for your unit.
    672412-001  SPS-BATT 9C 100WHr 3.0AH LI MO09100-CL  
    Let us know how it goes!
    "I work for HP."
    ****Click the (purple thumbs up icon in the lower right corner of a post) to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    Regards
    Manjunath

  • Help With Choosing The Technology

    Hello,
    I need help in choosing the appropriate technology for the application that I'm going to be creating.
    The characteristics of the system that have been decided until now:
    Standalone app built on either Flex/Flash/AIR
    Restricted to using the system on a single computer, hence can be a tightly coupled system
    The server component of the system needs to be closed source and robust, for which im thinking something like a Java backend,etc,etc.
    In a completely new environment, all that i need to be able to do is install just the AIR application and not worry about installing extra stuff for the server support.
    Thanks In Advance for anyone who can help me out with this.

    If you are saying you want the server component to be on the same machine as the Flex app, then your choices are severely limited due to the sandbox, unless of course you are using AIR, then you can just use the SQLite database.
    But if there will be a sevrer component on another machine on the web, you could use BlazeDS, and like I said, its free and very robust.
    http://opensource.adobe.com/wiki/display/blazeds/download+blazeds+3
    http://learn.adobe.com/wiki/display/Flex/Creating+a+BlazeDS+web+service+application+in+Fle x+Builder
    http://learn.adobe.com/wiki/display/Flex/Creating+a+BlazeDS+messaging+application+in+Flex+ Builder
    http://sebastien-arbogast.com/2008/04/10/flex-spring-and-blazeds-the-full-stack/
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • I need help instantly on this program please

    import java.util.*;
    public class D3
              private static int[] z = new int[100000];
    private static int first=z[0];
              private static int last=z[n-1];
              private static int n=100000;
    public static void main(String args[])
    Scanner input=new Scanner(System.in);
    for(int i=0;i<z.length;i++)
              z=2*i;
    int seqSearch(z;50000;n); //method call 4 key where key=mid
              int binSearch(z;first;last;50000);
              int seqSearch(z;35467;n); //method call 4 key where key in the left half
              int binSearch(z;first;last;35467);
              int seqSearch(z;89703;n); //method call 4 key where key in the right half
              int binSearch(z;first;last;89703);
              public int seqSearch(int z[];int key;int n)
         long start = System.currentTimeMillis();
    int count=0;
    int ans=-1;
    for(int i=0;i<n;i++)
    if z[i]=key
    count++
    {ans=i
    break;}
    return ans;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
         public int binSearch(int z[];int first;int last;int key)
         long start = System.currentTimeMillis();
         int count=0;
         if(last<first){
         count++;
         index=-1;
         else
         count++;
         int mid=(first+last)/2
         if(ket=z[mid]{
         index=mid;
         else
         if(key<z[mid]){
         index = binSearch(z[];first;mid-1;key);
         else
         index=binSearch(z[];mid+1;last;key);
         return index;
         long elapsed = System.currentTimeMillis() - start;
         System.out.print("Execution Time:" + elapsed);
         System.out.print("# of Basic Operations:" + count);
    // if anyone could tell me whats wrong with my code i'd be greatful...the program is supposed to perform binary and sequential search on a sorted array of 100000 numbers.once on an item in the middle of the array once on the right side of it and once on the left side...i also need to count the number of basic operations for the same number in both sequential and binary to see whats better.and i need to check the time...plz i need help now,,,

    "Guide to a first-time poster"
    you need to add exclamation marks to signify how urgent it is
    e.g.
    i need help instantly on this program please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    capital letters is better
    I NEED HELP INSTANTLY ON THIS PROGRAM PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    starting the italics on line 1, better again
    import java.util.*;
    public class D3
    private static int[] z = new int[100000];
    private static int first=z[0];
    private static int last=z[n-1];
    private static int n=100000;
    public static void main(String args[])
    Scanner input=new Scanner(System.in);
    for(int i=0;i<z.length;i++)
    z=2*i;
    int seqSearch(z;50000;n); //method call 4 key where key=mid
    int binSearch(z;first;last;50000);
    int seqSearch(z;35467;n); //method call 4 key where key in the left half
    int binSearch(z;first;last;35467);
    int seqSearch(z;89703;n); //method call 4 key where key in the right half
    int binSearch(z;first;last;89703);
    public int seqSearch(int z[];int key;int n)
    long start = System.currentTimeMillis();
    int count=0;
    int ans=-1;
    for(int i=0;i<n;i++)
    if z=key
    count++
    {ans=i
    break;}
    return ans;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
    public int binSearch(int z[];int first;int last;int key)
    long start = System.currentTimeMillis();
    int count=0;
    if(last><first){
    count++;
    index=-1;
    else
    count++;
    int mid=(first+last)/2
    if(ket=z[mid]{
    index=mid;
    else
    if(key><z[mid]){
    index = binSearch(z[];first;mid-1;key);
    else
    index=binSearch(z[];mid+1;last;key);
    return index;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
    and what about the dukes, offer 10 (never to be awarded, of course)
    do this, then sit back and watch the replies roll in.

Maybe you are looking for

  • Add new payment term base on sales order contract date and shipment date

    Dear Sir/Madam, My company need to create new payment term base on sales order's contract date and shipment date. the first time is 30% made in T/T within 30days from contract signed date. the second time is 70% made in T/T before shipment. I don't k

  • For-each loop in OSB

    Hi, I have a senario where i have a varied length XMl is coming to me in response of a service callout, and I need to iterate over it to get the fieldvalue of a particular tag based on its fieldName(e.g FUNCTION_CODE) and assign to a tag of another x

  • Need help accessing Mail files after Updgrade to OS X 10.5

    I recently did an Erase and Install of my new Leopard OS X. Before doing so, I copied my complete mail file from 10.4 to an external HD. After installing 10.5, I tried to import the old files from the HD and I get a message that says my Mail file is

  • Help- Urgent- Multi-folio app not showing all languages

    I created a multi-folio app in 6 languages. English the default. English shows up in app store but all the other folios for German, Italian etc don't show up. They are all published and public. I changed my ipad to Italian and I still dont' see Itali

  • Problem linking css style sheet

    I am trying to link a css style sheet to a new root file. When I try to link the css sheet I get an error - A recursive style import was found while trying to add CFTtemp.css. Please resolve this error by editing the file in an external text editor a