Recreating Deleted Arrays

Hi,
I'm trying to recreate a deleted array as follows:
array=null;
Array array[] = new Array[100];
addToArray("elem1","elem2","elem3");
but doesn't work. I'm unable to recreate/populate the array. Can someone please help me with this?
Thanks,
Anna

I'm not sure what your problem is here...
Your user defined class:
public class MyArray {
   private double x;
   private double y;
   private double dx;
   private double dy;
   private boolean fixed;
   private String lbl;
   ... setters/getters
}An arrayList of your class:
ArrayList list = new ArrayList();
list.add(new MyArray());
MyArray element = (MyArray)list.get(0);Where's the problem?

Similar Messages

  • Please Help me on recreating deleted arrays

    Hi,
    I'm trying to recreate a deleted array as follows:
    array=null;
    Array array[] = new Array[100];
    addToArray("elem1","elem2","elem3");
    but doesn't work. I'm unable to recreate/populate the array. Can someone please help me with this?
    I declared the array null first because the array was previously existing.
    What I need to do is to be able to add array elements dynamically and delete some at the same time.
    Deleting some elements seemed to be a complicated process so I thought of deleting the entire array instead then just recreate it and populate with required elements. I should keep the same array name.
    Thanks!
    Anna

    array=null;
    Array array[] = new Array[100]; // on this line you declare the variable array once again : the compiler doesn't accept it.
    addToArray("elem1","elem2","elem3");
    What I need to do is to be able to add array elements
    dynamically and delete some at the same time. You can also give a look at the Collection
    http://java.sun.com/docs/books/tutorial/collections/implementations/general.html
    and especially the class "ArrayList" http://java.sun.com/products/jdk/1.2/docs/api/java/util/ArrayList.html
    This class provides methods to add, delete element and dynamically enlarge the array.
    Good luck

  • Delete array icon won't expand

    Hi,
    Does anyone have problem with "delete array" icon that won't expand to accept more indexes?  From the Context help, it shows the delete array icon as expandable, but it won't work.
    thanks,
    atd
    Solved!
    Go to Solution.

    No, the node is not expandable. I guess the image in the context help indicates how the node adapts to higher dimension input arrays.
    Having the node expandable would be very dangerous because the indices assigned to elements of course change with every deletion. If you need to delete many sections, htere are much better ways to do this. "Delete from array" should typically not be used repetitively (e.g. in a tight loop).
    For some better ideas, have a look at this post. As you can see here, doing it efficiently can be orders of magnitude faster. Is your array 1D, 2D or higher?
    LabVIEW Champion . Do more with less code and in less time .

  • Delete Array

    Hello.
    I have a array and from which at some specific index i need to delete small portion of array like:
    0 pass
    1 pass
    2 fail
    3 fail
    4 pass
    5 fail
    6 fail
    no i have to delete  from above array, 1st three elements then two elemets and last remaing two elements which i am not able to do using delete array icon.
    So if anyone can help me.
    Thanks
    Solved!
    Go to Solution.

    Well, if you run your VI in highlight execution mode, you will probably see that it is not doing what you want from the get go.  Why are you wiring the start index and the length to the same value?  Have you looked at the help file dor the function and understand how it works?
    In your example, your first pass will delete 4 elements from the array starting at index 4, so indices 4, 5, 6, and 7.  Your start indices and lengths probably need to be different values.  Next, the way you are doing it, realize that your starting indices will continue to change.  You will probably want to do it backwards, so the end of the array is changing, not the beginning.  Then, you won't need to dynamically modify the indeices.

  • SLD:  recreate deleted Business System of type Integration Server

    Hi,
    accidentally i deletet the business system of type "Integration Server" in the SLD. And i can't recreate it. It always says:
    "Integration Server already defined There is already an integration server defined for the selected technical system. Please select role Application System."
    Any ideas to create such a business system?
    The old one isn't there in the list, after i deleted it.
    regards,
    ms

    Hi,
    If you change/delete the host name of the Integration Server after the installation in either the SLD or the exchange profile, you must adjust it accordingly in the exchange profile or the SLD, respectively
    Maintaining a Business System for the Integration Server
    http://help.sap.com/saphelp_nw04s/helpdata/en/9b/da0f41026df223e10000000a155106/frameset.htm
    Regarding Integration server in Business System  
    Regarding Integration server in Business System
    Refer editing the Business System
    http://help.sap.com/saphelp_nw04/helpdata/en/59/2cb3a3c93a4c7086500b8345143418/frameset.htm
    Thanks
    Swarup
    Edited by: Swarup Sawant on Jul 7, 2008 2:03 PM

  • Deleting array elements

    Hi!
    I have a problem with my program. i have an array and in this array a several numbers. With the "In Range and Coerce" function i want to prove if the the array element is inside or outside of my limitations. If my array element is in the outside of my limitation, the code in the case structure should delete this element.
    I need this program, because the array is displayed on a graph and i want only display the date, which is in the limitations.
    I hope somebody could help me!
    Best regards,
    Peter
    Labview 7.1 on Windows 2000
    Attachments:
    array.jpg ‏54 KB

    Hallo Peter
    Das Problem tritt auf, weil du immer wieder das selbe Array liest.
    Die Knoten am Loop sollten Shift-Register sein, damit das Array, bei dem das Element gelöscht wurde, bei der nächsten Iteration gelesen wird. Allerdings musst du dann auf einen While-Loop umstellen, da du ansonsten Elemente lesen willst, die es im Array nicht mehr gibt.
    Anbei eine mögliche Lösung.
    Hoffe es hilft weiter.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    RemoveElements.vi ‏32 KB

  • Can't recreate deleted user in CUCM

    Hi All,
    I found that if I delete a DN or End User from CUCM 8.6 then it doesn't allow me to recreate it. It is really giving me trouble cause if I delete a DN which I am using to reach IVR or MCU for any reason & want to recreate it then I can't. I need to use a new one. Kindly advice me how I can delete the DN permanently so I can create it again.
    Thanks
    Asif

    Hi Aaron
    When I try to sync the users with LDAP it shows in status that update successful but can't find the user in the End user tab. Also for the DN If I try to recreate it it gives a message that that DN already exist. It keeps the old data in the informix & doesn't delete from all the tables when I delete it using browser I beleive. Kidly suggest how to solve this.
    Thanks
    Asif

  • How to recreate deleted users in OIM 11g

    Hi Team,
    Unforchunately I deleted one user in OIM production .It OIM database the user status is "deleted" (USR table). so please advise me how to recreate the user or how to change the status in database
    Thanks in advance.
    Regards,
    Ravi.

    It's quite unfortunate...Because all the other Resources too might have been Revoked due to it....
    Change the User Login in the Database itself... Let the next cycle of Trusted Source recon create this user and provision all resources....
    Or better try another approach...
    Change the status of USR_STATUS from Deleted to Active in Database... Execute the "Evaluate User Policy" to again re-Provision the Revoked accounts....
    And communicate it to the client as well, if possible...

  • Deleting array element

    Hi,
        I am getting an array of 100 elements and i need to delete the the element if it contains 255.And most importantly the next element should be placed in its place.So if i get 30 255s then my output array should get reduced to 70.I tried search 1d array but it is returning only the index of first element containing 255.Please help!!!
    Solved!
    Go to Solution.

    Hi muks,
    i think i understand what you mean, but i have to create a test array to work with. Attached you can see another way to delete the 255 without using a loop.
    Mike
    Attachments:
    Unbenannt 3.vi ‏13 KB
    Remove_Element_from_Array.vi ‏14 KB

  • Delete Array Duplicate for only one column

    Hi all,
    So I am trying to work out a problem here. I have searched the forums but I have not found anything that works for me. Here is my issue.....I have an array (converted from a .csv file) with many rows and columns. Each row is a logfile for a particular serial number. The amount of columns is fixed. But, I need to create a vi to go through the array and remove the duplicates below the original and create a new array.. For example, my array could look like this (I added a desc header for clarity):
    Job, Tech, SN
    1827, SJ, 23827
    1825, SJ, 23827
    1827, SJ, 47384
    1827, SJ, 57483
    1827, SJ, 37473
    1825, SJ, 37473
    But i want an appended array like this:
    Job, Tech, SN
    1827, SJ, 23827
    1827, SJ, 47384
    1827, SJ, 57483
    1827, SJ, 37473
    Can anyone help me out?
    Thanks,
    Ryan
    Solved!
    Go to Solution.

    Assuming that the identical serial numbers are adjacent as in your example, here's what I would do.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    RemoveDuplicates.png ‏22 KB
    removeDuplicates.vi ‏11 KB

  • Recreate deleted recovery partition in Lion

    My iMac (27-inch, Mid 2011) came with Lion installed. I deleted the recovery partition when I triple booted with Windows 7, Ubuntu and Mac OS.
    Is there any way to re-create a deleted recovery partition in Lion? I've read that you can download Lion from the App Store & write it to a USB using the Disk Utility.
    I am currently dual booting with Mac OS X Lion (10.7.4) and Windows 7 (installed via Boot Camp).
    Please give step-by-step instructions if possible.

    Actually, have you tried the Internet Recovery Firmware mentions in the article I sent you before?
    If you have a newer Mac system, then as long as you have the latest firmware updates installed you should be able to use Apple's Internet Recovery feature and can bypass the need for a local Recovery HD partition. Apple recently released new EFI firmwareupdates for mid-2010 MacBook and Mac Mini systems that enable Internet Recovery, but there are also updates available for newer 2011 Mac models that do the same thing. With the Internet Recovery enabled in the Mac's firmware, to use it you just need to restart with the Command-R keys held down. If there is no local Recovery HD partition available, then the system will ask you to join a network. You will need a Wi-Fi connection available that is secured with a WPA or WPA2 password (other forms of connection such as WEP and certificate-based authentication will not work), and then the system will download and boot from a recovery image file obtained from Apple's servers.

  • Deletion of arrays during specific time intervals...how to get it working?

    i am trying to calculate the average peak values in a systolic pressure waveform during a specific time interval. for example, every 5 seconds, i want to average out all the peak values in that interval and after calculating the average, i want to delete the array of peak values. however, what i am finding is that the array is always 0 if i use the delete array in my vi. therefore, the average is always NaN, because the array is empty and there is a divide by 0 error....
    what should i do? i have been stuck on it for a long time now, thankyou very much"
    Attachments:
    help.vi ‏57 KB

    It is very difficult to make sense of your diagram, because all the control references are missing, so it is not possible to tell the various data sources apart.
    Where is the data coming from? How do you prevent race conditions between the acquisition and analysis parts?
    Overall, the diagram is overly complicated and very hard to read. For example clearing the array does not require reading the old array, measuring it's length, followed by "delete from array", followed by writing back to the array. Why don't you just wire an empty array to it? Same result! :-)
    You go to tremedous lenght calculating a simple array average, using numerous property reads and indexing arrays inside FOR loops. There is "mean.vi" that does it in one step. (If you only
    have base LabVIEW, it might not be available (?), so use "Sum" and divide by n. No loop needed). To find the largest element in an array, use "Array Max & Min" from the array palette, again in one simple step.
    I would highly recommend going over some LabVIEW tutorials or look at some of the shipped examples. Make yourself familiar with basic programming concepts such as auto-indexing at loop boundaries. An "index array" wired to the loop counter is never needed.
    I suspect that your problem is due to a race condition between acquisition and analysis code, but there is no way to tell unless you include all control references and also the companion VI that gets the raw data from the instrument.
    LabVIEW Champion . Do more with less code and in less time .

  • Delete element in 1D array

    Hi..
    I have 1D array. i want to delete an element that have 0 value in 1D array. so how can i do that?
    Attachments:
    delete array.vi ‏6 KB

    Here's a VI for you, it's the simplest way in terms of code. If you have a huge array you might need a more efficient method.
    <script src="http://shots.snap.com//client/inject.js?site_name=0" type="text/javascript"></script>
    Systems Test Engineer
    Certified LabVIEW Architect (CLA)
    Attachments:
    RemoveZeroes_1D_DBL.vi ‏12 KB

  • Want to delete Xsan Volume - REALLY

    Unusual question... I really want to delete our Xsan Volume.
    We're adding bigger drives and additional RAID's to our Xsan and want to "start from scratch" so to speak.
    I want to see if anyone has any ideas about how to do this. Here is what I was thinking:
    1. Unmount all Xsan clients/controllers
    2. Stop Xsan volume
    3. From Xsan Admin, delete the Xsan Volume (I can't seem to delete the Storage Pools, first though)
    4. Save
    5. Unlabel the Xsan LUN's
    6. Save
    7. Add new ADM's to "existing" RAID's
    8. RAID Admin - get them ready
    9. In Xsan Admin, label new LUN's
    10. Create new Volume and Storage Pools
    Does this sound right?? Any additional ideas??
    Thanks in advance.

    Hey jag,
    That sounds almost perfect... only thinkgs I can think of:
    5. wasn't sure if you could do this via xsan admin.. usually I do this via /Library/Filesystems/Xsan/bin/cvlabel -u
    7-8, when you add the ADM's, you'll want to delete/recreate the arrays so that will take a while. Technically you could grow them although I hear that takes just as long, so might as well do it from scratch properly (that's what I've heard is the right thing to do)
    Once you redo all your arrays/luns, make sure to reboot all the machines in your Xsan volume so they see the LUNs properly.

  • Options for recovery when 'recognize array' is greyed out?

    I have an X Raid with all the slots are full with 180MB drives and it's been running as two RAID 5 arrays of 1TB. Yesterday one drive showed a red light, so I shut the system down and re-seated the drive. All seemed well and the software began rebuilding the LUN map. When I cam back to it this morning two lights were red. I shut the system down, checked all the connections and brought it back to life, one side is now not recognised as an array - all the drives are green, but listed as 'spare'. I've swapped the drives to see if the controller is at fault, but this has no effect, and 'recognize array' is greyed out as an option.
    As the drives are not being seen as an array there seems to be nothing you can do - are there any further steps that can be taken, or do I just have to accept the data loss?

    Hi
    The same sequence of events that you describe happened at a site I support recently, unfortunately in that case you are looking at recreating the array that is listed as hot spares and recovering from your backup (you do have a backup don’t you?).
    Unless someone knows differently?
    As Donald has already said you don’t shut down the RAID if a drive fails or shows a degraded state. If you don’t have a spare handy act quickly and order one asap. When it arrives swap the drives and watch it rebuilding in RAID Admin. If the drive has failed or is degraded the controller will rebuild the data on that drive from the striped parity data that is stored on the other drives - that is what RAID 5 does. RAID 5 is the default configuration for XServe RAID and as such offers you one point of failure. You can configure the RAID as RAID 5 with a hot spare, this configuration offers you two points of failure. The users guide for RAID Admin has more information regarding the different types of RAID configurations that are supported and that can be used.
    Tony

Maybe you are looking for