Nov 29, 2011

JavaFX apps will not run from a Browser on Windows 7 64 bit

Duke Waving
Problem: After installing Java 6 or Java 7 and the Java FX Runtime on Windows 7 64 bit, you can not launch JavaFX applications from your browser. Any attempt to launch an application results in a request from the browser to install Java. Which is silly because it is already installed. Or is it?

Solution: Most web browsers are actually 32 bit applications. Consequently, you must install the 32 bit version of the Java Runtime Edition (JRE) and the 32 bit version of the JavaFX runtime. The first will install the needed Java plugin for your browsers. The second makes JavaFX available for 32 bit apps. After the install, restart your browser and voila, everything should work fine.

Nov 28, 2011

JQuery Click Event Example

JQuery LogoOver the break I created a simple example of how to use the JQuery click event.
See the code here.

Cyber Monday

Today is Cyber Monday and a bunch of online retailers are offering great deals. Here are some links to some of our partners.

Barnes and Nobles
Barnes&Noble.com

Best Buy

Nov 23, 2011

Set Up Apache Web Server on OS X Lion

OS X picture

This post documents the steps for setting up Apache on OS X Lion. Now the way I setup the server is a little different, but I will try to explain why.



  1. Start Apache Web Server
    1. Choose System Preferences in the Dock.
    2. Under Internet and Wireles and choose Sharing.
    3. Check Web Sharing.

    Apache should start up. If it does not, see the Troubleshooting section.

  2. Uncheck Web Sharing. This stops the Apache server. The server should be stopped so changes can be made to the directory structure.
  3. Set up the Apache home directory.

    The Apache home directory is located at /Library/WebServer/Documents. Of course you can set up your website and do your development there. However, if you perform an ls -l on the directory you will see the permissions set to 755 with user of root and a group of wheel. So effectively, you have no access to the directory. So you can either make files as root, or add yourself to the wheel group. Neither is very convenient, so this is the approach I take.

    1. Open a terminal window
    2. Switch to the root user: sudo bash
    3. In your home directory, create a directory to hold your web pages (e.g., www). Note that the permissions will be set to 775 with a user of root and a group of staff. Since you are a member of the staff group by default, you have read and execute rights to the directory.
    4. Add write permissions to the directory: chmod 775 www. Now this directory can be edited by both the web server and by you. Now we can have the web server point at this directory as its document directory.
    5. Change to web server directory: cd /Library/WebServer
    6. Rename the Documents directory: mv Documents Documents.bk
    7. Link to the directory our created: ln -s ~/www Documents
    8. Type exit to exit from your root shell.
  4. Now enable PHP
    1. Open a terminal window
    2. Switch to the root user: sudo bash
    3. Change to the configuration directory: cd /etc/apache2
    4. Change the permissions so you can edit the configuration directory: chmod 744 httpd.conf
    5. Edit the file with your editor of choice. vi httpd.conf. Note: If you do not know how to use vi, learning it is highly recommended as it is almost always available on Unix based systems.
    6. Uncomment this line: LoadModule php5_module libexec/apache2/libphp5.so
  5. Restart the Web Server

This should setup the server to work with PHP and allows you to easily edit and manipulate files.

Troubleshooting Tips

Problem: Apache will not start after upgrading from OS X Snow Leopard to Lion

Solution: The first thing to do is find out what error messages are being generated by Apache when it starts. This can be found in the Console application found in the Applications > Utilities > Console. This should list the error messages generated. In my case, the errors were related to directives in the Apache configuration file located at /etc/apache2/httpd.conf. Just commenting out the specific lines indicated in the console solved the startup problems for me.

Nov 19, 2011

Dolphin Browser for iPad and iPhone

iPhone iPad pictureThanks to this story by Ina Fried, I gave the Dolphin browser a try this week. It was a pleasant surprise to see how well this free browser works. It is especially useful on the iPhone with its gestures and tabbed interface. This features are golden on a device with such limited real estate.

Definitely worth a look. Check it out here.

Nov 14, 2011

Microsoft not Apple Killing Flash

Microsoft Logo
Harry McCracken at Technologizer makes a good point about who is really killing flash. A commenter on on this story by Erica Ogg points out that Microsoft will not support Flash in its Windows 8 metro browser (Internet Explorer 10).

A quick Google search confirmed this:
Microsoft revealed this week that Internet Explorer 10 Metro will not support browser based plug-ins.

“For the web to move forward and for consumers to get the most out of touch-first browsing, the Metro style browser in Windows 8 is as HTML5-only as possible, and plug-in free,” revealed Internet Explorer chief Dean Hachamovitch, in a blog post earlier this week. Microsoft is removing the ability to use plug-ins on the Metro style IE version of Windows 8 to improve security, reliability and battery life for end users. “Plug-ins were important early on in the web’s history,” admits Hachamovitch. “The web has come a long way since then with HTML5.”
Full Story Here

Although I do find it hard to believe there will be no plug-in or add on capability in Internet Explorer. It looks like Flash really is gonna be dead soon. The times are changing fast.

Nov 11, 2011

How do I update my iPhone/iPad to iOS 5 without Syncing?

The 5.0.1 iOS update to fix some issues with battery life is out. Did you know you no longer have to sync with iTunes to do the update? Neither did I. In fact, it looks like the updates are just patches now (only 44meg). This is a huge improvement over having to download the entire OS image every time.


To update your device do the following:
  1. Click Settings
  2. Click General
  3. Click Software Update
That's it. Your download should begin right away. It is probably a good idea to have your device plugged in while the update takes place.

Nov 9, 2011

Ding dong Flash is Dead?

Well maybe not dead. But mortally wounded. Today Adobe announced the are no longer going to develop a Flash Player for mobile devices. Steve Shankland at CNET has the story.

Flash: Crippled but alive...for now

Although Steve Jobs is no longer with us, his will is done. He stated early on that Flash wasn't a good fit for mobile devices and Apple would focus on HTML5. As of today, Adobe agrees with him. But don't make too big a deal out of this, Adobe will still support mobile apps using their Air platform. In addition, the story points out that most of us are still using PCs rather than iPhones or iPads.

Finally, in the end, Adobe is a tools vendor. Whether their tools target Flash or HTML5, they make money either way.

Nov 6, 2011

HTML5 and LocalStorage

LocalStorage is one of the features of HTML5. It provides a key, value store in your browser. Here are some resources for more information.




Free Tutorials
Found a couple of free tutorials.
HTML5 Offline Application Cache
Dive in Javascript: Simple Address Book App
PaperKilledRock: HTML5 LocalStorage

Library
Of course, with new features like this, new libraries are always welcome. I have not tried this yet, but I intend to.
JStorage

Books
Finally, we have a book by one of the folks working on the spec.


Barnes&Noble.com

Nov 3, 2011

Finally Saw "The Social Network"

Well I finally saw "The Social Network" movie about the founding of Facebook. First let me say, the only Hollywood cliche missing from the movie was a chase scene. Geez, since when was Silicon Valley so cool! Fancy night clubs, Victoria Secrets models everywhere. A far cry from getting a beer at the Tied House.lol.

The movie seems to be taken mostly from the vantage point of co-founder Eduardo Saverin. According to the movie, he was screwed out of his 30% stake in the company just because Mark Zuckerberg could. But according to this story, there is another side to things.Apparently Eduardo stayed to finish school and this really hampered Facebook's ability to obtain funding and move forward. In addition, he put free advertising on Facebook for a job site he created on his own.In this context, Zuck's decision makes a lot more sense. Someone with a 30% share of the company really needs to be all in.

On the whole a good, but not a great movie. I think startups are fun places to work. Just not fun in the rock star sense like the movie portrays. Friday keggers are much more likely than, club night with the Victoria's Secret girls.

Nov 1, 2011

Bash Command Line History Tricks

Linux LogoThis week in a training course I was using a Red Hat based Linux that had the up arrow assigned to taking a snapshot of the screen. Since I like to use the up and down arrows to navigate command lines in the Bash shell this was a bit of a bummer. However, I vaguely remembered some alternatives. Here is what I find.

EMACS Commands
By default Bash supports the use of EMACs commands to navigate through your command line history. You can move backward through the command history using Ctl-p and move forward through it with Ctl-n. Pretty much replaces the arrows.

In addition, I found out you can use Ctl-r to search through the history. After typing Ctl-r, enter the letters you are searching for and the command that best matches, is displayed. You can also modify the matched command line.

History Commands
In addition to EMACs, there are a number of commands that work with the command line history. You can use !! to run the previous command and !3 to run the command on line 3 of the history list.

I also figured out if you echo the command, (e.g., echo !5) you can use Ctl-p to go back and edit the line.

Movement Commands

Ctl-p - Display previous command line
Ctl-n - Display next command line
Ctl-a - Move to the start of the line
Ctl-e - Move to the end of the line


Search Command Lines

Ctl-r - Searches backward through the history for the letters you type
Just start typing the text you are searching for. The closest match will be displayed. The matched command line can be edited and modified.

History Command


history - Display the command history
!! - Repeat the last command
!# - Repeat the line number in the history
echo !! - Echo the previous command to standard out