Array Module Question

Hi,
I am currently working on designing phase for an Array Module. We are planning to track the Array information and store it's content to database. Currently I am finalizing the data model and I have following question.
--We need to track the Geneology of the Sample through out the whole system (Especially the results of Transfers). Is it better to have all that relationship in one flat table with columns for location (like PlateWell, GelLane…..) and columns for Content (Column like . LocationType  LocationId   ContentType ContentId) or is it better to store all the content of location as a ArrayType? Or is there any other option available in the Market?
In the first case database rows for that table will increate very very fast plus to find out the geneology of the location in Array , I have to use Connect By Prior which will take good amount of time(Is there any other option available?). I don’t have much idea about second option but I think retrieval individual content is going to be a problem.
Any help is really appreciated.
Thanks in Advance
Raj

Made a complete example:
String searchKey = "Juice";
TreeMap tm = new TreeMap();
tm.put("soda", "coke");
tm.put("Juice", "orange");
tm.put("SODA", "7-up");
Set set = tm.entrySet();
Iterator iterator = set.iterator();
while( iterator.hasNext() ) {
Map.Entry entry = (Map.Entry)iterator.next();
if(entry.getKey().equals(searchKey)){
System.out.println("searchKey '"+searchKey+"' value is: "+entry.getValue());
What do you think? Anything obvious that can be improved?

Similar Messages

  • Order the FAQ module questions

    I am trying to order the FAQ module questions in Business Catalyst.
    It puts them in alphabetical order by default so I numbered them. But once it gets to 10 it obviously goes out of order.
    And the client does not want to put a letter in front. ie A, B, C
    Any ideas on how to acheive this?
    Thanks in advance.

    Try leaving numerical gaps in your weighting scheme so you have future flexibility.
    For example, I like to use the weightings of 1000, 900, 800, 700 and so on.
    Then I have a LOT of wiggle room to add new information and sort my information the way I like.
    Tricia

  • Very basic modules questions (ath_pci, etc)

    Hello! (I'm sorry, I posted this one in another forum first, thinking I was posting it in this one :oops: )
    I have a very simple question:
    Where can I find modules (e.g., ah_pci for my Atheros mini PCI wireless card), and where and how do I install them?
    For example, when I do:
    modprobe ath_pci, I get a message saying something like:
    can't find ath_pci module;
    although I've seen a directory with this name on my system (IIRC, under /sys/drivers???).
    Other example:
    I have a 855GM Intelchipset. How do I find the module for it and how do I install it?
    Thanks a lot.

    Thanks for the reply, and for deleting the other thread.
    I looked for /lin/modules, and I don't have a /lin directory... Is it normal?
    Or maybe you meant /bin/modules...? Anyway, I looked for this too and there is no /modules directory under /bin.
    I found some modules under /sys/module. There is one named ide_cd that I put in the MODULES array of rc.conf (just for a test, I don't know why it is for...), but I get a message at bootup:
    [/code]FATAL: module ide_cd not found[code]
    Is this normal too? Or it has to be compiled with the kernel to work. And BTW, if I compile the kernel (I don't think I'm at this point in Linux yet!), do I loose my installation or if everything stays in place in my system?
    Thanks a lot![/code]

  • Training and Event module questions.

    Hi .
    I have some questions regarding Training and Event Management module.
    1. IS there a way to configure a custom attendee type for this module ?
    2. If no is there a way to rename a existing attendee type. I have a requirement to create a group of attendees type of External Person. I know i can use Company attendee type for grouping external person. But i need to change this Company to Group for displaying purposes. I know i can change the Company via T7778O table but won't it lead to bad consequences ?
    3. Is there a way to hide tabstrips on PVOO screen ? i have a requirement to keep only Company tabstrip others are not relevant for my scenario.
    That's all for now.
    Thanks in advance.
    Edited by: kernel.panic on Dec 22, 2010 8:47 AM

    Hi,
    thanks this one is ok, the one which I can not find is the info message for when the maximum capacity of the attendee list is reached:
    'Optimum capacity reached, only essential or wait list bookings possible' This one I want to change into a warning message.
    br,
    Ovidiu
    And I have a new question as well
    In the Attendee List layout is it possible to add columns which are not in the column set from customizing e.g. Personnel subarea,
    Employee subgroup, Employee group etc?
    Thanks
    br,
    Ovidiu
    Edited by: Ovidiu Moldovan on Apr 20, 2010 3:51 PM

  • Module Question.

    Hi all,
    My scenario is File->XI->R3
    Can I validate file information in a Sender Adapter Custom Module and if the validation fails then cancel the input so Integration Engine never gets the corresponding message? My question is how to cancel the procesing of the message in the adapter module?
    Thanks in advance,
    Diego.

    Chandu,
    my problem is that I want to validate data of an input file, so if the file doesn't contain certain fields, then it doesn't go to the XI Engine. (It's discarded before that.)
    So i thought to build a module for the sender adapter that do this validation, but I don't know how to discard the message at modules chain.
    I hope you could understand my english.
    Regards,
    Diego.

  • The arrays class question

    consider the code below
    int[] list = {2, 4, 7, 10};
    java.util.Arrays.fill(list, 7);
    java.util.Arrarys.fill(list, 1, 3, 8);
    System.out.print(java,util.Arrays.equals(list, list));i understand line 2, it gonna fill 7 into the array,so the output would be Line 2: list is {7, 7, 7, 7}
    my question is line 3, how come the output would be {7, 8, 8,7} what does 1 and 3 represent in a arrary?
    the line 4 output would be {7, 8,8,7} again why?
    Thank you guys whoever is gonna take to respond me questions

    zerogpm wrote:
    but which 2 lists were comparing ? since i have list list with the same name1) You're not comparing lists, you're comparing arrays.
    2) You're comparing a single array with itself.
    3) Objects, including arrays, do not have names. Classes, variables, and methods have names. Objects do not.

  • Copying arrays, performance questions

    Hello there
    The JDK offers several ways to copy arrays so I ran some experiments to try and find out which would be the fastest.
    I was measuring the time it takes to copy large arrays of integers. I wrote a program that allocates arrays of various sizes, and copy them several times using different methods. Then I measured the time each method took using the NetBeans profiler and calculated the frequencies.
    Here are the results I obtained (click for full size):  http://i.share.pho.to/dc40172a_l.png
    (what I call in-place copy is just iterating through the array with a for loop and copying the values one by one)
    I generated a graph from those values:  http://i.share.pho.to/049e0f73_l.png
    A zoom on the interesting part: http://i.share.pho.to/a9e9a6a4_l.png
    According to these results, clone() becomes faster at some point (not sure why). I've re-ran these experiments a few times and it seems to always happen somewhere between 725 and 750.
    Now here are my questions:
    - Is what I did a valid and reliable way to test performances, or are my results completely irrelevant? And if it's not, what would be a smarter way to do this?
    - Will clone be faster than arraycopy past 750 items on any PC or will these results be influences by other factors?
    - Is there a way to write a method that would copy the array with optimal performances using clone and arraycopy, such that the cost of using it would be insignificant compared to systematically using one method over the other?
    - Any idea why clone() can become faster for bigger arrays? I know arraycopy is a native method, I didn't try to look into what it does exactly but I can't imagine it's doing anything more complicating than copying elements from one location in the memory to another... How can another method be faster than that?
    (just reminding I'm copying primitives, not objects)
    Thanks!
    Message was edited by: xStardust! Added links, mr forum decided to take away my images

    yeh, everyone thinks that at some point. it relies,
    however, on you being perfect and knowing everything
    in advance, which you aren't, and don't (no offence,
    the same applies to all of us!). time and time again,
    people do this up-front and discover that what they
    thought would be a bottleneck, isn't. plus,
    the JVM is much smarter at optimizing code than you
    think: trust it. the best way to get good performance
    out of your code is to write simple, straightforward
    good OO code. JVMs are at a point now where they can
    optimize java to outperform equivalent C/C++ code
    (no, really) but since they're written by human
    beings, who have real deadlines and targets, the
    optimizations that make it into a release are the
    most common ones. just write your application, and
    then see how it performs. trust me on this
    have a read of
    [url=http://java.sun.com/developer/technicalArticles/I
    nterviews/goetz_qa.html]this for more info anda chance to see where I plagiarized that post from :-)
    Thanks for that link you gave me :)
    Was usefull to read.
    About time and money of programming, that is not really an issue for me atm since i'm doing this project for a company, but through school (it's like working but not for money).
    Of course it should not last entirely long but I got time to figure out alot of things.
    For my next project I will try to focus some more on building first, optimizing performance later (if it can be done with a good margin, since it seems the biggest bottlenecks are not the code but things outside the code).
    @promethuuzz
    The idea was to put collection objects (an object that handles the orm objects initialized) in the request and pass them along to the jsp (this is all done through a customized mvc model).
    So I wanted to see if this method was performance heavy so I won't end up writing the entire app and finding out halve of it is very performance heavy :)

  • 5B32 module question

    This is more of an equipment question, but I figure that thisis as good a
    place as any to ask.
    I've got about six 5B32 modules, and I need three. The problem is that
    four of the resistors that go with them are bad. I had as bad board,
    which I think might have screwed up the resistors. The resistors that
    Ihave that are good are reading about 20 Ohms of resistance, and the bad
    ones are 6 Ohms, 80 Ohms, 1.5 megaOhms, and 2.2 megaOhms.
    I have tried to buy some resistors from National Instruments and Analog
    Devices, but they don't know what they are (the part number doesn't come
    up at all). I hate to keep buying entire 5B32 modules when I only need
    the resistor. So, can I just go buy a 20 Ohm resistor at Radio Shack, and
    plug it i
    n, or is this thing that comes with it something special?
    Thanks in advance,
    Harry
    "Little Joe for the Big Heisman, '99"

    Absolutely - go down to Radio Shack and purchase some - The max current
    sould be 20 ma (since the 5B32 is a 4 - 20 ma current input module) so P =
    I^2 R , P = (.02)^2 * 20 = .008 Watts therefore a 1/4 or 1/2 watt resistor
    should be more than adequate.
    A 1/2 watt resistor has leads that would probably plug into the 5B01
    backplane nicely.
    Good Luck
    Harry King wrote in message <7q65an$[email protected]>...
    >This is more of an equipment question, but I figure that thisis as good a
    >place as any to ask.
    >
    >I've got about six 5B32 modules, and I need three. The problem is that
    So, can I just go buy a 20 Ohm resistor at Radio Shack, and
    >plug it in, or is this thing that comes with it something special?
    >
    >Thanks in advance,
    >Harry
    >
    >--
    >"Little Joe for the Big Heis
    man, '99"

  • Quick Module Question

    I have a link bar component that is linked to a ViewStack
    component, which has four stacks. I want to use modules in the last
    three stacks and my question is: Will the modules load when the
    user clicks on that particular stack, or will all of them be loaded
    even if the currentView property is set to 0?

    I think that that has to do with the "creation policy" and
    can be set either way.

  • STREAM module question

    Hi all,
    I am newbe in STREAM module development and this question might be a concept error. If so, please could you give me some clues?
    I would like to use the "libc" funcion "getpwuid()" in a kernel STREAM module.
    I have Solaris 7 64-bit kernel.
    �Can I do it? I have read that for 64-bit kernels, only dynamic libraries are available. Therefore in order ot use libc functions I would have to link dynamically the module relocatable object with the libc library in sparcv9. I have tried to link the kernel STREAM module with libc.so.1 (in /usr/lib/sparcv9) with no success so far. Everytime I trie to load the module it complains with the message: unknown symbol "getpwuid".
    If it is not possible, why? . Is it not possible to use libc functions such us: memcpy() etc..from the kernel context?
    Looking forward to hearing from you.
    Best Regards

    You cannot use user space libraries from within a kernel module. What exactly are you trying to
    do? What do you need password information for
    down in the kernel?
    Maybe ddi_get_cred() will help?
    Some functions like memcopy have kernel space equivalents (bcopy)....
    dan

  • NM-16AM module question in my cisco 3660

    hi,
    I have 3 of these modules.
    with 1 module, when I configure a line and I connect to the line I get only a black screen.
    when I do the exact same thing with another module, (configure a line on the 2nd module) it works fine.
    my question is, how can I know if a module is broken or not functional. can this happen?
    any advice on how to find out if a module is broken or if I single modem in the module is dead.
    thank you.
    also when I use debug modem and I call a modem that works fine I get this
    11w6d: Modem 5/14 Mcom: in modem state 'Dialing/Answering'
    11w6d: Modem 5/14 Mcom: in modem state 'Incoming ring'
    11w6d: Modem 5/14 Mcom: in modem state 'Waiting for Carrier'
    but when I don't get this I know in advance that it's not going to work and that I'll get just a black screen.
    any advice please?
    thank you.

    To identify a functional module , we need to look at the front panel LED of 3660 router. If READY 0, 1, 2, 3 is blinking green it indicates,it indicates the functional module is installed in the slot.If this LED is OFF, it indicates the slot is empty or the module is not functional. For more info on 3660 MAR router, refer the following Link.
    http://www.cisco.com/en/US/products/hw/routers/ps274/prod_module_configuration_guide09186a00800d9e97.html

  • Robotic module Question

    Hi all
    i have some question about the robotic module.
    i already have a DH table for my robto arm.
    Now i am trying to input this DH parameters into Labview.
    I saw the example of inverse kinematis for puma 560.
    Also,I find that the "create PUMA 560 Modified.Vi" can let user to input their only DH parameters.
    But
    What is the Twist in Labview? angle about previous Z, from old X to new X.
    What is the Length in Labview? is it represent thelength of the common normal (r).
    What is the Offset in Labview?offset along previousZ to the common normal.
    What is the Joint Corrdinate Offseti? in Labview?offset along previousZ to the common normal.
    When i modify the DH paramters into "set kinematic parameter.vi",there show a error about -310040.
    Anyone can indicate which part i get worg?
    Thank you so much
    Tim
    Attachments:
    Inverse Kinematics for Puma 560 org Test.vi ‏34 KB
    Test_PUM_560_tim.vi ‏32 KB
    myrobotarm.jpg ‏98 KB

    Hi Tim,
    Thanks for your question. Are you attempting to modify the "create PUMA 560 Modified.vi" that you mentioned using your DH parameters, or are you modifying the "Test_PUM_560_tim.vi" example VI that you attached? The "Inverse Kinematics for PUMA 560 org Test.vi calls the "Test_PUM_560_tim.vi" so if you are using this example as a model, you would have to input your parameters (Length, Twist, Offset which you mentioned) into that VI.
    The particular error you are getting (-310040) corresponds to the following error message: "LabVIEW cannot converge to a solution in the number of steps you specified. Make sure that the serial arm can achieve the transform you desire." This could be due to the fact that the current constraints are over defined. 
    Here is a link to the Robotic Help Manual:
    http://zone.ni.com/reference/en-XX/help/372983D-01​/
    If you would like to give me some more information about your application, I would be happy to help further. Which version of LabVIEW are you using, and which version of the Robotics Module are you working with?
    Good luck!
    R. Brill
    Applications Engineer
    National Instruments

  • Math / array / matrix-question

    Hallo everybody,
    first of all: it's not a indesignscripting-  but general math-javascriptquestion. please be patient
    I've got a first (matrixlike-)array (won't change)
    var containers = [
    'container11', 'container12', 'container13', 'container14', 'container15',
    'container21', 'container22', 'container23', 'container24', 'container25',
    'container31', 'container32', 'container33', 'container34', 'container35',
    'container41', 'container42', 'container43', 'container44', 'container45',
    'container51', 'container52', 'container53', 'container54', 'container55'
    and I've got a second array:
    ["container14", "container25", "container34", "container44", "container54"] //this array may contain 3 up to 8 items
    My aim is to check if a part of 5 to 3 items of the second array is part of or equal to a row or column of the matrix-like-array.
    For example: "container34", "container44", "container54" or "container11", "container12", "container13", "container14" (as part of second array) would be a result I#m looking for. Note: I only want to find the 'biggest charge'!
    Hope it's getting clear and one of the math-cracks will have a idea.
    Addittional: there's no MUST to work with arrays. I can also store the data to a object or mixture ... and may fill it with numbers instead of strings ...
    To get it visible:
    https://dl.dropboxusercontent.com/spa/3ftsuc9opmid3j4/Exports/fourWins/fourWins.html
    Items can be dragged and dropped. After every dropp the arrays have to be compared ... and I#m searching for a nice and elegant solution
    May be someone's interested
    Hans

    Hi Hans,
    Just a quick note although your question is solved.
    Provided that your matrix is 5×5 you could easily map any element to a single character in the set { A, B..., Z } (for example).
    Then your problem can be reduced to some pattern matching algorithm, that is, finding the longest part of the input string within a 'flat string' that just concatenates the rows and the columns of the search matrix in the form ROW1|ROW2...|COL1|COL2...|COL5
    And you can create RegExp on the fly to compute the solution(s) with almost no effort:
    const MX_ORDER = 5;
    const MIN_MATCH = 3; // We need at least 3 contiguous items
    var bestMatrixMatch = function F(/*str[]*/ROWS, /*str*/ND)
    // NB: No check is made on ROWS, so make sure you supply
    //     MX_ORDER strings, each being MX_ORDER-sized
        // Put in cache some subroutines
        F.RES_TO_STR ||(F.RES_TO_STR = function()
                return localize("'%1' found in %2", this.result, this.location);
        F.ROWS_TO_HS ||(F.ROWS_TO_HS = function(R, C,i,j)
                for( i=0,C=[] ; i < MX_ORDER ; ++i )
                for( C[i]='',j=0 ; j < MX_ORDER ; C[i]+=R[j++][i] );
                return R.concat(C).join('|');
        // Vars
        var haystack = F.ROWS_TO_HS(ROWS),
            candidates = ND &&
                haystack.match( new RegExp('['+ND+']{'+MIN_MATCH+',}','g') ),
            t, p;
        if( !candidates ) return null;
        // Sort the candidates by increasing size
        candidates.sort( function(x,y){return x.length-y.length} );
        // Grab the matches and keep the best
        while( t=candidates.pop() )
            if( 0 > ND.indexOf(t) ) continue;
            p = 1+~~(haystack.indexOf(t)/(1+MX_ORDER));
            return {
                result:   t,
                location: (p<=MX_ORDER)?('Row #'+p):('Col #'+(p-MX_ORDER)),
                toString: F.RES_TO_STR,
        return null;
    // =================
    // Sample code
    // =================
    var rows = [
        "ABCDE",
        "FGHIJ",
        "KLMNO",
        "PQRST",
        "UVWXY"
    var needle = "EKLMINSX";
    // get the result
    var result = bestMatrixMatch(rows, needle);
    alert(
        "Searching the longest part of '" + needle + "' in:\r\r" +
        ' '+rows.join('\r').split('').join(' ') +
        '\r\r===============\r\r' +
        (result || "No result.")
    @+
    Marc

  • Array Cast Question Puzzling me

    The question below puzzles me. The answer states that the result is a class cast exception because o1 is an int [] [] not a int []
    But I thought the point of line 7 is to say "I know it is a 2D array but I want to cast it to a 1D array - I know I am losing precision here".
    Given:
    1. class Dims {
    2. public static void main(String[] args) {
    3. int[][] a = {{1,2,}, {3,4}};
    4. int[] b = (int[]) a[1];
    5. Object o1 = a;
    6. int[][] a2 = (int[][]) o1;
    7. int[] b2 = (int[]) o1;
    8. System.out.println(b[1]);
    9. } }
    What is the result?
    A. 2
    B. 4
    C. An exception is thrown at runtime
    D. Compilation fails due to an error on line 4.
    E. Compilation fails due to an error on line 5.
    F. Compilation fails due to an error on line 6.
    G. Compilation fails due to an error on line 7.
    Answer:
    3 C is correct. A ClassCastException is thrown at line 7 because o1 refers to an int[][]
    not an int[]. If line 7 was removed, the output would be 4.
    &#730; A, B, D, E, F, and G are incorrect based on the above. (Objective 1.3)

    While you could approximate casting a 2D array to a 1D array in C/C++ by just grabbing a pointer to your first array and then overrunning array bounds (relying on how C/C++ allocates 2D arrays and the lack of bounds checking), Java's strong typing and bounds checking makes this impossible.
    If you want to do something similar in Java, you will need to create a new 1D array of the proper size and copy the elements stored in your 2D array into this new array. That being said, a database is almost guaranteed to be a better solution.

  • Some subclassing array creation question

    i)     Declare a class Customer which contains name, id , payment, and status. [5m]     
    ii)     Create a class called Shop that contains a one dimensional arrays� reference of type Customer Mall which      stores up to 45 Customer information.     [2m]
    Above are the question. I just want to know should the Shop class extends the Customer class or is it unecessary.

    I dont think you should use the extends keyword.
    Ask yourself which of these statements makes sense:
    A Customer is-a Shop.. (I dont think so)
    A Shop is-a Customer.. (That doesn't make sense either)
    A Shop has-a Customer... (now that sounds right)
    Given that I would have a instance variable of type Customer[] within the Shop class.
    Use composition instead of inheritance.
    I hope this helps..
    J

Maybe you are looking for

  • Adobe reader for tablet

    hi every one, Does Adobe pdf reader for tablet or mobile has the read out loud feature, if yes how does it work?

  • Restricting Cost Centers to G/L Accounts

    Dear SAp Gurus, I need to restrict which cost centers to be use for a specific G/L account. Does anyone knows what are the steps to restrict Cost Centers to be use for a G/L account, A/P account, and A/R account? Thank You for your help

  • Report column nosort

    I have a report based on a query like this select a, b, c, d, e, f , g, i from table when i run the report the column are ordered something like this f , g, i , a , b, c, d, e How do I prevent the column order from being changed from my actual order

  • Re: Oops...there was a problem Please restart Sk...

    using window 7...........plz restart my skype

  • People r saying that I can't copy music from iPhone to iPad .....

    I thought I seen a cord out there that plugs into the bottom of the devises like the flat/wide skinny ones so if so could you sync both devises that way