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

Similar Messages

  • Array matrix question

    if you create an array matrix of the following format:
    int [ ][ ][ ][ ] = new int [ 50 ][ 50 ][ 100 ][ 100 ];( ie, allows 50x50x100x100 storage: 25,000,000 )
    will it run slower, faster, or the same speed as one that uses a double array instead:
    int [ ][ ] = new int[ 5000][ 5000 ]; (ie, allows 5000 x 5000 storage : 25,000,000 )
    NOTE: if it matters, the arrays can be much larger than this as well.
    Thanks in advance for any help

    Obviously, you need empirical results to be sure. However, I would suspect it depends on the pattern of use, in the same way that C optimisers sometimes use non-intuitive ordering of nested loops in order to improve cache locality.

  • How can I create a matrix question? Specifically, I need a question in table format that allows each respondent to list a number of events and then data for each event (date, location, number of participants, topics covered, etc.

    How can I create a matrix question? Specifically, I need a question in table format that allows each respondent to list a number of events and then data for each event (date, location, number of participants, topics covered, etc.

    Hi,
    Sorry, we do not support a matrix-question field.   Please try the multilines text field (where your participant can enter multiple lines in the input text box) and see if it works for you.
    Thanks,
    Lucia

  • How do I create a check-box matrix question using Acrobat XI Pro?

    I would like to insert a question that is a 10 x 10 matrix that allows respondents to select multiple boxes in each row.  For example, the "add item > rating scale" feature formats a matrix the way I would like, although it only seems to allow for radio buttons.  With this feature, respondents can only select one item per row.  Is there any way to use this feature with check-boxes rather than radio buttons?  Or a different feature to create a matrix that allows for multiple selections per row? 
    Thanks so much,
    Andy 

    I created a 30 page Form in Microsoft Word with 20 to 30 check boxes on each page using the Zapf Dingbats Font.
    When I used Acrobat XI Pro to automatically convert the form it fails to create usable check boxes.
    It worked properly about 3 times on test pages but it will not do it again.
    Manually inserting check boxes one by one on 30 pages is mind numbing to say the least.
    Why doesn't the software work properly anymore?

  • 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 :)

  • 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?

  • 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

  • Adding arrays - confusing question

    I am in the process of writing a java program where I have to add arrays. The question asks:
    This program asks you to assume that your computer has the very limited capability of being able to read and write only single-digit integers and to add together two integers consisting of one decimal digit each. Write a program that can read in two integers of up to 40 digits each, add these digits together, and display the result. Test your program using pairs of numbers of varying lengths. You must use arrays in this problem.
    I think I understand up to there is says"Write a program that can read in two integers of up to 40 digits each" from there I am lost.
    Can anyone help explain what is needed?
    This is what i have so far:
    import java.util.*;
    public class add
        public static void main(String[] args)
          Scanner in = new Scanner(System.in);
          int x = in.nextInt();
          int y = in.nextInt();
            int[] a = {x};
            int[] b = {y};
            int[] ab = new int[a.length + b.length];
            System.arraycopy(a, 0, ab, 0, a.length);
            System.arraycopy(b, 0, ab, a.length, b.length);
            System.out.println(Arrays.toString(ab));
    }

    Yeh, sorry about that didn't have the time to go ahead and drag some of the code over when I first found this forum, first thing I tried a quick compile and run just to see what problems I'd get and I got this runtime error of: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 7
         at java.lang.String.charAt(String.java:687)
         at Joseph_Ryan_P2.main(Joseph_Ryan_P2.java:36)
    I threw in some print statements to see how far it gets before the error occurs and it seems to be right before the for loop(see code below)
    In this program I'm reading in from a text file that will read two numbers from the same line that are seperated by a space and eventually add them, is the best way to do that by using a tokenizer or some sort of space delimiter? Or is there an easier way? If the tokenizer is best how would i go about that I haven't learned too much about them besides the fact that they exist so far.
    Thanks for any help you or suggestions you guys can give.
    //Joseph_Ryan_P2.java
    //Big Integer Program
    //Description:
    //     Design and implement a BigInteger class that can add and subtract integers with up to 25 digits. Your
    //     class should also include methods for input and output of the numbers.
    // Must Use Arrays
    import java.io.*;               //neccessary imported libraries
    import java.util.*;
    public class Joseph_Ryan_P2          
         public static void main(String[] args)          //the programs main method
              try
                   Scanner scan = new Scanner(new File("BigInts")); //Scanner to read in from plaintext file
              String numline = scan.next();
              int x=0;
              int [] big1 = new int [numline.length()];
              System.out.println(numline);
                   int [] big2 = new int [numline2.length()];
                   String numline2= scan.nextLine();
                   System.out.println(numline2);
              for(int i = numline.length() - 1; i >= 0; i++)
              char current = numline.charAt(i);
              int d = (int) current - (int) '0';
                   big1[i] = d;
              }//end for loop
              }//end try
              catch(FileNotFoundException exception)
    System.out.println("The file could not be found.");
    catch(IOException exception)
    System.out.println(exception);
    } //end catch statements
         }//end main
    }//end class

  • TMG Standalone Array simple question

    hi everyone i have what i think is a simple question but i don't know if i'm missing something in all the tutorials about standalone arrays i've read.
    i'm working with 2 tmg enterprise editions in 2008R2 in a test environment. both are on sp2 fully updated and a single 20 Mbit connection. i would like for this two tmg's to work for high availability using that connection only and i was able to join both in
    a standalone array. here's how they're configured:
    tmg01
    internal nic ip range: 192.168.1.1/24
    second internal nic: not connected at the moment, considering for intra-array network if needed later on (if anyone suggest is absolutely necessary)
    external nic ip: dhcp supplied by isp.
    tmg02
    internal nic ip range: 192.168.1.2/24
    second internal nic: not connected at the moment.
    external nic: not connected. (where do i connect this one if i only have one modem for that 20 Mbit connection??)
    i have read that the intra-array network is not absolutely necessary so i’m leaving those unplugged.
    now, here’s my question, since they’re both already on an array, if tmg01 fails to deliver (let’s assume it has a hardware malfunction), how is tmg02 going to take over and connect to the external network if by definition my modem only accepts one cable? will
    i have to be near the server and change the cable to the other nic in tmg02 for it to work or do i have to add something in between the modem and the two tmg’s?
    is there something i’m missing? will i be needing 2 connections? maybe it’s too obvious or stupid and it just went passed me. i’m open to criticism and opinions.
    thanks

    Hi
    Let follow the best practice.
    In Production Normal setup for Full redundant Architecture, we need three servers, one for Array and other two servers for TMG for HA.
    1 . TMG Array Server – Subnet Routable with Internal TMG Subnet ( You can also have this in any one TMG but best practice is to separate it )
    2. 
    TMG – 1 – Two NIC, Internal / External
    3. 
    TMG – 2 – Two NIC, Internal / External
    Second Internal NIC is not required in your setup. So you can go with two NIC. External and Internal on two TMG
    Join TMG 1 and TMG 2 to Single Array which is server 1. By this all the configuration you make on one TMG will sync with other TMG.
    How TMG will handle in case of Server failure
    You need to Create two NLB in TMG
    One for Internal and one for External
    Internal NLB
    You need to create an Internal NLB, Since you are using 192.168.1.0 / 24 Network for Internal, assign an internal NLB as 192.168.1.3
    If you want to use TMG as gateway for all internet connection, then you need to have default Route from internal network pointing to 192.168.1.3 which is TMG NLB internal IP
    address
    External NLB
    Since you have not mentioned  External Network, let’s assume you are using 10.10.10.0 / 24 and External Interface of TMG 1 is 10.10.10.1 and TMG 2 is 10.10.10.2, Then create
    an External NLB and assign an IP address 10.10.10.3
    You need to have a Switch in between your Router and TMG servers,
    Connect TMG -1 and TMG – 2 External Interface NIC to Switch
    On external NIC – Set gateway as Modem IP address of Both TMG
    Connect an internet cable from modem to the same switch
    Ensure that, you have a route to 10.10.10.0 /24
     from Modem to External NLB IP address Ie 10.10.10.3
    Now you don’t have to switch cables to Modem,
    Good Luck !!

  • Quick RAID array setup question

    I had to upgrade one of the RAID arrays of one of my clients the other day. I had not setup the RIAD previously, but when I looked at how it was setup before it had 6 disc's in the array and one not part of the array.
    Now I assume who ever set it up before assumed that the 7th disc would be the redundant disc. After looking at the way it worked and doing some calculations from what info RAID admin provided me with I came to the conclusion that the way it was set up would be 6 disc's used as the array with one being a parity drive so if a drive failed that one would take over. On top of that they had another disc that was basically useless as it was not incorporated into the raid at all.
    The way I have set it up is that all 7 discs are part of the array so they have 6 disc's working with one fail over that would be the 7th meaning no disc's are wasted.
    Which way is correct is my question.

    I assume your predesessor left one disk as a hot spare.
    Whenever a disk from a raid set fails, the raid set will be rebuild with the hot spare disk. The bad disk can be swapped and will be the hot spare from then.
    Configuarions like this will give you the highest availability, but will cost you the most. Netto you will have the amount of 5 out of 7 disks. (1 for parity and 1 for hot spare).
    Note that in a raid5 set the parity is spread over all raid disks. There is not such a thing as a 'paritydisk'. The term paritydisk is hust for mathmatics purposes.
    Regards
    Donald

  • Copy Array Quick Question

    Just a quick question.
    Say I have an array A = [1,2,3,4,5]
    B = new int[5]
    I understand to copy the elements of A into B we could use a for loop.
    But can somebody explain to me why you can't just go B = A?
    Does this just cause B to point to A?
    So how do arrays work exactly? Is it like in C where each element is actually a pointer to the data, or does Java copy the data directly into the array element?

    Kayaman wrote:
    JT26 wrote:
    Array A=[1,2,3,4,5] ----> Here A is a reference variable which points to memory locations A[0],A[1],A[2],A[3],A[4] which could not be continueous.Actually no. What you have there is a syntax error. And please don't confuse people by talking about non continuous memory locations. That's simply wrong.And 100% irrelevant for the question at hand.
    >
    B = new int[5] -----> Here B is another reference variable points to an array which could hold 5 elemets.That is correct, basically.
    All the five element holders of B could be physically any where in the memory, thus copying the the elements is done via a for loop.No, Java is smart enough to store arrays sequentially in memory. And the smart way to copy large arrays is System.arrayCopy().Or java.util.Arrays.copyOf.

  • Array output question

    Hello,
    I'm trying to get this foreach to output to HTML.
    What I need help with is how to make this report output the array data.
    $MyCollection = @()
    $arrViewPropertiesToGet = "Name","Summary.Runtime.PowerState","Config.GuestFullName","Summary.Config.Annotation","CustomValue","AvailableField"
    foreach ($cluster in Get-Cluster) {
        Get-View -ViewType VirtualMachine -Property $arrViewPropertiesToGet -SearchRoot $cluster.id | Select `
      @{n="VM name"; e={$_.Name}},
            @{n="Cluster"; e={$cluster.name}},
      #@{n="PowerState"; e={$_.Summary.Runtime.PowerState}},
            @{n="Guest OS"; e={$_.Config.GuestFullName}},
            @{n="Notes"; e={$_.Summary.Config.Annotation}},
            ## just using the data already retrieved; far faster
            @{n="Tier"; e={$viewThisVM = $_; ($viewThisVM.CustomValue | ?{$_.Key -eq ($viewThisVM.AvailableField | ?{$_.Name -eq "Tier"}).Key}).Value}}
      $MyCollection += $viewThisVM
    } ## end foreach
    $MyCollection | ConvertTo-HTML -Fragment | Set-Content c:\temp\test.htm
    Invoke-Expression C:\temp\test.htm
    Here is what I know how to do, but need help with the array part, everything else is working great.
    #Sample Code
    Get-Service | Select-Object Status, Name, DisplayName | ConvertTo-HTML | Out-File C:\Scripts\Test.htm
    Invoke-Expression C:\Scripts\Test.htm
    Thanks,
    -Mike

    Hi sneddo,
    That is the complete script.
    $MyCollection = @()
    $arrViewPropertiesToGet = "Name","Summary.Runtime.PowerState","Config.GuestFullName","Summary.Config.Annotation","CustomValue","AvailableField"
    foreach ($cluster in Get-Cluster) {
        Get-View -ViewType VirtualMachine -Property $arrViewPropertiesToGet -SearchRoot $cluster.id | Select `
      @{n="VM name"; e={$_.Name}},
            @{n="Cluster"; e={$cluster.name}},
      #@{n="PowerState"; e={$_.Summary.Runtime.PowerState}},
            @{n="Guest OS"; e={$_.Config.GuestFullName}},
            @{n="Notes"; e={$_.Summary.Config.Annotation}},
            ## just using the data already retrieved; far faster
            @{n="Tier"; e={$viewThisVM = $_; ($viewThisVM.CustomValue | ?{$_.Key -eq ($viewThisVM.AvailableField | ?{$_.Name -eq "Tier"}).Key}).Value}}
      $MyCollection += $viewThisVM # we can delete this line, I was testing here.
    } ## end foreach
    $MyCollection | ConvertTo-HTML -Fragment | Set-Content c:\temp\test.htm
    If you test this part in your lab it works great.
    $arrViewPropertiesToGet = "Name","Summary.Runtime.PowerState","Config.GuestFullName","Summary.Config.Annotation","CustomValue","AvailableField"
    foreach ($cluster in Get-Cluster) {
        Get-View -ViewType VirtualMachine -Property $arrViewPropertiesToGet -SearchRoot $cluster.id | Select `
      @{n="VM name"; e={$_.Name}},
            @{n="Cluster"; e={$cluster.name}},
      #@{n="PowerState"; e={$_.Summary.Runtime.PowerState}},
            @{n="Guest OS"; e={$_.Config.GuestFullName}},
            @{n="Notes"; e={$_.Summary.Config.Annotation}},
            ## just using the data already retrieved; far faster
            @{n="Tier"; e={$viewThisVM = $_; ($viewThisVM.CustomValue | ?{$_.Key -eq ($viewThisVM.AvailableField | ?{$_.Name -eq "Tier"}).Key}).Value}}
    } ## end foreach
    I just need this part to export to a HTML Web Page.
    Thanks,

  • Urgent array sorting question

    I've sorted an array with "Collections.sort(myArrayList)" ..that's ok..but
    in my JList words appare sorted first the uppercase after lowercase
    (i.e. A,CCC,DDDDD,aa,bbb,cc,d)......I want it sort together..
    A lot of thanks for all answer!!

    Use Collections.sort(List list, Comparator c) api.
    Look into java.util.Comparator to create your own custom comparator, for ex.
    public class StringIgnoreCaseComparator implements Comparator {
      public int compare(Object o1, Object o2) {
        String s1 = (String)o1.toLowerCase();
        String s2 = (String)o2.toLowerCase();
        return s1.compareTo(s2);
      public boolean equals(Object obj) {
    }--lichu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Windows 7 on Tecra A4

    Just tried installing Windows 7 on my Tecra A4 and as I half expected, installation failed. When Vista came out there were problems too, but the solution was to rename 'pcmcia,sys' to 'pcmcia.old'. Hoping this would be the fix for Win'7 I tried it, b

  • How to remove history on ipod when i no longer have the ipod

    Hi so i recently gave my nephew my ipod touch while after thinking about it i really dont want him to be able to download anything with my credit card number is there any way i can remove it even though its no longer in my possen?

  • Unicode Character sets (e.g UTF-8)

    Hi, We are using some third party software which will connect to the oracle database. One of the requiremebnts it states is that both the databse client and server must use the Unicode character set e.g UTF-8. How do we ensure this when installing th

  • How to install plugins in Lightroom

    I've searched the forum but could not find a correct answer to this. I'm running LR 2.3 and Vista. I've tried using the Plug-in Manager in  Lightroom by going to file tab. When going to the location where I un-zipped the plugins, I always get the sam

  • Unzip Password protected EasyDMS71SP02P_1-20006126.ZIP file

    Hi, I downloaded and am trying to unzip the SAP Easy DMS files which is password protected. Can someone please advise of the password required to unzip this file? Thanks and regards, Iqbal