Cloning an array and reflection magic

* Arrays support cloning. But why is not possible to fetch an
* arrays clone()-method using reflection? Or is it anyway?
* Please watch out for the calls to getMethod() and clone()
* in this class' main()-method. Perhaps I missed something. Thank you!
import java.lang.reflect.Method;
public class Question {
public static void main (String[] args) {
Object[] array = new Object[5];
try {
Class c = array.getClass();
//! throwing a NoSuchMethodException!
Method m = c.getMethod("clone", null);
m.invoke(array, null);
} catch (Exception e) {
e.printStackTrace();
// but this is works properly:
array.clone();
}

// ...and now I've discovered the -tag...
import java.lang.reflect.Method;
public class Question {
public static void main (String[] args) {
Object[] array = new Object[5];
// throwing a NoSuchMethodException!
try {
Class c = array.getClass();
Method m = c.getMethod("clone", null);
m.invoke(array, null);
} catch (Exception e) {
e.printStackTrace();
// but this is o.k.
array.clone();

Similar Messages

  • Help plz regarding array and DB

    hi ,
    i have a problem regarding sorting.
    I have 1 million records in my DB table.
    When i open my swing application i sort the records in table [ORDER BY col1,col3,col4] like that and want that order record ids .
    upto here no problem.i am getting the ids in array and in my swing application when i go next i get from arrray the next record.
    but the problem is since the volume of the table is large if any addition r deletion to the table is not reflecting in the sorted order array.
    i can simply again call the database and sort it an update the error.but it proved very insufficent way.
    so i am looking something to optmise the sorting.
    i got an idea like using view .but i am looking anybody knows any workaround alogrithm for this.
    sree

    Here is an example taken from the ResultSet API Doc's. Note the constant type of "TYPE_SCROLL_SENSITIVE" for the type of ResultSet. Is this what you are using? (I have not tried this, but it is the solution that is put forth in my books and documents.)
           Statement stmt = con.createStatement(
                                          ResultSet.TYPE_SCROLL_SENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);
           ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
           // rs will be scrollable, will not show changes made by others,
           // and will be updatable

  • 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

  • EasyLink Advisor and Network Magic together - Why?

    I am running a Toshiba laptop with Windows XP(MCE) SP3, wireless on a home network with a WRT300N V1.1 router - conecting this laptop, Lexmark X4550 wireless printer, a PS3(80), 3 PSP's, a desktop HP running Windows SP2 with a USB g adapter.   I have updated LELA to (Version 3.11 build 9139.94 Platform version: 11.2.9195.1); and Network Magic to (Version: 5.5.9195.0-Pure0 Platform version: 11.2.9195.1 Updated 8/19/2009).  I am running a Clearwire wireless broadband modem to the internet and the back of the router.  So far, everything seems to be running fine.
    My question is why am I running two different systems from Linksys to manage my router?  Do I need both of them, even though they seem to be a little different? Which one is the future standard for Linksys?  Do I lose anything by deleting one of them, or do I gain anything by keeping both of them?  They do not seem to interfere with each other - it is just confusing.
    LELA seems to be the better one now that both have been upgraded to the newer sotware.
    Please advise.  Thanks... 
    Toshiba Satellite P105-S0684 laptop with Windows XP(MCE) SP3, Intel Pro/100 VE wired and Intel Pro/Wireless 3945ABG wireless. Network with a WRT300N V1.1 router (Firmware version V1.51.2) - conecting this laptop, Lexmark X4550 wireless printer, a PS3(80), 3 PSP's, a desktop HP running Windows XP(Pro) SP2 with a USB g adapter. I have updated LELA to (Version 3.11 build 9139.94 Platform version: 11.2.9195.1); and Network Magic to (Version: 5.5.9195.0-Pure0 Platform version: 11.2.9195.1 Updated 8/19/2009). I am running a Clearwire wireless broadband modem to the internet and the back of the router.

    toomanydonuts wrote:
    My understanding is that there should be no port scan attempts coming through the router.  Normally all the router's ports are closed, so no port scan should be coming through the router.
    That's my understanding as well, but, unfortunately, I am still getting ports being scanned from remote IPs. :-(
    Possible sources for this would be:
    1)  another computer on your network is sending out the port scan
    2)  a wireless printer on your network is opening ports  ( I have an HP wireless printer that does this).
    3)  someone is connecting wirelessly to your network, and scanning ports
    1) I only have one computer.
    2) Believe it or not I don't have a printer. :-)
    3) The router is connected to my computer via ethernet cable, so (I assume) I have (hopefully) turned off the wireless part of the router.
    To verify that the router's ports are closed, go to Gibson Research at grc.com , and click on the "Shields UP!" test.  Scan your ports and see if any of them are open.  The Shields UP! program WILL do a port scan, so you can also see if your computer's firewall complains during this test.
    I have done the above and the ports that "Shields Up" scans are stealthed.
    If you do find ports open, the most likely cause is a program, running on one of your computers, that is opening ports.
    All the programs that I use I have used for a number of years.  With the D-Link router that I used I did not have this "problem".  Having said that I am not interested in going back to the D-Link router.  Hopefully this problem that I am having with my Linksys router can be rectified. :-)
    Report back with the results of the scan.
    Message Edited by toomanydonuts on 01-23-2008 02:02 AM
    Thank you very much for your help toomanydonuts!!!
    Servalan

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

  • Running Boot Camp in Windows 7 with Bluetooth Wireless Keyboard and Wireless Magic Mouse

    NOTE: I was installing a fresh copy of Windows 7 Professional on a 27" iMac mid-2010 with a Processor Speed of 2.93 GHz, a Core i7 Processor Type,  a Quad Core Processor Configuration, 8GB RAM, and a ATI Radeon HD 5750 Graphics Card.  I run Snow Leopard so it is a 64-bit OS.  I have a Wireless Keyboard and Wireless Magic Mouse as well.  In order to install Windows 7 you need a Wired Keyboard and Mouse.  You will also need a Wired Keyboard and Wired Mouse to update Boot Camp.
    Updating Boot Camp Assistant (VERY IMPORTANT)
    First, plug in a wired keyboard and wired mouse.  The Boot Camp Assistant version that came with my iMac was 3.0 so I upgraded it to 3.1 and then to 3.2.  I'm not sure if only the upgrade to 3.1 is necessary, but I took it a step further.  I was told by Apple Tech Support that you first needed to upgrade to version 3.1 before being able to upgrade to 3.2  These upgrades will not be found using Software Update on the Mac.  However, they can be found at http://support.apple.com/downloads/#macoscomponents
    They also have software updates for 32-bit machines as well and MacBook Pro updates.
    NOTE: Before updating the version of Boot Camp, but after installing Windows 7 and after putting in the Mac OS X Install DVD to run Setup.exe to download the Mac drivers, run Software Update for the Mac while logged into Windows 7 by clicking on Start - All Programs - Software Update for any additional updates.
    Next I installed Boot Camp Software Update 3.1 for Windows 64 bit found at http://support.apple.com/kb/DL1336
    I then ran Software Update for the Mac while logged into Windows 7 by clicking on Start - All Programs - Software Update
    Then I installed Boot Camp Software Update 3.2 for Windows 64 bit found at http://support.apple.com/kb/DL979
    I then installed Boot Camp 3.2 Update for iMac (early 2011) found at http://support.apple.com/kb/DL979 but I'm not sure if this was necessary.
    Once Boot Camp 3.2 has been installed I ran Software Update for the Mac again while logged into WIndows 7 to make sure I had all the updates.
    Configuring a Bluetooth device on a Windows-based computer
    (from http://support.microsoft.com/kb/952818)
    How to make sure that the Bluetooth service is started (MY COMPUTER WAS ALREADY SET UP TO RUN BLUETOOTH, SO THE NEXT 8 STEPS COULD BE OPTIONAL)
    Open the Microsoft Management Console (MMC) snap-in for Services. To do this, follow these steps.
    Windows Vista or Windows 7Windows XP
    Click Start, and then click Run.
    Copy and then paste (or type) the following command in the Open box, and then press ENTER:services.msc
    Click Start , copy and then paste (or type) the following command in the Start Searchbox, and then press ENTER:services.msc
    In the Programs list, click Services.
    If you are prompted for an administrator password or for confirmation, type the password, or click Continue.
    Double-click the Bluetooth Support service.
    If the Bluetooth Support service is stopped, click Start.
    On the Startup type list, click Automatic.
    Click the Log On tab.
    Click Local System account.
    Click OK.
    If you prompted to restart the computer, click Yes.
    How to connect the Bluetooth device to the computer
    1. First off, you need to go into Mac OS and remove the keyboard and mouse from your Bluetooth settings entirely. You'll add them back in later (see 9) below).
    2. Boot into Windows using a USB connected Mouse and Keyboard.
    3. Go to Control Panel – Hardware and Sound – Device and Printers – Add a Device
    4. Turn on the Mouse to send out a signal and once it sees it select it to be paired to the computer
    5. Run 3.) again except select the keyboard.
    6. Turn on the Keyboard to send out a signal and once it sees it select it to be paired to the computer by typing in the 8 digit number into the wireless keyboard and hit ENTER/RETURN.
    7. To see if everything was added go to Devices and Printers and see if they were added to the list.
    8. Shutdown Windows 7 and Restart using Mac OSX.  If you adjusted the Boot Camp settings while in Windows 7 you will see a Boot Camp icon in the system tray located at the bottom right of the screen.  From here you can logoff and reboot in Mac OSX.  If you don't, do a RESTART and hold the Option key down after hearing the GONG and select the Mac HD option while logging in.  Now it's time to add back the wireless mouse and keyboard to be recognized by your Mac.
    9. Go to System Preferences – Internet and Wireless – Bluetooth
    10. Hit the “+” button to launch the Bluetooth Setup Assistant to find the devices sending out the signal.
    11. Highlight the device found and hit “Continue”
    12. Do this for both the keyboard and mouse.  You will be prompted to type in the 8 digit code into the wireless keyboard in order to pair it with your computer.
    13. Click on the pinwheel next to the “-“ sign to rename the wireless devices if you'd like.
    I then logged back into Windows 7 to see if the mouse and keyboard were functional and had no problems.  For some reason, Windows has problems pairing bluetooth devices that are already paired under a Mac OSX.  Many people have updated Boot Camp, yet still were not able to pair their wireless devices because they didn't break the Bluetooth connection on the Mac side first. So both steps are necessary (1) Updating to at least Boot Camp 3.1 if not 3.2 and (2) Deleting the Wireless mouse and keyboard link while running Mac OSX before trying to pair them in a Windows OS.

    I found the answers by trial and errors.
    @  is obtained by CTRL + OPT + 2
    #   is obtained by CTRL + OPT + 3
    (without shift or caps lock)
    These two signs are critical and I fail to understand why this information is not readily available from the help function or from the Apple support.
    Jean-Philippe

  • 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

  • Just installed Lion and the Magic TrackPad and I am having a problem with one click commands.  I have to hit the pad fairly hard with one finger to get it to accept the command.  Is this normal, is there another way that I am suppose to execute commands?

    Just installed Lion and the Magic TrackPad and I am having a problem with one click commands.  I have to hit the pad fairly hard with one finger to get it to accept the command.  Is this normal, is there another way that I am suppose to execute commands?

    No you just need to turn on Tap to Click. Go into System Preferences - Trackpad and click the Point to Click tab and select the first box which will say Tap to Click and you should be in business.

Maybe you are looking for