跳到主要內容

發表文章

目前顯示的是 8月, 2016的文章

JSON in javascript

印出所有的JSON內容: console.log(JSON.stringify(josnObj));     增加資料到 JSON Array: var jsonArray = []; jsonArray.push(“xxxxxxxx”); jsonArray.push({     “key”: value });   Jason array size: Object.keys(jsonArray).length

Thread Safe Method for Java

class MyCounter {     private static int counter = 0;     public static synchronized int getCount() {         return counter++;     } } from http://www.programcreek.com/2014/02/how-to-make-a-method-thread-safe-in-java/ 寫了一陣子iOS,感覺Java已經離我很遠了~ 只記得有這東西,但不記得怎麼用了…