原创 一句話Design Pattern:Factory

定義:The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which class to in

原创 一句話Design Pattern:Singleton

定義:The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it一句話:系統裏有些東西只

原创 一句話Design Pattern:Template Method

定義:The Template Method Pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Te

原创 一句話Design Pattern:Adapter

定義:The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classe

原创 一句話Design Pattern:Decorator

定義:The Decorator Pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible a

原创 一句話Design Pattern:Command

定義:The Command Pattern encapsulates a request as an object, thereby letting you parameterize other objects with differe

原创 一句話Design Pattern:Abstract Factory

定義:The Abstract Factory Pattern provides an interface for creating families of related or dependent objects without spe

原创 OO Principles

Encapsulate what variesFavor composition over inheritanceProgram to interfaces, not implementationsStrive from loosely

原创 我的“一句話Design Pattern”

當年備戰高考作文,無奈讀書太少,每逢寫議論文總是內容乾癟,沒有論據。遂與同學相約借來“名人軼事六百則”上下冊潛心研究。但總是看後面就忘前面,事後查找起來也不甚方便。終於決定一人一本,各花了一個月的課餘時間,把每一個故事總結成一行字,然後複

原创 Big-Endian and Little-Endian

Wikipedia has a very clear graph and tells me that "big-endian" and "little-endian" comes from Gulliver’s Travels1. Big

原创 一句話Design Pattern:Facade

定義:The Facade Pattern provides a unified interface to a set of interfaces in a sub-system. Facade defines a higher-leve

原创 一句話Design Pattern:Observer

定義:The Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all of

原创 一句話Design Pattern:Strategy

定義:The strategy pattern defines a family of algorithm, encapsulates each one, and makes them interchangeable. Strategy

原创 什麼是CORS

英文原文來自我的GitHub頁面。 CORS = Cross-Origin Resource Sharing 什麼是 Origin 要理解CORS,首先得理解什麼是 “Origin”。參見RFC6454:如果兩個URI擁有相同的schem

原创 資源收藏貼

網上看到的好的資源,沒時間立刻看完,收藏在這裏走到哪裏都能打開繼續看。算法和數據結構:   少見但有用的數據結構:http://stackoverflow.com/questions/500607/what-are-the-lesser-