Linux 平台上的图形化 SVN 客户端

You may already know some SVN clients on Linux, like rapidSVN, eSVN, etc. But I don’t think they are as good enough as TortoiseSVN that is only for Windows platform.

Today I found an SVN client named SmartSVN, developed by Java. It’s very very powerful, support many operations just like what TortoiseSVN does on Windows.

It’s a pity that it’s not open source software but for commercial.

By javafuns on June 9, 2009 at 22:57 · Views: 1,550 · Permalink · Leave a comment
Categorized in: Java · Tagged with: 

Make LI not indent

Sample code is listed below:

ul {
list-style:none;
margin:0px;
padding:0px;
}

list-style attribute makes li without bullet.
The code is tested on Firefox, Opera, IE.

By javafuns on May 28, 2009 at 10:19 · Views: 3,183 · Permalink · Leave a comment
Categorized in: Uncategorized · Tagged with: ,

How to set onSuccess event listener for Grails

Grails inherently supports ajax function, such as remoteFunction, remoteLink, etc.

But do you know how to set onSuccess event listener appropriately?

Let me tell you :)

<input type=”text” id=”name” name=”name” value=”"/>
<input type=”button” name=”checkbizname” value=”Chek whether this name already exists” onclick=”${remoteFunction(controller:’mycontroller’,action:’isNameExists’,onSuccess:’popwin(o)’, params:’\'name=\’ + document.getElementById(\’name\’).value’)}”/>

In the above code, when ajax request is handled and get response from server, onSuccess event listener will be invoked.

Note:

  1. popwin(o) should contain argument ‘o’, as ‘o’ is defined in the code generated by this GSP. You can find this argument via firebug. {success: function(o){popwin(o);}, failure: function(o){}}
  2. Another important thing is, you should define this function popwin(o) in head section in GSP. It seems a bug that funtions defined between head and body will not be invoked at all.
By javafuns on May 21, 2009 at 22:11 · Views: 2,082 · Permalink · Leave a comment
Categorized in: Scripts · Tagged with: , , ,

HIBERNATE-为DB2指定默认schema

hibernate 有一个属性hibernate.default_schema,设置了该属性后,hibernate将使用该schema.

例如:在hibernate.cfg.xml

<property name="default_schema">MYSCHEMA</property>

另外,如果你使用的是 jdbc 直接访问数据库,那么可以在 url 中加上 currentSchema=MYSCHEMA,例如:

<Resource name="jdbc/UddiDatabase" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="50" maxWait="10000"
username="db2admin" password="db2admin"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://192.168.56.101:50000/UDDI:traceLevel=3;driverType=4;currentSchema=MYSCHEMA;"/>

如果你遇到了有关schema的问题,那么不妨将这两种方案都尝试一下.

By javafuns on May 15, 2009 at 16:46 · Views: 2,083 · Permalink · Leave a comment
Categorized in: Database, Java · Tagged with: , , , , ,

How to configure Tomcat to support remote debugging

How do I configure Tomcat to support remote debugging?

The short answer is to add the following options when the JVM is started: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n There are a number of ways you can do this depending on how you normally start Tomcat:

The port does not need to be set to 8000, it may be any value appropriate for your system.

Whilst this is very useful in development it should not be used in production because of both security and performance implications.

Copied from: http://wiki.apache.org/tomcat/FAQ/Developing#Q1

By javafuns on May 13, 2009 at 17:24 · Views: 1,532 · Permalink · Leave a comment
Categorized in: Java · Tagged with: ,

How to install libstdc++.so.5 for Ubuntu

Today when I tried to run our applications, I was told that there is a necessary library libstdc++.so.5 missing.

Now, I give the programmers who also faces the same problem a solution:

sudo apt-get install libstdc++5

By javafuns on May 13, 2009 at 09:25 · Views: 1,447 · Permalink · Leave a comment
Categorized in: Java, Operation Systems · Tagged with: , ,

Groovy 学习笔记 (二)

5. 方法调用: 方法调用时, 括号是可选的. 例如: print ‘hello, world’

6. 方法返回值: 默认最后一句就是方法的返回值, 也就是说, 最后一句的return语句是可有可无的. 当然, 如果在方法中间需要return值, 还是要写 return 语句才行.

7. 闭包(closure): 闭包可以访问与闭包定义在同一scope的变量. 例如:

def name = “” //initialize variable

def printName = { println “The string in the name variable is ” + name } //define method

name = “Youssef” //set string Youssef in variable name

printName() //result: The string in the name variable is Youssef

如果不在同一scope, 那么需要给闭包指明参数, 参数与闭包的body部分用 -> 符号分隔. 如果只有一个参数, 则该参数可不必明确写出来, 默认用 it 作为该参数的名称.

def name = “” //initialize variable

def printName = { println “The string in the name variable is ” + it } //define method

name = “Youssef” //set string Youssef in variable name

printName(name) //result: The string in the name variable is Youssef

8. 异常处理: 不是强制性的

9. methodMissing 与 propertyMissing 方法:

10. categories:

class StringCategory {
static String lower(String string) {
return string.toLowerCase()
}
}


use (StringCategory) {
assert "test" == "TeSt".lower()
}

By javafuns on May 4, 2009 at 17:47 · Views: 3,268 · Permalink · Leave a comment
Categorized in: Scripts · Tagged with: , , ,

Grails RichUI plugin

Rich UI 是一个 AJAx 插件, 可以干很多事情:

我就用它做了一个 rating 功能, 哈哈, 真是超级简单, 超级方便.  在下面的链接里, 有详细的使用说明, 只要你的英语不是很烂, 就很容易搞明白如何使用.

具体地址: RichUI Plugin

By javafuns on April 28, 2009 at 21:24 · Views: 2,153 · Permalink · Leave a comment
Categorized in: Scripts · Tagged with: , , , ,
  • Highest Rated

  • My PicasaPhotos

    IMG_0599.JPG

    IMG_0666.JPG

    IMG_0680.JPG

  • RSS My del.icio.us

  • My RSS