Removing an Array?

Hello all. I am a university student from the UK and one of our modules involves building a simple game using Actionscript 3.0. Our course is not programming based so this is all very new to me, I have been learning for the past few months so I am very new when it comes to understanding how stuff works!
Basically the problem I have is I can't remove my Array which contains my enemies on screen. Basically, when hitDetectObject occurs, the game stops, the character is removed from the stage (this is correct), but I have no idea how to do the same for the enemies in the Array?
What happens in it's current state is when I press the games' Restart Button, a new Array simply piles up ontop of the previous run one, making the game unplayable as there are far too many objects on screen. Is there anything anyone can suggest? I just want the contents of the Array removed when the game stops.
Any advice would be much appreciated and you would be referenced in my work for any additional code you can advise.
Thanks.
package
    import flash.display.MovieClip;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.MouseEvent;
    import fl.controls.Button;
    import flash.display.DisplayObject;
    import flash.ui.Mouse;
    public class MyFlashGame extends MovieClip
        public var army:Array = new Array();
        public var myAvatar:Lightning;
        public var gameTimer:Timer;
        private var GameTime:Timer;
        private var btnStart:Button;
        private var btnLevel:Button;
        private var container:MovieClip = new MovieClip();
        public function MyFlashGame():void
            // Mouse hidden for the initial run
            Mouse.hide();
            gameTimer = new Timer(50);
            gameTimer.addEventListener( TimerEvent.TIMER, enemyFall );                          
            this.startGame();
            stage.addEventListener(MouseEvent.MOUSE_MOVE, updateCursor);
        private function startGame():void
            var gos:DisplayObject = getChildByName('gameOverScreen');
            if (gos !== null)
                removeChild(gos);
                // have to put mouse.hide again in startGame function otherwise it's only run once.
                Mouse.hide();
                //for each newEnemy within the army array
                for (var i:Number = 0; i < army.length-1; i++)
                       army.pop();
                for (var a:Number = 0; a < container.length; a++)
                    container.removeChildAt(a);
            var newEnemy = new Enemy(100,-15);
            army.push( newEnemy );
            if (Math.random() < 0.1 && army.length < 10)
            container.addChild(newEnemy);
            stage.addChild(container);
            myAvatar = new Lightning();
            addChild( myAvatar );
            gameTimer.start();
            myAvatar.x = mouseX;
            myAvatar.y = mouseY;
        private function updateCursor(e:MouseEvent):void
            myAvatar.x = mouseX;
            myAvatar.y = mouseY;
        public function enemyFall( timerEvent:TimerEvent ):void
            if (Math.random() < 0.1)
                var randomX:Number = Math.random() * 600;
                var newEnemy:Enemy = new Enemy(randomX,-15);
                army.push( newEnemy );
                container.addChild(newEnemy);
            for each (var enemy:Enemy in army)
                enemy.screenMovement();
                if (myAvatar.hitTestObject(enemy))
                    gameTimer.stop();
                    Mouse.show();
                    removeChild(myAvatar);
                   IN HERE?
                    dispatchEvent( new LightningDeath( LightningDeath.DEAD ) );
                    var gameOverScreen:GameOverScreen = new GameOverScreen();
                    gameOverScreen.name = 'gameOverScreen';
                    gameOverScreen.x = 200;
                    gameOverScreen.y = 150;
                    btnStart = new Button();
                    btnStart.label = "Restart";
                    btnStart.x = -30;
                    btnStart.y = 50;
                    btnStart.addEventListener(MouseEvent.CLICK, restart);
                    gameOverScreen.addChild(btnStart);
                    addChild( gameOverScreen );
                    btnLevel = new Button ();
                    btnLevel.label = "Next Level";
                    btnLevel.x = 90;
                    btnLevel.y = 50;
                    btnLevel.addEventListener(MouseEvent.CLICK, restart );
                    gameOverScreen.addChild(btnLevel);
                    addChild( gameOverScreen );
        private function restart(evt:MouseEvent):void
            this.startGame();

How do I use splice in this case? Forgive my lack of subject knowledge.
army.splice( newEnemy );
                    army = [];
                    army.length = 0;
Something like this? I need the full array removed.
I remember my lecture saying I wouldn't be able to loop through it because it's not possible on 0 based arrays, is that not true?
Appreciate your input.

Similar Messages

  • Benefit of Removing CAS array

    Hi,
    What's the benefit of Removing CAS array in Exchange 2013.

    Are you asking why 2013 does not have the RPC Client Access Server array concept? If so, remember that the server that hosts the active copy of the mailbox database is the one that services the protocol, and the conversion from HTTP - RPC happens locally. 
    CAS 13 is just a protocol proxy, unlike CAS07 and CAS10.
    Do a search for "Every server is an island"  
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • How can I add and remove from arrays?

    I made a little thing that has to do with badges. Theres 6 badges, and they load out with attachMovie. I want to be able to change the badges, so how would I be able to change things in an array? Like adding and removing numbers in it.

    Look up the Array class in the help documents and go thru all of the various methods available for it.  All of the adding and removing things methods will be there.

  • How do I lope through array, delete clip and remove from array

    I have a function that creates an instance of a movieClip and
    adds it to an array.
    In my gameloop I loop through the array and change some
    values. Now I want a cleanup function that loops through the array,
    and if the y value exceeds a certain value, I want to delete the
    clip instance and remove the record in the Array.
    Could someone please help me with the syntax for that? I will
    lay the code out below.
    Thankyou

    I still haven't gotten an answer on this one, and my client
    is starting to push me to fix the bug.
    I have created a number of instances of a movie clip, and I
    have also pushed references to each clip into an array.
    Then I loop through the array and do things.
    At some point I want to loop through the array and delete the
    original clips (removeChild).
    I don't know the syntax for that.
    for (var n:int = 0; n<myClipArray.length; n++){
    removeChild (myClipArray[n])
    // I WANT THE LINE ABOVE TO DELETE THE MOVIE CLIP
    I'd like to think there is some way to do that.

  • Cannot remove raid1 array (mdadm)

    Hi,
    The system is Oracle Linux 6.3 x86_64 running under VirtualBox. In order to remove the Linux RAID root volume I have started the system using the OL 6.3 UEK boot CD.
    For some reason I'm unable to remove the /dev/md127 RAID device. Please see below:
    <pre>
    # mdadm -As
    mdadm: /dev/md/vm009.example.com:1 has been started with 2 drives.
    # cat /proc/mdstat
    Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
    md127 : active raid1 sda2 [0] sdb2 [1]
    20457404 blocks super 1.1 [2/2] [UU]
    bitmap: 0/1 pages [0KB], 65536KB chunk
    md126 : active raid1 sda1[0] sdb1[1]
    511988 blocks super 1.0 [2/2] [UU]
    </pre>
    My first idea was to stop the device and remove it, which does not work:
    <pre>
    # *mdadm --stop /dev/md127*
    mdadm: stopped /dev/md127
    # *mdadm --remove /dev/md127*
    mdadm: error opening /dev/md127: No such file or directory
    </pre>
    However, there is no error when I do not stop /dev/md127. But also the device is not removed:
    <pre>
    # mdadm -As
    mdadm: /dev/md/vm009.example.com:1 has been started with 2 drives.
    # *mdadm --remove /dev/md127*
    # cat /proc/mdstat
    Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
    md127 : active raid1 sda2 [0] sdb2 [1]
    20457404 blocks super 1.1 [2/2] [UU]
    bitmap: 0/1 pages [0KB], 65536KB chunk
    md126 : active raid1 sda1[0] sdb1[1]
    511988 blocks super 1.0 [2/2] [UU]
    </pre>
    I thought about to use -zero-superblock:
    <pre>
    # *mdadm --stop /dev/md127*
    mdadm: stopped /dev/md127
    # *mdadm --zero-superblock /dev/sdb2*
    # mdadm -As
    mdadm: /dev/md/vm009.example.com:1 has been started with 1 drive (out of 2).
    # cat /proc/mdstat
    Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
    md127 : active raid1 sda2 [0]
    20457404 blocks super 1.1 [2/1] [U_]
    bitmap: 0/1 pages [0KB], 65536KB chunk
    md126 : active raid1 sda1[0] sdb1[1]
    511988 blocks super 1.0 [2/2] [UU]
    </pre>
    However, if I do the same for the other drive, then I loose the complete enchilada.
    <pre>
    # *mdadm --stop /dev/md127*
    mdadm: stopped /dev/md127
    # *mdadm --zero-superblock /dev/sda2*
    # mdadm -As
    mdadm: No arrays found in config file or automatically
    </pre>
    Here is the detail of the /dev/md127 device:
    <pre>
    # mdadm --detail /dev/md127
    /dev/md127:
    Version : 1.1
    Creation Time : Wed Nov 7 01:44:42 2012
    Raid Level : raid1
    Array Size : 20457404 (19.51 GiB 20.95 GB)
    Used Dev Size : 20457404 (19.51 GiB 20.95 GB)
    Raid Devices : 2
    Total Devices : 2
    Persistence : Superblock is persistent
    Intent Bitmap : Internal
    Update Time : Thu Nov 8 01:23:00 2012
    State : active
    Active Devices : 2
    Working Devices : 2
    Failed Devices : 0
    Spare Devices : 0
    Name : vm009.example.com:1
    UUID : 006a3ad6:c0590b94:5fddf632:5704f209
    Events : 70
    Number Major Minor RaidDevice State
    0 8 2 0 active sync /dev/sda2
    1 8 18 1 active sync /dev/sdb2
    </pre>
    Any ideas what I might be doing wrong? Thanks!

    I found confirmation of the procedure to remove a RAID device in chapter 5.3.5. Removing a RAID Device at https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-raid-manage-removing.html. But apparently, there is no more reference in the documentation for version 6.
    Anway, after some experimenting I finally I seem to have found the solution:
    <pre>
    # mdadm -S /dev/md126
    mdadm: stopped /dev/md126
    # mdadm -S /dev/md127
    mdadm: stopped /dev/md127
    mdadm --zero-superblock /dev/sdb2
    mdadm --zero-superblock /dev/sda2
    # mdadm -As
    mdadm: /dev/md/vm009.example.com:0 has been started with 2 drives.
    # cat /proc/mdstat
    Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]
    md127 : active raid1 sda1[0] sdb1[1]
    511988 blocks super 1.0 [2/2] [UU]
    </pre>
    Apparently the trick is to stop all of the RAID devices and not just only the one to be deleted (md127). Something might get confused between md126 and md127. I have no explanation. I guess I do not need to remove the md127 RAID device once the RAID superblock is removed, but I wonder how this will work with initramfs, which should still have references to the RAID device.

  • My add and remove program

    I am asked to create an add method with the following rules:
    When adding new elements, check to ensure there is room in the array data. If there is no unused array index, grow the array by delta elements. When removing existing elements, shrink the array by delta elements whenever there is room to add more than delta elements. In other words, leave no more than delta empty array locations at any time. The array must have from 0 through delta empty indexes at all times. The following assertions must pass.
    This add method must work for any data type. And so far the method that I have create is:
    public boolean add(E element) {
        boolean result = false;
        Object[] temp = new Object[data.length+delta];
            if (data.length == n){
                for (int i = 0; i<data.length; i++){
                    temp[i] = data;
    data = temp;
    for (int i=0; i<data.length; i++){
    if (data[i].equals(element))
    result = false;
    else{
    n++;
    data[n-1] = element;
    result = true;
    return result;
    The problem with this code is that when I try to add an interger it always gives me a null point exception because all the value in the array are set as null the very first time, how do I get this method to work the way it's suppose to be??

    okay guys, so here's now for my remove method:
    public boolean remove(E element) {
              boolean result = true;
              int position = 0;
              int count = 0;
              for (int i = 0; i <= n; i++) {
                   if (element.equals(data)) {
                        result = true;
                        position = i;
              if (result == true) {
                   for (int j = position; j < n - 1; j++) {
                        data[position] = data[position + 1];
                   data[n - 1] = null;
                   n--;
              for (int k = 0; k< data.length; k++) {
                   if (data[k] == null)
                        count++;
              if (count>=delta){
                   Object[] temp = new Object[data.length - (count-delta)];
                   for (int m = 0; m<temp.length; m++)
                        temp[m] = data[m];
                   data = temp;     
              return result;
    This method wont work according to the rules:
    When removing existing elements, shrink the array by delta elements whenever there is room to add more than delta elements. In other words, leave no more than delta empty array locations at any time. The array must have from 0 through delta empty indexes at all times. The following assertions must pass.
    why is that?? can someone help me?
    My teacher has provided me with this test method:
    @Test
         public void testGrowAndShrink() {
           Set<Integer> ints = new ArraySet<Integer>(5, 10);
           for (int i = 1; i <= 20; i++)
             ints.add(i);
           assertEquals(20, ints.size());
           // Array has now grown twice by 10 elements (capacity went from 5 to 25)
           assertEquals(25, ints.capacity());
           for (int i = 1; i <= 4; i++)
             ints.remove(i);
           assertEquals(16, ints.size());
           assertEquals(25, ints.capacity());
           ints.remove(5);
           // Array shrunk by 10 elements
           assertEquals(15, ints.size());
           assertEquals(15, ints.capacity());
         } and it didn't pass the assertEquals(15, ints.capacity());
    why???
    Message was edited by:
    aditya15417
    Message was edited by:
    aditya15417

  • Problem with Remove function in Container

    I need to remove an array of Component like a Jmenu or JToolBar from JMenuBar and JPanel. But it just couldn't do it. However, it was working when the component are not in array.
    Here is the code:
    for (int i = 0; i < TheModule.RemoveMenuList().length; i++)
    MainMenuBar.remove(TheModule.RemoveMenuList());
    Thank you!

    I'm got the solution for me.
    First of all i have 2 Query's.
    First called "Month" where I'm use Month dimension and promt filter wich in default return last 4 full month's.
    Second query called "Amount" where I'm use Month, City dimension and Amount as measure. For "Month" dimension I made detail like "Next Month" in univers. Filter's look like Month in list from query "Month" and "Next Month" in list from query "Month" which merged with "OR" (it's important).
    I build the same table, like in my previous post. Where Actual=[Amount] and at the end Previous=If IsNull(Previous([Amount])) Then NoFilter([Amount] Where([Month]=Min([Month]) ForAll([Month]));Drill) Else Previous([Amount]).
    In table I have only 4 month, because of using Month=[Month] from query "Month", but they still merged.
    Hope it's help.

  • Local variable for an Array of fixed size

    Hello,
    I have a two multirate loops in a VI. 
    In one loop, I want to refer an fixed sized array initialized in the other loop.
    But I coudn't name the array, so I can't refer it.
    Is there any way to refer it?
    Thanks,
    Young.

    If you need a local variable, there is no other way than to create an indicator for it.
    In LabVIEW there is no "fixed length" array : you can always add or remove an array element, and you don't need to declare it as in other languages. They are intrinsic dynamic objcets. Of course, the memory manager has to cope with this, that's why it's often better to initialize an array, to give it its final size immediately, resulting in faster running programs. However, this is only noticeable with relatively large arrays (> 10000-100000 elements).
    May be you should explain in more details what you intend to do, because trying to reproduce a C approach in LV is probably not the best thing to do. For instance, you said that you are initializing your array in a first loop. You mean that you re-initialize the array at each iteration ? I suppose no, so may be you could put the initialize step out of the loop, and wire the array to your two parallel loops.
    Remember also that local variables are not always good programming solutions, since using them will generate copies of their content each time they are refered to. And that can low down your program very significantly...
    Message Edité par chilly charly le 11-05-2005 05:05 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to remove unused controllers in OS

    Hi
    We removed (disconnected physically) some LUNs from our Servers.
    But we have still this message by asking with vxdmpadm:
    root@hostname# vxdmpadm listctlr all
    CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
    =====================================================
    c3 GENESIS DISABLED GENESIS0
    c2 GENESIS DISABLED GENESIS0
    c0 Disk ENABLED Disk So our monitoring creats all the time some Events because c2 and c3.
    Know someone how to remove this 'disabled' messages?
    We are not able to reboot the servers (because after a reboot c2 and c3 rid of)
    Thanks and Regards
    Konrad

    Your Array/Enclosure information is stored in /etc/vx/array.info ( [http://seer.support.veritas.com/docs/238556.htm|http://seer.support.veritas.com/docs/238556.htm] )
    You will have to edit the /etc/vx/array.info file (which I think you can do from the command-line with vxdmadm and vxddladm commands).
    Try playing with the vxddladm command and see if you can remove the array.

  • Help:FileWriter gives no output

    Hi:
    The following code gives no errors but also no output. I know that the encrypt method works because I am able to print the output to screen but I cannot get FileWriter to work.
    Can someone help me with this problem?
    Thanks.
    import java.io.*;
    class Monoalphabet
      public static void main(String args[])
      String keyword = args[0];
      char [] cypher;
      cypher = makeCypher(removeDups(keyword));     
      try
       FileReader f = new FileReader(args[1]);
       FileWriter f1 = new FileWriter(args[2]);
       encrypt(f,f1,cypher);
        catch(Exception e)
          System.out.println("Exception: " + e);
      public static void encrypt(FileReader reader,FileWriter writer, char[] cypher )
         int positionOfA = 'a';
         String outgoing = ""; 
         String temp = "";
         BufferedReader infile  = new BufferedReader(reader);
         try {
         while(( temp = infile.readLine()) != null)
              for (int k = 0; k < temp.length(); k++)
              char whatever = temp.charAt(k);
              char ch = cypher[(int)whatever -  positionOfA];
              String chs = new Character (ch).toString();
               outgoing = outgoing + chs;
               System.out.println(outgoing);    
             writer.write(outgoing);   
        catch(Exception e)
          System.out.println("Exception: " + e);
      public static String removeDups(String keyword)
      { String keep = "";
        keyword = keyword + "zyxwvutsrqponmlkjihgfedcba";
       for(int i = keyword.length()-1; i > -1 ; i--)
       if(i == keyword.indexOf(keyword.charAt(i)))
        keep = keyword.charAt(i)+ keep;
        return keep; 
      public static  char[] makeCypher(String remove)
          char Array [];
          Array = remove.toCharArray();
          return Array;

    You may want to try flushing your FileWriter when you are done.
    FileWriter f1 = null;
    FileReader f = null;
    try {
       f = new FileReader(args[1]);         
       f1 = new FileWriter(args[2]);  
       encrypt(f,f1,cypher);                    
    } catch(Exception e) {     
      System.out.println("Exception: " + e);   
    } finally {
      if (f1 != null) {
         try {
           f1.flush();
           f1.close();
         } catch (Exception e) {}
      if (f != null) {
         try {
           f.close();
         } catch (Exception e) {}

  • Create new portal-user with webservice

    Hi,
    I'm trying to develop a ejb-webservice which is creating a new Portal-User.
    The webservice is working so far, I made methods like getDisplayName() which is returning the display name to a logonId and so on. All this is working. I'm using the component sap.security.api.sda for this.
    Problem: User-creation is not working. I think the problem might be, that a webservice is not authorized to create users? Or putting it in another way: Is it possible that a webservice is "logging in" at the portal, or sohehow authorizing itself?
    Thanks and regards
    Jan Hempel

    Hi Detlev,
    thanks for Your answer.
    It seems like that the problem was caused by using array-parameters in the webservice-method?!
    Strange, but after removing the array-parameter from the method it worked! Before the webservice never returned anything, not an error or anything else.
    Well, strange enough, but I can live with that.
    regards
    Jan

  • Plot initialization takes a long time

    Hello,
    I've attached a vi that is a copy of some code I'm using in my application.  The behavior I want is for the strip chart to scroll from right to left.  The newest data will be added to the right side of the screen and scroll left, like a strip chart.  For this reason, the right side time is shown as 0 and the left side is shown as negative time, taken from the seconds to graph control.  It works just fine in my application with two exceptions.  When I set seconds to graph to a low number, say 1 second, all is well.  When I set it to a high number, like 100 seconds, the initialization takes a long time.  Based on this code, I've narrowed it down to the graph init time, and not the init of the arrays.  Is there a faster way to accomplish this same behaviour?  In addition, does anyone know why when the seconds to graph control is set to numbers greater than 30, the left side of the x-axis holds at -30, but for numbers less than 30, the left side shows that number?  It's supposed to show a negative of whatever the seconds to graph says.
    Thanks.
    Attachments:
    diagostic.vi ‏1246 KB

    Dennis,
    Thanks for the call about the marker values.  When I received the solution from NI, I just copied it over and it worked.  I never dug into how it worked.  I just removed the array to the marker values and it inits quickly now.  Thanks.  As for the history, best I can remember, the original chart drew and compressed the plot as data were added.  I wanted a chart of fixed width that would init to nothing drawn, and have the drawing itself scroll across from right to left as the time ticked off.  It's working great now.  Thanks.
    Rick

  • How to 'import xml' in my script

    Hi All,
    Below "Script 1" is working fine, now I want to call the '.xml' file which was placed in Template folder(see script code).
    How to import xml in 'New.indd' file("Line 27:-->var source = File(path + '/New.indd')".
    Please add import xml code in 'Script 1"
    Script 1:
    var path = Folder.selectDialog ("Select folder");
    if(path==null)
    exit();
    var files = path.getFiles(/\.(indd?|indt?)$/i);
    if(files==0)  
      alert("There is no 'indd'/'indt' file in your folder");
      exit();
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
    try
    myDocument = app.open(new File(files));
    MasterpageScriptLabel();
    TableCellStyleCreation();
    myDocument.save(new File(path + "/New.indd"));
    var folder = new Folder(path + '/Updated_Folder');
    folder.create();
    myDocument.close();
    var source = File(path + '/New.indd');
    var dest = new File(folder + '/New.indd');
    source.copy(dest);
    source.remove();
    catch(e)
    alert ("Your folder permissible only one file of 'INDD' or 'INDT' file");
    exit();
    function MasterpageScriptLabel()
    var myDoc=app.activeDocument;
    var myXMLElement=myDoc.xmlElements[0];
    if(myXMLElement.isValid)
        var myParentStory=myXMLElement.parentStory;
        var myTextContainers=myParentStory.textContainers;
        for(var i=0;i<myTextContainers.length;i++)
            myTextContainers[i].label="S_TF";
    var myDoc=app.activeDocument;
    var mspreads=myDoc.masterSpreads;
    for (i=0;i<mspreads.length;i++)
    if(mspreads[i].textFrames.length>1)
        var txfmlength=mspreads[i].textFrames;
        for (j=0;j<txfmlength.length;j++)
            if(txfmlength[j].nextTextFrame!=null)
            {txfmlength[j].label="S_TF";}
            if(txfmlength[j].previousTextFrame!=null)
            {txfmlength[j].label="S_TF";}
    function TableCellStyleCreation()
        var cestyle = myDocument.cellStyles;
        var array = ["TBL_COLH", "TBL_BODY"];
        var i = array.length;
        while(i--)
                try{
                    var style = myDocument.cellStyles.add();
                    style.name = array[i++];
                catch(e)
                    style.remove();
                    alert("'" + array[i-1] + "'"+ " Already exists in the document.")
                i--;
    main();
    function main(){
          var progress_win = new Window ("palette");
    var progress = progress_bar(progress_win, 2, 'Processing ... Completed');
        delay(1);
          progress.value = progress.value+1;
        delay(1);
        progress.parent.close();
    // delay function found here
    //found here http://www.wer-weiss-was.de/theme157/article1143593.html
      function delay(prmSec){
      prmSec *= 1000;
      var eDate = null;
      var eMsec = 0;
      var sDate = new Date();
      var sMsec = sDate.getTime();
      do {
      eDate = new Date();
      eMsec = eDate.getTime();
      } while ((eMsec-sMsec)<prmSec);
    * Taken from ScriptUI by Peter Kahrel
    * @param  {Palette} w    the palette the progress is shown on
    * @param  {[type]} stop [description]
    * @return {[type]}      [description]
    function progress_bar (w, stop, labeltext) {
    var txt = w.add('statictext',undefined,labeltext);
    var pbar = w.add ("progressbar", undefined, 1, stop);
    pbar.preferredSize = [300,20];
    w.show ();
    return pbar;
    by
    hasvi

    DECLARE @x xml=N'
    <Jobs>
    <Job>
    <JobCode>123</JobCode>
    <JobTitle>Years</JobTitle>
    <JobSubCode>
    <div>
    <Ol>
    <li>2001</li>
    <li>2002e</li>
    <li>2003</li>
    <li>2004</li>
    </Ol>
    </div>
    </JobSubCode>
    </Job>
    </Jobs>'
    SELECT J.c.value('(JobCode/text())[1]', 'varchar(10)') AS JobCode,
           J.c.value('(JobTitle/text())[1]', 'nvarchar(40)') AS JobTitle,
           L.c.value('.', 'varchar(10)') AS Years
    FROM   @x.nodes('/Jobs/Job') AS J(c)
    CROSS  APPLY J.c.nodes('JobSubCode/div/Ol/li') AS L(c)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Problem while installing solaris 10 on HP proliant DL 380 G5.

    Hi,
    facing problem while installing solaris 10 05/09 on HP proliant DL 380G5. The array controller is E200.
    i have installed the raid controller driver CPQary3-2.1.0-solaris10-i386, it is going ahead but not detecting the whole hard disk space. My hard disk space is SAS 146GB. There are two 146GB hard disk present. It is showing only 978 MB & only one hard disk. So please help me out. my mail ID is [email protected]

    I have a similar issue trying to load Solaris 10u4 on an IBM x236.
    I had to put in a recognized SCSI card, attach an external array to the card, and install Solaris 10u4 on the array. Then I had to install the correct driver from OpenSolaris (an Adaptec one for IBM ServeRAID), and do a live upgrade onto the now-visible internal disks. Then I removed the array and cleaned up the traces from the live upgrade.
    You may have to do something similar.
    And last month the boot drive got corrupted when power was interrupted. "Oops. Wrong plugs..." This time the external array will stay connected.

  • Hard drives not showing up in BIOS of UCS C22M3 Server

    Hi there,
    I am wondering if someone can help me work out why my internal hard drives aren't showing up in the BIOS. When I enable the RAID controller and set up an array they are detected and placed online, but if I remove the RAID array they do not show up in the BIOS as a device from which I can boot from. I am using the onboard SCU as the RAID controller and it makes no difference with this enabled or not, the internal hard drives do not show up in the BIOS. I have tried many different combinations but are unable to ever see the drives listed in the BIOS. Initially when I first received the server I was sure this was the case but have since formatted the drives. I have also tried resetting the BIOS settings to default.
    I would be most grateful if someone could help me as I have been working on this problem for a long time with no success.
    Thanks in advance.
    Tim
    This image shows the drives with the array active, if I remove the array the drives still show up on this screen but not in BIOS.

    Hey Tim, welcome to the communy!
    I don't think you are even supposed to see the individual disks as a boot option.  For all I know UCS is not intendeed to use its disks as JBOD (we'll see if that changes with new technologies like Hadoop) reason why you dont see the disks; you can see the RAID controller as a boot option  if you enable it to control the disks.
    I made the test in a C220 with a PCIe RAID controller (I don't have a C22 but it is very similar) and when I went to BIOS I didn't see the disks listed either, then I rebooted and pressed F6 and still the disks are not showing up, only the PCIe RAID controller showed up as a boot option:
    Last 2 things:
    1-Why do you want to see the individual disks as a boot option?
    2-Have you check another C22 or any other model to see if the behavior is different? If this does not happen on other servers (which I think it is NOT going to be the case) open a TAC case for further investigation.
    Rate ALL helpful answers.
    -Kenny

Maybe you are looking for

  • Why after IOS6 Ipad calendar not syncing with Icloud?

    After I upgrade Iphone and Ipad to IOS6, my Ipad calendar doesn't sync with ICloud using exactly same Apple ID. Any sugestions?

  • Auto detecting projector resolution?

    my wife teaches college and uses an overhead projector often. i'm trying to get her to use her macbook and keynote so she can use the remote (she takes her macbook to school anyway), but whenever she plugs it in, the projector shows the wrong resolut

  • New iMac and Aperture not loading .CR2 files? Any ideas?

    Hi, I have recently upgraded from a 2009 MBP (running 10.6) to a 27" iMac. What I am finding is that after migrating my applications Aperture will not load/show my CR2 files. It says they are an unsupported format. Any ideas for a solution? These fil

  • Itunes GB Size

    I upgraded from a version 6 Itunes to Itunes 7.5. I have a 20GB ipod and 4824 songs. The GB size in the Itunes library prior to the upgrade was approx. 18 GB. After the upgrade, the same amount of songs is listed as approx. 55GB. Is there a way to co

  • What happened to cron?

    My employer recently updated our Macs to Tiger and now cron seems to be exhibiting some strange behavior. Trying to use the -u flag on the command appears to lock the program up (or at least it just sits there doing nothing.) I typically use Cronnix