Sunday, December 14, 2014

Regular Expression - replace group

I have a html
<a href="cc.ccs"/><a href="bb.ccs"/><a href="#"/>

I want to replace the non # href so that it become
<a href="my_cc.ccs"/><a href="my_bb.ccs"/><a href="#"/>

print re.sub(
r"<a href=\"my_cc.ccs\"/><a href=\"my_bb.ccs\"/><a href=\"#\"/>")

Saturday, December 6, 2014

Open second winedt

Monday, December 1, 2014

Installation of Apache ODE on Windows 7

1. Use latest JRuby
2. Use latest JDK
3. Use Tomcat 6.0

Guideline of installation is here

---Some meta information for myself, not sure whether it is useful---
For rewriting (just rewriting it)

Installing Source of Apache ODE
My current version jdk 1.7 Update 51

Using latest junit
Set the java_home to jdk
Install buildr
Run buildr

macos with JDK 1.5 and JDK 1.6) is
buildr 1.4.4, jruby 1.5.1 (ruby 1.8.7 patchlevel 174).

jruby -S gem install buildr -v 1.4.4
jruby -S gem install buildr --verbose

cd c:\
buildr package test=no

buildr test

buildr eclipse

Setup Java Web service Service

  1. Create Dynamic Web Project
    1. Configuration -> Axis2
  1. Create src file
  2. Create Web Service
    1. Choose Operator Class
    2. Choose Apache Axis2
    3. After all start server

  1. Right Click Project, Right On Server, Copy the URL
Details can be found here:

Setup Java Web service Client

  1. Dynamic Project
  2. Configuration -> Axis2
  3. New => Web Service Client
  4. Pass the WSDL, check server

Details step can be found here