ImageIcon Array and a JLabel

Hey,
I have an ImageIcon arrary and JLabel called ImageLabel on which the ImageIcon is. Bascically I want it to do this: if the ImageIcon on the ImageLabel is a certain icon, say [0] and the click was < 200, then set the ImageIcon to [1] (in effect changing what image is shown on the ImageLabel). And vice versa, as demonstrated by the following code:
if (x < 200) and (ImageIcon theIcon = [0]) // if the click is below 200 on the x axis and theIcon is [0]
          setImageLabel.setIcon(ImageIcon[1]);if (x > 200) and (ImageIcon theIcon = [1]) // if the click is above 200 on the x axis and theIcon is [1]
          imageLabel.setIcon(ImageIcon[2);
However that code doesn't work. What code would work?

Thank you for your reply. I tried using the code, however, I am unsure as to how to use a 2D array.
I think it may help if I elaborate on what I need to do:
I have 80 images, and would like each image to be assigned to a coordinate, such as 1,1 on a coordinate
plane that is 16 wide by 23 high. My first idea would be that you will need (16 * 23) = 368 images, not 80.
By having each image as an integer, I could then set it to load another image when clicked.
For instance I want the program to load with the image set to 1,1 (this image
would be "images/1-1.gif".)
Now, since you are on 1,1 and click on a certain area of the image, it loads 2,1 (that co ordinate having the image "images/2-1.gif". If you click on a different part of the 1,1 image, it would load 3,1 ("images/3-1.gif). etc.
Sorry to say it, but you're still unclear on your goal: will you be only displaying one image at a time ? Do you expect 1 image
to represent each of the (16 * 23) coordinates ? Do you mean that the label will change location depending on the mouse clicks ?
Whatever your objective is, I don't see what is incompatible with the code I suggested in my previous reply.

Similar Messages

  • Is it possible to make an ImageIcon array?

    Hi, I have been having some strange problems with ImageIcon...
    Here is my code...
    ImageIcon tiles[][] = new ImageIcon[5][5];
    tiles[0][0] = "1.png";
    I know this is not right, but basically, I want to make a 2dimensional array of imageIcon's, and then use a loop to set the link to the image. This is tough because I have not had any luck with this code. It works on strings, int's, float's, etc. but not on ImageIcon's grrrrrrr
    thanks

    All I want to do, Is make an array of ImageIcon's and then use a 2dimensional loop to draw all the tiles.
    problem one: I want to use a loop to create each individual ImageIcon, and since there is no "setfile" kind of function i tried making my own in the post above. But im simply trying to make a loop which sets all of the tiles to appropriate file names. (all the file names are numbers and then .png)
    Thats all I want to do, and I want to pass a parameter to a function which tells it the filename to set, and the specific ImageIcon in the array to modify. Hence why I had 2 paramater strings in the previous post

  • Help With JScrollPane and many JLabels...

    I am in the process of designing an 'image browser' applet for a client, but am having some difficulty in deciding how I can most elegantly meet all of the requirements. The specification calls for an applet that can view up to 400 images (all images are small - 120 * 120 px), the view of the images can be scrolled (if not all are in the view) or scaled (zoom in and out on any area), and the images will need to 'animate' or move to new locations as sorting criteria changes. Also, I need to be able to group images into arbitrary n*n arrays and click on any image in the view (rollovers may also be necessary in the future).
    At first, I thought this would be easily solved by putting the images (JLabels?) into as many groups (JPanels?) as necessary to meet the sort criteria, then adding the groups to my main view (JScrollPane w/JPanel) in a GridLayout. My current attempt at a solution scales the groups (JPanels) via. an overridden paintComponent method from within my main scrolling view (using g2d and scale). Unfortunately, I now have many problems that I am having trouble solving:
    1. After I re-scale the JScrollPane (zoom in or out) and then try and scroll, the new images that scroll in are either garbled or just junk (seems like remnants of the original, non-scaled components?).
    2. The scrollbars, at first, were not reflecting the current scaling and how much content is visible, so I overrode the getPreferredSize method in my JScrollPane content object to return (super.getPreferredSize * scaleFactor) - this fixes the appearance of the scroll bars (ie. they accurately reflect how much content there is), but it also offsets all of the images left depending on the scale value (less scale -> images offset further left).
    3. I need pixel-perfect control over the images, so that I can animate the transition from one 'group' to another - I can't see a way to achieve this with my current solution.
    Has anyone tried to do something like this before? What is a good way of accomplishing what I need here? Any code out there that does something similar? Any help would be appreciated, I've been banging my head against the wall over this for days now...
    Thanks in advance,
    Mike P.
    Here is some relevant code:
    /* From BrowserPanel (JPanel associated with my main JScrollPane) */
    public void paint (Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        g2d.scale(scaleFactor, scaleFactor);
        super.paint(g2d);
    /* From BrowserPanel (JPanel associated with my main JScrollPane) */
    public Dimension getPreferredSize() {
        Dimension origSize = super.getPreferredSize();
        double originalSizeX;
        double originalSizeY;
        originalSizeX = origSize.getWidth();
        originalSizeY = origSize.getHeight();
        double newSizeX = originalSizeX * scaleFactor;
        double newSizeY = originalSizeY * scaleFactor;
        String strX = Double.toString(newSizeX);
        String strY = Double.toString(newSizeY);
        /* Round the string (discard anything after the decimal) */
        strX = strX.substring(0, strX.indexOf("."));
        strY = strY.substring(0, strY.indexOf("."));
        /* Convert string to int... */     
        int x = Integer.parseInt(strX);
        int y = Integer.parseInt(strY);
        return new Dimension(x, y);
    }

    I increased the frame size to 3 lines and noticed the the flickering is a result of the text area painting itself without the scrollbar and then repainting itself with the scrollbar. I don't know why this happens, but a work around is to use:
    ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,

  • Oracle Arrays and getVendorConnection API and Class Cast Exception

    I 've gone through various threads relating to the topic of Oracle Arrays and the getVendorConnecton API call to avoid the class Cast Exception.. i ve used all these but am still facing the problem...
    I would appreciate it if some one could resolve the following queries :
    I am using Weblogic 8.1 SP5 with oracle 8i
    1. I read that the need to use the getVendorConnection API to make pl/sql proc calls with oracle arrays from the WL Server wont be required to avoid classCastException...
    I tried to use the connection from the WL connection pool ..but it didnot work....I used the getVendorConnection API ..which also doesnot seem to work..
    I got the Heurisitc Hazard exception...I used the Oracle 9i driver ie ojdbc14.jar ...after this the exception is not coming but still the code doesnt seem to work...
    the snippet of the code is pasted below :
    ~~~~~~~~~~~~~~~~~~~~~~~code is : ~~~~~~~~~~~~~~~~~~~
    /*below :
    logicalCon is the Connection from the WL connection pool
    JDBCcon is the JDBC connection. */
    <div> try </div>
    <div>{ </div>
    <div>
    <b>vendorConn</b> = ((WLConnection)logicalCon).getVendorConnection();
    </div>
    <div>
    //Calling the procedure
    </div>
    <div>
    //java.util.Map childMap1 = JDBCcon.getTypeMap();
    </div>
    <div>
    java.util.Map childMap1 = <b>vendorConn</b>.getTypeMap();
    </div>
    <div>
    childMap1.put("SST_ROUTE_ENTRY", Class.forName("svm.stport.ejb.StaticRouteEntry"));
    </div>
    <div>
    //JDBCcon.setTypeMap(childMap1);
    <b>vendorConn</b>.setTypeMap(childMap1);
    </div>
    <div>
    // Create an oracle.sql.ARRAY object to hold the values
    </div>
    <div>
    /*oracle.sql.ArrayDescriptor arrayDesc1 = oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", JDBCcon); */
    </div>
    <div>
    oracle.sql.ArrayDescriptor arrayDesc1 =
    oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", <b>vendorConn</b>); // here if i use the JDBCcon it works perfectly.... <u>^%^%^%</u>
    </div>
    <div>
    code to fill in the sst route entry array....
    .....arrayValues1 */
    </div>
    <div>
    /* oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, JDBCcon, arrayValues1); */
    </div>
    <div>
    oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, <b>vendorConn</b>, arrayValues1);
    </div>
    <div>
    callStatement = logicalCon.prepareCall( "? = call procName(?, ?, ?)");
    </div>
    <div>
    /* ..code to set the ?s ie array1 */
    </div>
    <div>
    callStatement.execute();
    </div>
    <div>
    }catch(Exceptio e){
    </div>
    <div>
    }</div>
    <div>
    finally </div>
    </div>{</div>
    <div>System.out.println(" I ve come to finally"); </div>
    <div>}</div>
    <div>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~code snippet ends here ~~~~~~~~~~~~~~``
    </div>
    I have observed that the control immediately comes to the finally block after the call to the createDescriptor line above with <u>^%^%^%</u> in the comment. If i use the JDBCCon in this line...it works perfectly fine.
    Any pointers to where anything is getting wrong.
    I have jst set the vendorCon to null in the end of the file and not closed it. Subsequently i have closed the logicalCon. This has been mentioned in some of the thread in this forum also.
    Thanks,
    -jw

    Jatinder Wadhwa wrote:
    I 've gone through various threads relating to the topic of Oracle Arrays and the getVendorConnecton API call to avoid the class Cast Exception.. i ve used all these but am still facing the problem...
    I would appreciate it if some one could resolve the following queries :
    I am using Weblogic 8.1 SP5 with oracle 8i
    1. I read that the need to use the getVendorConnection API to make pl/sql proc calls with oracle arrays from the WL Server wont be required to avoid classCastException...
    I tried to use the connection from the WL connection pool ..but it didnot work....I used the getVendorConnection API ..which also doesnot seem to work..
    I got the Heurisitc Hazard exception...I used the Oracle 9i driver ie ojdbc14.jar ...after this the exception is not coming but still the code doesnt seem to work...
    the snippet of the code is pasted below :
    ~~~~~~~~~~~~~~~~~~~~~~~code is : ~~~~~~~~~~~~~~~~~~~Hi. Show me the whole exception and stacktrace if you do:
    try
    vendorConn = ((WLConnection)logicalCon).getVendorConnection();
    java.util.Map childMap1 = vendorConn.getTypeMap();
    childMap1.put("SST_ROUTE_ENTRY" Class.forName("svm.stport.ejb.StaticRouteEntry"));
    vendorConn.setTypeMap(childMap1);
    oracle.sql.ArrayDescriptor arrayDesc1 =
    oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR",
    vendorConn);
    oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, vendorConn, arrayValues1);
    callStatement = logicalCon.prepareCall( "? = call procName(? ? ?)");
    callStatement.execute();
    }catch(Exception e){
    e.printStackTrace();
    finally
    try{logicalCon.close();}catch(Exception ignore){}
    System.out.println(" I ve come to finally");
    /*below :
    logicalCon is the Connection from the WL connection pool
    JDBCcon is the JDBC connection. */
    <div> try </div>
    <div>{ </div>
    <div>
    <b>vendorConn</b> = ((WLConnection)logicalCon).getVendorConnection();
    </div>
    <div>
    //Calling the procedure
    </div>
    <div>
    //java.util.Map childMap1 = JDBCcon.getTypeMap();
    </div>
    <div>
    java.util.Map childMap1 = <b>vendorConn</b>.getTypeMap();
    </div>
    <div>
    childMap1.put("SST_ROUTE_ENTRY", Class.forName("svm.stport.ejb.StaticRouteEntry"));
    </div>
    <div>
    //JDBCcon.setTypeMap(childMap1);
    <b>vendorConn</b>.setTypeMap(childMap1);
    </div>
    <div>
    // Create an oracle.sql.ARRAY object to hold the values
    </div>
    <div>
    /*oracle.sql.ArrayDescriptor arrayDesc1 = oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", JDBCcon); */
    </div>
    <div>
    oracle.sql.ArrayDescriptor arrayDesc1 =
    oracle.sql.ArrayDescriptor.createDescriptor("SST_ROUTE_ENTRY_ARR", <b>vendorConn</b>); // here if i use the JDBCcon it works perfectly.... <u>^%^%^%</u>
    </div>
    <div>
    code to fill in the sst route entry array....
    .....arrayValues1 */
    </div>
    <div>
    /* oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, JDBCcon, arrayValues1); */
    </div>
    <div>
    oracle.sql.ARRAY array1 = new oracle.sql.ARRAY(arrayDesc1, <b>vendorConn</b>, arrayValues1);
    </div>
    <div>
    callStatement = logicalCon.prepareCall( "? = call procName(?, ?, ?)");
    </div>
    <div>
    /* ..code to set the ?s ie array1 */
    </div>
    <div>
    callStatement.execute();
    </div>
    <div>
    }catch(Exceptio e){
    </div>
    <div>
    }</div>
    <div>
    finally </div>
    </div>{</div>
    <div>System.out.println(" I ve come to finally"); </div>
    <div>}</div>
    <div>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~code snippet ends here ~~~~~~~~~~~~~~``
    </div>
    I have observed that the control immediately comes to the finally block after the call to the createDescriptor line above with <u>^%^%^%</u> in the comment. If i use the JDBCCon in this line...it works perfectly fine.
    Any pointers to where anything is getting wrong.
    I have jst set the vendorCon to null in the end of the file and not closed it. Subsequently i have closed the logicalCon. This has been mentioned in some of the thread in this forum also.
    Thanks,
    -jw

  • Large Arrays and Memory

    I'm supposed to be working on code for a lab, and they have reported possible problems with labVIEW eating through memory on long experiments.  Someone before me tried to fix the problem but I am unsure if it is actually helping.  (I'm more familiar with languages like C++, and have not used labVIEW prior to this summer). 
    Where I believe the problem lies is with the array (within a loop).  Depending on the experiment the arrays will be of different sizes so how they handle the array is:
    -> It is an array of a cluster of 2 elements
    -> The array is wired to a shift register.
    -> The shift register is initialized prior to the loop opening by wiring the shift register to a cluster of 2 "0's".
    ->Each loop cycle they add new data (a new cluster) to the array using "Build Array"
    There are multiple of these arrays all being plotted so they use "Build Cluster Array" and then wire it to the corresponding Plot (an XY Graph).  They use this after "Build Array".
    This used to be it, so the arrays would grow large and crash the program.  Someone before me added an option to clear the arrays, but I am unsure if the way she designed it actually releases the memory since they are still reporting some problems.  The user enters a number in a control "Clear After:".  On every iteration that is a multiple of that number, the program passes the shift register an array with one element.  The array that is passed set up the same as the array passed for the initialization process. 
    My concern is that the code never specifically says delete the array or release the memory.  It feels very similar to the situation in C++ when the programmer dynamically creates an array (using new) but never deallocates the array (using delete), instead they just change where the pointer is pointing.  There the memory would still be tied up and unusable. 
    So I guess my question is, looking at the process above do I need use "Delete from Array" to release the memory and allow the program to run faster on longer experiments with large datasets or does labVIEW automatically deallocate that memory and therefore I should I be looking elsewhere in my program for processes that would slow down everything on longer experiments?
    Thanks,
    Val
    Solved!
    Go to Solution.

    I have attached a photo of the portion of code that I was referring to.  It shows 2 photos so you can see all possibilities in the 2 case statements.
    The first picture is when the cycle is adding new data points, and does not clear the array.
    The second picture shows the program passing through the array (which it does every second cycle) and then "clearing" the array.  (Which as I state above, I didn't know if that was correct).
    (None of this is actually my code, I was hired on to upgrade them from labVIEW 5.1 to labVIEW 2009.  They just asked me to look at this.  It seems to work fine on smaller length experiments on the order of a couple of hours).  If you need anything else from me, don't hesitate to ask.
    Thanks,
    Val
    Attachments:
    loop.docx ‏105 KB

  • How to ask for an array and how to save the values

    I'm supposed to be learning the differences between a linear search and a binary search, and the assignment is to have a user input an array and search through the array for a given number using both searches. My problem is that I know how to ask them how long they want their array to be, but I don't know how to call the getArray() method to actually ask for the contents of the array.
    My code is as follows:
    import java.util.Scanner;
    import java.util.ArrayList;
    public class Main
        private static Scanner input = new Scanner(System.in);
        public static void main (String args[])
            //creates ArrayList
            int List[];
            System.out.println("How long would you like the array to be?");
            int arrayLength = input.nextInt();
            //Initializes array list
            List = new int [arrayLength];
            System.out.println("Please enter the first value of the array");
        public static void getArray(int List[], int arrayLength)
            for(int i=0; i < arrayLength; i++) {
                 System.out.println("Enter the next value for array");
                 List[i] = input.nextInt();
         public static void printArray(int List[])
             for(int i=0; i < List.length; i++)
                 System.out.print(List[i] + " ");
    public class search
        public static int binarySearch(int anArray[], int first, int last, int value)
            int index;
            if(first > last) {
                index = -1;
            else {
                int mid = (first + last)/2;
                if(value == anArray[mid]) {
                    index = mid; //value found at anArray[mid]
                else if(value < anArray[mid]) {
                    //point X
                    index = binarySearch(anArray, first, mid-1, value);
                else {
                    //point Y
                    index = binarySearch(anArray, mid+1, last, value);
                } //end if
            } //end if
            return index;
        //Iterative linear search
        public int linearSearch(int a[], int valueToFind)
            //valueToFind is the number that will be found
            //The function returns the position of the value if found
            //The function returns -1 if valueToFind was not found
            for (int i=0; i<a.length; i++) {
                if (valueToFind == a) {
    return i;
    return -1;

    I made the changes. Two more questions.
    1.) Just for curiosity, how would I have referenced those methods (called them)?
    2.) How do I call the searches?
    import java.util.Scanner;
    import java.util.ArrayList;
    public class Main
        private static Scanner input = new Scanner(System.in);
        public static void main (String args[])
            //creates ArrayList
            int List[];
            System.out.println("How many values would you like the array to have?");
            int arrayLength = input.nextInt();
            //Initializes array list
            List = new int [arrayLength];
            //Collects the array information
            for(int i=0; i < arrayLength; i++) {
                 System.out.println("Enter a value for array");
                 List[i] = input.nextInt(); 
            //Prints the array
            System.out.print("Array: ");
            for(int i=0; i < List.length; i++)
                 System.out.print(List[i] + " ");
            //Asks for the value to be searched for
            System.out.println("What value would you like to search for?");
            int temp = input.nextInt();
            System.out.println(search.binarySearch()); //not working
    }

  • Main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)

    main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)
    The path(Grundpfad)for the excel file should be inserted in the main.vi.

    1. There's a shipping example called Write Table To XL.vi (Help>Find Examples>Communicating with External Applications>ActiveX>Excel) that you can use as a starting point.
    2. Buy the LabVIEW Report Generation Toolkit. Info can be found here.
    3. Search this forum for other examples of writing to Excel.

  • How to save data in a 4D array and make partial plots in real time?

    Hi, this is a little complex, so bear with me...
    I have a test system that tests a number of parts at the same time. The
    experiment I do consists of measuring a number of properties of the
    parts at various temperatures and voltages. I want to save all the
    measured data in a 4-dimensional array. The indices represent,
    respectively, temperature, voltage, part, property.
    The way the experiment is done, I first do a loop in temperature, then
    in voltage, then switch the part. At this point, I measure all the
    properties for that condition and part and want to add them as a 1D
    array to the 4D array.
    At the same time, I want to make a multiple plot (on an XY graph) of
    one selected property and part (using two pull-down selectors near the
    XY graph) vs. voltage. (The reason I need to use an XY graph and not a
    waveform graph, which would be easier, is that I do not have
    equidistant steps in voltage, although all the voltage values I step
    through are the same for all cases). The multiple plots are the data
    sets at different temperatures. I would like to draw connection lines
    between the points as a guide to the eye.
    I also want the plot to be updated in the innermost for loop in real
    time as the data are measured. I have a VI working using nested loops
    as described above and passing the 4D array through shift registers,
    starting with an array of the right dimensions initialized by zeroes. I
    know in advance how many times all the loops have to be executed, and I
    use the ReplaceArraySubset function to add the measured properties each
    time. I then use IndexArray with the part and property index terminals
    wired to extract the 2D array containing the data I want to plot. After
    some transformation to combine these data with an array of the voltage
    values in the form required to pass to the XYGraph control, I get my
    plot.
    The problem is: During program execution, when only partial data is
    available, all the zero elements in the array do not allow the graph to
    autoscale properly, and the lines between the points make little sense
    when they jump to zero.
    Here is how I think the problem could be solved:
    1. Start with an empty array and have the array grow gradually as the
    elements are measured. I tried to implement this using Insert Into
    Array. Unfortunately, this VI is not as flexible as the Replace Array
    Subset, and does not allow me to add a 1D array to a 4D array. One
    other option would be to use the Build Array, but I could not figure
    out if this is usable in this case.
    2. The second option would be to extract only the already measured data
    points from the 4D array and pass them to the graph
    3. Keep track of the min. and max. values (only when they are different
    from zero) and manually reset the graph Y axis scale each time.
    Option 3 is doable, but more work for me.....
    Option 2: I first tried to use Array Subset, but this always returns an
    array of the same dimensionality of the input array. It seems to be
    very difficult, but maybe not impossible, to make this work by using
    Index Array first followed by Array Subset. Option 3 seems easier.
    Ideally, I would like option 1, but I cannot figure out how to achieve
    this.
    Your help is appreciated, thanks in advance!
    germ Remove "nospam" to reply

    In article <[email protected]>,
    chutla wrote:
    > Greetings!
    >
    > You can use any of the 3D display vi's to show your "main" 3d
    > data, and then use color to represent your fourth dimension. This can
    > be accessed via the property node. You will have to set thresholds
    > for each color you use, which is quite simple using the comparison
    > functions. As far as the data is concerned, the fourth dimension will
    > be just another vector (column) in your data file.
    chutla, thanks for your post, but I don't want a 3D display of the
    data....
    > Also, check out
    > the BUFFER examples for how to separate out "running" data in real
    > time.
    Not clear to me what you mean, but will c
    heck the BUFFER examples.
    > As far as autoscaling is concerned, you might have to disable
    > it, or alternatively, you could force a couple of "dummy" points into
    > your data which represent the absolute min/max you should encounter.
    > Autoscaling should generally be regarded as a default mode, just to
    > get things rolling, it should not be relied on too heavily for serious
    > data acquisition. It's better to use well-conditioned data, or some
    > other means, such as a logarithmic scale, to allow access to all your
    > possible data points.
    I love autoscaling, that's the way it should be.
    germ Remove "nospam" to reply

  • Data from a file to an array and opposite

    Aloha! Hope you can help me on this one!
    I need to read from a text (sequencial) file into an array, work on it and then save it to the origin file. How do I do this? I can only get examples of string->file file->string
    Thanx in advance! :))

    Hum...what I need to do is take one file and read some of it's lines into the first position of the array; and so on for the next positions. Here are the first 2 sets of lines of the file:
    They represent students, wich I need to load into a CardType type array:
    11
    Albert Einstein
    100
    2
    B
    234
    120
    45
    2002 11 18 //date
    8 0 0 //time
    2002 11 15 //date
    16 20 0 //time
    Stephen Jay Gould
    235
    3
    A
    512
    100
    50
    2002 11 18 //date
    8 20 0 //time
    2002 11 18 //date
    12 30 0 //time

  • RAID 5 array. 2 arrays (/) and (/home) - asks about this

    Hello pals. On wiki, we'have that it's necessary create the array with mdadm, after assemble, and after installs arch like anyother disk system, just add while in chroot "mdadm_udev" and run "mkinitcpio -p linux"
    My question, however, is:
    In a first try, I don't know if I did the mistake, but my /home partition were mounted, with, the root partition. So "not enough space".
    I've reinstalled all again, Everithing working since, but yesterday, arch halts and, after reboot, I "lost" my /home, and not "md0" and "md1" devices, but "md126" and "md127" ones are founded on my arrays, and, no more linux.
    fsck didn't work (not found the uuid XXXX partition"
    I'm using a RAID5 scheme with "md0" as /root and "md1" as /home. md0 with 3 hard disks and md1 with three too.
    RAID is a LSICorp with 21320R 6 bay. HD SCSI
    partition type were XFS to "root" and "ext4" to /home.
    Begginer's guide to install, and
    https://wiki.archlinux.org/index.php/RAID
    to create RAID

    Ok... everything reinstaled.
    sdc                                                                       
    └─sdc1  linux_raid_member archiso:0   5a556144-7cad-36e1-b969-300e33e42055
      └─md0 xfs               root        3cd56eab-5747-4468-92e0-d53baf0d5544 /
    sdd                                                                       
    └─sdd1  linux_raid_member archiso:0   5a556144-7cad-36e1-b969-300e33e42055
      └─md0 xfs               root        3cd56eab-5747-4468-92e0-d53baf0d5544 /
    sde                                                                       
    └─sde1  linux_raid_member archiso:0   5a556144-7cad-36e1-b969-300e33e42055
      └─md0 xfs               root        3cd56eab-5747-4468-92e0-d53baf0d5544 /
    sdf                                                                       
    └─sdf1  linux_raid_member archiso:1   d27f91fb-ed92-12a7-340c-11b8636d491f
      └─md1 ext4              home        6cb919d4-9016-4a7b-8336-01a1244a0630 /home
    sdg                                                                       
    └─sdg1  linux_raid_member archiso:1   d27f91fb-ed92-12a7-340c-11b8636d491f
      └─md1 ext4              home        6cb919d4-9016-4a7b-8336-01a1244a0630 /home
    sdh                                                                       
    └─sdh1  linux_raid_member archiso:1   d27f91fb-ed92-12a7-340c-11b8636d491f
      └─md1 ext4              home        6cb919d4-9016-4a7b-8336-01a1244a0630 /home
    cat /proc/mdstat
    cat /proc/mdstat
    Personalities : [raid6] [raid5] [raid4]
    md1 : active raid5 sdh1[3] sdg1[1] sdf1[0]
          142884864 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
    md0 : active raid5 sde1[3] sdc1[0] sdd1[1]
          70778880 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
    /etc/fstab
    # /etc/fstab: static file system information
    # <file system> <dir>   <type>  <options>       <dump>  <pass>
    # /dev/md0 LABEL=root
    UUID=3cd56eab-5747-4468-92e0-d53baf0d5544       /               xfs             rw,relatime,attr2,inode64,logbsize=64k,sunit=128,swidth=256,noquota  0 1
    # /dev/md1 LABEL=home
    UUID=6cb919d4-9016-4a7b-8336-01a1244a0630       /home           ext4            rw,relatime,stripe=192,data=ordered  0 2
    Anything to change?
    I remember that the ~last problem~ were during a upgrade.

  • I would like to migrate from Aperture. What happens to my Masters which are on a RAID array and then what do I do with my Vault which is on a separate Drive please ?

    I am sorry, but I do noisy understand what happens to my RAW original Master files, which I keep offline on a RAID array and then what I do with my Vault which as all my edited photos ? Sorry for such a simple question, but would someone please help my lift the fog ?
    Thanks,
    Rob

    Dear John ,
    Apologies, as I am attempting to get to the bottom of this migration for my wife ( who is away on assignment ) and I am not 100% certain on the technical aspects of Aperture, so excuse my ignorance.
    She has about 6TB worth of RAW Master images ( several 100 thousand ) which, as explained, are on an external RAID drive. She uses a separate Drive as a Vault . Can I assume that this Vault contains all of her edits, file structures , Metadata, etc ?
    So, step by step........She can Import into Lightroom her Referenced Masters from her RAID and still keep them there ? Is that correct ?
    The Managed Files that are backed up by her Vault , are in the pictures folder of her MacPro, but not in a structure that looks like her Aperture library ? This means Lightroom will just organize all the Managed files, simply by the date in the Metadata ? Am I correct ( Sorry for being so tech illiterate ).
    How do I ensure she imports into Lighgtroom in exactly the same format as she runs her workflow in Aperture ?  ( Projects, that are organized by year and shoot location and Albums within those projects with sub-locations, or species , etc ). What exactly do I need to do in Aperture please to organize Managed Files to create a mirror structure of Aperture on my internal Hard Drive ?
    There are a couple of points I am unsure about in regard to Lightroom. Does it work in the same way as Aperture ? Meaning, can she still keep Master Files on an external RAID and Lightroom will reference them ? If the answer is yes, how do you back up your Managed ( edited ) work in Lightroom ? ( Can you still use an external Drive as a Vault ? ) . Will the vault she uses now be able to continue to back up Managed Files post migration ?

  • Dynamically create empty mcs and asign elements from array and loadmovie

    I'm creating an educational game for my school students.
    A little boy is flying through the city when he encounters objects flying from left to right.
    He hears a SOUND eg: Dog - he must go and click the dog image with the flying cursor. There are at least 5 DIFFERENT objects that should be flying on the screen. There could be various of them at any one time.
    I have the roots of the images in an xml file. And the actual swf are in a file called IMAGE and the sounds in SOUND.
    My problem is that most tutorials I see use the attachmovie method but I don't want to put all the swf's in the library as there are hundreds.
    I have to use the loadmovie method.
    I take it I have to loop through the array and assign each element to an empty movieclip which in turn is in the loop so you get 5 empty clips - I will use i (index). It doesn't seem to be working. I shall keep trying and post back here if I get any luck but I'm running out of ideas.
    Then the objects have to float across the screen. Don't know whether to use tween object or onEnterFrame handler or other. AND someone has mentioned using setinterval to "spit out" the objects.
    BUT if I have five flying across the screen I'm left without clips to stick in any more.
    Oh my head hurts but I will keep going.
    CHEERS if any help is around. This should be quite a standard thng for game developpers. Code at the moment
    function loadEnemies():Void {
    enemy_xml = new XML();
    enemy_xml.ignoreWhite = true;
    enemy_xml.onLoad = function(success:Boolean) {
    if (success) {
    _root.parseEnemyXML();
    //enemy_xml.load("level_"+level+".xml");
    enemy_xml.load("data/animal_catch.xml");
    function parseEnemyXML():Void {
    rows = enemy_xml.firstChild.childNodes.length;
    for (var i:Number = 0; i<rows; i++) {
    var row_string:String = String(enemy_xml.firstChild.childNodes[i].firstChild.firstChild);
    _root["row_"+i+"_array"] = row_string; //MAIN ARRAY holds an array images/dog_a.swf/ images/cat_a.swf etc... all five
    _root.createEmptyMovieClip("enemyObjects", 1);
    enemyObjects.createEmptyMovieClip("holder_"+i, i);
    _root["object"+i] = new Sound(enemyObjects["holder_"+i]);
    trace(row_string);
    loadMovie["row_"+i+"_array"], ["holder_"+i]
    if (level == 1) {
    alerts_mc.play();
    } else {
    currRow = 0;
    rowCounter = 0;
    OK got to about here BUT
    a. I started to get confused around the createEmptyMovieClip part
    b. I KNOW I shouldn't have Sound(enemyObjetcs etc... BUT I copied the code from a tutorial and I don't know what to replace it with.
    I'm close but I need a little polishing.

    It doesn't do you much good to work with borrowed code that you do not understand.  Your best bet will be to start small, creating one functional piece of the puzzle at a time, and work your way up.  Start with making sure you are loading and parsing the xml properly, then set about loading the external content, then see about making that content move around, etc...
    In the code you show, your loadMovie line of code does not resemble anything I have seen before, looking more like (but not quite like) a multi-dimensional array element than a loadMovie() function call.  If you find you need to have control of the items as soon as they load, then you should consider using MovieClipLoader.loadClip instead of loadMovie.  The MovieClipLoader class provides features, such as to be able to determine when items have fully loaded.

  • How to create a grid with arrays and booleans?

    As part of a bigger project, I'm trying to create a sub-VI which will allow me to move a "cursor" in a 3x3 array.
    There should be 2 boolean inputs, one for moving down in the array, and the other for moving to the right. Once the edge of the array has been reached, the "cursor" will start back from the beginning.
    I have a vague idea of a 2 dimensional array with LED's. Once "down" has been pressed, the LED corresponding to (0,0) will turn off, turning (0,1) on. Same goes for the "right" button. When "down" is pressed at (0,2), the LED should turn off, and LED (0,0) should turn on.
    I'm sure it has something to do with initializing arrays, but i can't seem to find the right way to do it.
    Any kind of assistance is much appreciated. Thanks!
    Solved!
    Go to Solution.

    Maybe this will help.
    Oh, I just noticed that I could have done the "Clear True" outside of the inner case structure and some other things too, but oh well - it works.
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    grid_png.vi ‏14 KB

  • Inserting Records in an Array and using a constructor with it

    I badly need help on this! Please please please! I have been studying java for a short time only.
    Anyway, here goes: My project requires the following:
    Employee inputs the no. of video in the shelf. They have four classifications: Drama, Comedy, Action, and Thriller. Each video classification has different rates. The employee creates a video record containing the following information: 1. video ID number, 2. video classification, and 3. Price.
    The employee should display the classifications of videos available and the price. Only the available video tapes would be displayed according to the customer's chosen classification. When the customer chooses the video he wants to rent, the program will register and attach the name of the customer to the video number.
    I only need to use arrays, and NOT database to record the information.

    is it ok i i declare the drama_rate outside the video class?
    i have a list of variables on my videoupdate classYes. It's probably best to declare it static & then you can access it directly:
    public static float drama_rate = 100.0;
    rate = <the class name>.drama_rate;
    so, i should also include a customer no. both in the video and customer class.I would. You may want to list a bunch of videos and who currently has them. This way you don't have to search the customers AND the videos to do this.
    thanks =) i don't know either why we had to validate/invalidate,\
    but our applet doesnt refresh when >it is supposed to, so
    we just used this method. It wouldnt slow down the application, would it?Could you just revalidate()?
    the use of arrays. i havent finished with the program yet.
    i have the design already, i just couldnt put it in code.
    im not familiar with the use of multidimensional arrays-
    can i use this for the video and customer records i will need to store?Not sure what you're using arrays for, but here's an example of something I might do. Maybe it will be useful to you.
    Have you looked at HashMaps? You could use "Customer" as the key and then use an ArrayList of checked out Videos as the value:
    HashMap customers = new HashMap();
    ArrayList videos = new ArrayList();
    //Add the checked out videos to the list
    videos.add(video);
    <etc>
    // Add this customer and the list of videos he has checked out.
    customers.put(customer,videos);
    [\code]

  • Excel & ActiveX: Insert arbitrary columns from 2D array and create graph problems

    Hi there,
    I want to insert data from either a 1D or 2D array from LabView into Excel and create graphs.
    I used the information from the following example:
    http://www.ni.com/example/28934/en/
    and was able to create a new Excel file (I'm using Excel 2010), writing data from an 1D array to a column in excel by creating a while loop and using the first element of the array to write it to a specific cell. I use the counter of the loop to write to the next cell when the loop starts over and always delete the first value, which I write to the cell, from the array until it is empty.
    Now I also would like to write a 2D array - so the first column in Excel should be the first column from the array and so. Here I cannot use the loop counter directly as Excel only counts 1,2,... for the rows, but uses A,B,... to count columns. Also I do not know in advance how many columns my 2D array will contain, so creating a lookup table like (A means 1, B means 2,...) is not really an option (except there really is no other way). Is there a possibilty to convert numbers into letters or some way to 'explain' to the program that column 2 in the array means column B in Excel for example, or is there a way to insert new columns?
    I figured out how to add new Worksheets and as I also need to create a certain number of Worksheets and I know that on standard 3 sheets are present when creating the file, I use the 'add' methode to create every new worksheets before worksheet 3 - I could use the same methode to create new columns in Excel, but so far I didn't find a methode to do so. Or is there a way to enter the whole 2D array at once?
    Then I'd like to create a graph (in case of the 1D arrays a bar plot, when using 2D arrays a 3D plot) to view the data. I found this example:
    http://www.ni.com/newsletter/51339/en/
    -> as I do not have the toolkit I'd like to do it using ActiveX directly, so I tried to do things like shown under the headline 'DIY ActiveX/.NET'
    I tried to load the snippet to a new Excel file but got the error message 'microsoft.office.interop.excel.dll not found' and hence the code is not working. That confuses me a little as I would guess when this dll is not present I cannot access Excel from LabView at all, though my understanding of what I'm really doing so far is quiet limited. ;-)
    Also - as far as I understand from the snippet - when creating a new chart object I should be able the create methodes for it, however when I do a right click on the chart object of an ActiveX Worksheet symbol there are none listed.
    To explain my problems better I added a snippet showing my two problems: The inner of the two while loops shows how I import a 1D array. In the outer loop I seperate the columns. I know that currently this is not working as all data end up in column A of the Excel sheet - so I would need to convert the number of the outer counter to A, B,... or find a different solution.
    Moreover on the snippet I placed an ActiveX Worksheet Property with the Chart Object - as I can see the difference to the Chart Object in the example code from the last link above is the color. However I'm not sure what that means and how to change/ solve this.
    And just to make sure - I know this way the VI does not run as the Chart Object is placed completely wrong - I just did it, so it is included in the snippet.
    I'd be thankful for any suggestions,
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    ExcelAreaScan.png ‏60 KB

    Hello everyone and thanks for the answers.
    I only have the LabView Student Edition available here - is the toolkit included in it too. How can I check if it is installed/ available and in case it is installed - where can I find it?
    Today I had time to take a look at the example
    Create via ActiveX Labview a XY Scatter plot graph on an excel sheet
    It almost does what I want in terms of creating a graph. The only problem I could not fix, is that in this example a sheet is created where only the graph is present. i'd like to add the graph to a previously created worksheet. Today I tried get this working but it seems I stilll don't really understand what I'm doing, I'll post a snippet of my code as soon as I can access the PC with LabView on it again.
    I also took a look at the other example for inserting 2D attays - it seems to be what I need, I just had no time so far to test it, I'll post an update when I could test it.
    Thanks for the help so far!

Maybe you are looking for

  • HP Printer Software Update 2.10 causes application crashes

    Installed the above update two days ago. Since then whenever I try and print from an application e.g Mail or Firefox, with my HP2550n colour laser the application crashes and says "'Application' quit unexpectedly while using HPPrintSettings plugin.'

  • My Java File gets a .LCK file attached - do not want it there

    I have a couple of Java files. When I go to compile them the IDE will not enable the compile option from the drop down list. I found there is a .LCK file in the same directory with the same name as my File.. IE if my file name was Basketballs.java th

  • How do I get a word documewnt in Downloads under "Tools" to open? I can't find the original document.

    My wife opened a word document from her e-mail but didn't save it. I see it under Tools-downloads but can't get it to open. Does anyone have a suggestion? I think she deleted the e-mail and it is not in her deleted Items nor in Word under recent...

  • Popup- ok and cancel button

    Hello, The popup 'X' has nested view 'Y' and Ok, Cancel buttons. Nested View 'Y' has a start point, a Data service, a table with single column 'Z' and a out-port (configured to event Select), from the out-port, close pop-up endpoint is connected whic

  • How do I know if I am at 300 dpi in iPhoto?

    I have to send jpegs of my artwork for a bid.  They want the jpegs to be a maximem size per image 300 dpi.  How do I know if I am at 300 dpi in iPhoto?