How to find zeros in a spred sheet file

I have a spread sheet file having 33 column I want to find  is there any zero in any of the columns,how this can be done easily.searching one dimensional array is time consuming since file size is very large
thanks for your time
regards
augustin
Certified LabVIEW Associate Developer
Solved!
Go to Solution.

johnsold wrote:
If the spreadsheet file is a text file, you could use the string functions to search for the presence of zeros.  The details would depend heavily on the format in which the data is saved.
For working with numeric values another caution is in order.  In this case it probably would work to use the Is Equal to Zero comparison primitive, but remember that in general equality comparisons on floating point numbers are not a good idea due to the finite representation in binary and roundoff errors after calculations.  Adapting Matt Bradley's suggestion you might test whether the absolute value is less than some tolerance, such as 1e-6, rather than zero.
Lynn 
Lynn- good point! but use abs val and compare to the machine epsilon  (that "little e" constant on the numeric>constants sub-palette is the smallest value that the computer can represent as a dbl)
Jeff

Similar Messages

  • How to save data in spred sheet file as it is ?

    hello,
    I want to save one table in spred sheet file same as i read from my external device.
    here in attachment I have attached the vi.
    that is the sample data which i want to save for example in first column i want only numbers without any floating points.
    and in remaining column what everdata is, it should be same.
    In attachment file name 11 is the same file which i want but i am getting always like attachment 2 file,
    can you please guide me how can i get data same which is displayed in labview table.
    Thank you very much in advance.
    Solved!
    Go to Solution.
    Attachments:
    Untitled 3.vi ‏6 KB
    11.log ‏1 KB
    2.txt ‏1 KB

    This code - using Format into String - creates an output very similar to the 11.log file. You can write the string to a file with Write to Text File or write the string array with Write to Spreadsheet File.vi.  Write to Spreadsheet File.vi internally converts String array to what is in String and then writes it as text, so it makes more sense to just use Write to Text File. Using Write to Spreadsheet File.vi will make extra copies of the data, which can become a problem if the dataset is large.
    Read the Detailed Help for Format into String for more information on the format codes available.
    Lynn
    Attachments:
    Format data.vi ‏8 KB

  • How to finding zero pionts of a waveform?

    Hellow,
    I am developing a programme, its output values observed from the waveform chart should be a Sinusoidal wave, but the exact function/expression is unknown. I would like to detect the zero point of the output sinusoidal waveform.
    thanks a lot!
    ps, I developed the programme in the constrol&simulation loop and I tried to extract the tone information like amp &freq from the outout but did not work...
    Best regards,
    Floyd

    Hellow, thanks for your reply!
    As to the zero points, I just need two of them. I also noticed there won't be exactly zero and thought abour linear interpolation, but I don't know how to implement it,
    There is no noise and just a pure sinusoidal waveform. Actually I would like to extract the frequency and amp info from the waveform, however extract tone information VI seems not working in control and simulation loop. Finding zero points and then calculate the period and finally get frequency is just am alternative.
    I attached an example, in which I generated an sine wave with a "sine signal" VI, but in my programme the sinewave is actually unkonwn.
    Best Regards,
    Floyd
    Attachments:
    sine wave.vi ‏151 KB

  • How to find a particular word in a file using java

    Program how to find a particular word in a file

    SirivaniG wrote:
    Program how to find a particular word in a fileOkay, I finished it. Now what?

  • How to find out the end of the file in java

    hi friends,
    I am reading a file char by char. So how can I check for end of the file. I va a integer of the character and a string which has hex value of the character.
    but when I execute the pgm, it shows out of memory error. overflow of the heap.
    can anyone help???
    thanks in advance...
    bye

    There is no "type of file". It's all zeroes andones.
    thing is am wrintin a file. I want to set the
    type(extension) to be .iso. how can i do that???If you want to make the extension ".iso" then just end the file name with ".iso".
    If you want to make the "type" iso, so that it can be manipulated by an iso application or whatever, then you have to make sure the bytes you write are of the proper format.
    As already stated: Files don't have a type.

  • How to find the problem in EP trace file?

    Hi
    Last week all the role assignments to users under LDAP datasource got deleted from the portal. We have reuploaded the role assigmnet. Now got the trace files from the server. How to check what happend on that day ?
    When all roles assignmnets gone?
    Any Keywords to help!
    Thanks!
    Dhiya.J

    Hi both,
    I got the trace file already from J2EE server. Im struggling to find out anything from the trace file ..
    How to check when role assignments got deleted ?
    any LDAP configuration changes ?
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7185 - 630]/>
    <!NAME[./log/defaultTrace.trc]/>
    <!PATTERN[defaultTrace.trc]/>
    <!FORMATTER[com.sap.tc.logging.ListFormatter]/>
    <!ENCODING[UTF8]/>
    <!FILESET[6, 20, 10485760]/>
    <!PREVIOUSFILE[defaultTrace.5.trc]/>
    <!NEXTFILE[defaultTrace.7.trc]/>
    <!LOGHEADER[END]/>
    #1.5 #0018FE349B47007000000C1900001A200004939077FC1A8D#1288148604431#System.err#sap.com/irj#System.err#gmbeqy#17773####c35ae9f0e17611df93420018fe349b47#SAPEngine_Application_Thread[impl:3]_7##0#0#Error##Plain###     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)#
    #1.5 #0018FE349B47007000000C1A00001A200004939077FC1DC9#1288148604431#System.err#sap.com/irj#System.err#gmbeqy#17773####c35ae9f0e17611df93420018fe349b47#SAPEngine_Application_Thread[impl:3]_7##0#0#Error##Plain###     at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)#
    11d30a40e26211dfaa7e0018fe349b47#SAPEngine_Application_Thread[impl:3]_21##0#0#Error##Plain###Caused by: java.lang.NullPointerException#
    #1.5 #0018FE349B470059000004C300001A20000493A816802148#1288250048138#com.sap.security.core.imp#sap.com/tcwddispwda#com.sap.security.core.imp.[cf=com.sap.security.core.imp.User][md=init][cl=22052]#gmrnis#29282##sghrppr1.sgh.shs_PPH_15804951#gmrnis#e42beac1e26211dfa6230018fe349b47#SAPEngine_Application_Thread[impl:3]_28##0#0#Error##Java###Error while populating "USER.CORP_LDAP.cn=norsheha bte ismail,ou=mro - hims,ou=sgh,dc=sgh,dc=shs,dc=com,dc=sg"
    [EXCEPTION]
    #1#com.sap.security.core.persistence.datasource.PersistenceException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001BD, problem 2001 (NO_OBJECT), data 0, best match of:
         'DC=sgh,DC=shs,DC=com,DC=sg'
         at com.sap.security.core.persistence.datasource.imp.LDAPPersistence.populatePrincipalDatabag(LDAPPersistence.java:1456)
         at com.sap.security.core.persistence.imp.PrincipalDatabagFactoryInstance.getPrincipalDatabag(PrincipalDatabagFactoryInstance.java:2307)
         at com.sap.security.core.imp.User.init(User.java:244)
         at com.sap.security.core.imp.AbstractPrincipal.<init>(AbstractPrincipal.java:186)
         at com.sap.security.core.imp.Principal.<init>(Principal.java:64)
         at com.sap.security.core.imp.User.<init>(User.java:213)
         at com.sap.security.core.imp.User.<init>(User.java:203)
    It keeps on going like this ... any key word to search?
    Thanks!

  • How to find out where the tablespace physical file *.dbf ?

    How to find out where is my tablespace physical file *.dbf ?
    Can I increase tablespace_name: TEMP and how to increase it.
    First, I need to know where is the TMP *.pdf file, am I right?
    Thanks in advance

    This forum is for issues with the SQL Developer tool. You'd get more response in the General Database forum.
    Have fun,
    K.

  • Private strand flush not complete how to find optimal size of redo log file

    hi,
    i am using oracle 10.2.0 on unix system and getting Private strand flush not complete in the alert log file. i know this is due to check point is not completed.
    I need to increase the size of redo log files or add new group to the database. i have log file switch (checkpoint incomplete) in the top 5 wait event.
    i can't change any parameter of database. i have three redo log group and log files are of 250MB size. i want to know the suitable size to avoid problem.
    select * from v$instance_recovery;
    RECOVERY_ESTIMATED_IOS     ACTUAL_REDO_BLKS     TARGET_REDO_BLKS     LOG_FILE_SIZE_REDO_BLKS     LOG_CHKPT_TIMEOUT_REDO_BLKS     LOG_CHKPT_INTERVAL_REDO_BLKS     FAST_START_IO_TARGET_REDO_BLKS     TARGET_MTTR     ESTIMATED_MTTR     CKPT_BLOCK_WRITES     OPTIMAL_LOGFILE_SIZE     ESTD_CLUSTER_AVAILABLE_TIME     WRITES_MTTR     WRITES_LOGFILE_SIZE     WRITES_LOG_CHECKPOINT_SETTINGS     WRITES_OTHER_SETTINGS     WRITES_AUTOTUNE     WRITES_FULL_THREAD_CKPT
    625     9286     9999     921600          9999          0     9     112166207               0     0     219270206     0     3331591     5707793please suggest me or tell me the way how to find out suitable size to avoid problem.
    thanks
    umesh

    How often should a database archive its logs
    Re: Redo log size increase and performance
    Please read the above thread and great replies by HJR sir. I think if you wish to get concept knowledge, you should add in your notes.
    "If the FAST_START_MTTR_TARGET parameter is set to limit the instance recovery time, Oracle automatically tries to checkpoint as frequently as necessary. Under this condition, the size of the log files should be large enough to avoid additional checkpointing due to under sized log files. The optimal size can be obtained by querying the OPTIMAL_LOGFILE_SIZE column from the V$INSTANCE_RECOVERY view. You can also obtain sizing advice on the Redo Log Groups page of Oracle Enterprise Manager Database Control."
    Source:http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10752/build_db.htm#19559
    Pl also see ML Doc 274264.1 (REDO LOGS SIZING ADVISORY) on tips to calculate the optimal size for redo logs in 10g databases
    Source:Re: Redo Log Size in R12
    HTH
    Girish Sharma

  • How to find where iWeb is saving the files?

    greetings.
    i used iweb last year to make a couple web pages... i normally just edit html directly and don't use this kind of software... i cannot find where it is saving the pages i've updated... the location in ~/Site that has the files from last year do not appear to be updating when saving... the changes are getting saved somewhere because the changes are still there after quitting and restarting iweb... the standard way i use to find where a program is saving the file is to command+click on the title bar to see what path it is saving the file... that doesn't work in iweb...
    i edit my files locally on my HD... then when everything is ok, i copy them up to our server... since i cannot find where iweb is saving the files, i can't copy them to the server... i really don't like software that gets in the way of just doing the work or hides everything... :-\
    i did a quick search of the manual and this list and didn't find anything on this topic...
    thanks for any suggestions-
    jeffery
    ps: also how does one get rid of that ANNOYING "try mobilme for free" splash screen when starting the program each time? it's enough to make me want to just delete everything and recode it by hand... certainly less annoying and possibly even faster... :-[ sorry for being so cranky-

    There is absolutely nothing wrong with iWeb at all. You just need to learn how to use it and what it does and how it publishes that is all.
    You just need to know that if you want to update, then you need the domain files and where they are stored and know that iWeb cannot import and that it creates html files on publishing and publishing to a folder will create these. If you wish to make alterations to these files, then you can easily do so with an html editor and then upload directly to your web server.
    As with anything, if you learn what it does and how to use it effectively, you can make it work very well for you.

  • How to find the message that processed a file

    Dear guys,
    I need to find the message that have processed a text file. Using sxmb_moni  I can see this information on DynamicConfiguration log but I don't know how to search this string text in all messages that were processed.
    Thanks,
    Helio Paixao

    Hi Paixao,
    As michal you need to have the EhP1 (enhancement package 1 for PI)  or if you have installed trex then you can see this blog on how to find:
    /people/prasad.illapani/blog/2005/11/14/payload-based-message-search-in-xi30-using-trex-engine
    Else some other nonstandard ways through which you can get are shown in this blogs:
    /people/sravya.talanki2/blog/2006/02/21/abap-based-trex-in-xi-proto
    /people/alessandro.guarneri/blog/2006/02/14/super-message-monitor-for-sap-xi
    Regards.
    ---Satish

  • How to find out the format of a file?

    Is there any way to find out the format of a file?
    By format I mean binary, text, .doc, .rtf, etc. Please kindly help

    The unix file command:
    file *
    foo.doc ms-office file / word
    bar.png png image, 32x32 pixels, no transparency
    moo.hhml html text
    note that as in the last - file names are ignored, it works by checking the beginning of each file's data against it's database, and as in #2 it can sometimes see a lot more than just the file format.
    Don't know of a windows port, you could try cygwin

  • How to find the location of java class files at runtime?

    Does anyonw have an idea how to get the file name of a java class given the binary name?
    I mean how can I get the file name for my class myPackage.myClass?
    I am looking for a function which takes "myPackage.myClass" as input and returns
    "c:\\javaprojects\\myPackage\\myClass.class".
    I tried to do it with the LassLoader class but it did not work. Does anyone have an idea if the Java core API already has a function which does that?
    Thanks, Bernhard

    Hi ,
    It is a simple SAMPLE code , you think and build a logics to handle all classes.
    Try this sample, It doesn't handle the inner classes you put logic to handle the logics for inner classes.
    The inner class format is it contains the character $ in the File location but inside the code you put "." instedad of "$" you to find out or put trials.
    package pkg1;
    import java.io.* ;
    import java.util.* ;
    import java.util.zip.* ;
    public class ClsB {
         private static Vector clsPaths ;
         public static Vector getPaths() {
              if( clsPaths == null ) {
                   String paths = System.getProperty( "java.class.path" ) ;
                   // In linux or solarise use the following
                   // StringTokenizer st = new StringTokenizer( paths , ":\n" ) ;
                   StringTokenizer st = new StringTokenizer( paths , ";\n" ) ;
                   clsPaths = new Vector() ;
                   while( st.hasMoreTokens() ) {
                        String path = st.nextToken() ;
                        File f = new File( path ) ;
                        if( f.exists() ) {
                             try {
                                  f = f.getCanonicalFile() ;
                                  clsPaths.add( f ) ;
                             }catch( IOException ioe ) { }
              return clsPaths ;
         public static String findClassPath( String fullClassName ) {
              Vector v = getPaths() ;
              for( int i = 0 ; i < v.size() ; i++ ) {
                   File f = ( File ) v.get( i ) ;
                   String path = findIn( f , fullClassName ) ;
                   if( path != null )
                        return path ;
              return null ;
         static boolean isJar( File jar ) {
              if( jar.isDirectory() )
                   return false ;
              try {
                   ZipFile zf = new ZipFile( jar ) ;
                   return true ;
              } catch ( ZipException ze ) {
                   // It is not a jar file
                   // you handle this
              } catch ( IOException ioe ) {
                   ioe.printStackTrace() ;
              return false ;
         static String findIn( File dirOrJar , String clsName ) {
              if( isJar( dirOrJar ) ) {
                   // It is something different because the class inside the jar file
                   // Simply I return the jar file location and the entry name ,
                   // but you put action what you want
                   if( isInsideJar( dirOrJar , clsName ) ) {
                        // All archieve file using the path separator is '/'
                        return dirOrJar.getPath() + "!" + clsName.replace( '.' , '/' ) + ".class" ;
              } else {
                   File f = new File( dirOrJar , clsName.replace( '.' , File.separatorChar ) + ".class" ) ;
                   if( f.exists() ) {
                        return f.getPath() ;
              return null ;
         static boolean isInsideJar( File jar , String clsName ) {
              try {
                   ZipFile zf = new ZipFile( jar ) ;
                   // All archieve file using the path separator is '/'
                   ZipEntry ze = zf.getEntry( clsName.replace( '.' , '/' ) + ".class" );
                   return ( ze != null ) ;
              } catch ( ZipException ze ) {
                   ze.printStackTrace() ;
              } catch ( IOException ioe ) {
                   ioe.printStackTrace() ;
              return false ;
         public static void main(String[] args) {
              System.out.println( findClassPath( "pkg1.ClsB" ) );
              System.out.println( findClassPath( "pkg1.pkg2.ClsA" ) );
    }

  • How to find out the size of a file?

    Hi,
    I would like to determine the size of a file from my code. How is that possible? I do not find any appropriate method in the java.io.File class.
    Any help would be very appreciated!

    java.io.File.length()
    Returns the size of the file as a long. The number corresponds to the number of bytes in the file.

  • How to find the process responsible for deleting files

    Hi,
    We have a process which stores a file in a particular location say /tmp/mydir/. The files getting stored in this directory are getting deleted. Is there any way to find which process is responsible for deleting the file. Is there any way we can truss on the directory/file and check which process accessed it or deleted it.

    solquestions wrote:
    I tried: dtrace -n syscall::unlink:entryThat one looks good to me.
    While it picks up the unlinking(I tested by doing a rm of some files), I could not get the pid of the process doing such rm.....(or maybe the process exited...)You haven't asked it to print that information. Try:
    dtrace -n 'syscall::unlink:entry {trace(pid);trace(execname)}'
    I'd like to see the process/adpp/program, calling a particular system call....unlink, close, open etc etc...The above should do that.
    I wonder if dtrace can capture both library calls and system calls......Dtrace doesn't capture so much as it fires on probes. But yes, both libraries and system calls can have probes available.
    It seems functionality for capturing system calls from a process are more documrnte, and with examples, than, those asking for finding which system calls get opened by whom....
    I think all you're missing is adding some information to the trace output.
    Is getting unlink enough to find "what is removing files?"You might want to check rename as well.
    How do I drrace for "anything that touched taht file" or, "anything that touches files in a directory"That's actually a somewhat difficult task for dtrace. First, you might download the "Dtrace toolkit". One of the tools in there is "opensnoop". It reports on file opens and you can examine the script to see how it does it. You can even give a filename and it only reports when that filename is accessed.
    But the main problem is that files can have many names, and dtrace is just looking at the name in many cases. So "/etc/passwd" can be called "/etc/passwd", or if you're in /usr it could be called "../etc/passwd", or any of a variety of names. It's not too hard to set a probe predicate to fire only on a pattern match, so you could set it to only fire when the filename is matched.
    Good luck, and see if any of the existing tools in the toolkit are close enough that you can use them directly or modify them slightly.
    Darren

  • How to find out the status of a file in java

    Hi
    I have an application that writes xml files anytime it is invoked. I am writing all unique files to a windows directory.
    i also have an ftp client working on that directory that scans all the files and sends them to the server every few minutes.
    I want to find a way using which all the files except the one that is being currently written by the application are transferred.
    Is there a way to find out in java as to what file is being written to by the operating system at that point of time ? I have looked around for quite a long time and have not been able to find a solution to this problem.
    Any help will be deeply appreciated.

    out = new FileOutputStream(matcher.group(1)+".open" , true);
                          FileChannel ch = out.getChannel();
                                       FileLock lock =  ch.lock(0L, Long.MAX_VALUE, false);
                                   // Connect print stream to the output stream          
                                       p = new PrintStream( out );
                            p.println ("\n" + parms.getProperty( value ) + "\n");
                                  p.flush();
                            p.close();
                                  lock.release();Ok, I tried implementing locks but I dont know why it is not working...An exception is thrown and nothing is wriiten to the file. I have employed a complete lock on the file so that no other JVM application can use it.
    Actually this is a server that grabs data sent from an Iframe and writes it down to a temp file. I open a file input stream, lock it and then use a printwriter strream to write the realyed data to the file. Any inputs as to what is wrong with the code snippet above?????

Maybe you are looking for