Friday, May 10, 2013

Subversion(SVN)概念與工具介紹


Subversion(SVN)概念與工具介紹


http://www.cc.ntu.edu.tw/chinese/epaper/0020/20120320_2002.html

8.kdesvn:在Linux下使用KDE桌面管理下類似TortoiseSVN的軟體。
9.RabbitVCS:在Linux下使用Gnome桌面管理下類似TortoiseSVN的軟體。 


#Step by step : it works.
http://rbgeek.wordpress.com/2012/05/01/svn-server-on-ubuntu-12-04-lts-with-web-access/


Problem:

svn: Can't open file '/home/xxxxx/svn/aaa/db/txn-current-lock': Permission denied

Ans:

www-data is a user/group set created specifically for web servers. It should be listed in /etc/passwd as a user, and can be configured to run as another user in /etc/apache2/apache2.conf.


Problem

Install RabbitVCS on Ubuntu 12.04






sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 34EF4A35 





Change annotation background colors in eclipse?

#Problem:

新版似乎沒用~得用下一個方法 直接調系統參數.
That said, I found an Eclipse plugin, Annotions Ruler Background. It looks like it should do the trick, but was designed for Indigo (3.7) and doesn't seem to work on Juno (4.2). Sigh.

此問題花了一個多小時才找到解決方法~希望你節省你的時間
step 1: install gnome color chooser
and go "specific"-->tooltips
 Step 2: it works now.

Before : The it is not clear while doing debuging in eclipse.

Thursday, May 9, 2013

how to migrate applications from Vaadin 6 to Vaadin 7.



#Problem:  how to migrate applications from Vaadin 6 to Vaadin 7.

com.vaadin.application + vaadin 7

https://vaadin.com/wiki/-/wiki/Main/Migrating+from+Vaadin+6+to+Vaadin+7





How can I specify a RELATIVE JDBC SQLite url (path?)


#Problem:

How can I specify a RELATIVE JDBC SQLite url (path?)


 specify an absolute path in the JDBC URL:
jdbc:sqlite://Users.../lib/db/ithildin.db
#It works.

#Problem

How to create war files

#Performance:
test condition: Vaadin+ SQL + add data into table
it take 20ms to add a data (run in Java Vaadin context)
09/05/2013 02:54:46.142:::+++createTable 2
09/05/2013 02:54:46.148:::i*=0
09/05/2013 02:54:46.166:::i*=1
09/05/2013 02:54:46.183:::i*=2
09/05/2013 02:54:46.203:::i*=3
09/05/2013 02:54:46.225:::i*=4
09/05/2013 02:54:46.249:::i*=5
09/05/2013 02:54:46.272:::i*=6
09/05/2013 02:54:46.296:::i*=7
09/05/2013 02:54:46.319:::i*=8
09/05/2013 02:54:46.342:::i*=9
09/05/2013 02:54:46.365:::i*=10
09/05/2013 02:54:46.400:::i*=11
09/05/2013 02:54:46.419:::i*=12
09/05/2013 02:54:46.441:::i*=13
09/05/2013 02:54:46.457:::i*=14
09/05/2013 02:54:46.476:::i*=15
09/05/2013 02:54:46.493:::i*=16
09/05/2013 02:54:46.510:::i*=17
09/05/2013 02:54:46.526:::i*=18
09/05/2013 02:54:46.542:::i*=19
09/05/2013 02:54:46.558:::i*=20
09/05/2013 02:54:46.576:::i*=21
09/05/2013 02:54:46.597:::i*=22
09/05/2013 02:54:46.619:::i*=23
09/05/2013 02:54:46.641:::i*=24
09/05/2013 02:54:46.663:::i*=25
09/05/2013 02:54:46.682:::i*=26
09/05/2013 02:54:46.702:::i*=27
09/05/2013 02:54:46.724:::i*=28
09/05/2013 02:54:46.743:::i*=29
09/05/2013 02:54:46.782:::i*=30
09/05/2013 02:54:46.801:::i*=31
09/05/2013 02:54:46.819:::i*=32
09/05/2013 02:54:46.839:::i*=33
09/05/2013 02:54:46.861:::i*=34
09/05/2013 02:54:46.883:::i*=35
09/05/2013 02:54:46.905:::i*=36
09/05/2013 02:54:46.921:::i*=37
09/05/2013 02:54:46.937:::i*=38
09/05/2013 02:54:46.953:::i*=39
09/05/2013 02:54:46.969:::i*=40
09/05/2013 02:54:46.985:::i*=41
09/05/2013 02:54:47.001:::i*=42
09/05/2013 02:54:47.018:::i*=43
09/05/2013 02:54:47.034:::i*=44
09/05/2013 02:54:47.050:::i*=45
09/05/2013 02:54:47.067:::i*=46
09/05/2013 02:54:47.089:::i*=47
09/05/2013 02:54:47.112:::i*=48
09/05/2013 02:54:47.128:::i*=49
09/05/2013 02:54:47.144:::i*=50
09/05/2013 02:54:47.162:::i*=51
09/05/2013 02:54:47.182:::i*=52
09/05/2013 02:54:47.212:::i*=53
09/05/2013 02:54:47.228:::i*=54
09/05/2013 02:54:47.247:::i*=55
09/05/2013 02:54:47.268:::i*=56
09/05/2013 02:54:47.285:::i*=57
09/05/2013 02:54:47.306:::i*=58
09/05/2013 02:54:47.323:::i*=59
09/05/2013 02:54:47.339:::i*=60
09/05/2013 02:54:47.355:::i*=61
09/05/2013 02:54:47.372:::i*=62
09/05/2013 02:54:47.387:::i*=63
09/05/2013 02:54:47.404:::i*=64
09/05/2013 02:54:47.430:::i*=65
09/05/2013 02:54:47.461:::i*=66
09/05/2013 02:54:47.477:::i*=67
09/05/2013 02:54:47.493:::i*=68
09/05/2013 02:54:47.510:::i*=69
09/05/2013 02:54:47.526:::i*=70
09/05/2013 02:54:47.542:::i*=71
09/05/2013 02:54:47.558:::i*=72
09/05/2013 02:54:47.575:::i*=73
09/05/2013 02:54:47.591:::i*=74
09/05/2013 02:54:47.609:::i*=75
09/05/2013 02:54:47.632:::i*=76
09/05/2013 02:54:47.654:::i*=77
09/05/2013 02:54:47.674:::i*=78
09/05/2013 02:54:47.696:::i*=79
09/05/2013 02:54:47.718:::i*=80
09/05/2013 02:54:47.739:::i*=81
09/05/2013 02:54:47.762:::i*=82
09/05/2013 02:54:47.783:::i*=83
09/05/2013 02:54:47.799:::i*=84
09/05/2013 02:54:47.814:::i*=85
09/05/2013 02:54:47.836:::i*=86
09/05/2013 02:54:47.858:::i*=87
09/05/2013 02:54:47.880:::i*=88
09/05/2013 02:54:47.902:::i*=89
09/05/2013 02:54:47.924:::i*=90
09/05/2013 02:54:47.943:::i*=91
09/05/2013 02:54:47.959:::i*=92
09/05/2013 02:54:47.978:::i*=93
09/05/2013 02:54:47.997:::i*=94
09/05/2013 02:54:48.025:::i*=95
09/05/2013 02:54:48.044:::i*=96
09/05/2013 02:54:48.059:::i*=97
09/05/2013 02:54:48.075:::i*=98
09/05/2013 02:54:48.090:::i*=99
#problem:
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
 at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
 at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
 at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
 at com.vaadin.ui.Button.fireClick(Button.java:479)
 at com.vaadin.ui.Button.changeVariables(Button.java:198)

Wednesday, May 8, 2013

使用Eclipse Ant plugin操作流程


Step 1:

使用Eclipse Ant plugin操作流程


http://jerry17768java.blogspot.tw/2012/07/eclipse-ant-plugin.html



Problem:

com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-6-openjdk-amd64/jre"


Step2:

set $JAVA_HOME in eclipse but it goes to another path and say can not find java compiler


Problem:
No tools.jar is specified in the Ant runtime classpath

重要觀念:
In Eclipse the Ant java.home variable is not based on the Windows JAVA_HOME environment variable. Instead it is set to the home directory of the project's JRE.
然後分為Java 跟 ant兩個部份
解答:
http://stackoverflow.com/questions/1288343/how-to-change-java-home-for-eclipse-ant


ant build specific target(build特定的特定的target)


ant [options] [target [target2 [target3] ...]]







Monday, May 6, 2013

How to open files as root via a right click (Ubuntu密技 - 迅速製作檔案、文件夾、應用程式快捷徑)

http://www.pendrivelinux.com/how-to-open-files-as-root-via-a-right-click/


Ubuntu密技 - 迅速製作檔案、文件夾、應用程式快捷徑
--> 右鍵 :然後建立連結
http://alfredcave.blogspot.tw/2009/10/ubuntu_2032.html


測試一:沒有作用

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS;
do
sudo "gnome-open $uri" &

done


測試二:必須要用gksudo:還是不會動

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS;
do
gksudo "gnome-open $uri" &

done




測試三:必須要安裝:libgnome2-0:

 -->sudo apt-get install libgnome2-0

終於可以!

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS;
do
gksudo "gnome-open $uri" &

done



How to run .sh file

http://askubuntu.com/questions/122428/how-to-run-sh-file



Comparison of web application frameworks


Comparison of web application frameworks

Sunday, May 5, 2013

how to setup the vaadin build environment





+
step 1:After install vaadin successfully, create the first project and build successfully,
step 2:copy it inot Tomcat  Webapp folder,
step 3: access it via /localhost:8080/myapp,

the error message as below:
https://vaadin.com/forum/#!/thread/2503181


javax.servlet.ServletException: com.vaadin.server.ServiceException: com.example.bbb.BbbUI could not be loaded
 com.vaadin.server.VaadinServlet.handleServiceException(VaadinServlet.java:580)
 com.vaadin.server.VaadinServlet.service(VaadinServlet.java:343)
 com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


Reference:

http://stackoverflow.com/questions/13929352/vaadin-servletexception-failed-to-load-application-class

問題:Eclipse Plugin doesn't download Vaadin 7 libraries


https://vaadin.com/forum/#!/thread/2503181



必須要裝:ant:
--> sudo apt-get install ant1.7
 

sudo ln -s -T /usr/share/java/ivy.jar /usr/share/ant/lib/ivy.jar










搜尋趨勢


Tomcat 教學安裝


+https://sites.google.com/site/stevenattw/linux/install-tomcat



+http://blog.sina.com.cn/s/blog_4b9d604f0100ia7z.html

bash: ./startup.sh: 拒絕不符權限的操作
fixed by: 

$:chmod a+x *.sh