• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 25,  comments - 0,  trackbacks - 0
            export LD_LIBRARY_PATH=/usr/local/lib64
            即可就是把libSlice.so.34庫的位置找出來
            posted @ 2012-07-05 17:26 nk_ysg 閱讀(574) | 評論 (0)編輯 收藏
            C++的編譯
            1.svn checkout http://protobuf.googlecode.com/svn/trunk/ protobuf
            2.cd protobuf
            3../autogen.sh
            4.autoconf產生configure腳本
            5../configure
            6.make && make check && make install

            Python Install
            1.python setup.py test
            2.python setup.py install
            posted @ 2012-07-05 11:11 nk_ysg 閱讀(357) | 評論 (0)編輯 收藏
            參考如下文章
            http://blog.csdn.net/hbhhww/article/details/7168507
            http://rdc.taobao.com/blog/cs/?p=455
            posted @ 2012-07-03 17:49 nk_ysg 閱讀(150) | 評論 (0)編輯 收藏
            1.yy復制當前行
            2.yw復制單詞
            3.
            v字元選擇,會將游標經過的地方反白選擇!
            V行選擇,會將游標經過的行反白選擇!
            [Ctrl]+v區塊選擇,可以用長方形的方式選擇資料
            y將反白的地方複製起來
            d將反白的地方刪除掉

            塊注釋

            #用v進入virtual模式
            #用上下鍵選中需要注釋的行數

            1.插入注釋:
            按Control+v進入列模式
            按大些“I”進入插入模式,輸入注釋符“#”,然后立刻按下ESC

            2.刪除注釋
            先按Control+v進入列模式
            選中要刪除的注釋符,然后按d ,進行刪除
            3.加入python.vim 這些東西存放在/usr/share/vim/vim72/syntax/里面


            posted @ 2012-07-02 10:24 nk_ysg 閱讀(188) | 評論 (0)編輯 收藏

            http://blog.csdn.net/hjmhjms/article/details/1521357 
            ACE的安裝是一件比較麻煩的事情,這里簡單的記錄了我在VS2008下安裝ACE的過程,希望能給大家一個參考。

            1. 安裝環境:
              1. 操作系統:Win 7旗艦版
              2. 編譯環境:VS2008中文版
              3. ACE版本:ACE-5.5.1
            2. 安裝過程:
              1. 下載安裝包。
                1. Ace的安裝文件可以在http://download.dre.vanderbilt.edu/中下載到,由于我是在windows環境下安裝并且不需要TAO等其它庫,便下載了ACE-5.5.1.zip。
                2. 下載完成后將其解壓。我的解壓路徑為D:\Develop\ACE_wrappers。
              2. 設置環境變量
                1. 在操作系統添加一個名為ACE_ROOT的用戶環境變量,值為剛才ace的解壓路徑D:\Develop\ACE_wrappers
                2. 添加用戶的Path環境變量,值為%ACE_ROOT%\lib,這樣才能保證系統能找到ace生成的動態連接庫。
                3. 設置VS2005的C++開發項目信息,依次打開菜單 工具-選項-項目和解決方案-VC++目錄 ,在右側目錄列表中選擇"包含目錄",添加$(ACE_ROOT),在右側目錄列表中選擇"庫文件",添加$(ACE_ROOT)\lib
              3. 編譯ACE
                1. ACE_ROOT\ace目錄創建一個名為 config.h的文件。編輯文件并加入以下內容
                  #include "ace/config-win32.h"
                  表明當前是在win32的環境下進行ace的項目。
                2. 進入ACE_ROOT\ace目錄中,能發現ACE現在已經帶VS2005的編譯項目了,直接打開ace_vc9.sln,直接生成ACE項目的Debug版和Release版,編譯過程還比較快,大概就幾分鐘的樣子。編譯鏈接完成后,在ACE_ROOT\lib中一共生成了四個文件,分別是"ACE.dll","ACE.lib", "ACEd.dll","ACEd.lib",其中帶"d"表示的是Debug版本。
            posted @ 2012-06-26 11:32 nk_ysg 閱讀(559) | 評論 (0)編輯 收藏
            gdb 打印數組s的i到j之間的內容,假設s的元素類型為T
            p *(s+i)@(j-i+1)*sizeof(T)

            也就是print *name@len
            posted @ 2012-06-06 10:43 nk_ysg 閱讀(1574) | 評論 (0)編輯 收藏
            /*
            */
            #include <iostream>
            using namespace std;

            /*
            注意到對于gcd(a,b) = d 我們對(a, b)用歐幾里德輾轉相除會最終得到
            (d, 0)此時對于把a =d, b = 0 帶入a*x + b*y = d,顯然x = 1,y可以為任意值,
            這里y可以為任意值就意味著解會有無數個。我們可以用a = d, b = 0的情況逆推出來
            任何gcd(a, b) = d 滿足a*x + b*y = d的解。如果x0, y0是b*x + (a%b)*y = d 的解,
            那么對于a*x + b*y = d的解呢?
            b*x0 + (a%b)*y0 = d => b*x0 + (a - [a/b]*b)*y0 = a*y0 + b*(x0 - [a/b]*y0),
            所以a*x + b*y = d的解x1 = y0, y1 = x0 - [a/b]*y0; 這樣我們可以程序迭帶了。
            */
            int extEuclid(int a, int b, int &x, int &y)
            {
                if (b == 0)
                {
                    x = 1;
                    y = 0;
                    return a;
                }
                int d = extEuclid(b, a % b, x, y);
                int iTemp = x;
                x = y;
                y = iTemp - (a / b)* y;
                return d;
            }
            //解同余方程ax = b(mod n) (返回最小的正數x)

            int modularLinearEquation(int a, int b, int n)
            {
                //等價于求ax + cn = b;
                
            //先求a*x1 + c1*n = gcd(a, n)
                int x, y, d;
                d = extEuclid(a, n, x, y);
                if (b % d != 0)
                   return -1;
                x = x * (b / d);
                x = (( x % n) + n) % n;
                return x;
            }

            //中國剩余定理,推導都是數學
            int solModularEquations(int b[], int m[], int k)
            {

                int iTemp;
                int y;
                int result;

                int M = 1;
                for (int i = 0; i < k; i++)
                  M *= m[i];

                result = 0;
                for (int i = 0; i < k; i++)
                {
                  iTemp = M / m[i];
                  y = modularLinearEquation(iTemp, 1, m[i]);
                  result = (result + b[i] * iTemp * y) % M;
                }
                return result;
            }

            int main()
            {
                int x, y , d;
                d = extEuclid(1001, 767, x, y);
                cout << x << endl;
                cout << y << endl;
                cout << d << endl;
                cout << "1001 * x + 767 * y = " << (1001 * x + 767 * y) << endl;
                cout << modularLinearEquation(3, 2, 100) << endl;
                return 0;
            }
            posted @ 2012-06-02 14:31 nk_ysg 閱讀(468) | 評論 (0)編輯 收藏

            set fileencodings=ucs-bom,utf-8,GB18030,gbk

            ucs- bom是unicode編碼的一種,類似utf8,將其和utf8放在最前面是因為,vim在試圖用ucs-bom或utf-8來讀文件的時候,如果發現錯誤則選用后續編碼來讀文件,而vim卻不能根據gbk和gb18030進行錯誤識別。沒有gb2312?因為在vimrc中設置gb2312根本沒用。基于這個設置,來操作下;

            posted @ 2012-05-09 10:00 nk_ysg 閱讀(469) | 評論 (0)編輯 收藏
            find . -name "*.h" -o -name "*.c" -o -name "*.cc" > cscope.files
            cscope -bkq -i cscope.files
            posted @ 2012-05-08 15:13 nk_ysg 閱讀(258) | 評論 (0)編輯 收藏
            mysql> desc tb_user_anonymous_history;
            +----------------+---------------------+------+-----+---------+-------+
            | Field          | Type                | Null | Key | Default | Extra |
            +----------------+---------------------+------+-----+---------+-------+
            | u              | char(64)            | NO   | PRI | NULL    |       |
            | day_index      | int(10) unsigned    | NO   | PRI | 0       |       |
            | last_fight_day | int(10) unsigned    | NO   |     | 0       |       |
            | fight_win      | tinyint(3) unsigned | NO   |     | 0       |       |
            | fight_total    | tinyint(3) unsigned | NO   |     | 0       |       |
            +----------------+---------------------+------+-----+---------+-------+
            select u,sum(fight_total) as total from tb_user_anonymous_history  where last_fight_day>=20120423 and last_fight_day <=20120424  group by u having total >= 12;
            posted @ 2012-05-02 10:56 nk_ysg 閱讀(289) | 評論 (0)編輯 收藏
            僅列出標題
            共3頁: 1 2 3 
            <2025年7月>
            293012345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789

            常用鏈接

            留言簿

            隨筆分類

            隨筆檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            欧美va久久久噜噜噜久久| 精品久久久久久无码不卡| 国产色综合久久无码有码| 久久超乳爆乳中文字幕| 久久精品国产半推半就| 亚洲精品tv久久久久久久久久| 精品久久久久久久国产潘金莲 | 午夜精品久久久久久久无码| 精品国产乱码久久久久久人妻| 国产午夜免费高清久久影院| 久久久精品国产Sm最大网站| 亚洲AV日韩AV永久无码久久| 国产成人久久777777| 国产69精品久久久久久人妻精品| 国产精品久久久久久| 久久久国产打桩机| 午夜精品久久久久9999高清| 国内精品人妻无码久久久影院 | 亚洲国产精品无码久久久秋霞2| 久久亚洲高清观看| 热re99久久精品国99热| 久久久久综合国产欧美一区二区| 色欲久久久天天天综合网精品| 久久久久久噜噜精品免费直播 | 中文字幕人妻色偷偷久久| 久久精品国产99国产精品| 97久久天天综合色天天综合色hd| 伊人热热久久原色播放www | 久久精品无码一区二区app| av无码久久久久久不卡网站| 久久精品国产乱子伦| 无码任你躁久久久久久老妇| 久久久久国色AV免费看图片| 国产精久久一区二区三区| 久久99精品国产99久久6男男| 奇米综合四色77777久久| 久久精品中文字幕大胸| 久久香综合精品久久伊人| 亚洲精品美女久久久久99小说 | 亚洲综合精品香蕉久久网97| 国产精品岛国久久久久|