原创 設計模式之01單例模式(筆記)

1 定義: 1.1文字定義:Ensure a classhas only one instance, and provide a global point of access to it.(確保某一個類只有一個實例,而且自行實例化並向整個

原创 設計模式之12策略模式(筆記)

1 定義: 1.1 定義:Define a family of algorithms, encapsulate each one, and make them interchangeable.(定義一組算法,將每個算法都封裝起來,並且使它

原创 設計模式之11裝飾模式(筆記)

1 定義: 1.1 定義:(Decorator Pattern)Attach additional responsibilities to an object dynamically keeping the same interface.

原创 使用Flex Bison 和LLVM編寫自己的編譯器

轉自:http://coolshell.cn/articles/1547.html 使用Flex Bison 和 LLVM編寫你自己的編譯器 原文出處:http://gnuu.org/2009/09/18/writing-you

原创 23個經典JDK設計模式

轉自:http://coolshell.cn/articles/3320.html 下面是JDK中有關23個經典設計模式的示例,在stakeoverflow也有相應的討論:http://stackoverflow.com/questi

原创 設計模式之09命令模式(筆記)

1 定義: 1.1 定義:Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queu

原创 設計模式之05構建者模式(筆記)

1 定義: 1.1 定義:Separate theconstruction of a complex object from its representation so that the sameconstruction process

原创 設計模式之04模板方法模式(筆記)

1 定義: 1.1 定義: Define the skeleton of an algorithm in anoperation, deferring some steps to subclasses. Template Method l

原创 開發工具-Eclipse(25個最佳閃亮的Eclipse開源工具)

6月23號Eclipse基金會發布了最新的Eclipse太陽神版本,囊括了39個項目,下面我們就來看看哪些項目是最受Eclipse開源社區喜歡的。Eclipse最初是一個Java IDE,但後來變得越來越強大,早已超出了IDE的範疇,截

原创 六大原則之“開閉原則(OCP)“筆記

1.開閉原則:Open Closed Principle, OCP) 定義:Software entities like classes, modules and functions should be open for exte

原创 設計模式之02工廠方法模式(筆記)

1 定義: 1.1 定義:Define aninterface for creating an object, but let subclasses decide which class toinstantiate. Factory Me

原创 Java_call_C(從本地端拋出異常)

本文將實現從C/C++代碼中拋出異常,並在JAVA端處理。 三個異常:值類型錯誤異常,鍵值不存在異常,存儲滿異常。 1.在java端新建異常包,並編寫異常類:com.packtpub.exception,中添加如下三個相應的異常類文件

原创 設計模式之06代理模式(筆記)

1 定義: 1.1 定義:Provide asurrogate or placeholder for another object to control access to it.(爲其他對象提供一種代理以控制對這個對象的訪問)。 1.

原创 設計模式之10責任鏈模式(筆記)

1 定義: 1.1 定義:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle t

原创 SystemProperties_SOP

屬性系統是android的一個重要特性。它作爲一個服務運行,管理系統配置和狀態。所有這些配置和狀態都是屬性。每個屬性是一個鍵值對(key/value pair),其類型都是字符串。 首先:在android中設置這一屬性,目的是定義一些屬