2017年11月21日 星期二

如何查詢Port被哪個程式佔用了

windows 用 netstat 命令 C:\>netstat -ano | findstr 0.0:80 結果 TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       1860 其中 1860 就是佔用 port 的程式 PID,再輸入 C:\>tasklist | findstr 1860 得到如下的資訊 httpd.exe                  1860 Services               ...
Posted on 11/21/2017 10:46:00 上午 | Categories: , ,

2017年10月27日 星期五

如何在 eclipse 快速地 stop/terminate 一個 java application

參考此篇: https://stackoverflow.com/questions/321118/what-is-the-short-cut-in-eclipse-to-terminate-debugging-running 直接講結論:要使用快速鍵的話,要切換到 debug view 就會有效。 但是......如何在不切換 view 的情況下 stop/terminate 呢...
Posted on 10/27/2017 10:10:00 上午 | Categories: ,

2017年10月12日 星期四

cmd script 自動產生日期、時間字串,並 copy 到剪貼簿中

要先定義 os.date & os.time 的字串格式 For /f "tokens=1-4 delims=- " %%a in ('date /t') do (set _thisDate=%%a%%b%%c) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set _thisTime=%%a%%b) set _thisDateTime=%_thisDate%.%_thisTim...
Posted on 10/12/2017 03:12:00 下午 | Categories:

2017年10月5日 星期四

redis monitor

監控 redis 現在被呼叫 (查詢) 的狀...
Posted on 10/05/2017 10:05:00 上午 | Categories:

2017年10月2日 星期一

2017年9月28日 星期四

2017年9月26日 星期二

partial-search-in-hashmap In Java

如何 search hash map 參考:https://stackoverflow.com/questions/6713239/partial-search-in-hashmap...
Posted on 9/26/2017 11:29:00 上午 | Categories:

2017年9月11日 星期一

Java 取亂數 A-Z / a-z

先前筆記過在 java 中用 Math.random() 實作一個亂數 (數字)。 今天來搞一個 A-Z / a-z 的字母亂數...
Posted on 9/11/2017 02:26:00 下午 | Categories:

2017年9月8日 星期五

Java 取亂數 Math.random()

java.lang 中的 Math 類別定義了 random() (double) ran = Math.random(...
Posted on 9/08/2017 03:48:00 下午 | Categories:

2017年9月6日 星期三

2017年9月4日 星期一

2017年9月1日 星期五

redis 關不掉

剛遇到 redis 怎麼關都關不掉 (kill 25603 沒回應...
Posted on 9/01/2017 10:38:00 上午 | Categories:

用 top 看特定 process name

剛用 top 查看某服務的 process_id,但是某服務排名太後面,找不到 process_i...
Posted on 9/01/2017 10:35:00 上午 | Categories: ,

Java 註解

節錄 wiki  Java註解又稱Java標註,是Java語言5.0版本開始支援加入原始碼的特殊語法後設資...
Posted on 9/01/2017 10:29:00 上午 | Categories: