In need of help, desperately!

I'm using LabView 6 to design some testing software for electronic
components, and I want to have a button to return to the main menu that
overides everything...
At the moment, there are two while loops in the main part of my program, and
the buttons control is within the innermost while loop, attached both loops
ending conditions.
However, unless i'm running my inner while loop, the exit button isn't
recognised, (which does make sense), and short of using a local variable, I
can't end the outer loop, without being in the inner loop...
(Does any of this make sense??)
But I don't want to use a local variable, since this would mean I can't use
latching with the mechanical action,
and the next time the program is booted, the
button is still on, causing it
to stop immediately.
Can anyone please help me?
Slade Squire
Programmer
Rectifier Technologies Pacific

Another solution is to read the local where it is needed, and latch the
button back to the FALSE state on exiting the loops by writing to a local.
Greg McKaskle
Slade Squire wrote:
>
> Thanks a lot for that, I'm new with LabView, and simply had no idea!
> I knew that I had to initialize the value to zero, but I didn't know I could
> do it like that
> -Slade
>
> "Roberto Bozzolo" wrote in message
> news:[email protected]..
> > To avoid the problem of controls not being in the default state when a
> > vi starts I am used to put an invoke node at the very beginning,
> > selecting 'VI' as the vi server class of it and choosing 'Reinitialize
> > all to default' as the method invoked. If this is not
suitable for
> > your program you can simply create an invoke node for the boolean and
> > select 'Reinit to dflt' as the method (or create a local variable and
> > wire a False constant to it).
> >
> > This could solve your problem permitting you to use a local variable
> > for the boolean Quit button. If you still don't want to use locals,
> > you could use some of the syncronization vis that lv offers like
> > notifications or ocurrences, found in the Advanced >> Syncronization
> > palette.
> >
> > Roberto

Similar Messages

  • CRM - IPC issues - need some help desperately -Thank you

    Issue: Create Quotation with a product results in a error: "no connection could be made to IPC".
    Also, choosing 'Conditions' Tab results gray/empty tab with "Pricing doc. does not exist" message in the status bar.
    Landscape:  Single host Win2k, CRM 4.0 sp03 IDES with IPC SP08.  No issues on CRM side other than the above mentioned.  So far we did:
    1) Installed IPC. 
    'dispatcher.properties' file contents:
    rfcEnabled=true
    rfcDispatcherProgId=IPC_RFC_DISPATCHER
    rfcServerCount=1
    rfcServerProgIdPrefix=IPC_RFC_SERVER_
    rfcGateways=ALPHA:sapgw00
    <end>
    2) Added "ipcuser" and gave system roles according to note:412309
    3) Maintained RFC settings for IPC_RFC_DISPATCHER and IPC_RFC_SERVER_1.  Both as (host:alpha), (Gateway:sapgw00)
    Started IPC dispatcher, server.  IPC logs look good. 
    ~ IPC Admin utility was able to login with "ipcuser" and client 800. 
    ~ monitor pulls up server on port 9163.  Test create document works fine and IPC reports Operational.
    4) RFC Testing (SM59) connections
            IPC_RFC_DISPATCHER  and  IPC_RFC_SERVER_1  tested ok and reported time.
    >>>>  However, using (SE37)
    5) IPC_COM_SESSION_BEGIN executes to a error screen of:
    Test for function group  |   COM_SCE_SV
    Function module              |  COM_IPC_SESSION_BEGIN
    Runtime:       | 2.262.764 Microseconds
    Exception:     | DISPATCHER_SYSTEM_ERROR  <<<<<
    Import Parameters |      Value
      |     -
    IV_CLIENT           |    800
    IV_USER_NAME         |   IPCUSER
    IV_USER_LOCATION |       ANYTEXT
    IV_SESSION_TYPE       |      CRM
    IV_NULL                |     *
    IV_MODULE           |    IPC
    Export Parameters    |   Value
        |   -
    EV_DESTINATION          
    EV_HOST
    EV_PORT  |               00000
    EV_SESSION_ID     
    EV_SESSION_ID_IPC
    EV_RFC_SCENARIO   |      RFC
    So, digging further,
    6) IPC_COM_SHOW_SERVERS executes to a error:
    ET_DISPATCHER_LIST : 2 Entries   <<<<<
    <details>
    IPC_V_RFC_DISPATCHER - communication failure   <<<<<<
                           hostname 'iwyf7yta' unknown / CPIC-C error CM_PARAMETER_ERROR.
    Here are my questions:
    a)  Do you find anything wrong with my configuration?
    b)  why is the need for IPC_V_RFC_DISPATCHER?
    C)  Does this mean that I need to run more dispatchers and servers??
        (i.e. each for IPC_RFC_DISPATCHER/server, IPC_V_RFC_DISPATCHER/server and IPC_WOV_RFC_DISPATCHER/server) - because these destinations are defined in RFC DESTINATIONS under TCP/IP connections... and they don't have program ids registered... so their test connections fail...
    and more importantly, am I even on the right track in solving my pricing issue???
    Any help would be greatly appreciated.

    John,
    The configuration you have done is correct as per the IPC documentation. But the RFC destination to be used for IPC connection is defined in the table COMM_IPC_DEST field DEST_OUT. When you run the IPC test with the FM COM_IPC_SESSION_BEGIN, this destination is used to connect to the IPC dispatcher. BTB while you do not need more than one dispatcher you may choose to run more than one server.
    There are more than one ways to resolve this problem.
    The simplest is to maintain the RFC destination IPC_V_RFC_DISPATCHER with the program ID (in this case IPC_RFC_DISPATCHER) configured in your IPC's dispatcher.properties file.
    Once the IPC connectivity is established your pricing problems should get resolved. Let me know if it works.

  • I need email help desperately

    I just purchased an 8820.
    My email setting only allow me to set-up a Work email using an enterprise server.
    In my getting started book it shows that there should be a selection for using a personal email address however my phone does not give me this option.
    Help Please!!!!

    Hello,
    The carrier has the option os allowing a Blackberry to do the following:
    BES only,
    BIS only,
    BES and BIS
    BB Web access
    I havent seen anyone use BES only, but if that is what you have been advised then you wont be able to use the BIS feature.
    Can you confirm this with your carrier?
    Checked out my Blackberry FAQ's and Links to Needed Articles here
    http://darkeen.homelinux.com/index.php/Blackberryfaq

  • LR 4 only prints a blank page on Epson 2880. Print preview panes remain blank. Window 7 OS. Need help desperately!

    LR 4 only prints a blank page on Epson 2880. Print preview panes remain blank. Window 7 OS. Need help desperately!

    Bob
    Thank you for your kind consideration of my problem. Up until the software started to print blank pages the preview pane always showed the selected print within the selected layout. Something has changed. Lightroom will print to the JPEG file but only a blank page on the Epson 2880. I've been in contact with Epson support and an IT tech and they tell me the problem is with Lightroom. I'm at my wits end and thinking of upgrading but the glitch may carry over. Uninstalling and reinstalling and deleting the preferences file did nothing to rectify the situation.
    Thanks again!
    David

  • Desperately in need of help!! apache webserver question!

    Guys,
    I need ur help!! I am on the verge of breakdown!! what the funny part is i have done the tough part fairly easily but the easy part is annoying me. here is my problem:
    I have setup virtualhosts defnition for my webserver. post configuration i have now Apache 2.0 + tomcat 5.5 and mod_jk running successfully on my machine.
    The files that i have modified are
    httpd.conf
    workers.properties and
    server.xml
    what i want is:
    when i give url: as http://www.mydomain.com
    this has to bring up the tomcat web application which can otherwise be invoked by url: http://www.mydomain.com:8080/myapplication
    what i am able to achieve is i can load the application via apache withou having to specify the port number like this:
    http://www.mydomain.com/myapplication
    but i want 'myapplication' to be automatically loaded when given just the servername itself!!
    please this must be a simple thing..help me!
    i have modified jkMount /myapplication/*.jsp
    I have to get this working by today evening i am sick and tired of this...
    -Sri

    httpd.conf
    <VirtualHost xxx.xx.xx.xx:8080>
    ServerName xyz.domain.edu
    ServerAlias xyz.domain.edu* www.domain.org domain.org
    DocumentRoot /usr/tomcat/apache-tomcat-5.5.15/webapps
    ServerPath /neuroMor
    ErrorLog logs/xyz.domain.edu-error_log
    CustomLog logs/xyz.domain.edu-access_log common
    </VirtualHost>
    <VirtualHost xxx.xx.xx.xx:8080>
    ServerName www.domain.org
    ServerPath /neuroMor
    DocumentRoot /usr/tomcat/apache-tomcat-5.5.15/webapps
    ErrorLog logs/www.domain.org-error_log
    CustomLog logs/www.domain.org-access_log common
    </VirtualHost>
    #To be added at the end of your httpd.conf tomcat auto-configure
    Include /usr/tomcat/apache-tomcat-5.5.15/conf/auto/mod_jk.conf
    # Load mod_jk module
    LoadModule jk_module libexec/mod_jk.so
    # Where to find workers.properties
    JkWorkersFile /usr/local/apache/workers.properties
    # Where to put jk logs
    JkLogFile /var/log/httpd/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel info
    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    # JkOptions indicate to send SSL KEY SIZE,
    JkOptions ForwardKeySize ForwardURICompat ForwardDirectories
    # JkRequestLogFormat set the request format
    JkRequestLogFormat "%w %V %T"
    # Static files in the neuroMor webapp are served by apache
    Alias /neuroMor /usr/tomcat/apache-tomcat-5.5.15/webapps/neuroMor
    # The following line prohibits users from directly access WEB-INF
    <Location "/neuroMor/WEB-INF/">
    AllowOverride None
    deny from all
    </Location>
    #JkAutoAlias /usr/tomcat/apache-tomcat-5.5.15/webapps
    # Send servlet for context /examples to worker named worker1
    JkMount /index.jsp ajp13
    # Send JSPs for conext /examples to worker named worker1
    JkMount /* ajp13
    I want to show neuroMor/index.jsp page when i give the url for
    http://xyz.domain.edu without specifying any relative path name.
    workers.properties
    workers.tomcat_home=$CATALINA_HOME
    workers.java_home=$JAVA_HOME
    ps=/
    worker.list=ajp13
    worker.ajp13.port=8009
    worker.ajp13.host=localhost
    worker.ajp13.type=ajp13
    worker.ajp13.lbfactor=1
    worker.loadbalancer.type=lb
    worker.loadbalancer.balanced_workers=ajp13
    worker.inprocess.type=jni
    worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib
    worker.inprocess.cmd_line=start
    worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)
    i386$(ps)server$(ps)libjvm.so
    worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
    worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
    Everything is working just fine..all i want is to show my default page as my application index.jsp page.
    -Many thanks for any kind of help
    Sri

  • Help desperately needed  w/ Spry/XML thing

    I am in dire need of help. I altered the products demo from
    the Spry download and am am creating a gallery type thing where you
    click on an item in the list, and the image changes. I have that
    working fine. I then created a forward and backward button so you
    could scroll through the images that way. And that works fine.
    However, even though the image changes, I can't figure out how to
    get the proper item highlighted in the left navigation.
    For example, if I start on the first item (Atari Lucasfilm)
    and click my forward arrow, the image will change to the Adobe
    picture, but the navigation on the left still has Atari Lucasfilm
    highlighted.
    Here is a link to the website
    http://www.3hounddesign.com/Paul_Woods/identity.html#
    Here is a link to the xml
    http://www.3hounddesign.com/Paul_Woods/identity.xml
    And here is a link to the javascript
    http://www.3hounddesign.com/Paul_Woods/gallery.js
    Any help at all would be greatly appreciated.

    The only reason I have the gallery.js included at all is
    because I am a massive javascript novice who has no idea how to
    create a button that would go to the next/previous image. Therefore
    I went to the gallery demo and pretty much copied the
    <a href="#" onclick="StopSlideShow();
    AdvanceToNextImage();" title="Next">
    I figured I would need to attach the javascript file that
    went with the gallery demo in order to make that work. I'm not sure
    what errors it created. I used Firebug, but couldn't quite figure
    it out.
    If there is an easier way to create a forward button that
    would advance to the next image AND have the proper item
    highlighted in the left navigation, please please please let me
    know. Like I said, I am not very familiar with javascript, and am
    on a deadline and trying really hard to figure out a bunch of stuff
    and pretty much knocking my head against the wall.
    Thank you for your help!
    Once again, here is the website
    http://www.3hounddesign.com/Paul_Woods/identity.html#
    Here is a link to the website
    http://www.3hounddesign.com/Paul_Woods/identity.html#
    Here is a link to the xml
    http://www.3hounddesign.com/Paul_Woods/identity.xml
    And here is a link to the javascript (which is probably not
    what I should be using)
    http://www.3hounddesign.com/Paul_Woods/gallery.js

  • Need urgent help!!!! (combine prompt and formula)

    Hi,
    I am using Oracle Business Intelligence 10.1.3.3.2, and creating some reports from answers. I desperately need to combine
    prompt and formula on some column.
    I need to use prompt in my formula on some column.
    Need urgent help !

    You can use the presentation variables to pass the value of the prompt into the report or any column formula.
    In the dashboard prompt you see an option called "Set Variable" where and you need to give a name to the variable.(Say Var_value)
    Now the value of the variable can be simply referenced using the syntax @{var_name}{10}. Here '10' being the defualt value which is optional you can simply reference using @{var_name} and you have the value of the prompts passed.
    Hope it works
    Thanks
    Prash

  • Need urgently help for OBIEE Installation (11g)

    Hi all,
    I am having problems trying to install Oracle Business Intelligence 11g on Windows 7.
    The Installation Wizard hangs on the step: Domain Configuration (0%). The Creating Domain shows In progress.
    The log under the Inventory directory shows me only following:
    INFO: Ending the inventory Session
    INFO: Using an existing InstallAreaControl for this Inventory Session with existing access level 1
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    INFO: The ORACLE_CONFIG_HOME env var is set to
    I really don't know what to do. I am searching for a solution on Internet, but I don't find it.
    I need urgently help. I would appreciate someone could help me.
    We can do together via Webex or something similar. It doesnt worth it for me to type here and wait till someone give me an answer (if any), trying to find out how I did.
    I hope to find the help I need. I am desperated :-(

    Can I install the OBIEE 10g version?I am not sure but i think OBIEE is not certified with windows 7. i could not find any MOS doc confirming same. Please log a call with oracle to confirm this.
    would it work fine with the Oracle Database 11g and the RCUs?. Yes OBIEE 10g will work with oracle database 11g.
    Thanks,
    JD

  • Need some help and guidance please!

    Hi everyone,
    I desperately need some help because I am at my wits end.   In September I purchased a Compaq Presario CQ60-450US.  Shortly after purchasing, I fresh installed Windows 7 Professional.  Recently I decided to tried to dual boot ubuntu on the machine only to find that the installation failed because of CD read error.  I know for a fact that the CD is not the issue because I have used this CD three other times to install ubuntu thus I came to the conclusion that the CD/DVD drive was bad.  
    I called HP support to get a new CD/DVD drive replaced only to spend 2 hours on the phone with a individual that decided to troubleshoot first trying to install ubuntu remotely (I informed the indiviual that the remote session would end), then by playing a DVD and "skipping throughout" the movie.  He/she said that she could see no issue.  (no diagnostic was run)I informed the individual that I had issues with buring as well.  He/she proceeded to go online and install software asking me to demonstrate the issue after which the call got dropped mysteriously.
    I called HP support back and told them that I am having an issue now burning.  They proceed to connect remotely and look at the software the previous support individual downloaded and said that the software was not supported by HP.  I informed the individual that I give permission to install any software needed to troubleshoot but the individual said that I could not be suppoted because I wasn't using the OS installed by HP.  I was instructed to recover my machine to the OS that was installed with the machine if I was to continue to get support.
    I informed the individual that the drivers and software are the same for either OS considering the CD/DVD rom is a plug and play device.  The individual refused to help and told me I had lost my warranty because of my decision to install an OS directly from Microsoft or a third paper vendor. 
    That is where I stand.  HP is refusing to give me support because I am not running their Vista Home edition even though my issue is hardware.  I cannot find any warrent information stating that I need to have the original operating system installed on the machine to receive support.   Can anyone point me to a reputable division that can help me with my issue?  I feel I was just thrown aside so that they don't have to initiate a repair.  If not has anyone filed a compalint against this outrageous support requirement?   

    Dear ndjumpball,
    I would like to say that I have some good -- or at least encouraging -- advice.  Regretfully, I do not.  I had issues with my dv7 practically since purchasing it a year ago specifically so I would have a reliable computer for school.  My first problem: I bought my laptop a mere 7 weeks before HP started offering their free upgrade to Windows 7.  Consequently, I was forced to purchase the full installation retail or continue to deal with the wonton freezes and system failures that inevitably occurred while I was working on homework -- courtesy of HP's installation of Vista Home Premium 64-bit.  Thankfully, I was able to purchase a copy of Windows 7 Professional 64-bit through a significant student discount offer from Microsoft, and I had my new OS downloaded the evening of October 23, 2009; I had to give their servers time to free up, since it seemed like everyone and their dogs were also downloading what the reviews posted on CNET and PC World touted as being more reliable.  I recall (I can't remember exactly which site this appeared) the statement, "Windows 7 is what Vista should have been from the beginning."
    I was all excited and happy now that I had a laptop for school that had everything I was looking for:  decent size hard drive, a fair amount of RAM, great 17.3" display with awesome colors, and a CDRW/DVDRW/Blu-Ray disk drive in the bay.  Not only was I very satisfied with the hardware; it also came with a decent host of software that are thought was pretty cool, too.  It came with CyberLink's DVD Suite 6 that I could activate simply by touching a soft button above the keyboard.  Aside from Vista Home Premium crashing on me at the most inopportune times, I was exceedingly happy with my $1000 purchase and investment.  Then came the "upgrade" to Windows 7 Professional 64-bit...Because I didn't have a "compatible" version of Vista, I had to do a full ("custom") install.  In other words, I lost all of the cool features I originally bought the machine for in the first place...no more cool one-finger's brush software activation (still don't have that working), and HP Chat Support told me the same thing they told you.  The following is a direct copy/paste quote from an email response I received from HP Total Care:  "In order to help you relevantly I would like to request you to please revert back to Vista operating system and check whether the issue is persisting or not.  If the issue is still persisting after reverting the operating system back to vista then we need to perform system recovery."
    After pursuing my case for 6 months -- finally getting my case escalated to two HP Customer Care Case Managers in Texas/Oklahoma -- the best "customer support" I received was what I'm sure was a truly heartfelt and sincere apology...  Oh, neither case manager was "able" to send me either the true upgrade disks that would have preserved the features purchased, nor were they willing to send me a stand-alone installation of the CyberLink’s DVD Suite 6 that is currently offered with the HP Pavilion dv6t Quad Edition series.  (In massive frustration and anger, I bought the CyberLink’s DVD software - $100 I didn't have to spend on something I had already bought...)
    A month later (late March), MY CD-RW/DVD-RW/Blu-Ray drive stopped working.  After an hour online with Customer Care, I had finally convinced the rep that the drive was working fine after my ditching Vista Home Premium, and that its failure had absolutely nothing to do with Windows 7 Pro.  After giving the guy my credit card number as security, I had a replacement drive shipped to me.
    My personal recommendation:  clearly state that the hardware failure had nothing to do with whatever software or OS you chose to install.  Bottom line:  your computer is only 8 months old and is still covered under warranty, they can replace the defective part, or you can return the entire machine.  You probably want to be the "Nice Guy" but you need to remind them that you have other brands available to purchase.
    I don't know if that helps or not, but thank you for giving me the opportunity to vent!  :-)

  • Basic Output program need some help...Please

    import java.io.*;
    class FileOutputDemo
    public static void main(String args[])
    int one=1, two=2, three=3;
         FileOutputStream out; // declare a file output object
         PrintStream p; // declare a print stream object
         try
              // Create a new file output stream
              // connected to "myfile.html"
              out = new FileOutputStream("myfile.html");
              // Connect print stream to the output stream
              p = new PrintStream( out );
              p.printf ("This is written to a file %d", one);
              p.close();
         catch (Exception e)
              System.err.println ("Error writing to file");
    }Hello I am new to java, and I hope someone help me to modify the above code in order to make it work as the following:
    I have a list of integer values like 1, 2, 3, 4? 10
    And I want the program to substitute the integer values (the integer declared list) subsequently one by one to output a new html file as the following output:
    This is written to a file 1
    This is written to a file 2
    This is written to a file3 ?etc
    Also this substitution has to be outputted to a new file every time.
    Thank you very much in advance for your kind help
    if i have to post this anywhere else please advise me..
    Adam

    import java.io.*;
    public class FileOutputDemo
        public static void main(String[] args) {
             FileOutputStream out; // declare a file output object
             PrintStream p; // declare a print stream object
             try
                  // Create a new file output stream
                  // connected to "myfile.html"
                  out = new FileOutputStream("myfile.html");
                  p = new PrintStream( out );
                  int[] arrayOfInts = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                for (int element : arrayOfInts)
                     p.printf (element + " ");
                  p.close();
                  // Connect print stream to the output stream
             catch (Exception e)
                  System.err.println ("Error writing to file");
    }ok .... guys i really understand what do you mean,
    i only need your help to make the program print one integer at a time from the array to a seprate file ....what do you suggest ... any hints
    Thanks

  • Remote App on iPad connects but drops after about  20 mins. Need to turn  off wait about 1 minute then turn on wifi on iMac before it can reconnect. Need some help please.

    Remote App on iPad connects but drops after about  20 mins. Need to turn  off wait about 1 minute, then turn on wifi on iMac before it can reconnect. Need some help please.
    Already gone through troubleshooting guide a zillion times. Thanks.

    This worked for me... A little time consuming but once you get rolling it goes GREAT... Thanks....
    I got my artwork and saved it to my Desktop
    Opened up Microsoft Paint and clicked on "File" and "Open" and found it to get it on the screen to resize it
    Clicked "resize" and a box for changing it opened up
    Checked the box "Pixels" and "Unchecked maintain aspect ratio"
    Set Horizontal for 640 and Vertical for 480
    Clicked on "OK" and went back to "File" and did a "Save As" and chose JPEG Picture
    It came up "File Already Existed" and clicked "OK" (really did not care about the original artwork I found because wrong size)
    Went to iTunes and on the movie right clicked on "Get Info", clicked on "Details", then "Artwork"
    Go to the little box on the top left that shows your old artwork and click on it to get the little blue border to appear around it and hit "Delete" to make it gone
    Click on "Add Artwork" and find it where you put the one from above on your Desktop and hit "Open" and OK and your new artwork is now there and all good.
    Sounds like a lot of steps to follow but after around 5 or so you will fly through it. This worked perfect on my iPhone 6 Plus and I have artwork on my Home Videos now.

  • Need your help in Remodeling concept

    Hi Gurus need your help in time estimations
    I have a cube with data and now I need to add 10 new info objects to the cube which are including Date fields (BUDAT, BLDAT) these 10 fields will be populated to the cube from a Z table in ECC as we donu2019t have these fields in the cube we have to go for remodeling of the cube
    My client requires how much time it will take to complete this
    Now I want to know how much time it would take to do this (if any customer exits and user exits are required) and addition if new fields will have any effect on the current queries
    Please advice in this
    Thank you

    The time taken will depends on a lots of factor like server speed, available memory, background jobs etc. Apart from this, the time will also depends on how much the cube is filled i.e. the no. of records in the cube. Its very abstract to tell you the exact time taken for this. But, please make sure that you have the backup of the cube which you are going to re-model. T0 say, I think 3-4 hours should be ok for the remodelling.
    Thanks.
    Shambhu

  • Need your help on performance issue please

    Hello everyone!
    I need your help to understand an effect I notice with a Thread class I built. I currently work on enhancement of my application Playlist Editor (see http://www.lightdev.com/page74.htm) and a new release will be available soon.
    Among other extensions the new release will have a title filter function which is based on audio data that is recursively read from ID3 tags of files found in a given root directory. The data collection is done by a CollectionThread class which reads into a data model class AudioDataModel and the entire process works fine, no problem with that.
    However, when my application is started for the first time the CollectionThread runs approximately 3 minutes to collect data from approximately 4300 audio files on an Intel Pentium M 1,4 GHz, 512 MB RAM, Windows XP SP2. When the application is shut down and started again, it takes only a few seconds to do the same task for all subsequent launches.
    I already tried to start the application with java option -Xms40m to increase initial heap size. This increases performance in general but the effect is still the same, i.e. first run lasts significantly longer than subsequent runs.
    I also tried to build a pool mechanism which creates many empty objects in the data model and then releases them to contain the actual data at is being read in but this did not lead to better performance.
    It must have to do with how Java (or Windows?) allocates and caches memory. I wonder whether there is a way to pre-allocate memory or if there are any other ideas to improve performance so that the process always only takes seconds instead of minutes?
    I attach the key classes to this message. Any help or ideas is much appreciated!
    Thanks a lot a best regards
    Ulrich
    PS: You can use the news subscription service at
    http://www.lightdev.com/dynTemplate.php4?id=80&dynPage=subscribe.php4 to be informed when the new release of Playlist Editor is available.
    All classes posted here do not need debugging, they already have proven to run error free. The classes are only posted for information for the interested reader - no need to go through all the stuff in detail - only if it interests you.
    My application calls class CollectionThread wich is a subclass of InfoThread. CollectionThread recursively goes through a directory and file structure and stores found ID3 tag information in instances of class ID3v11Tag which in turn gets stored in one instance of class AudioDataModel. All classes are shown below.
    This is the mentioned CollectionThread
    * Light Development Playlist Editor
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.app.playlisteditor.data;
    import com.lightdev.lib.util.InfoThread;
    import java.io.File;
    * A class to collect audio data from a given storage location.
    * <p>
    * <code>CollectionThread</code> uses ID3 tag information to gain data.
    * </p>
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software as well as any licensing notes
    *      inside this documentation
    * @version 1, October 13, 2004
    public class CollectionThread extends InfoThread {
       * constructor
       * @param model  AudioDataModel  the data model to collect data to
      public CollectionThread(AudioDataModel model) {
        this.model = model;
       * constructor, creates a new empty AudioDataModel
      public CollectionThread() {
        this(new AudioDataModel());
       * set the data model to collect data to
       * @param model AudioDataModel  the model to collect data to
      public void setModel(AudioDataModel model) {
        this.model = model;
       * get the data model associated to this thread
       * @return AudioDataModel  the data model
      public AudioDataModel getModel() {
        return model;
       * set the directory to collect data from
       * @param rootDir File  the directory to collect data from
      public void setRootDirectory(File rootDir) {
        this.rootDir = rootDir;
       * do te actual work of this thread, i.e. iterate through a given directory
       * structure and collect audio data
       * @return boolean  true, if work is left
      protected boolean work() {
        boolean workIsLeft = true;
        maxValue = -1;
        filesProcessed = 0;
        if(getStatus() < STATUS_HALT_PENDING) {
          countElements(rootDir.listFiles());
        if(getStatus() < STATUS_HALT_PENDING) {
          workIsLeft = collect(rootDir.listFiles());
        return workIsLeft;
       * count the elements in a given file array including its subdirectories
       * @param files File[]
      private void countElements(File[] files) {
        int i = 0;
        while (i < files.length && getStatus() < STATUS_HALT_PENDING) {
          File file = files;
    if (file.isDirectory()) {
    countElements(file.listFiles());
    i++;
    maxValue++;
    * recursively read data into model
    * @param files File[] the file array representing the content of a given directory
    private boolean collect(File[] files) {
    int i = 0;
    while(i < files.length && getStatus() < STATUS_HALT_PENDING) {
    File file = files[i];
    if(file.isDirectory()) {
    collect(file.listFiles());
    else if(file.getName().toLowerCase().endsWith("mp3")) {
    try {
    model.addTrack(file);
    catch(Exception e) {
    fireThreadException(e);
    i++;
    filesProcessed++;
    fireThreadProgress(filesProcessed);
    return (i<files.length);
    /** the directory to collect data from */
    private File rootDir;
    /** the data model to collect data to */
    private AudioDataModel model;
    /** the number of files this thread processed so far while it is running */
    private long filesProcessed = 0;
    This is class InfoThread
    * Light Development Java Library
    * Copyright (C) 2003, 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.util;
    import java.util.Vector;
    import java.util.Enumeration;
    * Abstract class <code>InfoThread</class> implements a status and listener concept.
    * An <code>InfoThread</code> object actively informs all objects registered as listeners about
    * status changes, progress and possible exceptions. This way the status of a running
    * thread does not require a polling mechanism to be monitored.
    * <p>
    * <code>InfoThread</code> implements the following working scheme
    * </p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public abstract class InfoThread extends Thread {
       * construct an <code>InfoThread</code> object
       * <p>This class is meant to be used when a <code>Thread</code> object is needed that actively
       * informs other objects about its status</code>. It is a good idea therefore to register
       * one or more listeners with instances of this class before doing anything
       * else.</p>
       * @see addInfoThreadListener
      public InfoThread() {
       * set the amount of time this thread shall idle after it is through with one
       * work cycle and before a next work cycle is started. This influences the time
       * other threads have for their work.
       * @param millis long  the number of milliseconds to idle after one work cycle
      public void setIdleMillis(long millis) {
        idleMillis = millis;
       * Causes this thread to begin execution; the Java Virtual Machine calls the <code>run</code>
       * method of this thread. Calls method <code>prepareThread</code> before calling
       * <code>run</code>.
       * @see run
       * @see prepareThread
      public synchronized void start() {
        setStatus(STATUS_INITIALIZING);
        prepareThread();
        setStatus(STATUS_READY);
        super.start();
       * call method <code>start</code> instead of this method.
       * calling this method directly will lead to an exception
       * @see start
      public void run() {
        //System.out.println("InfoThread.run");
        if (status == STATUS_READY) {
          boolean workIsLeft = true;
          setStatus(STATUS_RUNNING);
          while (status < STATUS_STOP_PENDING && workIsLeft) {
            if (status < STATUS_HALT_PENDING) {
              workIsLeft = work();
              if(!workIsLeft) {
                setStatus(STATUS_WORK_COMPLETE);
            if (status == STATUS_HALT_PENDING) {
              setStatus(STATUS_HALTED);
            else if (status == STATUS_STOP_PENDING) {
              setStatus(STATUS_STOPPED);
            else {
              try {
                sleep(idleMillis);
              catch (InterruptedException e) {
                fireThreadException(e);
        else {
          // error: Thread is not ready to run
        setStatus(STATUS_THREAD_FINISHED);
       * stop this thread. This will terminate the thread irrevokably. Use method
       * <code>haltThread</code> to pause a thread with the possiblity to resume work later.
       * @see haltThread
      public void stopThread() {
        switch (status) {
          case STATUS_RUNNING:
            setStatus(STATUS_STOP_PENDING);
            break;
          case STATUS_HALT_PENDING:
            // exception: the thread already is about to halt
            break;
          case STATUS_STOP_PENDING:
            // exception: the thread already is about to stop
            break;
          default:
            // exception: a thread can not be stopped, when it is not running
            break;
       * halt this thread, i.e. pause working allowing to resume later
       * @see resumeThread
      public void haltThread() {
        switch (status) {
          case STATUS_RUNNING:
            setStatus(STATUS_STOP_PENDING);
            break;
          case STATUS_HALT_PENDING:
            // exception: the thread already is about to halt
            break;
          case STATUS_STOP_PENDING:
            // exception: the thread already is about to stop
            break;
          default:
            // exception: a thread can not be halted, when it is not running
            break;
       * resume this thread, i.e. resume previously halted work
       * @see haltThread
      public void resumeThread() {
        if(status == STATUS_HALTED || status == STATUS_HALT_PENDING) {
          setStatus(STATUS_RUNNING);
        else {
          // exception: only halted threads or threads that are about to halt can be resumed
       * this is the method to prepare a thread to run. It is not implemented in this abstract
       * class. Subclasses of <code>InfoThread</code> can implement this method to do anything
       * that might be required to put their thread into STATUS_READY. This method is called
       * automatically by method <code>start</code>.  When implementing this method, it should
       * call method <code>fireThreadException</code> accordingly.
       * @see start
       * @see fireThreadException
      protected void prepareThread() {
        // does nothing in this abstract class but might be needed in subclasses
       * this is the main activity method of this object. It is not implemented in this abstract
       * class. Subclasses of <code>InfoThread</code> must implement this method to do something
       * meaningful. When implementing this method, it should call methods
       * <code>fireThreadProgress</code> and <code>fireThreadException</code> accordingly.
       * @return boolean true, if work is left, false if not
       * @see fireThreadProgress
       * @see fireTreadException
      protected abstract boolean work();
       * add an <code>InfoTreadListener</code> to this instance of <code>InfoThread</code>
       * @param l InfoThreadListener  the listener to add
       * @see removeInfoThreadListener
      public void addInfoThreadListener(InfoThreadListener l) {
        listeners.add(l);
       * remove an <code>InfoTreadListener</code> from this instance of <code>InfoThread</code>
       * @param l InfoThreadListener  the listener to remove
      public void removeInfoThreadListener(InfoThreadListener l) {
        listeners.remove(l);
       * notify all <code>InfoThreadListener</code>s of a status change
       * @param fromStatus int  the status tis thread had before the change
       * @param toStatus int  the status this thread has now
      protected void fireThreadStatusChanged(int fromStatus, int toStatus) {
        Enumeration e = listeners.elements();
        while(e.hasMoreElements()) {
          Object l = e.nextElement();
          if(l instanceof InfoThreadListener) {
            ((InfoThreadListener) l).threadStatusChanged(this, fromStatus, toStatus);
       * notify all <code>InfoThreadListener</code>s of an exception in this thread
       * @param ex Exception  the exception that occurred
      protected void fireThreadException(Exception ex) {
        Enumeration e = listeners.elements();
        while(e.hasMoreElements()) {
          Object l = e.nextElement();
          if(l instanceof InfoThreadListener) {
            ((InfoThreadListener) l).threadException(this, ex);
       * notify all <code>InfoThreadListener</code>s of the progress of this thread
       * @param progressValue long  a value indicating the current thread progress
      protected void fireThreadProgress(long progressValue) {
        Enumeration e = listeners.elements();
        while(e.hasMoreElements()) {
          Object l = e.nextElement();
          if(l instanceof InfoThreadListener) {
            ((InfoThreadListener) l).threadProgress(this, progressValue, maxValue);
       * set the status of this thread and notify all listeners
       * @param newStatus int  the status this thread is to be changed to
      private void setStatus(int newStatus) {
        //System.out.println("InfoThread.setStatus oldStatus=" + status + ", newStatus=" + newStatus);
        int fromStatus = status;
        status = newStatus;
        fireThreadStatusChanged(fromStatus, newStatus);
       * get the current status of this thread
       * @return int  the status
      public int getStatus() {
        return status;
       * cleanup before actual destruction.
      public void destroy() {
        //System.out.println("InfoThread.destroy");
        cleanup();
        super.destroy();
       * cleanup all references this thread maintains
      private void cleanup() {
        //System.out.println("InfoThread.cleanup");
        listeners.removeAllElements();
        listeners = null;
      /* ----------------------- class fields start ------------------------ */
      /** storage for the objects this thread notifies about status changes and progress */
      private Vector listeners = new Vector();
      /** indicator for the status of this thread */
      private int status = STATUS_NONE;
      /** maximum value for threadProgress */
      protected long maxValue = -1;
      /** the idle time inside one work cycle in milliseconds */
      protected long idleMillis = 1;
      /* ----------------------- class fields end -------------------------- */
      /* ----------------------- constants start --------------------------- */
      /** constant value indicating that no status has been set so far */
      public static final int STATUS_NONE = 0;
      /** constant value indicating that the thread is currently initializing */
      public static final int STATUS_INITIALIZING = 1;
      /** constant value indicating that the thread is ready to run */
      public static final int STATUS_READY = 2;
      /** constant value indicating that the thread is running */
      public static final int STATUS_RUNNING = 3;
      /** constant value indicating that the thread is about to halt */
      public static final int STATUS_HALT_PENDING = 4;
      /** constant value indicating that the thread is halted */
      public static final int STATUS_HALTED = 5;
      /** constant value indicating that the work of this thread is complete */
      public static final int STATUS_WORK_COMPLETE = 6;
      /** constant value indicating that the thread is about to stop */
      public static final int STATUS_STOP_PENDING = 7;
      /** constant value indicating that the thread is stopped */
      public static final int STATUS_STOPPED = 8;
      /** constant value indicating that the thread is finished */
      public static final int STATUS_THREAD_FINISHED = 9;
      /* ----------------------- constants end --------------------------- */
    }this is the InfoThreadListener interface
    * Light Development Java Library
    * Copyright (C) 2003, 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.util;
    * An interface classes interested to receive events from objects
    * of class <code>InfoThread</code> need to implement.
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public interface InfoThreadListener {
       * method to receive a status change notification from a thread
       * @param thread InfoThread  the thread which status changed
       * @param fromStatus int  the status which the thread had before the change
       * @param toStatus int  the status which the thread has now
      public void threadStatusChanged(InfoThread thread, int fromStatus, int toStatus);
       * method to receive a notification about the progress of a thread
       * @param thread InfoThread  the thread which notified about its progress
       * @param progressValue long  the value (e.g. 10 if 100 percent completed, 20 of 1 million files processed, etc.)
      public void threadProgress(InfoThread thread, long progressValue, long maxValue);
       * method to receive a notifiaction about the fact that an exception occurred in a thread
       * @param thread InfoThread  the thread for which an exception occurred
       * @param e Exception  the exception that occurred
      public void threadException(InfoThread thread, Exception e);
    }This is class AudioFileDescriptor
    * Light Development Java Library
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.audio;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import java.io.Serializable;
    import java.text.DecimalFormat;
    * This class models characteristics of an audio file such as the absolute path
    * of the file, its tag contents (if any) and the play duration, etc.
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public class AudioFileDescriptor implements Serializable, Comparable {
      public AudioFileDescriptor(String absolutePath) throws FileNotFoundException, IOException {
        load(absolutePath);
      public boolean equals(Object o) {
        if(o != null && o instanceof AudioFileDescriptor) {
          return ((AudioFileDescriptor) o).getAbsolutePath().equalsIgnoreCase(this.getAbsolutePath());
        else {
          return false;
      public void load(String absolutePath) throws FileNotFoundException, IOException {
        this.absolutePath = absolutePath;
        RandomAccessFile rf = new RandomAccessFile(absolutePath, "r");
        if(id3v11Tag == null) {
          id3v11Tag = new ID3v11Tag(rf, false);
        else {
          id3v11Tag.readTag(rf, rf.length() - 128);
        rf.close();
      public String getAbsolutePath() {
        return absolutePath;
      public ID3v11Tag getID3v11Tag() {
        return id3v11Tag;
      public void setID3v11Tag(ID3v11Tag tag) {
        this.id3v11Tag = tag;
      public String toString() {
        DecimalFormat df = new DecimalFormat("00");
        return id3v11Tag.getArtist() + ", " + id3v11Tag.getAlbum() + " - " +
            df.format(id3v11Tag.getTrackNumber()) + " " + id3v11Tag.getTitle();
       * Compares this object with the specified object for order.
       * @param o the Object to be compared.
       * @return a negative integer, zero, or a positive integer as this object is less than, equal to,
       *   or greater than the specified object.
       * @todo Implement this java.lang.Comparable method
      public int compareTo(Object o) {
        return toString().compareTo(o.toString());
      private String absolutePath;
      private ID3v11Tag id3v11Tag;
      private transient long duration = -1;
      private transient int type = TYPE_UNKNOWN;
      public static final transient int TYPE_UNKNOWN = 0;
      public static final transient int TYPE_MP3 = 1;
    }This is class ID3V11Tag into which the data is actually stored
    * Light Development Java Library
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.audio;
    import java.io.File;
    import java.io.RandomAccessFile;
    import java.io.IOException;
    import java.io.Serializable;
    import java.text.DecimalFormat;
    * This class is a very simple implementation of an ID3v11Tag. It models an ID3 tag
    * pretty much the same way as it is physically stored inside an audio file.
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public class ID3v11Tag implements Serializable, Comparable {
       * construct an ID3v11Tag and read tag content from a given file
       * <p>This constructor can be used for cases where a RandomAccessFile has already
       * been opened and will be closed elsewhere</p>
       * @param rf RandomAccessFile  the open file to read from
       * @param isAtTagStartPos boolean  true, if the file pointer is at the
       * position where the ID3 tag starts; when false, the pointer is positioned accordingly here
       * @throws IOException
      public ID3v11Tag(RandomAccessFile rf, boolean isAtTagStartPos) throws IOException {
        if(isAtTagStartPos) {
          readTag(rf);
        else {
          readTag(rf, rf.length() - 128);
       * construct an ID3v11Tag and read tag content from a file at a given location
       * <p>This constructor opens and closes the audio file for reading</p>
       * @param absolutePath String  the absolute path to the audio file to open
       * @throws IOException
      public ID3v11Tag(String absolutePath) throws IOException {
        RandomAccessFile rf = new RandomAccessFile(absolutePath, "r");
        readTag(rf, rf.length() - 128);
        rf.close();
       * construct an ID3v11Tag and read tag content from a given file
       * <p>This constructor opens and closes the audio file for reading</p>
       * @param audioFile File  the audio file to read from
       * @throws IOException
      public ID3v11Tag(File audioFile) throws IOException {
        this(audioFile.getAbsolutePath());
       * get a string representation of this object
       * @return String
      public String toString() {
        DecimalFormat df = new DecimalFormat("00");
        return getArtist() + ", " + getAlbum() + " - " + df.format(getTrackNumber()) + " " + getTitle();
       * position to file pointer and read the tag
       * @param rf RandomAccessFile  the file to read from
       * @param jumpPos long  the position to jump to (the tag start position)
       * @throws IOException
      public void readTag(RandomAccessFile rf, long jumpPos) throws IOException {
        rf.seek(jumpPos);
        readTag(rf);
       * read the tag from a given file, assuming the file pointer to be at the tag start position
       * @param rf RandomAccessFile  the file to read from
       * @throws IOException
      public void readTag(RandomAccessFile rf) throws IOException {
        rf.read(tagBuf);
        if(tag.equalsIgnoreCase(new String(tagBuf))) {
          rf.read(title);
          rf.read(artist);
          rf.read(album);
          rf.read(year);
          rf.read(comment);
          rf.read(trackNo);
          rf.read(genre);
      public String getTitle() {
        return new String(title).trim();
      public String getArtist() {
        return new String(artist).trim();
      public String getAlbum() {
        return new String(album).trim();
      public String getYear() {
        return new String(year).trim();
      public String getComment() {
        return new String(comment).trim();
      public int getGenreId() {
        try {
          int id = new Byte(genre[0]).intValue();
          if(id < GENRE_ID_MIN || id > GENRE_ID_MAX) {
            return GENRE_ID_OTHER;
          else {
            return id;
        catch(Exception ex) {
          return GENRE_ID_OTHER;
      public String getGenreName() {
        return genreNames[getGenreId()];
      public int getTrackNumber() {
        try {
          return (int) trackNo[0];
        catch(Exception e) {
          return 0;
       * Compares this object with the specified object for order.
       * @param o the Object to be compared.
       * @return a negative integer, zero, or a positive integer as this object is less than, equal to,
       *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Franck,
    thank you, mate. I did what you suggested (changed class attached) but that did not change the mentioned behaviour.
    The first run is approximately 75 seconds with Java option -Xms40m and approx. double without, the second run and all subsequent runs are only 2-3 seconds each (!!!) even when terminating and re-starting the application between thread runs.
    I'm pretty clueless about that, any more help on this anyone?
    Thanks a lot and best regards
    Ulrich
    PS: BTW, I forgot to post the class that is filled with data by class CollectionThread, so here it is
    * Light Development Playlist Editor
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.app.playlisteditor.data;
    import java.io.File;
    import com.lightdev.lib.audio.ID3v11Tag;
    import javax.sound.sampled.UnsupportedAudioFileException;
    import java.io.IOException;
    import java.io.Serializable;
    import com.lightdev.lib.audio.AudioFileDescriptor;
    import com.lightdev.lib.ui.SortListModel;
    import java.util.Iterator;
    * Storage model for audio data.
    * <p>
    * <code>AudioDataModel</code> can be used to store ID3 tag data collected from
    * a directory with audio files to perform queries and reports on the found data.
    * </p>
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software as well as any licensing notes
    *      inside this documentation
    * @version 1, October 15, 2004
    public class AudioDataModel extends SortListModel implements Serializable {
       * constructor
      public AudioDataModel() {
       * add an audio track from a given audio file
       * <p>This will attempt to read ID3 tag data from the file.</p>
       * @param audioFile File  the file to add audio data for
       * @throws IOException
      public void addTrack(File audioFile) throws IOException {
        AudioFileDescriptor afd = new AudioFileDescriptor(audioFile.getAbsolutePath());
        if (!data.contains(afd)) {
          data.add(afd);
       * get all tracks for agiven combination of genre name, artist name and album name. Any of
       * the parameters may be null or AudioDataModel.FILTER_ALL
       * <p>Ugly code, I know, but it simply hard codes all combinations of the the mentioned
       * parameters. Any more elegant implementations welcome.</p>
       * @param genreName String  a genre name to get tracks for
       * @param artistName String  an artist name to get tracks for
       * @param albumName String  an album name to get tracks for
       * @return SortListModel   the found tracks in a list model
      public SortListModel getTracks(String genreName, String artistName, String albumName) {
        SortListModel foundTracks = new SortListModel();
        Iterator e = data.iterator();
        while(e.hasNext()) {
          AudioFileDescriptor afd = (AudioFileDescriptor) e.next();
          ID3v11Tag tag = afd.getID3v11Tag();
          if(genreName == null || genreName.equalsIgnoreCase(FILTER_ALL)) {
            if(artistName == null || artistName.equalsIgnoreCase(FILTER_ALL)) {
              if (tag.getAlbum().equalsIgnoreCase(albumName))
                foundTracks.add(afd);
            else {
              if(albumName == null || albumName.equalsIgnoreCase(FILTER_ALL)) {
                if (tag.getArtist().equalsIgnoreCase(artistName))
                  foundTracks.add(afd);
              else {
                if (tag.getArtist().equalsIgnoreCase(artistName) &&
                    tag.getAlbum().equalsIgnoreCase(albumName))
                  foundTracks.add(afd);
          else {
            if(artistName == null || artistName.equalsIgnoreCase(FILTER_ALL)) {
              if(albumName == null || albumName.equalsIgnoreCase(FILTER_ALL)) {
                if (tag.getGenreName().equalsIgnoreCase(genreName))
                  foundTracks.add(afd);
              else {
                if (tag.getGenreName().equalsIgnoreCase(genreName) &&
                    tag.getAlbum().equalsIgnoreCase(albumName))
                  foundTracks.add(afd);
            else {
              if(albumName == null || albumName.equalsIgnoreCase(FILTER_ALL)) {
                if (tag.getGenreName().equalsIgnoreCase(genreName) &&
                    tag.getArtist().equalsIgnoreCase(artistName))
                  foundTracks.add(afd);
              else {
                if (tag.getGenreName().equalsIgnoreCase(genreName) &&
                    tag.getArtist().equalsIgnoreCase(artistName) &&
                    tag.getAlbum().equalsIgnoreCase(albumName))
                  foundTracks.add(afd);
        foundTracks.sort();
        return foundTracks;
       * list all artists in this model
       * @return SortListModel
      public SortListModel listArtists() {
        SortListModel artists = new SortListModel();
        artists.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String artistName = tag.getArtist();
          if (artists.indexOf(artistName) < 0) {
            artists.add(artistName);
        artists.sort();
        return artists;
       * list all artists in this model having titles belonging to a given genre
       * @param genreName String  name of the genre artists are searched for
       * @return SortListModel
      public SortListModel listArtists(String genreName) {
        SortListModel artists = new SortListModel();
        artists.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String artistName = tag.getArtist();
          String genre = tag.getGenreName();
          if (artists.indexOf(artistName) < 0 && genre.equalsIgnoreCase(genreName)) {
            artists.add(artistName);
        artists.sort();
        return artists;
       * list all genres in this model
       * @return SortListModel
      public SortListModel listGenres() {
        SortListModel genres = new SortListModel();
        genres.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String genreName = tag.getGenreName();
          if (genres.indexOf(genreName) < 0) {
            genres.add(genreName);
        genres.sort();
        return genres;
       * list all albums in this model
       * @return SortListModel
      public SortListModel listAlbums() {
        SortListModel albums = new SortListModel();
        albums.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String albumName = tag.getAlbum();
          if (albums.indexOf(albumName) < 0) {
            albums.add(albumName);
        albums.sort();
        return albums;
       * list all albums in this model having titles belonging to a given genre
       * @param genreName String  name of the genre albums are searched for
       * @return SortListModel
      public SortListModel listAlbums(String genreName) {
        SortListModel albums = new SortListModel();
        albums.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String albumName = tag.getAlbum();
          String genre = tag.getGenreName();
          if (albums.indexOf(albumName) < 0 && genre.equalsIgnoreCase(genreName)) {
            albums.add(albumName);
        albums.sort();
        return albums;
       * list all albums in this model having titles belonging to a given genre and artist
       * @param genreName String  name of the genre albums are searched for
       * @param artistName String  name of the artist albums are searched for
       * @return SortListModel
      public SortListModel listAlbums(String genreName, String artistName) {
        SortListModel albums = new SortListModel();
        albums.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String albumName = tag.getAlbum();
          String genre = tag.getGenreName();
          String artist = tag.getArtist();
          if(genreName == null || genreName.equalsIgnoreCase(FILTER_ALL)) {
            if (albums.indexOf(albumName) < 0 &&
                artist.equalsIgnoreCase(artistName))
              albums.add(albumName);
          else {
            if (albums.indexOf(albumName) < 0 &&
                genre.equalsIgnoreCase(genreName) &&
                artist.equalsIgnoreCase(artistName))
              albums.add(albumName);
        albums.sort();
        return albums;
       * get the number of audio tracks stored in this data model
       * @return int  the number of tracks
      public int getTrackCount() {
        return data.size();
      /** constant to select all items of a given part */
      public static final String FILTER_ALL = "    all";
    }...and here the changed CollectionThread now caching found File objects in a vector
    * Light Development Playlist Editor
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.app.playlisteditor.data;
    import com.lightdev.lib.util.InfoThread;
    import java.io.File;
    import java.util.Vector;
    import java.util.Enumeration;
    * A class to collect audio data from a given storage location.
    * <p>
    * <code>CollectionThread</code> uses ID3 tag information to gain data.
    * </p>
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software as well as any licensing notes
    *      inside this documentation
    * @version 1, October 13, 2004
    public class CollectionThread extends InfoThread {
       * constructor
       * @param model  AudioDataModel  the data model to collect data to
      public CollectionThread(AudioDataModel model) {
        this.model = model;
       * constructor, creates a new empty AudioDataModel
      public CollectionThread() {
        this(new AudioDataModel());
       * set the data model to collect data to
       * @param model AudioDataModel  the model to collect data to
      public void setModel(AudioDataModel model) {
        this.model = model;
       * get the data model associated to this thread
       * @return AudioDataModel  the data model
      public AudioDataModel getModel() {
        return model;
       * set the directory to collect data from
       * @param rootDir File  the directory to collect data from
      public void setRootDirectory(File rootDir) {
        this.rootDir = rootDir;
       * this is the method to prepare a thread to run.
      protected void prepareThread() {
        maxValue = -1;
        filesProcessed = 0;
        innerCount = 0;
        fileList = new Vector();
       * do the actual work of this thread, i.e. iterate through a given directory
       * structure and collect audio data
       * @return boolean  true, if work is left
      protected boolean work() {
        boolean workIsLeft = true;
        if(getStatus() < STATUS_HALT_PENDING) {
          countElements(rootDir.listFiles());
        if(getStatus() < STATUS_HALT_PENDING) {
          workIsLeft = collect(); //collect(rootDir.listFiles());
          fileList.clear();
          fileList = null;
        return workIsLeft;
       * count the elements in a given file array including its subdirectories
       * @param files File[]
      private void countElements(File[] files) {
        int i = 0;
        while (i < files.length && getStatus() < STATUS_HALT_PENDING) {
          File file = files;
    if (file.isDirectory()) {
    countElements(file.listFiles());
    else {
    fileList.add(file);
    i++;
    maxValue++;
    * read data into model
    * @param files File[] the file array representing the content of a given directory
    * @return boolean true, if work is left
    private boolean collect(/*File[] files*/) {
    Enumeration files = fileList.elements();
    while(files.hasMoreElements() && getStatus() < STATUS_HALT_PENDING) {
    File file = (File) files.nextElement();
    try {
    model.addTrack(file);
    catch(Exception e) {
    fireThreadException(e);
    filesProcessed++;
    if(++innerCount > 99) {
    innerCount = 0;
    fireThreadProgress(filesProcessed);
    return false;
    int i = 0;
    while(i < files.length && getStatus() < STATUS_HALT_PENDING) {
    File file = files[i];
    if(file.isDirectory()) {
    collect(file.listFiles());
    else if(file.getName().toLowerCase().endsWith("mp3")) {
    try {
    model.addTrack(file);
    catch(Exception e) {
    fireThreadException(e);
    i++;
    filesProcessed++;
    fireThreadProgress(filesProcessed);
    return (i<files.length);
    /** the directory to collect data from */
    private File rootDir;
    /** the data model to collect data to */
    private AudioDataModel model;
    /** the number of files this thread processed so far while it is running */
    private long filesProcessed = 0;
    /** a list to temporary store found files */
    private Vector fileList;
    /** counter to determine when to fire progress messages */
    private int innerCount = 0;

  • TS1702 I need some help the apps were downloading slowly

    The apps downloaded but it didn't cause it's stuck in downloading mode what should I do?
    The iOS 6 update didn't work.
    Please I need some help.
    The apps didn't download.
    Talking Angela and Ginger didn't download.
    Talking Santa didn't update.

    Try moving the existing backup file to a safe location so that iTunes has to create an entire new file.  The backup file is located here. You can delete that backup once you get a successfull backup.
    iTunes places the backup files in the following places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: If you do not see the AppData or Application Data folders, you may need to show hidden files (Windows XP,  Windows Vista and Windows 7), or iTunes may not be installed in the default location. Show hidden files and then search the hard drive for the Backup directory.

  • I'm suddenly in need of help with my Firefox browser (6.0.2)

    Hi there,
    I'm suddenly in need of help with my Firefox browser (6.0.2)
    (OS: I use Windows XP).
    When I open up the browser, all I see is a completely blank white screen, with all the toolbars at the top.
    I know that my physical connections are fine: I've tested the modem, turned the pc off and on etc. and I can also receive/send emails.
    This problem started today, 8th September, 2011 and has never happened before.
    Is it a coincidence that Firefox updated itself just before I logged off yesterday evening? Could it be something to do with this particular new update?
    I've also noted that just before I "open up" Firefox, I now get a small box saying:
    [JAVASCRIPT APPLICATION]
    Exc In Ev handl: TypeError: This oRoot.enable is not a function
    This has never appeared before - I hope it offers a clue a to what is wrong.
    The Browser is not stuck in Safe Mode, by the way.
    Obviously, I can't search for any solutions to the problem on the internet, as I can't physically see any websites!
    (A friend is sending this query on my behalf from their pc)
    Any light you could throw on this confusing problem would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.
    If the only option is to uninstall Firefox and reinstall it from your site, then I'm also in trouble (I can't see the internet or make any downloads).
    In that case, would you be able to send the .exe file as an attachment to my email address? If so, please let me know and I'll give you further details.
    Many thanks in advance.

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

Maybe you are looking for