Tuesday, March 27, 2007

Setup svnserve for personal usage

It is handy to have your own SVN server for you own small projects.
Here are the steps I used to setup a SVN server on Windows XP:
1. Download the Subversion binary for Windows from here, and unzip it to your local drive. Note: I was using 1.4.3
2. Create your own repository like: svnadmin create /svn-win32-1.4.3/repos/dliurepo
3. Setup the svnserve as Windows service: X:\svn-win32-1.4.3\bin>sc create svnserve binpath= "c:\dev\svn-win32-1.4.3\bin\svnserve.exe --service -r X:\svn-win32-1.
4.3\repos\dliurepo" displayname= "svn server"
4. Edit the svnserve.conf in your repository conf directory add the following texts:
password-db = userfile
anon-access = read
auth-access = write
realm = test svn realm
5. Create a new file named userfile in the same directory where svnserve.conf locates with the following content:

Further references:
Setup svnserve as windows service.
Version Control with Subversion.

Notes: sc command's option name includes the equal sign. Do NOT forget to put space after the option name '='.

Dump the SVN repository:
svnadmin dump <repository> > dumpfilename

Load dump into SVN repository:
svnadmin load <repository> < dumpfilename

Setup home Subversion Server with Apache.
Subversion and Apache
Having any Subversion Problem or Question? Search SVNForum

Wednesday, March 21, 2007

Copy, paste, and cut text block in VI

Copy block in vi:
Mark Beginning of Block : mx set mark x (x may be any letter)
Mark End of Block and "Copy'' : y`x yank from here to mark x into buffer
Mark End of Block and "Cut'' : d`x delete from here to mark x into bufferFor the whole file try:

Goto to line one: 1G
Sort from current line to end of file: !Gsort<cr>
Or if you want to think of it as one command: 1G!Gsort<cr>

Sort a range:
Move Cursor to last line to sort
mark the line with mark 'a': ma
move cursor to first line to sort
sort from current line to mark 'a': !'asort<cr>

Now what does the special chars above mean.

'!' is the vi filter command, it is followed by a movement command
that says what is being filtered. That is followed by the actual
filter cmd. The filter cmd can be any executable. In this case sort.
Since vi does not know how long the filter command name is, you have
to hit carriage return to initiate the filter.

G by itself means go to the end of the file

ma means set mark a to this line. (marks a-z exist)

'a means goto mark a.

XMLSPY 4.4U external XSL transformer

Add SAXONb89n as external XSL transformer for XML Spy
Toos->Options->XSL->External XSL transformation program: C:\LearningZone\SAXON\SAXONb89n\bin\transform.exe -o %2 -s %1 %3

Add SAXONb89j as external XSL transformer for XML Spy
Toos->Options->XSL->External XSL transformation program:

X:\tools\java\j2sdk1.5.0_06-win32\bin\java -jar C:\LearningZone\SAXON\saxon8.jar -o %2 -s %1 %3

To use saxon 6.5.3:
X:\tools\java\j2sdk1.5.0_06-win32\bin\java -jar C:\LearningZone\SAXON\saxonDTS.jar -o %2 %1 %3

Monday, March 12, 2007

Have trouble to start Oracle Server Console?

After dormant long time, now I start to pick up the Oracle Lite installed on top of OAS. All of sudden the Oracle Application Console will not start. Here are the steps I used to diagnose the problem:

Where is the log file?

How to start Oracle Server Console?
/export/home/catused/oracle/ora_j2ee/bin/emctl start iasconsole

Control the behaviour of Servlet Filter Chain

One of my colleague is upgrading the java application server to JBoss 4.05, he ran into the problem that the secured resources protected by declarative security defined in web.xml, but it does not forward to the login form defined filter. Finally, I help him find out the reseaon, there is ways to control the filter chain behaviour in Servlet 2.4:

Please refer to here.

Friday, March 09, 2007

How to exclude the name space from xslt result?

One of my colleague asked me how to avoid the result xml file include the annoying name space from the elements when you are using xsl:copy.
Here is the solution:
add exclude-result-prefixes="saxon v00" into your xsl:stylesheet element in your xsl file.

omit-xml-declaration specifies whether the XSLT processor should output an XML declaration; the value must be yes or no. Please refer to here.