Monday, September 28, 2009

tablet Input

Main article: http://msdn.microsoft.com/en-us/magazine/cc721604.aspx

Need to install:
1. Tablet PC recognizer
http://www.microsoft.com/downloads/details.aspx?familyid=080184dd-5e92-4464-b907-10762e9f918b

2. Table PC Edition SDK 1.7
http://www.microsoft.com/downloads/details.aspx?familyid=B46D4B83-A821-40BC-AA85-C9EE3D6E9699

Invalid win32

Got weird errors like: invalid win32 application.

This is due to the following scenario:

64Bit IIS7 running a 32Bit application so Enable 32Bit is set to true on the application pool
Also running as an exchange front end server and hence RPCProxy is loaded

In this scenario you might get the errors

In IE -
"HTTP Error 503. The service is unavailable."


In the event viewer-
"The Module DLL C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load. The data is the error."
and
"Application pool 'xxxxxxxxx' is being automatically disabled due to a series of failures in the process(es) serving that application pool."

Essentially the rpcpoxy is trying to load into the 32bit pool. The question I have i guess is why is this dll trying to load in the first place. It's not part of my application. Anyway to fix this issue:

Edit c:\windows\system32\inetsrv\config\applicationhost.config

In the section which has add - precondition="bitness64" to the rpcproxy line so that you have the following

Subversion

Projectlocker.com offers free svn repository

If the folder to be submitted into repo already exist, do the following:
1. right click to import (this imports the existing files into SVN)
2. right click to create repository (this indexes your existing files and allows you to use SVN normally)

Wednesday, September 16, 2009

Right align/justify in textarea, java

1. Font has to be first of all changed to monospace. Using something like:
txtAreaResult.setFont(new Font("monospaced",Font.PLAIN,12));

2. When we append character to the stringbuffer, we use this method
private String rightAlign(String input, int pad) {

int length = pad - input.length();

if (length < 0)
return input.substring(0,input.length());

StringBuffer buffer = new StringBuffer(pad);
for(int i=0; i<length; i++)
buffer.append(" ");

return new String(buffer.append(input));
}

3. we can use append like this:
StringBuffer results = new StringBuffer();
results.append(rightAlign("Months", 6));