Please have a look at this.

There is something that happens in my code that I can't figure out. I have some varaibles defined in my main class, it's just one class anyway and the rest are inner anonymous. When I come to use them from an inner class, the code doesn't behave as I want it to unless I write the variables I'm using again inside the inner class, which is or are, actionListener/s.
here's the code to see what I'm talking about:
final String year = yearField.getText();
final String id = idField.getText();
final String student = studentIdField.getText();
final String section = sectionIdField.getText();
final String project = projectIdField.getText();
final String mark = markField.getText();
final String grade = gradeField.getText();
final String pass = passField.getText();
insert.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
         String year = yearField.getText();
         String id = idField.getText();
         String student = studentIdField.getText();
         String mark = markField.getText();
         String section = sectionIdField.getText();
         String project = projectIdField.getText();
         String grade = gradeField.getText();
         String pass = passField.getText();
        if((year.equals(""))&&(id.equals(""))&&(student.equals(""))&&(mark.equals("")))
            JOptionPane.showMessageDialog(jf,
               "Please enter a value"
        else if(year.equals(""))
            JOptionPane.showMessageDialog(jf,
               "Please enter a value for Year"
        else if(id.equals(""))
            JOptionPane.showMessageDialog(jf,
                 "Please enter a value for ID"
        else if(student.equals(""))
             JOptionPane.showMessageDialog(jf,
               "Please enter a value for Student Id"
        else if(mark.equals(""))
             JOptionPane.showMessageDialog(jf,
                 "Please enter a value for Mark"
        else
              try
                      DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
     Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433","admin","admin");
     Statement statement = connection.createStatement();
     String query = "Insert into Results (Student_Id,Result_Year,Term,Degree,Pass,Project_Id,Univrs_Fac_Dept_Id,Grade,Univers_Fac_Dept_Section_Id) values ('"+student+"','"+year+"','"+term+"','"+mark+"','"+pass+"','"+project+"','"+department+"','"+grade+"','"+section+"')";
                     statement.executeUpdate(query);
     connection.close();
     catch(SQLException sqlerr)
          System.err.println(sqlerr);
     );Now, if I don't include the variables again inside the actionListener, the code doesn't move outside the if statement. Does anybody know why is that happening?
I just have another small question. When I need to check that a Chooser isn't empty, how do I do it? I mean with a string, you say: if(object.equals("")), what's for the items?
Thank you very much and sorry for the lot of talking.

you have to be careful with your variables:
the declared variables inside the actionlistener(s) are not these in your main class!!
what you might do:
a) let your main-class implement ActionListener
public class MainClass extends PARENTCLASS implements ActionListener {
   public static void actionPerformed(ActionEvent ae) {
}b) create your own event handler
public class MainClass extends PARENTCLASS {
   public MainClass() {
      insert.addActionListener(new YourActionListener(this));
public class YourActionListener extends ActionListener {
   private MainClass main;
   public YourActionListener(MainClass parent) {
      main = parent;
   public void actionPerformed(ActionEvent ae) {
      main.year = "abc";
      main.id = "id";
      // or implement setXXX methods -> main.setYear("abc"); main.setId("id"); ...
}hope it helps...

Similar Messages

  • Material staging in WM - Jurgen please have a look at this

    Dear Jurgen,
    I'd kindly like to ask you to please have a look at this issue.
    Re: Requesting urgent reply
    Thanks in advance,
    Csaba
    (sorry for sending message this way...)

    I answered in the other thread.

  • Please have a look at this, problem loading images from jar.

    I made a post at the wrong place..
    Pleae have a look at it:
    http://forum.java.sun.com/thread.jsp?forum=422&thread=434524&tstart=0&trange=15

    Answer (hopefully not totally useless) posted over there.

  • EtreCheck Report: Could somebody please have a look at this?

    Hello guys (m/f)
    I just did an EtreCheck after I read about it a whilke ago here on the Apple Support Communities.  I'm using a late 2012 iMac now, but my previous iMac (2009, not sure when exactly) seemed to be slow too.  It's slow opening tabs, sites, etc.  And it's slow shutting down.
    BTW I switched off Time Machine a while ago, as my external WD started reporting bad block.  (Wanted to get my NAS to take over, but can't figure out why.   That's why I've been going without a Time Machine backup for way to long.)
    Here's the report:
    Hardware Information:
              iMac (21.5-inch, Late 2012)
              iMac - model: iMac13,1
              1 2.9 GHz Intel Core i5 CPU: 4 cores
              8 GB RAM
    Video Information:
              NVIDIA GeForce GT 650M - VRAM: 512 MB
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0
              AirPlay: Version: 1.9
              AppleAVBAudio: Version: 2.0.0
              iSightAudio: Version: 7.7.3
    System Software:
              OS X 10.9 (13A603) - Uptime: 0 days 9:23:21
    Disk Information:
              APPLE HDD HTS541010A9E662 disk0 : (1 TB)
                        EFI (disk0s1) <not mounted>: 209,7 MB
                        Macintosh HD (disk0s2) /: 999,35 GB (607,16 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information:
              Apple Inc. FaceTime HD Camera (Built-in)
              Apple Inc. BRCM20702 Hub
                        Apple Inc. Bluetooth USB Host Controller
    FireWire Information:
    Thunderbolt Information:
              Apple Inc. thunderbolt_bus
    Kernel Extensions:
              com.iospirit.driver.rbiokithelper          (1.21)
              com.eltima.ElmediaPlayer.kext          (1.0)
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
              [invalid] com.avermedia.installerPlugin
              [loaded] com.adobe.fpsaud.plist
              [not loaded] com.avermedia.installerPlugin.plist
              [loaded] com.bombich.ccc.plist
              [loaded] com.eltima.ElmediaPlayer.daemon.plist
              [loaded] com.iospirit.candelair.daemon.plist
              [loaded] com.iospirit.candelair.sync.plist
              [loaded] com.leapmotion.leapd.plist
              [loaded] com.memeo.Memeod.plist
              [loaded] com.prosofteng.DriveGenius.locum.plist
              [loaded] com.wdc.WDDMservice.plist
              [loaded] com.wdc.WDSmartWareServer.plist
              [loaded] com.zeroonetwenty.BlueHarvestHelper.plist
    Launch Agents:
              [loaded] AVerQuick.plist
              [loaded] com.leapmotion.Leap-Motion.plist
              [loaded] com.synology.SynoSIMBL.plist
              [loaded] com.synology.SynoSIMBL_RefreshFinder.plist
              [loaded] org.glimmerblocker.updater.plist
    User Launch Agents:
              [loaded] com.adobe.ARM.[...].plist
              [loaded] com.divx.agent.postinstall.plist
              [loaded] com.google.keystone.agent.plist
              [loaded] com.plexapp.helper.plist
              [loaded] com.prosofteng.DGMonitor.plist
              [failed] de.writeitstudios.cookiestumbleragent.plist
    User Login Items:
              DiskLed
              FontExplorerXAutoload
              iTunesHelper
              System Events
              Mippy
              Mail
              Safari
              Camino
              blueharvestd
              Mippy
              BlueHarvest
              BlueHarvest
              Sony Ericsson Bridge Helper
              WDDriveManagerStatusMenu
              CNQL2410_ButtonManager
              WDQuickView
    3rd Party Preference Panes:
              Candelair
              Flash Player
              Flip4Mac WMV
              FUSE for OS X (OSXFUSE)
              GlimmerBlocker
              Perian
              WDQuickView
    Internet Plug-ins:
              AdobePDFViewer.plugin
              AdobePDFViewerNPAPI.plugin
              Default Browser.plugin
              DirectorShockwave.plugin
              Flash Player.plugin
              FlashPlayer-10.6.plugin
              Flip4Mac WMV Plugin.plugin
              Google Earth Web Plug-in.plugin
              iPhotoPhotocast.plugin
              JavaAppletPlugin.plugin
              PDF Browser Plugin.plugin
              QuickTime Plugin.plugin
              RealPlayer Plugin.plugin
              VLC Plugin.plugin
    User Internet Plug-ins:
    Bad Fonts:
              None
    Time Machine:
              Mobile backups: OFF
              Auto backup: NO
              Time Machine not configured!
    Top Processes by CPU:
                   2%          WindowServer
                   1%          EtreCheck
                   1%          fontd
                   0%          Leap Motion
                   0%          SystemUIServer
                   0%          DiskLed
                   0%          dpd
    Top Processes by Memory:
              336 MB             Safari
              279 MB             Finder
              229 MB             WindowServer
              221 MB             Camino
              205 MB             com.apple.IconServicesAgent
              123 MB             com.apple.WebKit.WebContent
              115 MB             Mail
              57 MB              PluginProcess
              49 MB              com.apple.WebKit.Networking
              49 MB              mds_stores
    Virtual Memory Statistics:
              3.10 GB            Free RAM
              3.55 GB            Active RAM
              497 MB             Inactive RAM
              878 MB             Wired RAM
              734 MB             Page-ins
              0 B                Page-outs
    Hope you guys find something.  (and that this is the right place to put my question!)
    Sincerely
    Mathy

    You have a lot of potential for things to go wrong. If any of the red items are old they could be doing a lot of damage to performance, since they are loaded into the system level.
    Synology appears to be doing something with SIMBL - follow the removal instructions at http://www.culater.net/software/SIMBL/SIMBL.php
    It is a hacky way to inject code into apps. Check the synology site for updates.
    The failed launchd job [failed] de.writeitstudios.cookiestumbleragent.plist could cause issues within your user account.
    Your login items are duplicated.
    BlueHarvest
    BlueHarvest
    blueharvestd
    Mippy
    Mippy
    That isn't a great idea. I'd suggest you logout, log back in but hold shift as you click the login button it will disable all those apps & show you if they are part of your issues.
    'Safe mode' will disable all third party extensions & startup items (hold shift after the chime until the spinning 'cog' appears). Ensure the login window says 'safe mode'.
    https://support.apple.com/kb/HT1455
    Be aware that some features will be disabled like wifi on some models, graphics drivers will be in a reduced mode - this is normal in safe mode. Reboot to go back to normal.
    Hopefully the notes below will help you understand the report better
    Mathy Van Nisselroy wrote:
    Kernel Extensions:
              com.iospirit.driver.rbiokithelper          (1.21)
              com.eltima.ElmediaPlayer.kext          (1.0)
    Launch Daemons:
              [invalid] com.avermedia.installerPlugin       <<-- WTH !?
              [loaded] com.adobe.fpsaud.plist
              [not loaded] com.avermedia.installerPlugin.plist
              [loaded] com.bombich.ccc.plist
              [loaded] com.eltima.ElmediaPlayer.daemon.plist
              [loaded] com.iospirit.candelair.daemon.plist
              [loaded] com.iospirit.candelair.sync.plist
              [loaded] com.leapmotion.leapd.plist
              [loaded] com.memeo.Memeod.plist
              [loaded] com.prosofteng.DriveGenius.locum.plist
              [loaded] com.wdc.WDDMservice.plist
              [loaded] com.wdc.WDSmartWareServer.plist
              [loaded] com.zeroonetwenty.BlueHarvestHelper.plist
    Launch Agents:
              [loaded] AVerQuick.plist
              [loaded] com.leapmotion.Leap-Motion.plist
              [loaded] com.synology.SynoSIMBL.plist
              [loaded] com.synology.SynoSIMBL_RefreshFinder.plist
              [loaded] org.glimmerblocker.updater.plist
    User Launch Agents:
              [loaded] com.adobe.ARM.[...].plist
              [loaded] com.divx.agent.postinstall.plist
              [loaded] com.google.keystone.agent.plist
              [loaded] com.plexapp.helper.plist
              [loaded] com.prosofteng.DGMonitor.plist
              [failed] de.writeitstudios.cookiestumbleragent.plist
    User Login Items:
              DiskLed
              FontExplorerXAutoload
              iTunesHelper
              System Events
              Mippy
              Mail
              Safari
              Camino
              blueharvestd
              Mippy
              BlueHarvest
              BlueHarvest
              Sony Ericsson Bridge Helper
              WDDriveManagerStatusMenu
              CNQL2410_ButtonManager
              WDQuickView
    3rd Party Preference Panes:
              Candelair
              Flash Player
              Flip4Mac WMV
              FUSE for OS X (OSXFUSE)
              GlimmerBlocker
              Perian
              WDQuickView
    Internet Plug-ins:
              AdobePDFViewer.plugin
              AdobePDFViewerNPAPI.plugin
              Default Browser.plugin
              DirectorShockwave.plugin
              Flash Player.plugin
              FlashPlayer-10.6.plugin
              Flip4Mac WMV Plugin.plugin
              Google Earth Web Plug-in.plugin
              iPhotoPhotocast.plugin
              JavaAppletPlugin.plugin
              PDF Browser Plugin.plugin
              QuickTime Plugin.plugin
              RealPlayer Plugin.plugin
              VLC Plugin.plugin
    Red items are loaded at the system level (not necessarily bad, but they have the potential to modify the OS).
    Blue items are loaded at the user level
    Cleanup:
    All the usual caveats apply, backup before you modify the system, delete the items (or move them to another disk or folder if you are worried about deleting the wrong thing) but ensure the originals are gone or updated.
    Use the Finders "Go menu > Go to Folder…" when you need to open the hidden ~/Library (your users library).
    Reboot for the system changes to take effect.
    How to find updates:
    The critical launchd jobs & kernel extensions use reverse domain notation e.g.
    com.logmein.hamachi.plist means look at http://logmein.com for updates (if you don't recognize it removing it may be appropriate)
    In short: You want to try to update or remove all the system level items.
    Startup Items: Stored in /Library/StartupItems/
    Startup Items have been discontinued by Apple since Mac OS 10.4. They are responsible for making changes at a system level. Remove them all or spend time ensuring ALL related software is up to date. You need a very good reason to have anything installed in here. The developers are ignoring Apple guidelines by installing these - not a good sign.
    Kernel Extensions: Stored in /Library/Extensions/
    Kernel Extensions also load third party code, but they insert it into the 'core' of the OS. These can be safe, however you must ensure the related tools or apps are up to date, otherwise the system is basically built upon quicksand. Remove them all & see if the OS works better.
    Launchd jobs: several types
    LaunchAgents          - Stored in /Library/LaunchAgents
    LaunchDaemons       - Stored in /Library/LaunchDaemons
    User LaunchAgents   - Stored in ~/Library/LaunchAgents
    These are all background jobs, they are not necessarily bad, but if they are loading old code it could be doing untold damage to the performance & stability of the entire OS. Focus on the System level jobs (the ones inside /Library - the system level) also remove ['failed'], non-system jobs.
    EtreCheck gives a status on launchd jobs…
    [loaded]                  - a running job
    [not loaded]            - jobs that are set not to run, basically harmless, remove them unless you plan to use the associated software (if it is up to date)
    [failed]                    - jobs in a crashed or unknown state, it could be forking processes or using all the system resources, remove these.
    User login items:
    Applications and helpers that are managed inside 'Systems Preferences > Users and groups > Login Items tab'.
    These are loaded at the 'User level', consider removing all of them whilst you troubleshoot.  When you decide to re-add them ensure the software is up to date.
    3rd Party Preference Panes: & Internet Plug-ins:
    /Library/PreferencePanes/ and ~/Library/PreferencePanes/
    /Library/Internet Plug-Ins/ and ~/Library/Internet Plug-Ins/
    Once again these items all must be up to date, or remove them from your system. If the prefpanes manage additional software use the uninstaller or see the developers site for uninstall instructions. You can also right click to remove 3rd party preference panes in System preferences
    Read the list of Internet plug-ins carefully, there are often duplicate Flash player versions that won't help stability, it's just wasted space too.
    Don't forget to also update Safari's extensions in it's preferences (if you have any).
    Re-run EtreCheck after cleaning up to see if items have returned (some apps will reload the background jobs when re-opened, so either update or remove the software).
    Hope that isn't too daunting, the OS should be better if there are less old items running at the system level.

  • Arrrrrrr! Someone please have a look at this code!

    Ok! I'm pulling my hair out! I've got this code!
    import mx.transitions.Tween;
    import mx.transitions.easing;
    function turnOn() {
    new Tween(camel_shoe_mc, "_alpha", Regular.easeIn, 0, 100,
    1, true);
    camel_bt.onRollOver = turnOn;
    function turnOff() {
    new Tween(camel_shoe_mc, "_alpha", Regular.easeIn, 100, 0,
    1, true);
    camel_bt.onRollOut = turnOff;
    function turnOn() {
    new Tween(fudge_shoe_mc, "_alpha", Regular.easeIn, 0, 100,
    1, true);
    fudge_bt.onRollOver = turnOn;
    function turnOff() {
    new Tween(fudge_shoe_mc, "_alpha", Regular.easeIn, 100, 0,
    1, true);
    fudge_bt.onRollOut = turnOff;
    Now this is what is happning! you rollover the camel_bt the
    camel_shoe_mc show's up, great! Then you rollover the fudge_bt and
    the camel_shoe_mc come's up!! Is there a way of having this code in
    the same layer? Or do I have to make a new layer for each. Or is
    the code written wrong? I do have about 50 "_mc" so I would like to
    have the code in one place as well as the images. I hope someone
    out there can help! If you need to butcher the code by all means
    do! That's for having a look!!!!

    the code is great! Even if it should be "i++". The whoe thing
    work's like a charm! It's just what I wanted! Christmass comes
    again! Hay, seeing as I have you hear. Do you have any idea what
    code I should add to the _bt's so when you click on them it fills
    in a form at the bottom of the page? i.e rollOver the button it
    inform's you waht the color is and you click the button and it
    fill's out a combo box form at the bottom.

  • Can you please have a look on this small script?[SOLVED]

    Hello guys,
    I am writing a small script which has to do the following:
    1. It should run without any interruption. (Therefore while [ 1 ])
    2. While working continuously, it should check whether a folder named "check" is available in the folder "/home/arch".
    3. If it is the case, it should execute the script /home/arch/shutdownServer1
    The bash script I am trying to execute is the following:
    #!/bin/bash
    while [ 1 ]
    do
    if [$(ls /home/arch | grep check)="check"]; then
            /home/arch/shutdownServer1
    fi
    done
    I tried to execute the code while the folder named "check" was available in the folder "/home/arch" But I got the following error.
    /home/arch/myscript: line 5: [check=check]: command not found => This implies that the expression "$(ls /home/arch | grep check)" was evaluated correctly because of check=check. But why does it say "command not found"? Since check=check it should be evaluated as true and execute the script shutdownServer1?
    P.S.: myscript is the name of the bash script file.
    Guys, please help me.
    Thanks in advance
    Last edited by Archie_Enthusiasm (2010-11-29 12:20:58)

    Try one of these
    if [ $(ls ~/ | grep check) ]; then
    ~/shutdownServer1
    fi
    or
    [ $(ls ~/ | grep check) ] && ~/shutdownServer1
    Edit: @Allan: thanks for '-d', I completely forgot that
    Last edited by igndenok (2010-11-29 11:59:16)

  • Please have a look at this query

    hi there,
    i'm implementing a wildcard search utility in my app (restricting usage by allowing to use '*' & '?' only, so no hectic job here), i've achieved the correct matching of a given text & a text with wildcards but to some extent by manual check which very hectic to me, now i want to try with new code which is (incomplete) as follows, please correct & suggest me,
    class WildcardSearchUtility {
        static boolean isNodeStringMatchingWildcardText(String wcText, String nodeText) {
             char    c1[] = wcText.toCharArray();
             char    c2[] = nodeText.toCharArray();
             int     n1 = c1.length;
             int     n2 = c2.length;
             int   i1 = 0;
             int   i2 = 0;
             for ( ;     i1 < n1   &&   i2 < n2;     i1++, i2++) {
                if(c1[i1] == '*') {
                          // don't know what to do
                   if(i1 != (n1-1)) {
                      i1++;
                } else if (c1[i1] == '?') {
                          // don't know what to do
                   if(i1 != (n1-1)) {
                      i1++;
                } else if(c1[i1] != c2[i2])
                   return false;
             return false;
       }when i implement the code it should correctly match the given text and a wildcard search text, for example:
         String    wildcardText = "*L?st*";
         String    nodeTexts[] = {
              "List",   "ActionListener",   "JComponent",   "SomeText",
              "Last",   "AbstractList",     "JButton",      "Component"
              "Like",   "ABCDLastPQRS"
         System.out.println("Search text is " + wildcardText + "\n");
         for(int i=0; i < nodeTexts.length; i++) {
              boolean matching = WildcardSearchUtility.isNodeStringMatchingWildcardText(
                                    wildcardText, nodeTexts);
    System.out.println(
    "\tmatching with \""+ nodeTexts[i] + "\"\t" +
    (matching ? "[Matched]" : "[Not Matched]\n");
    System.out.println("Done");
    the output must be like the one below
    Search text is "*L?st*"
             matching with "List"         [Matched]
             matching with "ActionListener"         [Not Matched]
             matching with "JComponent"         [Not Matched]
             matching with "SomeText"         [Not Matched]
             matching with "Last"         [Matched]
             matching with "AbstractList"         [Matched]
             matching with "JButton"         [Not Matched]
             matching with "Component"         [Not Matched]
             matching with "Like"         [Not Matched]
             matching with "ABCDLastPQRS"         [Matched]
    Donei'd appreciate any suggestions, sample codes, corrections by you experts
    thanx in advance,
    Afroze.

    the jdk1.4 comes with regular expression treatment ...
    here it is a sample code:
    to test:
    * A class which provide a way of filtering a folder relative a set of filename masks
    * @version 1.0
    * @author Felipe Ga�cho
    public class teste
       static public void main(String[] args)
          MyFileFilter t = new MyFileFilter(new String[]{"*.jpg","i*o*u","*88*"});
          System.out.println(t.accept("teste.jpg"));
          System.out.println(t.accept(".jpg.jpg.jpge"));
    }The filter class:
    import java.util.*;
    import java.io.*;
    * A class which provide a way of filtering a folder relative a set of masks
    * @version 1.0
    * @author Felipe Ga�cho
    * @date september - 2001
    class MyFileFilter implements FileFilter
         /** The array of valid masks */
       private Object[][] masks = null;
       /** The wildcard. The default wildcard is the character '*' */
       private String wildcard = "*";
       /** The description of this filter. For example: "JPG and GIF Images" */
       String filterDescription = "";
         * The constructor
         * @param setOfMasks A set of masks which will be used as filter
       MyFileFilter(String[] setOfMasks, String description)
              filterDescription = description;
          masks = new Object[setOfMasks.length][];
          for(int i=0; i<setOfMasks.length; i++)
             masks[i] = parseMask(setOfMasks);
         * The constructor
         * @param setOfMasks A set of masks which will be used as filter
    MyFileFilter(String[] setOfMasks)
              this(setOfMasks, "");
         * Sets the character used as wildcard
         * @param wildcard The new wildcard character
    public void setWildcard(String newWildcard)
              wildcard = newWildcard;
         * Returns the current wildcard character
         * @return The current wildcard character
    public String getWildcard()
              return this.wildcard;
         * Creates an array with all tags of a mask
         * @param mask The mask which will be used to filter a folder
    private Object[] parseMask(String mask)
              StringTokenizer maskParser = new StringTokenizer(mask, wildcard, false);
              ArrayList maskTags = new ArrayList();
              // Fill the array of tags representation of the mask
              while(maskParser.hasMoreTokens())
                   maskTags.add((String)maskParser.nextToken());
              // Check if the first character of the mask is a wildcard (open mask on left)
              if(mask.startsWith(wildcard))
                   maskTags.add(0,wildcard);
              // Check if the last character of the mask is a wildcard (open mask on right)
              if(mask.endsWith(wildcard))
                   maskTags.add(wildcard);
              return maskTags.toArray();
         * The validation process: the filename is parsed from the left to the right
         * seeking the mask tags. If a tag in the mask can�t be reached
         * in the filename it return false, otherwise it returns true.
         * @param filename The filename to be test
         * @param mask An array containing the mask tags
    private boolean valid(String filename, Object[] mask)
              // Test if the first tag of the mask is present at the start of the filename
    if( ! mask[0].equals(wildcard) && ! filename.startsWith((String)mask[0]))
    return false;
              // Test if the last tag of the mask is present at the end of the filename
    if( ! mask[mask.length-1].equals(wildcard) && ! filename.endsWith((String)mask[mask.length-1]))
    return false;
    for(int i=0; i<mask.length; i++)
                   // If the tag is a wildcard, then ignore this tag and continues the verification
                   if(mask[i].equals(wildcard))
                        continue;
                   // The index of a non-wildcard tag in the filename
                   int indexOfTheTag = filename.indexOf((String)mask[i]);
                   if(indexOfTheTag == -1)
                        return false;
                   // The tag were found. Continues the verification from the tag index plus its length
                   filename = filename.substring(indexOfTheTag + ((String)mask[i]).length());
              return true;
         * Check if a filename is like one of the masks
         * @param filename The filename to be checked
    public boolean accept(String filename)
    for(int i=0; i<masks.length; i++)
    if(valid(filename, masks[i]))
    return true;
    return false;
    * The FileFilter method overwrite
    * @param filename The File which the name should be verifyied
    public boolean accept(File filepath)
    return accept((filepath.getName()).substring(filepath.getName().lastIndexOf(File.separator)));
    * The FileFilter method overwrite
    * @return The description of this file filter
    public String getDescription()
    return filterDescription;

  • Please have a look at this thread

    hi ,
    i guess this forum is right place for the below thread, so instead of cross posting referring the thread.
    some body please guide me on this
    http://forum.java.sun.com/thread.jspa?threadID=5292095&tstart=0
    Thanks
    R

    hi hpr3 - thatnks for the suggestion.
    I did that. I had one spell this morning when MySpace worked fine. Then it all went back to the spinning wheel.
    I uninstalled again, reinstalled, did the permissions, restarted. Same problem.
    This may be spurious, but during the successful session I noticed that a Quicktime movie file which was on my desktop had a thumbnail image instead of the old style non-picture icon. Now that file has the old style icon. Related, do you think?

  • URGENT ..PLEASE HAVE A LOOK AT THIS :(

    i bought HP Pavilion notebook about an year ago and took good care of it. However 2 months ago i had trouble with my charger so got it replaced. After this, I started facing start up issues which i managed to solve somehow using HP chat support. Now 2 weeks after my laptop went out of warranty my laptop refuses to start at all and when i took it to a HP repair shop i found that my laptop charger was faulty and damaged my motherboard. My laptop needs a new motherboard, which will cost me over 9500 INR!
    When i inquired extending my warranty i found that HP has stopped this service for Pavilion series and now I'm stuck with a huge bill. I'm tired of calling HP support and going to service centre and this issue had already taken more than 20 days.
     People please help me out.Hope i find a solution to my problem here.
    SERIAL NUMBER:<text removed for privacy>

    @rakhmad
    model number: dv5-1002 au , product no:FN402PA
    yup i got it replaced with original HP . Though my previous adapter was 65 W(18.5V) compared to my new charger 90 W(19.5 V)  .I recently checked HP part surfer and didnt found the new charger 463956-001 there .
    Could it be the cause of issue ?The HP service centre who gave me the charger claims that it is comaptible though HP telephone helpline denies it . It has been 20 days and i'm stuck

  • Please, have a look at this issue

    https://discussions.apple.com/message/18046309#18046309

    Hi Topher,
    Thank you.
    Did you say "Doing this should preserve your user files, account settings, and installed applications as they currently are" ?????
    I had no idea....
    I will reinstall then..thanks.

  • Can you have a look at this video and give advice please?

    Hi Guys,
    Can you have a look at this video-
    http://www.youtube.com/watch?v=UA0x3bQUW-g
    I shot it for a friend at a hotel. Can you let me know if if works ok / stutters etc. on your computer.
    I edited hdv pal / ppro cs3 then adobe media encoder to H 264 1280 x 720 25fps bitrate min 2 max 4. keyframes 25.
    It looks pretty bad i think at the normal youtube. It looks a lot better when you hit the 'watch in hd' but begins to stutter.
    Do you have any advice?
    Many thanks
    scott

    First, thank you for doing a very nice piece. I'm a tad bit tired of the "in-your-face" skateboarding pieces. The young lady is also "easy on the eyes."
    Second, I looked at the piece in both resolutions, and also after all buffering had completed. The only things that I saw were one Transition at about the 1/4 point that seemed to have about a 1-frame "glitch," or something. Two of the Titles also did not seem to fade-up/move-in at the same pace, or with the same smoothness as the others. Even looking at movement, like the flag (again near the 1/4 mark - sorry that I did not write down the exact TimeCode), I did not notice any stuttering. I'd better get this out of the way right now, I'm viewing on my laptop's 17" 1680x1050 nVidia GeForce 8800M GTX-512MB display, with full hardware acceleration.
    Not sure what you, and Dan, are seeing. I'm usually a pretty critical observer, though might be missing something important. If you can give me a TimeCode and where, in the frame, you're both seeing the problems, I'll be glad to give it another go.
    Good luck,
    Hunt
    PS I like the mood that both the visuals and music convey. My wife also made note of the URL, for our next trip to the UK in October.

  • Please take a look at this. Attempting to make a professional brochure/bound 5-page presentation.

    Please take a look at this template I made for a Statement of Qualifications pamphlet.
    Here is a link to google drive. I made this template from scratch in Photoshop CS6.
    SOQ Page_Blank(no lettering).pdf - Google Drive
    What I am curious about, is that some of the lettering often looks blurry, although the page is 500pixels per inch 8.5x11, 76MB .psd file. What can I do about that?
    Also, I want to make it easy to write and edit the actual content that will go onto the page. Not all of us here have photoshop to edit the lettering. Is there a way I can export this to word so they can edit the content whenever? Are there better options (programs) to help me design this template? I am guessing I am somewhat pushing photoshops limit as to making a bound 5-page presentation. I am stuck and would like this to be easier. All suggestions for both of my questions as well as overall action toward making this would be great.
    Here is an example of a SOQ Pamphlet that I have been using as reference. In my eyes the design is perfect!
    http://www.ch2m.com/corporate/markets/environmental/conferences/setac-2013/assets/CH2M-HIL L-land-conservation-restoratio…
    Any help is great,
    Thanks,
    Adam

    Since photoshop can not do pages, your on the right track by using pdf format. Since it can do pages, but really requires acrobat pro to bind the pages together.
    Your best bet is InDesign then Illustrator would be the next option. Each of these can do multi page documents.
    There is absolutely no reason to use 500px/inch for the resolution anything between 150 and 300 would suffice leaning towards 300ppi.
    If the text is blurred a few things that can cause that, 1) anti-aliasing 2) document was created as a low resolution then upsampled 3) text is rasterized 4) document is rasterized.

  • Waveform peak detection ...Please have a look

    Hi folks,
               I am trying to acquire 2 signals and then detect the peaks of each of them and divide the peaks and display it in a waveform chart.But my Peak detection doesnt work at all...I tried plugging in values from 3 to 10000 but it just doesnt work...Please have a look at my VI and feel free to point out any errors in my VI..
    Thanks
    Attachments:
    slope 2 channels3.vi ‏51 KB

    Hi,
    Had a look at ur VI
    tell me, do u need a single peak for every iteration or a series of peaks above a certain threshold?
    If it is a single peak for each acquired waveform , then extract y array from the waveform cluster( you have already done it in ur VI) and connect it  to 'find array min max' function found in array functions palette and u get the single peak for each waveform.
    If it is a series of peaks u are interested in, then compare all these values inside a for loop.
    Index each element inside a 'for' loop, check it for threshold using a conditional case structure and put it inside a shift register.
    regards
    Dev

  • Mods. Please take a look at this topic

    Hi,
    Please take a look at this topic:
    http://discussions.apple.com/thread.jspa?threadID=422678&tstart=0
    It's becoming 'unfriendly'
    Thanks.
    M

    Hi Kady,
    Thanks for putting the inappropriate parts in the 'Trash'
    M

  • Someone please take a look at this

    Please take a look at this.
    This is my jsp file:
    <%@ page import="java.sql.*" %>
    <%
    String url="jdbc:mysql://localhost/ali";
    String user="root";
    String password="";
    Connection conn=null;
    String classPath="com.mysql.jdbc.Driver";
    try{
         Class.forName(classPath);
         conn = DriverManager.getConnection(url,user,password);
         }catch(Exception exc){
         out.println(exc.toString());
    %>
    <%
         Statement stm=conn.createStatement();
         String update="CREATE TABLE product(id varchar(20) PRIMARY KEY, name char(20))";
         try{
              stm.executeUpdate(update);
              out.println("Successful")
         }catch(Exception exc){
              out.println("sorry loser!!");
         stm.close();
         conn.close();
    %>
    but when I try opening it up in tomcat i get this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 16 in the jsp file: /mytest/createTable.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/java/jakarta-tomcat-4.1.31/work/Standalone/localhost/_/mytest/createTable_jsp.java:64: ';' expected
         }catch(Exception exc){
    ^
    1 error
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

    i've repaired that one already but now i get this.Please....Help me.
    org.apache.jasper.JasperException
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:207)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.NullPointerException
         at org.apache.jsp.createTable_jsp._jspService(createTable_jsp.java:60)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

Maybe you are looking for