傳送門 : http://alexnisnevich.github.io/untrusted/

這個遊戲你要 用 上, 下, 左, 右 控制 @ 過不同的關卡, 過程中會有不同的難題 要你要右手邊的 Console 去修改 Javascript 來完成.



腦袋閉塞時, 用來打發時間還不錯的 ~
有問題的版本是 OpenSSL 1.01, 這個 Bug 會影響到有在用 OpenSSL 來處理 SSL/TLS 的伺服器.

讓伺服器有可能被人直接讀到 記憶體內的資料, 例如 Secret keys, username, password 之類的

以下是外國網站的圖解 :


所以快去檢查你的服務器吧 !!
測試連結 https://lastpass.com/heartbleed/ 也可以用來測試你有用的網站.

在桃園機場出境後,猛然撞見的春日小旅行橫幅,於是就請好心路人幫我們拍了張起飛照。
和芯儀君的新加坡畢業旅行,從去年十二月開始規劃,終於正式上路了。雖然跟安排的行程有些出入,但旅行本來就充滿了許多變數,玩得開心最重要。


 一般在使用 Excel 的時候作帳或者在某些欄位需要限定輸入的項目時,這時我們會使用Excel的資料驗證→清單這個功能。
以前使用這個功能,想要增加或移除項目的時候都需要再重新指定範圍。後來學習到用 OFFSET 的方式,就可以將動態地去指定需要的項目清單。


回到台北的當天,阿姨就問我媽隔天要不要去健走,於是乎我媽揪我,我揪剛結束中橫健走的芯儀,一行人就這樣去新店「微健走」了。


這是一個很常用的Pattern, 用來確保你的Class 只會有一個 instance. 然後其他地方就可以存取這個 instance 取到同樣的資料.

Class Diagram










Sample Code
/**
 * Created by Gary on 1/25/14.
 */
public class Singleton {
    private static Singleton instance;
    private Singleton(){
        // Initializing
    }
    public static synchronized Singleton getInstance(){
        if(instance == null)
            instance = new Singleton();
        return instance;
    }
    // Other Method...
    public void doSomething(){
     
    }
}

Call
Singleton.getInstance().doSomething();

例子:
這有一個倉庫只會存可樂, 一開始有100罐取完就沒.

倉庫
/**
 * Created by Gary on 1/25/14.
 */
public class WarehouseService {
    private static WarehouseService instance;
    private int coke;
    private WarehouseService(){
        coke = 100;
    }
    public static synchronized WarehouseService getInstance(){
        if(instance == null)
            instance = new WarehouseService();
        return instance;
    }

    // Return true if coke enough.
    public boolean getCoke(int qty){
        if(coke >= qty){
            coke -= qty;
            return true;
        }
        return false;
    }
 
    // Return current coke qty.
    public int getRemain(){
        return coke;
    }
}

取東西的人
/**
 * Created by Gary on 1/25/14.
 */
public class Customer {
    // Get Coke
    public Customer(String name, int cokeQty){
        String status = WarehouseService.getInstance().getCoke(cokeQty) ? "Success" : "Fail";
        System.out.println(name + " get coke " + status);
        System.out.println("Coke remain : " + WarehouseService.getInstance().getRemain());
    }
}

測試
/**
 * Created by Gary on 1/25/14.
 */
public class TestSingleton {
    public static void main(String[] args){
        new Customer("Crab", 10);
        new Customer("Gary" , 90);
        new Customer("Crab" , 10);
    }
}

結果
Crab get coke Success
Coke remain : 90
Gary get coke Success
Coke remain : 0
Crab get coke Fail
Coke remain : 0







今天早上突然想到 Excel 中 Sum 或者其他基本函數中,有些引數的數量其實不固定,那如果要在自定義的 Function 中要怎麼使用?
於是就整理在這兒了 ( ̄ー ̄)