The Warm Healing Pizza

There is no ailment beyond the power of the pizza
RSS icon Email icon Bullet (black)
  • Online Dating Sites - match.com

    Posted on January 23rd, 2009 Joe No comments

    Since, I’m married now to a wonderful geek woman (whom I met on match.com),   I thought it might be nice to impart some of wisdom I gained from online dating to those who are still searching.  

    Disclaimer:  This advice is not perfect.  Take it with a grain of salt (and two aspirin).   If you plan to use any of my advice, you are on your own.  Good Luck!

    Tip 1 (Skip the BIO) :

    •  The the Bio  or “About Myself” section is worthless.  Ignore it.  People will say what they think you want to hear.  Nothing good ever came from an autobiography (as far as I know).    :)
    • Physical Attributes:  If this section is really important to you (and to a lot of people it is), remember that most of it is probably not true.  You only have to see one episode of American Idol to realize that most people have a somewhat filtered image of themselves (and their talents).

    Tip 2 (The Telltale Signs):

    • What books do they read?  This tells (IMO) more about a person than any of the biographical paragraphs they you can read about them.   Also, if the person reads the same type of books as you, it’s definitely a good sign and you’ll have some great things to talk about.  Television can be a substitute for this, but books will tell much more. 
    •  Divorce, custody, and kids:   If the woman (not so much for men) is divorced and her kids don’t live with her, there is probably a reason….   Exercise extreme caution. 
    •  Pictures:    If the person’s picture is a high-school graduation photo and the person is over 25….RUN.
    • Pets:  What kind of pets do they have.   This says a lot as well… Chinchilla people may not get along well with Rat Terrier owners.

    Tip 3 (Go shopping for the traits you want):

    • Filters:  Use the site’s filter to get the selection down to what you are looking for, follow the instructions above and then use the shotgun approach.  Send out as many winks, hellos, etc as you can.  Keep them short, otherwise it’s a huge waste of time if the person doesn’t respond.
    • Be honest with yourself!   If you don’t like smoking, filter out the smokers.  If can’t stand liberals (0r conservatives), filter them out.  If you prefer someone with lots of education, ask for it.  Don’t compromise just to not be alone.  Also, don’t settle for a fixer-upper.   Important lesson:  You can’t change people, but you can change your search criteria.

     

    Tip 4 (Be Nice…):

    • Be polite.   Let’s face it, it’s easy to be rude in the digital age.    If you aren’t interested, just let the person know.  Be nice about it.  There’s really no excuse to just stop answering, you never know when you might run into that person in real life.  Just be honest and part ways.  enough said.
    • The reverse of this.  If someone politely lets you know they are not interested, then let it go.  There are plenty of other options out there for you.

     

    Okay, that’s my micro-advice for the day.  Get out there, dust yourself off and start looking.  Remember to be positive.   This is like a job interview, you just have to get through all the wrong applicants till you find the one that you can connect with.

  • Evernote

    Posted on December 30th, 2008 Joe No comments

    Sorry, I have to plug this app, because I use it all the time.

    Evernote is one cool app!

    The best thing I like about this app is I can sync it with everything.  I can store notes (and now documents in the premium version) on my PC, Mac, iPhone, or any system with a web browser and recall them at any time from any of these devices.   You can also store photos and it will automatically OCR them for any words contained within.  You classify and search on any of the notes.   Okay, I’ll get off my soapbox.  check it out for yourself…   www.evernote.com

  • More Java Sounds

    Posted on July 7th, 2008 Joe No comments

    Here’s an update to my last post:  My cousin, Dave.  (Way to go, Dave!) submitted this example of another (simpler) way to play sound files:

    import java.io.*;
    import java.net.URL;
    import javax.sound.sampled.*;
    public class SimpleSoundPlayer2 {
    public static void main( String[] args )
        {
            // The audio file to play
            String audioFile = "/1-welcome.wav";
            // Check that the resource is available
            URL url = SimpleSoundPlayer2.class.getResource(audioFile);
            if( url == null ) {
                System.out.println("Resource not found.");
                System.exit(1);
            }
            try {
                playSound(url);
            } catch( IOException e ) {
                System.err.println("IOException occured: " + e );
                e.printStackTrace();
                System.exit(1);
            }
        }
        public static void playSound( URL url ) throws IOException {
            AudioInputStream audioStream = null;
            try {
                audioStream = AudioSystem.getAudioInputStream( url );
            } catch( UnsupportedAudioFileException e ) {
                System.err.println("The audio file is not a recognized format.");
                return;
            }
            // Print out some info about the sound
            System.out.printf("URL: %s \nFormat: %s\n", url.toString(),
                audioStream.getFormat().toString() );
            try {
                // Create the clip and open the stream
                Clip clip = AudioSystem.getClip();
                clip.open(audioStream);
                // Start playing the sound
                clip.start();
                // Wait until the sound finishes playing
                while (clip.isActive()) {
                    try { Thread.sleep(99); } catch (Exception e) {break;}
                }
                // Close the clip
                clip.close();
            } catch (LineUnavailableException e ) {
                System.err.println("Unable to create Clip: " + e);
                e.printStackTrace();
                System.exit(1);
            }
        }

    }

    I believe the same rules apply here as far as where you put for resource files and the pathing used to find them.

  • Loading Resources From Jar Files In Java

    Posted on July 5th, 2008 Joe No comments

    Okay, this is a frustrating one.  You make a cool java app with sounds and icons and then you go to deploy it, but it doesn’t work on your friends computer.   Well if you are a newbie, like me, you might not realize that you need to deploy those sound/image files with your program.   Sounds pretty straight forward, right?   Well, it is if you know the directory where your friend will be running the program from and where you can access the files.   How about putting all those nice resources in a jar file and deploying that with your program instead.  That’s actually the easy part, but then how do you get them out to use at run time.   There are a few articles around on this, but none seemed to tell me enough about how to do this.  I finally got it working, so I figured I’d share it for the rest of us java greenhorns…

    First I’ve copied and modified a program to play wave files (I just googled for it since I’m not smart enough to write this stuff from scratch).   You can find this code at:

    anyexample.com

    The important part of the code is here:

    public void run() {
    /*File soundFile = new File(filename);
    if (!soundFile.exists()) {
      System.err.println("Wave file not found: " + filename);
      return;
    }
    */
    URL url = getClass().getResource(filename);
    if (url != null) {
    //System.out.println("sound file = " + filename);
    AudioInputStream audioInputStream = null;
    try {
        audioInputStream = AudioSystem.getAudioInputStream(getClass().getResourceAsStream(filename));
        // audioInputStream = AudioSystem.getAudioInputStream(soundFile);
    }
    catch (UnsupportedAudioFileException e1) {
       e1.printStackTrace();
       return;
    }
    catch (IOException e1) {
      e1.printStackTrace();
      return;
    }
    

    Notice, I’ve changed from using a File to a URL.  The variable filename is just a string which is declared earlier.  The important (and not immediately obvious) part is… What do I use for the filename?    Here’s where it gets interesting:

    I’ve created a package called  joetest.resources  and put my sound files in there.   I’m using netbeans, so here’s a screen shot of what it looks like:

    packages

    I’ve dropped some sound files in the joetest.resources folder. I picked these up from Soundsnap which is a cool site for free sound files.
    Now comes the part that gave me fits trying to get to work. Let’s say I wanted to play the blaster.wav file. In order to access it, here’s what I assign to the filename variable:

    filename = “/joetest/resources/blaster.wav”;

    Now that that is done, this is what my Main.java looks like:

    package joestest.testprograms;
    public class Main {
       public static void main(String[] args) {
           new joestest.tools.WavePlayer("/joestest/resources/blaster.wav").start(); 
       }
    }

    That’s all there is to it!    Okay, now that I know how to do this it seems simple, but when you are starting out in java this can be a real pain.

    Incidentally,  this is very similar to how you would get icons for buttons etc.  Here’s an example:

    btnMyButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/joetest/resources/buttonicon.gif")));