Recent Posts

guava notes

Reference Guava User Guide Practice in Github Optional Optional 可以用來處理 null value 與避免 NullPointerException public class OptionalTest {

字串 format

帶入 dict 的值, 如果用 format api, dictionary 要帶 ** 去展開 key-value >>> m = {'a':1.1234, "b":"qq"} >>> '%(a)1.1f %(a)s %(b)s' %m '1.1 1.1234 qq'

function is an object

python 的 function 是一個物件, 所以可以放進 collection 中等以後被呼叫. >>> def a(): print 'a';

split large file

I use Notepad++ to check log and debug. When log file is large, I need to split large file to smaller ones. I can't find tool so write codes to split file ...

Shell 筆記

cd /d %~dp0不管執行 script 時候路徑在哪, cd /d %~dp0 後 script 的路徑就到該 script 路徑下 script, 放在 f:/test/test.bat cd /d %~dp0 dir execute: f:/test/test.bat f:\>test\te...

Git 筆記

從 branch merge 回 master, 導致 pom.xml conflict, 想 reset pom.xml 因為這不是我要 merge 的內容. (stackoverflow) git reset pom.xml git checkout pom.xml 想清掉 untrack fil...

Basic Perl 筆記

單引號的 \n 不會換行, 雙引號內的 \n 會換行 print("line1\nline2\n\n\n\n"); print('line3:abc\nabc'); d:\>test.pl input string:abc input number:4 abcabcabcabc d:\>test...

Scrum Q&A

Q: 我們用用 SCRUM 想幹嘛?  A: 我們都曾經遇過在某個專案已經花費很多時間跟人力做得一團亂. 但在某個機緣下少少幾個人展現強大的戰鬥力把待辦清單做完, 成為膾炙人口的佳話. 這個佳話也成為團隊員日後美好的回憶. 會有佳話是因為:  待辦事項清單清楚 有人排出優先順序, 先...

User Story Template

Reference Thomas Tseng User story format: “As a (user type), I want to (goal), so that (reason).” Attributes of good user story: I...

compound interest

Reference http://shooeugenesea.github.io/compoundinterest.html Description 不想工作, 最好投資可以每年幫你賺 200萬, 就是在不工作的情況下還是可以賺200萬. 怎麼做呢? 我先做個網頁, 用複利的方式去替你算每年的目標是多少...

Android APP: GameVolumn

Reference Android SDK Tutorial: Working With The SeekBar Android: Enable click event on empty activity area How to create Transparent Activity in Android...

Fight with Bitmap OOM problem.

Reference Managing Bitmap Memory Supporting Multiple Screens BrightImage in Github BrightImage in Google Play How To Pick Image From Gallery In Android A...

split big log file

Description 一個 log 檔 3G 怎麼看? 不想裝工具, 就只能把檔案切小 Dependencies JDK7 apache commons io Codes public static void main(String[] params) throws IOException ...