29th August 2008 - By Aaron
Update: This may no longer work without a tethering plan

After 7 calls and 2.5 hours on hold with Sprint I have finally done it.
It was really not that difficult, I just needed the special number to dial (#777) to make it happen.
For the rest of you here is a step by step guide.
- Turn bluetooth on for the PC and the phone (Menu, Settings, Bluetooth, On)
- Add the computer as a trusted device on the phone (Shouldn’t be necessary but it seems to not work without this configured first)
- On the phone visit Menu, Settings, Bluetooth, Trusted Devices, Add New
- Choose search. Select your PC name from the list and choose “Add to Trusted”
- Enter a NUMERIC pin on the phone. Press Done
- The System Tray on the PC will pop up with a pair request. Click on it and enter the code you just entered on the phone. Press OK.
- Name the device on the phone (or leave it the same) and press OK
- Make the phone visible (Menu, Settings, Bluetooth, Visibility, Visible for 3 min.)
- Open My Bluetooth Places on the PC (Right click on Bluetooth System Tray Icon)
- Choose Bluetooth Setup Wizard link on the left of My Bluetooth Places.
- Choose “I know the service I want to use and I want to find a Bluetooth device that provides that service” and press Next.
- Choose “Dial Up Networking” and press next.
- Choose the icon representing your phone and press next.
- Press “Configure”
- Press “Configure” again
- Put in the phone number #777 and press Ok twice. Press Finish
- Bubble will appear from System Tray asking about pairing. Click on it.
- Enter an security code using NUMBERS and press Ok
- Phone will alert you of an attempted pairing. Choose Yes, enter the security code you just made up and then choose ok.
- Connection will succeed and Dial Up Networking dialog will appear on the computer.
- Username and password should be empty and phone number should be #777. Press Dial
- It should connect. Your phone will ask you if you want to accept the connection. Say yes
- The phone screen will change to read Data Connection.
- Your computer is online!
Other things you can do to improve your experience…
- Turn on auto-accept on the phone for the trusted device
- Stop the PC from asking you the username, password and phone number by…
- Right click on the phone in the My Bluetooth Places screen and choose properties
- Choose Configure, then the options tab
- Uncheck prompt for name and password and prompt for phone number
- Choose OK and then OK again
Posted in Computers | No Comments »
22nd January 2008 - By Aaron
There is no specific method for NULLS FIRST (default is NULLS LAST), but you can still accomplish this through the expression api.
You can simply append some sql to the end of your ordering field expression and it will take care of it for you.
For example, if you are ordering by the name then this would put the nulls last (default):
query.addOrdering(builder.get("name"));
This code could be ammended into the following to put nulls first:
query.addOrdering(builder.get("name").postfixSQL("NULLS FIRST"));
It’s that easy.
Posted in Programming | No Comments »
17th August 2007 - By Aaron
Well the first question to ask is what unit do you want the difference in. This is one of the reasons many people stick to incremental date math instead of math returning an int.
Lets say you want to do a basic age calculation. How old is Joe? His birthday is 7/29/1981. Well you could subtract 1981 from today, then determine if he had a birthday this year, which could mean comparing everything up to the milliseconds. The problem is, such a calculation is not as accurate as it would seem. This style method fails to preserve the validity of the passing of leap years, leap seconds, etc. If you asked how many days old Joe is then your answer would be something like 365 * (current – 1981) + number of days this year – number of days between Jan 1 and July 29. Well you forgot a few leap days in there, at least 5.
Read the rest of this entry »
Posted in Computers, Programming | 4 Comments »
26th July 2007 - By Aaron
I have published a pet project of mine online recently. After looking at many different project hosting sites I resolved on google code. It seems to have a great interface and amount of space available.
The project is called JExel, and is a Java based expression language parser. It’s not complex to utilize, and can be the perfect plugin library for usage in your larger Java application. JExel parses string expressions to an object result. It comes with native boolean, math, string and date functionality.
A boolean expression utilization would look something like Expression.evaluateToBoolean("true AND false"); and, in this case, would return a new Boolean(false);.
Of course there are also included methods evaluateToDouble(String) and evaluateToString(String).
Additionally there is a plain evaluate(String) method that returns an Argument. You can then call getObject() on the resulting Argument and get the actual Object result.
You can expand on the included operators, and write your own to accomplish your own task. You can provide a Resolver which can resolve string variables found in the expression via your own needs. Say you had an expression like Expression.evaluateToDouble("path/to/variable + otherVariable");. This means if you provide a resolver then you can gain variable resolution relevant to your own project. Maybe path/to/variable is translated into “6″ and otherVariable is translated into “4″. Then the result would be 10.
Have fun! Start Exploring JExel
Posted in Computers, Programming | 2 Comments »
28th May 2007 - By Aaron
In your pom.xml you have the ability to turn on resource filtering that replaces variables in resource files with actual values. These are useful for things like ${pom.name} and ${pom.version}. Your pom.xml section would look something like this…
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
And your properties file could contain something like these
# Build Time Information
APPLICATION.NAME=${pom.name}
APPLICATION.VERSION=${pom.version}
Read the rest of this entry »
Posted in Programming | 3 Comments »