Array(Non Displayabl​e)

Hi,
I'm currently having problem to display the output with the error array(non displayable). Below are the files attached.
Attachments:
Book1..xls ‏59 KB
Agilent Output.vi ‏109 KB

Hai,
This is pretty strange because i copied the same data to a different excel sheet and saved the sheet in the same name and your vi works fine for that excel file, but when i provide this file name am getting empty output.
"Value -> Array(Non Displayable)" is not an error it even comes for all the excel sheets for which am getting proper output.
Just copy the values to another file and run the vi it works fine.
With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

Similar Messages

  • Intel Raid Vs Marvel Raid on Big Bang B3 Marshall (Non OS Drives) via win7 setup

    I apologise in advance if this seems lazy but has anybody tried setting up RAID 1 mirroring of two non-essential data hard drives within Windows 7 64-bit as opposed to a bios setup?
    I only need to mirror a games hard drive so as not to have to do manually backup the hard drive with Acronis software backup every other day or so.
    I have a Acronis backup of the game hard drive as I am aware that creating a raid array on both drives will delete all data on both drives but I can restore my games software later.
    As it was a non-essential raid array (non-OS drives) on my previous hardware setup for these two identical games drives before upgrading to the MSI big-band Marshall B3 I totally forgot to set up the raid whilst doing a fresh install of Windows 7 on a dual boot with a previously restored/Acronis universal restore of windows 7 which also had this raid array.
    If that all makes sense I'm hoping you guys can put me in the right direction as to Intel on Marvel (I seem to remember reading in the past that Marvel Raid drivers had issues) preferences for a setup within Windows 7 64-bit rather than the bios setup which would mean starting from scratch which I'm not prepared to do on a non-essential, non-OS Raid array.
    If however I was doing an essential OS drives Raid array then it's a no-brainer to do a BIOS setup with a fresh install.
    Any thoughts much appreciated, cheers

    I don't think you are looking at the right areas.
    Quote:
    Sonnet Tempo cards are compatible with most external SATA storage. However, external hard drives with USB 2.0/eSATA dual interface based on the Oxford Semiconductor OXU931DS storage controller chip may not be compatible with Mac OS X when connected via SATA. Known issues are kernel panics occurring when the drive is connected, or the drive not being recognized by the operating system.
    Western Digital manufactures Desktop edition (WD Caviar, Caviar SE, Caviar SE16, and Raptor X) hard drives and Enterprise (RAID) Edition (WD RE, RE2, and Raptor) hard drives. Each type of hard drive is designed to work specifically in either a desktop computer environment, or connected to a RAID controller (hardware or software-based). If you intend to configure Western Digital drives in a RAID set, Sonnet and WD recommend using only their Enterprise edition hard drives. For more information, see this Western Digital FAQ.
    EndQuote
    http://www.sonnettech.com/product/temposatae4p.html
    Not everyone follows guidelines like they use to. Enterprise and RAID Edition drives - even Green RE4 series - not noise. You want a good drive enclosure with adequate cooling from air flow and fans. These are not silent and any drive noise is just background hum and noise that they are working.
    http://macperformanceguide.com/RecommendedESATAEnclosures.html
    There are dozens of reviews on drive storage. If noise is over riding then you aren't a candidate for RAID, but you are for SSD and Green, and would find SilentPCReview up your alley.
    http://www.silentpcreview.com/

  • RAID 1 Issue - One array becomes two

    All:
    I have setup a RAID 1 array with two identical segate SATA 150 drives.  This was a clean install, and everything went without a hitch.  My problem is this: after a week or so, I would boot the PC and The BIOS RAID array would say "Error--Degraded."  It took a long time to boot, but was fine and when I got into Windows, my C:\ drive was joined by a D:\drive (the second Seagate.)
    I shut down, rebooted, and went into the RAID BIOS.  The second drive had magically gained its own array (non-bootable), which I deleted.  The PC booted fine with a healthy RAID array, and all was well. 
    Until it happened again a day later.  And again.  And again.  Basically, the array doesn't stay stable for more than a couple days.  I even swapped out the drives with Seagate as they were clicking.  The new ones are good, but the problem still occurs.
    I have not experienced any data loss, but am mystified as to what is going on here...Any help would be greatly appreciated!
    Thank You,
    Michael Tschirret
    MSI K8N Neo2 Platinum Edition v 1.40
    Athlon 64 3200+
    1 GB DDR 2700 SDRAM (2 512MB sticks)
    2 HDD 160GB|Seagate Barracuda 7200.7 Sata 150
    1 WD 100GB External IDE hard drive
    Sony CD-R/RW DVD +/- R/RW
    TDK CD-R/RW
    1 Floppy drive
    SB Audigy 2 ZS Platinum
    eVGA GeForce 6800GT

    I'm having the same problem, except I am using 4 hdds in RAID 0+1. one drive dropped out and the machine crawls now. Could it be an issue with SATAI vs SATAII? I have 4 Seagate Barracuda 120GB drives, but they were purchased over a two year period, so I suspect their firmwares vary a bit...
    Any help would be much appreciated.
    BTW, I have the latest BIOS installed (v1.B)

  • I want to store all received signal in array

    I transmit signal to USRP and recieved it several times i want to store all elements i received in array and take from this array the one transmitted signal  ex: transmitted signal [ 1 -1  3  4] recieved signal [1 -1 3 4 1 - 1 3 4 1 -1  3 4] and i want to take from this array [ 1 -1 3 4 ]
    Attachments:
    RN (2).vi ‏56 KB

    Once you have a normal data array, you can use the array subset.vi to take any section of the array that you want to.  I'm a little confused as to how you are using the build waveforms.vi.  You are wiring the old waveform to to the 'Y' input instead of the 'waveform' input, which is what I think you should be doing.  To get a normal array (non waveform data type) either change your fetch function to return doubles, or use 'get waveform components' to separate the Y data from the waveform data type.
    Jon F.
    Applications Engineer
    National Instruments

  • Problem Bubble sorting random array

    For my CompSci class I have to create an array with random number in it and then do a bubble sort. I was able to create the array and input the variables in it but when it bubble sorts the array none of the values in the sorted array correlate to the original integers in the array.
    Any help would be greatly appreciated.
    public class RandomSort {
    public static void main(String[] args) {
        final int ARRAY_SIZE = 20;
        final int RAND_MIN = 0;
        final int RAND_MAX = 100;
        int [] randomSort = new int [ARRAY_SIZE];
        int i;
        for (i = 0; i < randomSort.length; i++)
            randomSort[i] = (int) (Math.random()*(((RAND_MAX - RAND_MIN)+1)+RAND_MIN));
        for (i=0; i<ARRAY_SIZE; i++)
                for (int j = 0; j <=i-1; j++)
                        if (randomSort[j] > randomSort [j+1])
                            int temp = randomSort[j];
                            randomSort[j] = randomSort[j+1];
                            randomSort[j+1] = temp;
                System.out.println(randomSort);

    Mmmhhh....
    for (i = 0; i < ARRAY_SIZE; i++) {
         for (int j = ARRAY_SIZE - 1; j >= i + 1; j--) {
              if (randomSort[j - 1] > randomSort[j]) {
                   final int temp = randomSort[j - 1];
                   randomSort[j - 1] = randomSort[j];
                   randomSort[j] = temp;
         System.out.println(randomSort);
    Pffff....9
    31
    32
    33
    34
    36
    37
    39
    45
    63
    64
    81
    84
    85
    86
    91
    94
    94
    99
    100Aarrfff...  [http://en.wikipedia.org/wiki/Bubble_sort|http://en.wikipedia.org/wiki/Bubble_sort]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • One RAID Array Becomes Two???

    All:
    I have setup a RAID 1 array with two identical segate SATA 150 drives.  This was a clean install, and everything went without a hitch.  My problem is this: after a week or so, I would boot the PC and The BIOS RAID array would say "Error--Degraded."  It took a long time to boot, but was fine and when I got into Windows, my C:\ drive was joined by a D:\drive (the second Seagate.)
    I shut down, rebooted, and went into the RAID BIOS.  The second drive had magically gained its own array (non-bootable), which I deleted.  The PC booted fine with a healthy RAID array, and all was well.
    Until it happened again a day later.  And again.  And again.  Basically, the array doesn't stay stable for more than a couple days.  I even swapped out the drives with Seagate as they were clicking.  The new ones are good, but the problem still occurs.
    I have not experienced any data loss, but am mystified as to what is going on here...Any help would be greatly appreciated!
    Thank You,
    Michael Tschirret
    MSI K8N Neo2 Platinum Edition v 1.40
    Athlon 64 3200+
    1 GB DDR 2700 SDRAM (2 512MB sticks)
    2 HDD 160GB|Seagate Barracuda 7200.7 Sata 150
    1 WD 100GB External IDE hard drive
    Sony CD-R/RW DVD +/- R/RW
    TDK CD-R/RW
    1 Floppy drive
    SB Audigy 2 ZS Platinum
    eVGA GeForce 6800GT

    I'm having the same problem, except I am using 4 hdds in RAID 0+1. one drive dropped out and the machine crawls now. Could it be an issue with SATAI vs SATAII? I have 4 Seagate Barracuda 120GB drives, but they were purchased over a two year period, so I suspect their firmwares vary a bit...
    Any help would be much appreciated.
    BTW, I have the latest BIOS installed (v1.B)

  • Need more help with a GUI

    It's the ever popular Inventory program again! I'm creating a GUI to display the information contained within an array of objects which, in this case, represent compact discs. I've received some good help from other's posts on this project since it seems there's a few of us working on the same one but now, since each person working on this project has programmed theirs differently, I'm stuck. I'm not sure how to proceed with my ActionListeners for the buttons I've created.
    Here's my code:
    // GUICDInventory.java
    // uses CD class
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class GUICDInventory extends JFrame
         protected JPanel panel; //panel to hold buttons
         protected JPanel cdImage; // panel to hold image
         int displayElement = 0;
         public String display(int element)
                   return CD2[element].toString();
              }//end method
         public static void main( String args[] )
              new GUICDInventory();
         }// end main
         public GUICDInventory()
              CD completeCDInventory[] = new CD2[ 5 ]; // creates a new 5 element array
             // populates array with objects that implement CD
             completeCDInventory[ 0 ] = new CD2( "Sixpence None the Richer" , "D121401" , 12 , 11.99, 1990 );
             completeCDInventory[ 1 ] = new CD2( "Clear" , "D126413" , 10 , 10.99, 1998 );
             completeCDInventory[ 2 ] = new CD2( "NewsBoys: Love Liberty Disco" , "2438-51720-2" , 10 , 12.99, 1999 );
             completeCDInventory[ 3 ] = new CD2( "Skillet: Hey You, I Love Your Soul" , "D122966" , 9 , 9.99, 1998 );
             completeCDInventory[ 4 ] = new CD2( "Michael Sweet: Real" , "020831-1376-204" , 15 , 12.99, 1995 );
             //declares totalInventoryValue variable
                 double totalInventoryValue = CD.calculateTotalInventory( completeCDInventory );
              final JTextArea textArea = new JTextArea(display(displayElement));
              final JButton prevBtn = new JButton("Previous");
              final JButton nextBtn = new JButton("Next");
              final JButton lastBtn = new JButton("Last");
              final JButton firstBtn = new JButton("First");
              prevBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                        displayElement = (//what goe here? ) % //what goes here?
                        textArea.setText(display(displayElement));// <--is this right?
              nextBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                          displayElement = (//what goes here? ) % //what goes here?
                        textArea.setText(display(displayElement));// <--is this right?
              firstBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                        displayElement = 0;
                        textArea.setText(display(displayElement));// <--is this right?
              lastBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                        displayElement = //what goes here?;
                        textArea.setText(display(displayElement));// <--is this right?
              JPanel panel = new JPanel(new GridLayout(1,2));
              panel.add(firstBtn); panel.add(nextBtn); panel.add(prevBtn); panel.add(lastBtn);
              JPanel cdImage = new JPanel(new BorderLayout());
              cdImage.setPreferredSize(new Dimension(600,400));
              JFrame      cdFrame = new JFrame();
              cdFrame.getContentPane().add(new JScrollPane(textArea),BorderLayout.CENTER);
              cdFrame.getContentPane().add(panel,BorderLayout.SOUTH);
              cdFrame.getContentPane().add(new JLabel("",new ImageIcon("cd.gif"),JLabel.CENTER),BorderLayout.NORTH);
              cdFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              cdFrame.pack();
              cdFrame.setSize(500,200);
              cdFrame.setTitle("Compact Disc Inventory");
              cdFrame.setLocationRelativeTo(null);
              cdFrame.setVisible(true);
         }//end GUICDInventory constructor
    } // end class GUICDInventory
    // CD2.java
    // subclass of CD
    public class CD2 extends CD
         protected int copyrightDate; // CDs copyright date variable declaration
         private double price2;
         // constructor
         public CD2( String title, String prodNumber, double numStock, double price, int copyrightDate )
              // explicit call to superclass CD constructor
              super( title, prodNumber, numStock, price );
              this.copyrightDate = copyrightDate;
         }// end constructor
         public double getInventoryValue() // modified subclass method to add restocking fee
            price2 = price + price * 0.05;
            return numStock * price2;
        } //end getInventoryValue
        // Returns a formated String contains the information about any particular item of inventory
        public String displayInventory() // modified subclass display method
              return String.format("\n%-22s%s\n%-22s%d\n%-22s%s\n%-22s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n  \n" ,
                                       "CD Title:", title, "Copyright Date:", copyrightDate, "Product Number:", prodNumber , "Number in Stock:",
                                       numStock , "CD Price:" , "$" , price , "Restocking fee (5%):", "$", price*0.05, "Inventory Value:" , "$" ,
                                       getInventoryValue() );
         } // end method
    }//end class CD2
    // CD.java
    // Represents a compact disc object
    import java.util.Arrays;
    class CD implements Comparable
        protected String title; // CD title (name of product)
        protected String prodNumber; // CD product number
        protected double numStock; // CD stock number
        protected double price; // price of CD
        protected double inventoryValue; //number of units in stock times price of each unit
        // constructor initializes CD information
        public CD( String title, String prodNumber, double numStock, double price )
            this.title = title; // Artist: album name
            this.prodNumber = prodNumber; //product number
            this.numStock = numStock; // number of CDs in stock
            this.price = price; //price per CD
        } // end constructor
        public double getInventoryValue()
            return numStock * price;
        } //end getInventoryValue
        //Returns a formated String contains the information about any particular item of inventory
        public String displayInventory()
              //return the formated String containing the complete information about CD
            return String.format("\n%-22s%s\n%-22s%s\n%-22s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n  \n" ,
                                       "CD Title:", title, "Product Number:", prodNumber , "Number in Stock:",
                                       numStock , "CD Price:" , "$" , price , "Restocking fee (5%):", "$", price*0.05, "Inventory Value:" , "$" ,
                                       getInventoryValue() );
        } // end method
        //method to calculate the total inventory of the array of objects
        public static double calculateTotalInventory( CD completeCDInventory[] )
            double totalInventoryValue = 0;
            for ( int count = 0; count < completeCDInventory.length; count++ )
                 totalInventoryValue += completeCDInventory[count].getInventoryValue();
            } // end for
            return totalInventoryValue;
        } // end calculateTotalInventory
         // Method to return the String containing the Information about Inventory's Item
         //as appear in array (non-sorted)
        public static String displayTotalInventory( CD completeCDInventory[] )
              //string which is to be returned from the method containing the complete inventory's information
              String retInfo = "\nInventory of CDs (unsorted):\n";
              //loop to go through complete array
              for ( int count = 0; count < completeCDInventory.length; count++ )
                   retInfo = retInfo + "Item# " + (count + 1);          //add the item number in String
                   retInfo = retInfo + completeCDInventory[count].displayInventory();     //add the inventory detail in String
              }// end for
              return retInfo;          //return the String containing complete detail of Inventory
        }// end displayTotalInventory
         public int compareTo( Object obj ) //overlaod compareTo method
              CD tmp = ( CD )obj;
              if( this.title.compareTo( tmp.title ) < 0 )
                   return -1; //instance lt received
              else if( this.title.compareTo( tmp.title ) > 0 )
                   return 1; //instance gt received
              return 0; //instance == received
              }// end compareTo method
         //Method to return the String containing the Information about Inventory's Item
         // in sorted order (sorted by title)
         public static String sortedCDInventory( CD completeCDInventory[] )
              //string which is to be returned from the method containing the complete inventory's information
              String retInfo = "\nInventory of CDs (sorted by title):\n";
              Arrays.sort( completeCDInventory ); // sort array
              //loop to go through complete array
              for( int count = 0; count < completeCDInventory.length; count++ )
                   retInfo = retInfo + "Item# " + (count + 1);     //add the item number in String
                   retInfo = retInfo + completeCDInventory[count].displayInventory(); //add the inventory detail in String
              return retInfo;     //return the String containing complete detail of Inventory
         } // end method sortedCDInventory
    } // end class CD

    nextBtn.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent ae)
                   displayElement = (//what goes here? ) % //what goes here?
                   textArea.setText(display(displayElement));// <--is this right?
    });Above is your code for the "Next" button.
    You ask the question "What goes here"? Well what do you think goes there?
    If you are looking at item 1 and you press the "Next" button do you not want to look at item 2?
    So the obvious solution would be to add 1 to the previous item value. Does that not make sense? What problem do you have when you try that code?????
    Next you say "Is this right"? Well how are we supposed to know? You wrote the code. We don't know what the code is supposed to do. Again you try it. If it doesn't work then describe the problem you are having. I for one can't execute your code because I don't use JDK5. So looking at the code it looks reasonable, but I can't tell by looking at it what is wrong. Only you can add debug statements in the code to see whats happening.
    If you want help learn to as a proper question and doen't expect us to spoon feed the code to you. This is your assignment, not ours. We are under no obligation to debug and write the code for you. The sooner you learn that, the more help you will receive.

  • Multiple ObjectOutputStreams to one ObjectInputStream

    I would like to have multiple ObjectOutputStreams (liviing in their own java apps) creating objects and having them all funnel into the server app, and have a single ObjectInputStream handle all the deserialization. Speed and performance are they key, so don't want a lot of instances of ObjectInputStream around (one for each client) and don't want to have to instantiate one with every received message.
    So, I made my own ByteInputStream that the ObjectInputStream uses that you can pass arrays of bytes to. It manages them and returns bytes to the OOS as needed.
    If I have a single ObjectOutputStream making objects, this works fine. If I have multiple ObjectOutputStreams all making identical objects, it also works. However, if one of the streams gets an object of a different type, it doesn't like it.
    I did some bit checking, and objects from different streams only differ in random bytes throughout the byte array. For example, an object that serializes into a byte stream 500 bytes long, differs in 5 bytes scattered throughout the array - none at the beginning (first 50 bytes)
    Anyone ever try to use multiple OOSs feeding a single OIS? Any ideas on why I see it work if the object are the same, but not if they differ?

    I have created an application which can send/receive 3000 objects per second each in their own ObjectOutputStream/ObjectInputStream
    How many object do you need to send? How much bandwidth do you have? You might find the network is your bottleneck not the number of streams.

  • CS UI

    Are there some examples of script dialogue boxes (or UI )?? I've had a look at CSUIB 2.0 but it's not javascript friendly - which doesn't help when you don't know what's wrong. Ultimately I want to create a dialogue box that is populated by the layers in a photoshop file. Each of the layers listed is to be given a radio button so the user can switch them on or off. After which I can then pass a function to each selected layers.
    Here's what I've got so far:
    var dlg =
    "dialog {text:'Script Interface',bounds:[100,100,420,510]," +
    "radiobutton0:RadioButton {bounds:[110,330,211,350] , text:'layerName0' }," +
    "radiobutton1:RadioButton {bounds:[110,300,211,320] , text:'layerName1' }," +
    "button0:Button {bounds:[30,370,130,390] , text:'cancel' }," +
    "button1:Button {bounds:[170,370,270,390] , text:'OK' }};";
    var win = new Window(dlg,"my dialogue");
    win.center();
    win.show();
    I don't know why the rado buttons aren't working as they should. Any ideas?

    Hi Ghoulfool,
    I'm on CS3 but I don't think that's the problem.
    It's getting a bit specific to my needs, which is bad because I can't build the script without forum help.
    It assumes you have a file that's built to reflect the layers and actions available in the arrays I set up at the start of the script.
    It also assumes of course that you also have the named actions available in the named action set!
    No-one's going to have a document/actions just like that and I'm contractually forbidden from attaching one.
    I'm hoping someone might know enough scripting to see the problems and offer advice regardless.
    Currently I'm at an impasse and considering a total rewrite.
    Perhaps if I just start with a script that builds an array of all layers (including those within layersets) first, then I might be beter placed to create a recursive function or for loop that can run actions on those layers?
    Any advice after perusing the following would be welcome...
    // Run Action on All Matched Layers- Adobe Photoshop Script
    // Description: searches all layers, including grouped layers, by name and selects the first match, running a chosen action on the layer.
    // Requirements: Adobe Photoshop CS2, or higher
    // Version: 0.1.1, 8/June/2010
    // Author: Tom Barnfield ([email protected])
    // Website: http://www.runninghead.com
    // ============================================================================
    // Installation:
    // 1. Place script in 'C:\Program Files\Adobe\Adobe Photoshop CS3#\Presets\Scripts\'
    // 2. Restart Photoshop
    // 3. Choose File > Scripts > run action on all matched layers.jsx
    // ============================================================================
    // TO DO: Pair actions with layers and sort call action routine.
    // For reference:
    //~ win.dropdownlist.onChange = function() {
    //~    //Save the selected value in a variable to be used later
    //~    myActions = actions_array[parseInt(this.selection)];
    //~    };
    // enable double-clicking from Mac Finder or Windows Explorer
    // this command only works in Photoshop CS2 and higher
    #target photoshop
    // bring application forward for double-click events
    app.bringToFront();
    // FYI: You can call Actions with this script like so-
    // doAction('setup PS CS3 on load','toms ps actions 3 7 8');
    // Declare variables:
    var chosen_action = null;//'default var declaration in line 31';
    //var item;//del?
    var myTitle = 'Customize your Processing :)';
    var done_layers_array = new Array();
    // Previouisly in modal dlg box was 'folderSamples'.
    var standard_layers_array = new Array(
    'stitching',
    'sawtooth',
    'ticking',
    'shading',
    'outer hairs',
    'eyes',
    'nose la',
    'muzzle line'
    var actions_array = new Array(
    'none', // Default initial state, avoid by use of a  +1 in the loops if necessary.
    'lt to st stitching action', // stitching
    'lt to st stitching action', //sawtooth
    'prepare ticking layers lt to st', // ticking
    'none', // shading
    'lt to st outer hairs action', // outer hairs
    'lt to st eyes action', // eyes
    'lt to st stitching action', // nose line
    'lt to st stitching action', // eyes
    var dropdownlist_array = new Array();// The array of drop down lists.
    var chosen_actions_array = new Array();// The array of chosen actions, must corespond to the numnber of chosen layers.
    var ui = // dialog resource object
         'dialog { \
              orientation: "row", alignChildren: "row", \
              main_panel: Panel { \
                   orientation: "row", alignChildren: "left", \
                   group1: Group { \
                        orientation: "column", alignChildren: "left"\
                   group2: Group { \
                        orientation: "column", \
              buttons_group: Group { \
                   orientation: "column", alignment: "left", \
                   goBtn: Button {text:"Go!", properties:{name:"Go"} }, \
                   cancelBtn: Button { text:"Cancel", properties:{name:"cancel"} }, \
         var win = new Window (ui); // new window object with UI resource
         // Reset all text in the main_panel titles and buttons:
         win.main_panel.text = myTitle;
         win.buttons_group.goBtn.name = 'Go';
         win.buttons_group.cancelBtn.text = 'Cancel';
    // Create a column of check boxed layer names:
    for(var i = 0; i < standard_layers_array.length; i++) {
         win.main_panel.group1.add('checkbox', undefined, standard_layers_array[i]);
    // Create a column of dropdown menus:
    for(var i = 0; i < standard_layers_array.length; i++) {
         dropdownlist_array[i] = win.main_panel.group2.add('dropdownlist', undefined, actions_array);
         dropdownlist_array[i].selection = [i+1] ;//Make the first item in list appear instead of a blank (= 0).
         // When the dropdown selection is changed by the user, update the chosen _actions _array:
         dropdownlist_array[i].onChange = function (){
              chosen_actions_array[i] = this.selected.text;
              alert(chosen_actions_array);
    //Go button:
    win.buttons_group.goBtn.onClick = function() {
         for (var i = 0; i < standard_layers_array.length; i++) {
              chosen_actions_array.push(dropdownlist_array[i].selection.text);
         // Display an alert to show the chosen_actions_array is working:
    //~      var msg = '';
    //~      for (var i = 0; i < chosen_actions_array.length; i++) {
    //~           msg += chosen_actions_array[i] + '\n';
    //~           }
    //~      alert ('Chosen_actions_array returns:\n\n' + msg);
         win.close(1); // 1 in the brackets means Closed like "OK", 2 means closed like "Cancel".
    // Cancel button (not strictly needed as the default action for the goBtn is 'close')
    win.buttons_group.cancelBtn.onClick = function() {
        win.close(2); // 1 in the brackets means Closed like "OK", 2 means closed like "Cancel".
    win.show();
    win.center();// move to center before
    // ============================================================================
    // main - main function
    function main(name) {
         // prompt for layer name (first run)
    //~      if (!name) {
    //~           var name = prompt('Enter the kind of layers you wish to run the action on (eg- "shading", "outer hairs" or "ticking":', 'stitching', 'Type of Layers to Work On');
    //~      } else {// prompt for layer name (after unsuccessful find)
    //~           name = prompt('"' + name + '" not found.\n\n' +
    //~           'Perhaps because we\'re finished processing the document now?\n\n' +
    //~           'Would you like try another search?', name, 'Find Layer');
    //~      }
    //var chosen_action = prompt ('Now choose an action to run\nThis must be available in \"toms ps cbg actions 7 4 10.\"', 'lt to st stitching action', 'Action to run');
         // find layer; quit on cancel button or escape key
         //if (name) {
              var match = findLayer(activeDocument);
              // repeat find if layer not found
              if (!match) {
                   main(name);
    // findLayer - iterate through layers to find a match
    function findLayer(ref) {
         // declare local variables
         var layers = ref.layers;
         var match = false;
              // iterate through layerstack to find a match
              for (var i = 0; i < layers.length; i++) {
                   var layer = layers[i];
                   if (layer.typename == 'LayerSet') {// If it's a layerset, go in one level and carry on.
                   match = findLayer(layer);
                   } else {// This must be a real layer...
                   // Looping layer processor
                   for (var i = 0; i < standard_layers_array.length; i++) {
                        var name = standard_layers_array[i];
                        // test for matching layer
                        var current_layer_full_address =  (layer.parent.name.toLowerCase() + '.' + layer.name.toLowerCase());
                        alert(layer.parent.name.toLowerCase() + '.' + layer.name.toLowerCase());
                        if ((layer.name.toLowerCase().indexOf (name, 0)!=-1) && (done_layers_array[i] != current_layer_full_address)) {// case insentetive searches.
                             match = true;
                             //If the matched layer is inside a locked group (layerset), unlock the group first.
                             layer.parent.allLocked ? layer.parent.allLocked = false : null;
                             layer.allLocked ? layer.allLocked = false : null;
                             done_layers_array.push(current_layer_full_address);// ensure we don't process layer again. Push does not work in IE5/Win, I don't care :)
                             activeDocument.activeLayer = layer;// select matching layer
                             var chosen_action = chosen_actions_array[i];
                             if (chosen_action != 'none') {
                                  doAction(chosen_action,'toms ps cbg actions 7 4 10');// run the action.
                        } else {
                             match = false;
                   }// end of looping layer processor.
                   // end of if match
    // Done iterating through layers to find a match, return result.
         return match;
    // Display an alert to let the user know which layers were successfully amended:
    var msg = '';
    for (var i = 0; i < done_layers_array.length; i++) {
         msg += done_layers_array[i] + '\n';
    alert ('These are the layers that were amended:\n' + msg + '\ndone_layers_array.length = ' + done_layers_array.length + '.');
    // isCorrectVersion - check for Adobe Photoshop CS2 (v9) or higher
    function isCorrectVersion() {
         if (parseInt(version, 10) >= 9) {
              return true;
         else {
              alert('This script requires Adobe Photoshop CS2 or higher.', 'Wrong Version', false);
              return false;
    // isOpenDocs - ensure at least one document is open
    function isOpenDocs() {
         if (documents.length) {
              return true;
         else {
              alert('There are no documents open.', 'No Documents Open', false);
              return false;
    // hasLayers - ensure that the active document contains at least one layer
    function hasLayers() {
         var doc = activeDocument;
         if (doc.layers.length == 1 && doc.activeLayer.isBackgroundLayer) {
              alert('The active document has no layers.', 'No Layers', false);
              return false;
         else {
              return true;
    // showError - display error message if something goes wrong
    function showError(err) {
         if (confirm('An unknown error has occurred.\n' +
              'Would you like to see more information?', true, 'Unknown Error')) {
                   alert(err + ': on line ' + err.line, 'Script Error', true);
    // test initial conditions prior to running main function
    if (isCorrectVersion() && isOpenDocs() && hasLayers()) {
         try {
              // suspend history for CS3 (v10) or higher
              if (parseInt(version, 10) >= 10) {
                   activeDocument.suspendHistory('Find Layer', 'main()');
              // just run main for CS2 (v9)
              else {
                   main();
         catch(e) {
              // don't report error on user cancel
              if (e.number != 8007) {
                   showError(e);
    Cheers,
    Tom B
    aka runninghead

  • Image expand resizing issue

    http://www.kowalskidesign.com/source/normalFlash.html
    Hello,
    I'm having problems resizing the expanded view. This is when you click on a thumb and the image enlarges with a description.
    I've tried changing lines 204-205 (highlighted in bold in code below)
    '// extends mask producing fully visible image' changing:-
    width: (2 * MWIDTH),  to width: 550    and the same with the height but i get mixed results.
    If anyone could give me some pointers it would be very much appreciated.
    The link is above. Here is the code:-
    // Grid Expandable Gallery
    // (C)RimV - www.mymedia-art.com - [email protected]
    // FLASH LIB
    import flash.geom.*;
    import flash.display.BitmapData;
    import flash.filters.DropShadowFilter;
    // FUSE KIT
    import com.mosesSupposes.fuse.*;
    import com.mosesSupposes.fusefx.*;
    import com.endologik.fusefx.*;
    // DYNAMIC REGISTRATION
    import com.darronschall.DynamicRegistration;
    //______________________________________________ PARAMETERS
    // Gallery characteristic
    var strokeThickness:Number = 2;
    var rows:Number = 4;
    var columns:Number = 5;
    var bWidth:Number = 700;
    var bHeight:Number = 500;
    var speed:Number = 0.5;
    var layerAlpha:Number = 70;
    // Roll over / roll out effec
    var Effect:Array = ["None", "brightness", "photo flash", "grayscale"];
    var effectID:Number = 2;
    // data path
    var styleSheet:String = "css/styles.css";
    var xmlPath:String = "normalFlash.xml";
    //______________________________________________ VARIABLES
    // Gallery dimension
    var SWIDTH:Number;
    var SHEIGHT:Number;
    var MWIDTH:Number;
    var MHEIGHT:Number;
    var nWidth:Number;
    var nHeight:Number;
    var TOTAL:Number;
    // Movieclip dimension
    var maskContainer:MovieClip = new MovieClip();
    var layer:MovieClip = new MovieClip();
    var current:MovieClip = new MovieClip();
    var descriptionClip:MovieClip = new MovieClip();
    var preloader:Array = new Array();
    var maskArray:Array = new Array();
    var image:Array = new Array();
    var position:Array = new Array();
    var captionClip:MovieClip = new MovieClip();
    // misc
    var xmlData:XML = new XML();
    var link:Array = new Array();
    var description:Array = new Array();
    var caption:Array = new Array();
    var count:Number = 0;
    var firstLoaded:Boolean = true;
    var mWidth:Number;
    var mHeight:Number;
    var dX, dY:Number;
    //______________________________________________ MAIN
    initGallery();
    function initGallery():Void
    // Initialize ZigoEngine
    ZigoEngine.register(PennerEasing, FuseItem, FuseFMP);
    FuseFX.register(ColorFX);
    ZigoEngine.OUTPUT_LEVEL = 0;
    // hide display clip
    display._visible = false;
    // Global reference
    _global.base = this;
    // Gallery dimension
    SWIDTH = Stage.width;
    SHEIGHT = Stage.height;
    base = this;
    // stage resize listener
    Stage.scaleMode = "noScale";
        Stage.align = "TL";
    var stageResize:Object = new Object();
    Stage.addListener(stageResize);
    stageResize.onResize = onStageResize;
    // start building gallery
    buildGallery();
    dX = -(Stage.width - bWidth) * .5;
    dY = -(Stage.height - bHeight) * .5;
    function onStageResize():Void
    base._x = (Stage.width - bWidth) * .5 + dX;
    base._y = (Stage.height - bHeight) * .5 + dY;
    function buildGallery():Void
    // Load XML
    loadXML();
    // Load StyleSheet
    loadStyleSheet();
    // Load XML
    function loadXML():Void
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadData;
    xmlData.load(xmlPath);
    // Load image and save data
    function loadData(loaded:Boolean):Void
    if (loaded)
    var data:Array = xmlData.firstChild.firstChild.childNodes;
    TOTAL = data.length;
    createMaskContainer();
    for (var i:Number = 0; i < TOTAL; i++)
    var dat:Array = data[i].childNodes;
    caption[i] = dat[1].attributes.content;
    description[i] = dat[2].firstChild.nodeValue;
    link[i] = dat[3].attributes.src;
    // Image data
    image[i] = new MovieClip();
    position[i] = new Object();
    loadImage(dat[0].attributes.src, i);
    // Load image
    function loadImage(src:String, index:Number):Void
    image[index] = this.createEmptyMovieClip("image" + index, index + 1000);
    // create movie clip loader listener
    var mylistener:Object = new Object();
    // update progress
    mylistener.onLoadProgress = function(image:MovieClip, byteLoaded:Number, byteTotal:Number):Void
    var num:Number = Math.round(byteLoaded / byteTotal * 100);
    _global.base.preloader[index].percent.text = num;
    // Load completed initialize data
    mylistener.onLoadInit = function(target:MovieClip):Void
    // remove preloader
    preloader[index].removeMovieClip();
    //set up necessary component and calculate data
    // Setting center registration
    DynamicRegistration.initialize(target);
    target.setRegistration(target._width / 2, target._height / 2);
    var r:Number = Math.floor(index / columns);
    var c:Number = index % columns;
    var deltaX:Number = (SWIDTH - bWidth) / 2;
    var detalY:Number = (SHEIGHT - bHeight) / 2;
    cover[index]._x = target._x2 = position[index].x = (c + 1) * strokeThickness + c * mWidth + mWidth / 2 + deltaX;
    cover[index]._y = target._y2 = position[index].y = (r + 1) * strokeThickness + r * mHeight + mHeight / 2 + detalY;
    target.xmin = target._x2 - (target._width - mWidth) / 2;
    target.xmax = target._x2 + (target._width - mWidth) / 2;
    target.ymin = target._y2 - (target._height - mHeight) / 2;
    target.ymax = target._y2 + (target._height - mHeight) / 2;
    target.index = index;
    target.xk = speed;
    target.yk = speed;
    target.release = false;
    target.oX = target._x2;
    target.oY = target._y2;
    target.setMask(maskArray[index]);
    maskArray[index].tWidth = (target._width) / (bWidth / MWIDTH);
    maskArray[index].tHeight = (target._height) / (bHeight / MHEIGHT);
    // Apply effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(target, ColorFX.BRIGHTNESS, -70, 0);
    break;
    case "grayscale": ZigoEngine.doTween(target, ColorFX.SATURATION, -100, 0);
    break;
    // Setup interactive
    target.onRelease = function():Void
    // unhide image + move to center
    if (!this.release)
    delete this.onEnterFrame;
    this.release = true;
    current = this;
    var index:Number = this.index;
    // extends mask producing fully visible image
    ZigoEngine.doTween({ target:maskArray[index],
    width: (2 * MWIDTH),
    height: (2 * MHEIGHT),
    ease:"easeInQuint",
    time:1,
    func:function():Void
    // display description
    descriptionClip._visible = true;
    descriptionClip.swapDepths(current._parent.getNextHighestDepth());
    descriptionClip.content.htmlText = description[current.index];
    descriptionClip.content._width = current._width - 5;
    descriptionClip.back._height  = descriptionClip.content._height + 10;
    descriptionClip.back._width = descriptionClip.content._width + 5;
    descriptionClip._x = current._x;
    descriptionClip._y = current._y + current._height - descriptionClip._height;
    ZigoEngine.doTween({ target:descriptionClip,
    alpha:100
    // Disable effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, 0, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, 0, 2);
    break;
    // move to center
    var centerX:Number = (SWIDTH - current._width) / 2;
    var centerY:Number = (SHEIGHT - current._height) / 2;
    ZigoEngine.doTween({ target:current,
    x:centerX,
    y:centerY,
    ease:"easeOutQuint"
    // display cover layer
    var depth = this._parent.getNextHighestDepth();
    layer.swapDepths(depth);
    layer._visible = true;
    ZigoEngine.doTween({ target:layer,
    start_alpha:0,
    alpha:layerAlpha
    this.swapDepths(depth + 1);
    // hide caption
    ZigoEngine.doTween({ target:captionClip,
    alpha:0,
    func:function():Void
    captionClip._visible = false;
    else
    // turn back to original position
    ZigoEngine.doTween({ target:descriptionClip,
    alpha:0,
    func:function():Void
    descriptionClip._visible = false;
    ZigoEngine.doTween({ target:this,
    _x2:this.oX,
    _y2:this.oY,
    func:function():Void
    current.release = false;
    ZigoEngine.doTween({ target:maskArray[this.index],
    width: nWidth,
    height: nHeight
    ZigoEngine.doTween({ target:layer,
    alpha:0,
    func:function():Void
    layer._visible = false;
    // Enable effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, -70, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, -100, 2);
    break;
    // animate
    target.onRollOver = function()
    // animate image
    if (!this.release)
    this.onEnterFrame = function():Void
    this._x2 += this.xk;
    this._y2 += this.yk;
    if (this._x2 >= this.xmax || this._x2 <= this.xmin) this.xk =- this.xk;
    if (this._y2 >= this.ymax || this._y2 <= this.ymin) this.yk =- this.yk;
    // effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, 50, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, 0, 2);
    break;
    case "photo flash": ZigoEngine.doTween(this, [ColorFX.BRIGHTNESS,ColorFX.CONTRAST],[100,100], 0);
    ZigoEngine.doTween(this,[ColorFX.BRIGHTNESS,ColorFX.CONTRAST],[0,0], 2);
    break;
    // Show caption
    captionClip.swapDepths(_global.base.getNextHighestDepth());
    captionClip.captionText.text = caption[this.index];
    captionClip._visible = true;
    ZigoEngine.doTween({ target:captionClip,
    x:_xmouse + 10,
    y:_ymouse - 10,
    start_alpha:0,
    alpha:100
    // disable
    target.onRollOut = function():Void
    delete this.onEnterFrame;
    if (!this.release)
    // effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, -70, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, -100, 2);
    break;
    // hide caption
    ZigoEngine.doTween({ target:captionClip,
    alpha:0,
    func:function():Void
    captionClip._visible = false;
    // Fade in image
    ZigoEngine.doTween({ target:target,
    start_alpha:0,
    alpha:100,
    time:3
    // Movie Clip Loader
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.addListener(mylistener);
    loader.loadClip(src, image[index]);
    function createMaskContainer():Void
    // Mask container
    maskContainer = this.createEmptyMovieClip("maskContainer", 100000);
    // Cover layer
    layer = this.attachMovie("layer", "layer", 200000);
    layer._width = SWIDTH;
    layer._height = SHEIGHT;
    layer._x = SWIDTH / 2;
    layer._y = SHEIGHT / 2;
    layer._alpha = layerAlpha;
    layer.useHandCursor = false;
    layer.onRelease = function():Void { };
    layer._visible = false;
    // attach mask clip and place in proper position
    var k:Number = 0;
    for (var i:Number = 0; i < rows; i++)
    for (var j:Number = 0; j < columns; j++)
    maskArray[k] = new MovieClip();
    maskArray[k] = maskContainer.attachMovie("mask", "mask" + k, k);
    maskArray[k]._x = (j + 1) * strokeThickness + j * 50 + 25;
    maskArray[k]._y = (i + 1) * strokeThickness + i * 50 + 25;
    k++;
    DynamicRegistration.initialize(maskContainer);
    maskContainer.setRegistration(maskContainer._width / 2, maskContainer._height / 2);
    maskContainer._x2 = SWIDTH / 2;
    maskContainer._y2 = SHEIGHT / 2;
    MWIDTH = maskContainer._width;
    MHEIGHT = maskContainer._height;
    maskContainer._visible = false;
    var deltaX:Number = bWidth / MWIDTH;
    var deltaY:Number = bHeight / MHEIGHT;
    maskContainer._xscale2 = deltaX * 100;
    maskContainer._yscale2 = deltaY * 100;
    nWidth = 50 + strokeThickness * (deltaX - 1) / deltaX;
    nHeight = 50 + strokeThickness * (deltaY - 1) / deltaY;
    mWidth = nWidth * deltaX;
    mHeight = nHeight * deltaY;
    for (var i:Number = 0; i < TOTAL; i++)
    maskArray[i]._width = nWidth;
    maskArray[i]._height = nHeight;
    // attach preloader
    preloader[i] = this.attachMovie("preloader", "preloader" + i, i + 8000);
    preloader[i]._x = (maskArray[i]._x / MWIDTH) * (maskContainer._width) + maskContainer._x;
    preloader[i]._y = (maskArray[i]._y / MHEIGHT) * (maskContainer._height) + maskContainer._y;
    // Attach caption
    captionClip = this.attachMovie("caption", "captionClip", 99999);
    captionClip._visible = false;
    function stopMoving():Void
    for (var i:Number = 0; i < TOTAL; i++) delete image[i].onEnterFrame;
    function loadStyleSheet():Void
    // Attach Description Clip
    descriptionClip = this.attachMovie("description", "descriptionClip", 300000);
    descriptionClip.content.autoSize = true;
    descriptionClip._visible = false;
    descriptionClip._alpha = 0;
    var myStyle:TextField.StyleSheet = new TextField.StyleSheet;
    myStyle.load(styleSheet);
    myStyle.onLoad = function(loaded:Boolean):Void
    if (loaded)
    _global.base.descriptionClip.content.styleSheet = this;
    target.onEnterFrame = function():Void
    this._x2 += this.xk;
    this._y2 += this.yk;
    if (this._x2 >= this.xmax || this._x2 <= this.xmin) this.xk =- this.xk;
    if (this._y2 >= this.ymax || this._y2 <= this.ymin) this.yk =- this.yk;

    Thanks, for your reply..
    I've corrected it.. Its works as expected in Firefox and Chrome, problem with IE alone
    My question is changing doctype declaration is alone enough for upgrading HTML 4 to 5?
    Previously, i've used is
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    now i changed to <!DOCTYPE html>

  • Excel read multiple cells

    Hi all,
    I want to read multiple cells from excel C1:C2 but I get the variant result:
    Value -> Array(Non Displayable) 
    When I removed string C2 to read cell C1 the result is OK.
    Does anybody know the solution?  
    Thanks in advance. 
    NacNud
    Using LabVIEW 8.5
    Sorry for the duplicate image. Don't know how to remove this.
    Attachments:
    Movie strip path.vi ‏13 KB
    Movie excel edit.vi ‏53 KB
    Movie date.xls ‏16 KB

    Hmmm...
    Solved it myself. The variant is not represented with a probe.
    The solution was to convert the variant data to an 2D array and then probe it.
    See attachement for the solution.
    NaNud
    Message Edited by excel read multiple cells on 05-18-2010 11:44 AM
    Attachments:
    Movie excel edit.vi ‏54 KB

  • Variant data

    Hello,
    I am using an ActiveX DLL in my current LabVIEW project, something
    that I have never done before
    I use one of the DLL's methods to receive Variant data and then use
    the "Variant to Data" to try and receive and array of floats that I
    then want to plot to a chart. At the moment I am only getting 0.00 for
    all the values and I know that this should not be the case. I create
    an indicator for the Variant and this is the information I can get.
    OLE Variant
    Variant Type -> VT_ARRAY|VT_R4
    Value -> Array(Non Displayable)
    I have also tried the "Get Variant Attribute" VI but don't get any
    values for either 'name(s)' or 'value(s)'.
    Using "Variant To Flattened String" gives me an array of
    integers for
    the type string: 6,132,1 and nothing in the data string.
    Any ideas?
    Regards,
    Adrian.

    Nghtcrwlr wrote:
    Should I not post this question in LabVIEW thread?
    You originally posted this in the Breakpoint board.  I had the moderator move it to the LabVIEW board.
    Use the context help (Ctrl+H to toggle it on/off).  You will notice if you put your cursor over the Variant to Data node that it explains that you have to supply a data type to convert to.  You can wire anything into the data type, such as an array of doubles.  If you don't supply a type, it defaults to a variant.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is DB/SE supported for message persistence through OEMS?

    Hi all,
    I'm in the process of designing an high availability configuration for ESB.
    We will use Oracle database RAC for the metadata repository and for message persistence through Oracle Enterprise Messaging Service (OEMS) as well.
    I'm considering to use the Oracle Database Standard Edition (SE) for clustering (Although the license policy for SE not only depends on the number of processor sockets but also on the MCM's since the 1st of May!)
    Does anyone know if the database standard edition is officially supported for message persistence through OEMS?
    Thanks in advance,
    Jeroen van Schaijk

    Hi Scott,
    as I know the only difference in the partnr. is:
    370-xxxx Sun StorEdge 3510 FC Array (Non-RoHS)
    371-xxxx Sun StorEdge 3510 FC Array RoHS
    hth
    Gerhard

  • Drawing float* buffer fastest way

    Hi,
    I am little out-of-date about pixel buffer objects, native pixel formats, etc. on OSX. Can you briefly point me out what is the fastest way to visualize grayscale data represented as float* 2d array (non power of two domain, [0,1] range) to the frame buffer? Is OpengGL my best option or is there any faster OSX specific direct frame buffer drawing?
    In case of OpenGL, how do I do this. I am using Cocoa, on 10.5x.
    Thanks a lot
    Sunil

    Hi,
    I am little out-of-date about pixel buffer objects, native pixel formats, etc. on OSX. Can you briefly point me out what is the fastest way to visualize grayscale data represented as float* 2d array (non power of two domain, [0,1] range) to the frame buffer? Is OpengGL my best option or is there any faster OSX specific direct frame buffer drawing?
    In case of OpenGL, how do I do this. I am using Cocoa, on 10.5x.
    Thanks a lot
    Sunil

  • Fast way to find the number of non-zero terms in an array or image

    I am trying to use the Standard Deviation PtbyPt Vi.  It takes in a series of points, can be reset when beginning the calculation.  There is also an input for sample size.  I am calculating some statistics on an array...and would only  to include like the non-zero elements that are  in the sample. 
    Is there a quick way to look at an array and find the number of non-zero elements?
    Thanks.
    Solved!
    Go to Solution.

    GerdW wrote:
    - for big arrays this may lead to "out of memory" problems because of creation of data copies
    Here's a quick rundown on memory allocations based on the algorithm.
    (case 1&3)
    If you do the "!=0, ?1:0, I32, sum" shuffle, each step needs to allocate a new array, so if the input array is DBL and uses N amount of memory, we need 7N/8 more memory.
    (Total of 15N/8, or 13N/8 if we don't need the I32, but in this case the array are too small to worry about anything )
    The nice thing is that it works for any array dimensionality (1D, 2D, 5D, etc...)
    (Case 2&5)
    If you do the summing in a shift register, No additional array memory is needed. Unfortunately, the code needs to be changed by adding an extra FOR loop for each dimension (see case 5 for 2D inputs).
    (Case 4)
    If we reshape the N-D array to a 1D array, we need to create a second copy, so the memory usage is about twice. This also works for any dimension.
    In real life, and if memory is a potential issue, you should always do some benchmarks.
    Often, the issues are more complex, so this is just a quick summary.
    Message Edited by altenbach on 10-23-2008 11:59 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    CountNonZero.PNG ‏29 KB

Maybe you are looking for

  • Excise invoice is meant for normal exports.

    Hi Gurus, In Deemed exports :  While raising ARE-3 its showing the following error message: 0000000003/2008 excise invoice is meant for normal exports. Message no. 4F260 Please share your ideas to go ahead. I have used same excise group but different

  • One scroll Bar for both the split-screen containers ?

    Hello All,            I have 2 screens on my output which are split screens. But now I want only one scroll bar for both of then so that when the scroll bar is used both the screens will simultaneously move. Is this functionality possible ? If yes ca

  • Getting an Object Identifier String given a line of source code? HELP!

    (forgot to close the code tag on that last one!) Hi there, I am in desparate need of getting the object identifier given a particular line of source code. I need this for the debugger I'm writing, and since the jdb forum never gets reponses; just mor

  • List processing question

    I'll start by describing what I'm trying to do. I have a list of html files that is a subset of a directory tree of other html files. I'm looking for a way to find the complement of my list of files. Here's an example: All files: ./d1/f1.html ./d1/f2

  • Scratch Disk Problems

    I teach FCP to high school students. I have them set their scratch disks which works fine when they start their projects. But, when they try to set them again the next time they open their projects they get an error message, that they don't have acce