原创 java file path abstract path absolute path canonical path

  1. path,普通路徑名,由getPath()方法返回,就是你構造File時指定路徑名。如File f = new File("testFil

原创 ant import relative path

< project name = "A" >   <import file="path to project B xml"/> ... </project>   <project name ="B">  <property file=".

原创 JAVA 方法 默認訪問級別

一直認爲默認訪問級別的java 方法對子類是不可見的,也就是不能被繼承的,但是下面的例子挑戰了這個看法 public class TT { public static void main(String[] args) {

原创 extends Thread 與 implements Runnable 的區別

1、通過實現Runnable接口創建線程 (1).定義一個類實現Runnable接口,重寫接口中的run()方法。在run()方法中加入具體的任務代碼或處理邏輯。 (2).創建Runnable接口實現類的對象。 (3).創建

原创 httpclient ssl

1. http: PlainSocketFactory 2. https: SSLSocketFactory( need TrustManager(usally X509TrustManager), SSLContext)   packa

原创 check connection status, check session status, sqldeveloper, 檢測DB連接狀態

just to make a memento to check oracle db session status with sqldeveloper: 1. click Tools 2. select Monitor Sessions 3

原创 hadoop cygwin ssh config

ssh-host-config, 不要privilege user ssh-keygen, 不設密碼 其他採用默認設置 最後 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 從/usr/sb

原创 eclipse watch expression cannot be resolved to a type 表達式 類型無法解析

today I encountered an type resolving of expression in eclipse debuging.   1. stop at a break point 2. add watch expres

原创 xsl 遍歷模板

有如下的XML結構: <response name="test2">                        <Status>                           <StatusCode>101</StatusCod

原创 mocking webservice with SoapUI example

test case data config xml <?xml version="1.0" encoding="UTF-8"?> <webservices> <version number="1"> <service name

原创 detail design doc spirit

your detail design doc succeeds if anyone from your team can easily start the implementation aftering reading your deta

原创 post data 丟失

if you firstly call getParameters to get URL parameter data, then you call getReader to read post data, you may find th

原创 eclipse 變量 高亮 eclipse variable highlight eclipse mark occurrences

1 要顯示哪些類型 windows->   preferences-> java-> Editor-> Mark   Occurrences 2 高亮顯示的顏色 Window->Preferences->General->Editors-

原创 start-stop-daemon example

example: run an ant task as a daemon thread #!/bin/sh DESC="mock system" NAME="mocksystem" PIDFILE=/var/run/$NAME.pid

原创 以\\開頭的數字的正則表達式

目的:將字符串中不是以\開頭的數字以*代替。 如:對於字符串:abc11,cd123 \\0123,68,T5699 處理後的結果應該是:abc*,cd* \0123,*,T* 開始想到的表達式是(?<![\\\\d])([0-9]+){