# Programming

### Tuesday February 24, 2009

I just wasted about 2 hours trying to figure out why my java servet won’t compile.  The answer was actually very simple, so I want to save people that time, which I wasted. The error: package javax.servlet does not exist import javax.servlet.*; ^ 1 error This caused about 10 other Read More

## Having a Dialog with the nsIFilePicker

Probably once of the most simple but useful interfaces that I have come across is the nsIFilePicker. This interface will allow the end-user to use a dialog for loading or saving a file, or getting folder for use in your application. In my case I just need the user to Read More

## Dissecting the Linux Filesystem Hierarchy Standard

While trying to figure out where and how I am going to install XULRunner apps on to a Linux system, I realized a little nugget of information which I did not know (or forgot).  Where do file go when an application is installed under a Linux system? After some searching Read More

## Run External Apps using XPCOM Interfaces

I thought it was impossible to run a program outside my XUL app, mainly because of some kind of JavaScript restriction. There are client-side restrictions to protect the file system from being infected from malicious code, however there are some server side solutions, but most of them use ActiveX. Is Read More

## GUID generator in JavaScript

Found two little functions in JavaScript to create a GUID Thanks to sj at note19.com, I don’t know exactly how reliable the generator is, I ran a couple tests against 50 guids, and it passed, but I need to run the guids through the Windows Installer using WiX, and I Read More

## XUL File I/O: Write Files

Writing files in XUL isn’t that much harder than reading a file, in fact its very similar.  What a relief.  In my example I am appending the data “Appending Data” to my file. function writeFile() { var data = “Appending Data”; var filePath = “C:\\text.txt”; var file = Components.classes[“@mozilla.org/file/local;1”] .createInstance(Components.interfaces.nsILocalFile); Read More

## How-to: Read Files in XUL

After some weeks of procrastination and going nuts over other projects, I’m getting back to XUL and my XRap program.  I’ve been asked to change my current XRap code (currently the 0.1 is in C#) to XUL, which would increase its portability, and it just makes sense to make a Read More

## Installing PHPUnit on Ubuntu 8.04

You need to get the latest release of PHP $sudo apt-get install php5 To get PHPUnit you need to get the PEAR installer, which is part of PHP$sudo apt-get install php-pear Once you have PEAR installed you must register the PEAR channel with the PEAR environment \$sudo pear channel-discover Read More

## Installing WAMP and PHPUnit on Windows

Download and Install WAMP Once you have installed and setup WAMP, open up the command prompt and go to your php directory in WAMP C:\>cd wamp\bin\php\php5.2.5 From here you must run the go-pear.bat file to install PEAR and all the files needed for it C:\wamp\bin\php\php5.2.5>go-pear.bat When executed PEAR will ask Read More