Friday, October 9, 2009

Blackberry - Code Signing

You are required to sign your cod if you use BlackBerry API that have a "lock" image besides them.

According BlackBerry, they want to must track the use of some sensitive API.

For the application of new signing keys, you can refers to for instructions

BlackBerry will send you 3 files, client-RBB-XXXX.csi, client-RCR-XXXX.csi and client-RRT-XXXX.csi, for registration. And these files will be tied to the installed machine.

Over time, you may change/upgrade your machine and you can reuse the signing keys by copying the following 3 files in the "/bin" directory to the new "/bin".

After that, you can sign your cod again.

Wednesday, October 7, 2009

Blackberry - Available directory

So far, the directory I can find to write file into are

/store/home/user or /SDCard/ directory

You can use the following to list all available root.

Enumeration e = FileSystemRegistry.listRoots();
System.out.println("Root: " + e.nextElement().toString());

Monday, October 5, 2009

C# DateTime From String

Getting C# DateTime object from String can be done by

String dt = "10/1/2009 2:22:14 PM";
DateTime myDT = DateTime.ParseExact(dt, "M/d/yyyy h:mm:ss tt", null);

Most important step is to create a correct parsing string ("M/d/yyyy h:mm:ss tt")

Below are some useful parsing string information

d - Numeric day of the month without a leading zero.
dd - Numeric day of the month with a leading zero.
ddd - Abbreviated name of the day of the week.
dddd - Full name of the day of the week.

f,ff,fff,ffff,fffff,ffffff,fffffff -
Fraction of a second. The more Fs the higher the precision.

h - 12 Hour clock, no leading zero.
hh - 12 Hour clock with leading zero.
H - 24 Hour clock, no leading zero.
HH - 24 Hour clock with leading zero.

m - Minutes with no leading zero.
mm - Minutes with leading zero.

M - Numeric month with no leading zero.
MM - Numeric month with a leading zero.
MMM - Abbreviated name of month.
MMMM - Full month name.

s - Seconds with no leading zero.
ss - Seconds with leading zero.

t - AM/PM but only the first letter.
tt - AM/PM ( a.m. / p.m.)

y - Year with out century and leading zero.
yy - Year with out century, with leading zero.
yyyy - Year with century.

zz - Time zone off set with +/-.

Tomcat - removing server info

Below are the steps to remove Tomcat Server Information 1. Make sure Tomcat is not running 2. Navigate to "Tomcat Installation"...