原创 42 Decorator pattern

Decorator: Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to su

原创 02 LayoutInflater

(1) LayoutInflater inflater = LayoutInflater.from(getContext()); View itemView = inflater.inflate(R.layout.agenda_item,

原创 09 gradient

<shape xmlns:android="http://schemas.android.com/apk/res/android"     andr

原创 03 DisplayMetrics

WindowManager-->Display-->DisplayMetrics (1) DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDef

原创 c# 線程

名稱空間:System.Threading 異步委託 異步委託使用線程池。基於IAsyncResult的異步模式。 static int TakesAWhile(int data, int ms) { } public delegate

原创 Get current time and interval

Reference: http://blog.sina.com.cn/s/blog_7e2ace6a0100xqk5.html     C++ DWORD GetTickCount(); GetLocalTime(SYSTEMTIME*)

原创 IMEI & IMSI & TAPI

IMEI(International Mobile Equipment Identity)是國際移動設備身份碼的縮寫,國際移動裝備辨識碼,是由15位數字組成的"電子串號",它與每臺手機一一對應,而且該碼是全世界唯一的。 IMEI組成  I

原创 c# Runtime load library; Load Assembly from Specific Directory Path

Reference: http://www.chilkatsoft.com/p/p_502.asp using System; using System.Collections.Generic; using System.Compone

原创 timer

Reference: http://www.cnblogs.com/ryhan/archive/2011/07/14/2106350.html http://www.biye5u.com/article/Csharp/winform/20

原创 43 Singleton Pattern

Singleton: ensures a class has only one instance, and provides a global point of access to it.     Java example 1:   pu

原创 C# using

http://www.cnblogs.com/cding/articles/1363712.html   1.using指令。using + 命名空間名字 2.using別名。using + 別名 = 包括詳細命名空間信息的具體的類型。

原创 C#Hashtable與Dictionary性能

http://www.cnblogs.com/zcy_soft/archive/2010/10/02/1841165.html

原创 Control的Invoke和BeginInvoke

Reference: http://www.cnblogs.com/c2303191/articles/826571.html     MethodInvoker 提供一個簡單委託,該委託用於調用含 void 參數列表的方法。在對控件的

原创 從C#程序中調用非受管DLLs

using System.Runtime.InteropServices; // DllImport所在的名字空間 [StructLayout(LayoutKind.Sequential)]

原创 委託-異步調用-泛型委託-匿名方法-Lambda表達式-事件

1. 委託 From: http://www.cnblogs.com/daxnet/archive/2008/11/08/1687014.html 類是對象的抽象,而委託則可以看成是函數的抽象。一個委託代表了具有相同參數列表和返回值