Archive for March, 2008

Nowadays, most computers come built without a 3.5″ floppy drive. And 99% of the time, the floppy drive just is not required anymore. USB Flash drives, otherwise known as memory sticks or thumb drives, have made the floppy disk obsolete. Therefore, booting from a memory stick is the next step.To create a memory stick, you will need to first download and extract (unzip) two files: HP USB Disk Format Tool and Windows 98 System Files. Follow the steps below:

  1. To create the bootable USB memory stick, install the HP USB Disk Format Tool.
  2. Insert your USB memory stick into a the computer.
  3. IMPORTANT: Backup files you wish to keep onto the local hard drive (as this process will delete all files on the memory stick).
  4. Start up the installed application from the HP USB Disk Format Tool.
  5. The device dropdown will automatically populate and identify your memory stick.
  6. Select Fat32 from the Filesystem dropdown.
  7. Check the box with “Create a DOS startup disk”.
  8. In the following textbox, browse to the location of the extracted files from the Windows 98 Systesm Files.
  9. Click the “Start” button.
  10. Click “Yes” to the following dialog box warning you of file deletion.
  11. Next, copy all extracted files from the Windows 98 System Files folder onto the USB memory stick to enable cd rom and mouse support.

Your USB memory stick is now bootable. If you wish to boot your computer from the USB key, be sure to set the proper settings in the BIOS.

To get the difference between two dates in C# is easy given the built in functions. The method requires two DateTime variables. In the example below, we will calculate the difference between two string dates.

string startDateString = “1/10/2006″;
string endDateString = “3/24/2007″;
DateTime startDate = Convert.ToDateTime(startDateString);
DateTime endDate = Convert.ToDateTime(endDateString);
TimeSpan dateDifference = endDate.Subtract(startDate);
int days = dateDifference.Days;

In the example above, two random dates are assigned to strings (startDateString and endDateString). The ToDateTime function of the Convert class is utilized to convert both strings into type DateTime. Finally, the subtract function is called on the future date and the result passed to the TimeSpan class. With the TimeSpan class, the difference in days, hours, milliseconds, minutes, and seconds can be determined. Our example above example is days.

More specifically, the TimeSpan class is capable of returning to either full integers as days, hours, milliseconds, minutes, and seconds. The second option is to return as doubles full and partial days, hours, milliseconds, minutes, and seconds. Additionally, this process will work with the full DateTime format.

The Web Developer designed for Firefox, Flock and Seamonkey is a free extension that adds a menu and a toolbar. It will run on any platform that these browsers support including Windows, Mac OS X and Linux. Just to list a few features:

  • Disable Javascript
  • Disable Referrer
  • Disable Cookies
  • Add Cookies
  • View Cookie Information
  • Disable Styles
  • Edit Styles (on the fly)
  • Display Form Details
  • Show Passwords
  • Make Form Fields Editable
  • Disable Images
  • Edit HTML (on the fly)
  • Resize Window
  • Various Validation
  • View Generated Source
  • Many other features…

Most of the features are useful for testing various browser compatibilities. Not all users will enable cookies, referrers, images, or javascript on their browser. The Web Developer plugin allows an easy way to test how your site will handle various situations. Most useful if Edit CSS and Edit HTML will bring up windows that allow changes and saves that will update on the fly. This plugin displays as a FireFox toolbar and (like most Firefox plugins) has no problems during the uninstall process.

Overall, Web Developer is a great tool for developing sites in HTML and CSS. It is also a useful tool when developing AJAX enabled sites, as you can view the generated source. To try Web Developer, visit the developer’s site directly at http://chrispederick.com/work/web-developer/ or from Firefox Extensions at https://addons.mozilla.org/en-US/firefox/addon/60.