Time of Update: 2016-07-04
標籤:會話1: mysql> select now(); 會話2:[[email protected] ~]# stap -v -e ‘probe process("/usr/local/mysql56/bin/mysqld").function("*Item_*").call{ if( tid()==7625) printf("%s:%s %d \n",execname(),probefunc(),tid())}‘ | c++filt
Time of Update: 2016-07-04
標籤://private char[] HexChar = { ‘0‘, ‘1‘, ‘2‘, ‘3‘, ‘4‘, ‘5‘, ‘6‘, ‘7‘, ‘8‘, ‘9‘, ‘A‘, ‘B‘, ‘C‘, ‘D‘, ‘E‘, ‘F‘ }; private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { char hexH; char hexL;
Time of Update: 2016-06-30
標籤: public class A{ public int Property1 { get; set; }}static void Main(){ A aa = new A(); Type type = aa.GetType();//擷取類型 System.Reflection.PropertyInfo propertyInfo = type.GetProperty("Property1"); propertyInfo.SetValue(aa, 5,
Time of Update: 2016-06-30
標籤: private void ShowSelectedPicture(string path) { FileStream fs = File.OpenRead(path); //OpenRead int filelength = 0; filelength = (int)fs.Length; //獲得檔案長度 Byte[] image = new Byte[filelength]; //
Time of Update: 2016-06-28
標籤: int[] ss = new int[6]; Random s = new Random();
Time of Update: 2016-06-28
標籤:應該說是對瞭解一些基本概念十分好的書,雖然編寫了這麼長時間的C#程式,但翻了兩天,也感覺有些東西可以吸取的。(權當這裡作為讀書筆記的摘要 ^_^)幾個縮寫術語:CTS Common Type System 一般型別系統CLS Common Language Specification Common Language SpecificationCLR Common Language Runtime 通用語言執行平台MSIL
Time of Update: 2016-07-02
標籤:當前XAMARIN在IOS以及ANDROID上沒有完整的FreeType綁定,如果使用自己的遊戲引擎,
Time of Update: 2016-07-01
標籤:最近在搞一個小東東,用到了泛型的處理,用到了對泛型的執行個體化問題。下面來講講對泛型的執行個體化,以代碼為例,如:public class A{}public class B<T>{ public static T Get() { //在這一塊如何執行個體化T這個對象呢?如果用default(T)這個是不行的。只能做一個null值處理。
Time of Update: 2016-06-27
標籤:1、命名空間:using System.Runtime.InteropServices;2、匯入方法[DllImport("user32.dll", EntryPoint = "GetKeyboardState")]public static extern int GetKeyboardState(byte[] pbKeyState);3、大小寫狀態public static bool CapsLockStatus{get{byte[] bs = new
Time of Update: 2016-07-01
標籤://定義類public class MyClass{public int Property1 { get; set; }}static void Main(){MyClass tmp_Class = new MyClass();tmp_Class.Property1 = 2;Type type = tmp_Class.GetType(); //擷取類型System.Reflection.PropertyInfo propertyInfo =
Time of Update: 2016-07-01
標籤: 在C#的迴圈語句中,有的時候我們希望跳過其中某個迴圈,有時我們希望當某個條件滿足時,直接終止整個迴圈。C#為我們提供了
Time of Update: 2016-06-27
標籤:在vs中進行C#編程時:(1)輸入svm然後按Tap鍵會產生main函數;(2)Ctrl +k+s 三個鍵一起按,會調出程式碼片段(當需要對程式中代碼加region的話,全部選中代碼,然後按以上三個快速鍵,調出region,會自動包括選中代碼);(3)Home鍵和End鍵:Home鍵會使游標移到當前程式碼的開頭,而End會使游標移到當前程式碼的結尾;這兩個鍵在對長程式碼操作的時候用的比較多;(4)Shift鍵的使用
Time of Update: 2016-06-27
標籤: #region Protected Property protected Regex rLetters { get { return new Regex("[a-zA-Z]{1,}"); } } /// <summary> /// 驗證數字 /// </summary> protected Regex rDigit { get { return new Regex("[0-9]{1,}"); }
Time of Update: 2016-06-27
標籤:0、常用方法Navigate(string urlString):瀏覽urlString表示的網址Navigate(System.Uri url):瀏覽url表示的網址Navigate(string urlString, string targetFrameName, byte[] postData, string additionalHeaders):
Time of Update: 2016-07-02
標籤:
Time of Update: 2016-07-02
標籤: 對C/C++程式員來說,管理和使用虛擬儲存空間可能是個困難的, 容易出錯的任務。與儲存空間有關的錯誤屬於那些令人驚恐的錯誤, 因為它們在時間和空間上, 經常是在距錯誤源一段距離之後才表現出來。 將錯誤的資料寫到錯誤的位置, 你的程式可能在最終失敗之前運行了好幾個小時,且使程式中止的位置距離錯誤的位置已經很遠啦。而避免這種噩夢的最好方法就是防範於未然。 幸好《深入理解電腦系統》中有一段講: C程式中常見的記憶體操作有關的10種典型編程錯誤,十分經典, 因此抄寫在此,
Time of Update: 2016-07-01
標籤:[添加指令碼(Move)]//該指令碼掛在img的父物體上using UnityEngine;using System.Collections;using UnityEngine.UI;//定義枚舉public enum Tools{ 空, 塞尺}public class Move : MonoBehaviour { //放置img的父物體(表單,如所示) public GameObject LittleWin1; public
Time of Update: 2016-07-01
標籤:獲得資源的介面 /*NSString *img1 = [[NSBundle mainBundle] pathForResource:@"ad_1" ofType:@"png"]; NSString *img2 = [[NSBundle mainBundle] pathForResource:@"ad_1"
Time of Update: 2016-06-28
標籤:Cocoa和Object-c是蘋果公司OS
Time of Update: 2016-06-27
標籤:c庫函數和系統調用的區別Linux下對檔案操作有兩種方式:系統調用(system call)和庫函數調用(Library functions)fork完後:(1)有兩個傳回值,子進程返回0,父進程返回子進程的id(2)父子進程誰先運行不確定,由調度系統說了算,但是期望子進程先退出,並且父進程在子進程退出時讀取子進程的狀態(3)代碼地區: 列印與迴圈的關係,例如父子進程各自++,第一次列印2個,第二次由2變4,一共列印6次Fopen(標準C庫函數提供)——傳回值是FILE*FILE*