How to make a Favicon.ico

If you run a website yo will notice a ton of requests for “/favicon.ico”. This is because many web browsers will looks for a file name “favicon.ico” in the root of your website. I do not know which web browsers do, but probally just IE since this was a Microsoft innovation. There are other more modern ways to handle the “Favorite Icon” just as using a PNG and placing a special “link” tag on your webpages, but this tutorial is just the quick and dirty way to get a favicon.ico going.

  1. Get Liquid Icon XP from X2 Studios. This link will open a new window.
  2. Install and open Liquid Icon
  3. Draw an image or copy and past an image into the Liquid Icon editor
  4. Save as an ICO file, and name “favicon.ico”
  5. Copy this to the root of your website.

That is all it takes to get a cool little icon for your site and to stop they nagging 404 errors in your log.

Comments Off

jQuery UI Themes on Google’s CDN

I have been using Google’s CDN (Content Delivery Network) for a while now for jQuery and jQuery UI javascript files. I would then host the jQuery UI themes locally. But i found out that the stylesheets and images for jQuery UI are also hosted on Google’s CDN.

Add a standard link tag with this URL, change {version} to the version of jQuiery UI you want to use. The latest as of 12/2010 is 1.8.7. Change {theme} to the name of the theme from the canned themes on the jQuery UI site.

<link href="http://ajax.googleapis.com/ajax/libs
/jqueryui/{version}/
themes/{theme}/jquery-ui.css"
rel="stylesheet" type="text/css" />

Comments Off

Add Time (NTP) Servers in Windows XP

Windows XP is the first version of Windows that can synchronize its clock with Time (NTP) Servers. NTP stands for Network Time Protocol. There are many NTP server that are links to Atomic Clocks so they have perfect time. I know Windows 2000 could synchronize time, but only with a Windows Domain Controller which does little good to most of us. Out of the box Windows XP is set to synchronize time with time.windows.com and we can switch it to time.nist.gov. But what if you want to synchronize with another time server? Maybe one closer to you or one in your company. Well you need to dive into the registry to add or delete them and I will show you how.

1. First I will show you where the Internet Time setting are. Double-click on the clock in the system tray.

2. Now click on the Internet Time tab. See the Server list. We have time.windows.com and if you pull-down the menu you will see time.nist.gov. If anything switch it to time.nist.gov, no need to give Microsoft your IP address. Click OK.

3. Now lets go add a new NTP server. Click Start, then Run.

4. In the Run dialog type regedit then click OK.

5. Now in the Registry Editor, navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers key.

6. Now right-click on Servers, go to New then String Value.

7. This will create a new String Value. Name it 3 or what ever number is next. There cannot be two of the same value. if you add another make it 4 and so on.

8. Now double-click the String Value we just created. Enter your new time server. I went to NIST Internet Time Servers and picked one close to me. Click OK.

9. Now you see our new NTP server. Add as many as you like, even delete the ones you don’t. Just make sure they are numbered correctly, 1, 2, 3, etc. Close Registry Editor by clicking the red X.

10. Now go back and double-click on the clock to open the Date and Time Properties.

11. Pull-down the Server list and your should see the new Time servers you just added. Select the new Time server.

12. Now test the new Time Server by clicking Update Now. After a few seconds it will tell you the time has been successfully synchronized. If you get an error message try again. If that does not resolve it check your Time server and go back and change it.

From now on your computer will have the correct time. Note that if the date is wrong it will not synchronize time. Visit www.time.gov to manually set the date and time.

One comment so far, add another

Launch a Java Application from an Icon in Windows

Java applications are not native applications in Windows. What do I mean? Well a native application has an EXE extension and if you double-click on it, it will run. Java works differently. When you compile your java program it is not compiled into an EXE, it is compiled into a class. Then you “feed” this class file to the Java interpreter which is a Windows native application. This is done by typing “java.exe MyApp” at the command prompt. Well we don’t use Windows because we love the command prompt, we like icons and shortcuts.

You could make a batch file which contains the command I mentioned before. The problem with that is it will launch a command prompt window for second. That seems kind of hokey to me. My Windows native applications don’t do that. Ok, here is the trick. If you look in your Java bin directory you will see java.exe, well next to it is javaw.exe. This is the guy we want to use, and instead of using a batch file we are going to use a shortcut. Make sure your Java bin directory is set in the Environmental Variable called Path. That way you can simply call the application by name anywhere in the file system.

For this example I have an application called “HelloWorld” and it lives in “C:\Program Files\Java\Hello World”. For your application change the paths and names as needed.

1. Right-click in the folder where your class file lives. Choose New -> Shortcut.

2. Type in “javaw.exe HelloWorld”. Click Next.

3. Now type “Hello World” or what ever you are going to name this shortcut. Click Finish.

4. Now we see the new “Hello World” shortcut. We are not done yet, we need to modify a property.

5. Highlight the Address, right-click, and choose Copy.

6. Now right-click on our new shortcut and choose Properties.

7. Now erase whatever is in the “Start in” box and paste the Address in here. The start in box must contain the folder where the class file lives. Click OK.

8. That’s it. Now double-click the shortcut and your application should launch just like any other application.

You can copy this shortcut anywhere. Your Desktop, Start Menu or Quick Launch and you will have an icon for your Java application. I suggest copying the shortcut, not to move it. That way you will always have it with your application to reuse.

Comments Off

Install Perl on Personal Web Server (PWS) in Windows 98

This is kind of old, but it might be useful to someone somewhere. Once I was e-mailed from a guy that told me this quick little tip was his salvation after he spend hours and hours.

When I first got into web programming I used Perl. Since then I have done JSP and PHP. For quick testing of my Perl code I liked to run it locally and at the time I had Windows 98.

Windows 98 has a striped down version of Internet Information Server (IIS) called Personal Web Server (PWS).

  1. Install Personal Web Server from either the Windows 98 CD-ROM or from the Microsoft website. The location on the CD-ROM is [driveletter]:\add-ons\pws\setup.exe
  2. Download and install ActivePerl from www.activestate.com.
  3. Click Start, Run then type regedit and click OK.
  4. Go to “HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3SVC/Parameters/Script Map”.
  5. Create a new String Value named .pl with a value of “C:\Perl\bin\perlis.dll”.
  6. Change the drive letter and location to where ever perlis.dll is installed. I did this many years ago so the current download of ActivePerl might be different. You can also do the same for .cgi if you want.
  7. Exit out of regedit and reboot the computer. Very important, you must reboot.
  8. Open the PWS Manager and click Advanced. Choose or create a directory you want the Perl scripts to run in. Check only Execute and click OK. If you want HTML in the same directory check Read as well, no need for Scripts.
  9. That is it, everything should work.
Comments Off