Time of Update: 2018-12-07
<script type="text/javascript">alert("你知道我是怎麼彈出的嗎?");</script>
Time of Update: 2018-12-07
原文連結用途顯示關於對象檔案、可執行檔以及對象檔案庫裡的符號資訊。文法nm [ -A ] [ -C ] [ -X {32|64|32_64}] [ -f ] [ -h ] [ -l ] [ -p ] [ -r ] [ -T ] [ -v ] [ -B | -P ] [ -e | -g | -u ] [ -d | -o | -x | -tFormat ] File ...描述nm 命令顯示關於指定 File 中符號的資訊,檔案可以是對象檔案、可執行檔或對象檔案庫。 如果檔案沒有包含符號資訊,nm
Time of Update: 2018-12-07
原文:http://linuxtoy.org/archives/dtrx.html提取存檔最令人困惑的莫過於面對不同的存檔格式,不僅得選擇合用的存檔提取程式,有時還得搭配各種不同的選項。有了 dtrx 的協助,則可以使我們變得更懶一點,只要記住一個命令就夠了。dtrx 能夠提取 tar、zip、cpio、deb、rpm、gem、7z、cab、lzh、rar、gz、bz2、lzma、xz 等多種存檔格式,甚至還包括遞迴提取功能。要使用 dtrx
Time of Update: 2018-12-07
boost::algorithm學習#include <boost/algorithm/string.hpp>using namespace std;using namespace boost; 一:大小寫轉換1 to_upper() 將字串轉為大寫 Example: string str1(" hello world! "); to_upper(str1); // str1 == " HELLO WORLD! " 2 to_upper_copy()
Time of Update: 2018-12-07
很多時候我都想在自已的代碼中全部使用std::string代替MS的CString來保證我的程式在未來易於移植,但老實說CString比std::string好用很多,每每還是被誘惑了;再看看C#的string,用起來感覺更好。不過有了這個庫 我可以基本抵制住誘惑了... #include <boost/algorithm/string.hpp>
Time of Update: 2018-12-07
gtest 的彩色資訊輸出 + boost.test 的記憶體流失檢測及定位 /* Author : Andrew.Wu [ Created on : 2009/04/29 - Last Modified On : 2009/05/02 ] */ gtest 的彩色資訊顯示看起來比較醒目,boost。test 的記憶體流失檢查很實用。真希望兩個功能在一個庫裡,可以省不少事情。不過如果想在作者們沒有這麼做之前結合使用這兩個功能,下面的方法可以試。 1: #include
Time of Update: 2018-12-07
原文連結Cpp代碼 #include <iostream.h>class Base { public: Base() { mPtr = new int; } ~Base() { delete mPtr; cout<<"Base::Destruction"<<endl;} private: int* mPtr; } ;class Derived : public Base { public: Derived() { mDerived = new
Time of Update: 2018-12-07
原文連結一 C語言中存在著兩種類型轉換:隱式轉換和顯式轉換隱式轉換:不同資料類型之間賦值和運算,函數調用傳遞參數……編譯器完成char ch;int i = ch;顯示轉換:在類型前增加 :(Type)變數 對變數進行的轉換。使用者顯式增加char *pc = (char*)pb;void *ps = (void*)pa;二
Time of Update: 2018-12-07
原文連結純虛函數的作用 在許多情況下,在基類中不能對虛函數給出有意義的實現,而把它聲明為純虛函數,它的實現留給該基類的衍生類別去做。1.首先:強調一個概念 定義一個函數為虛函數,不代表函數為不被實現的函數。定義他為虛函數是為了允許用基類的指標來調用子類的這個函數。 定義一個函數為純虛函數,才代表函數沒有被實現。定義他是為了實現一個介面,起到一個規範的作用,規範繼承這個。類的程式員必須實現這個函數。 2.關於執行個體化一個類: 有純虛函數的類是不可能產生類對象的,
Time of Update: 2018-12-07
雖然網上討論不少BoostRegex的問題,推薦用其他正則庫,但是還是用了下。[code]#include <list>#include <boost/lexical_cast.hpp>#include <boost/regex.hpp> //使用Regex #include <iostream>//#include "../PStringConv/PStringConv.h"#include <string&
Time of Update: 2018-12-07
ready(fn)當DOM載入就緒可以查詢及操縱時綁定一個要執行的函數。這是事件模組中最重要的一個函數,因為它可以極大地提高web應用程式的響應速度。
Time of Update: 2018-12-07
文章目錄 文法描述標誌退出狀態樣本 原文連結 通過除去綁定程式和符號偵錯工具使用的資訊,減少擴充公用對象檔案格式(XCOFF)的對象檔案的大小。文法strip [ -V ] [ -r [ -l ] | -x [ -l ] | -t | -H | -e | -E ] [ -X {32 |64 |32_64 }] [ -- ] File ...描述strip 命令減少 XCOFF 對象檔案的大小。strip 命令從 XCOFF
Time of Update: 2018-12-07
Table 11.3. Predicates Algorithm nameDescriptionFunctionsstarts_withCheck if a string is a prefix of the other onestarts_with()istarts_with() ends_withCheck if a string is a suffix of the other oneends_with()iends_with() containsCheck if a string is
Time of Update: 2018-12-07
我一直是在努力推介boost,因為boost是一塊美玉,但,沒有什麼是完美的。現在,我將暴露出boost的一點瑕疵:boost::timer。雖說是瑕不掩瑜,但瑕疵就是瑕疵。先看一看下面的例子: // win2000 中vc7.1編譯運行 boost::timer t; Sleep(1000); cout << t.elapsed() << endl; // redhat9 中gcc3.2.3編譯運行 boost::timer t;
Time of Update: 2018-12-07
原文地址:http://www.dutor.net/index.php/2010/07/symbol-hard-links/ Linux/Unix中有兩種連結,永久連結和軟連結,均由ln命令來建立。ln -s /home/m/.vimrc /media/Elements/115/vimrc軟連結 軟連結使用ln命令的-s選項建立:1ln -s source filename
Time of Update: 2018-12-07
原文連結在C++中,名稱(name)可以是符號常量、變數、宏、函數、結構、枚舉、類和對象等等。為了避免,在大規模程式的設計中,以及在程式員使用各種各樣的C++庫時,這些標識符的命名發生衝突,標準C++引入了關鍵字namespace(命名空間/名字空間/名稱空間/名域),可以更好地控制標識符的範圍。 MFC中並沒有使用命名空間,但是在.NET架構、MC++和C++/CLI中,都大量使用了命名空間。1)範圍與命名空間l 相關概念與命名空間相關的概念有:n 聲明域(declaration
Time of Update: 2018-12-07
原文地址:http://topic.csdn.net/u/20101128/22/1e6b33b3-2eda-47c2-b437-5df353c05faf.htmljQuery(document).ready(function () { $("div li").click(function(){ alert($(this).prevAll("li").length);//要 prevAll 才行,prev只返回1 });})
Time of Update: 2018-12-07
Table 11.4. Find algorithms Algorithm nameDescriptionFunctionsfind_firstFind the first occurrence of a string in the inputfind_first() ifind_first() find_lastFind the last occurrence of a string in the inputfind_last() ifind_last() find_nthFind the
Time of Update: 2018-12-07
原文連結按照預設規定,只有一個參數的建構函式也定義了一個隱式轉換,將該建構函式對應資料類型的資料轉換為該類對象,如下面所示:class String {String ( const char* p ); // 用C風格的字串p作為初始化值//…}String s1 = “hello”; //OK 隱式轉換,等價於String s1 = String(“hello”); 但是有的時候可能會不需要這種隱式轉換,如下:class String { String ( int n
Time of Update: 2018-12-07
在淺嘗boost之timer的post裡,我提到boost::timer在linux和windows下的不同表現,並用ACE_OS::gettimeofday做了一個替代方案。不過,為了這個功能把ACE的DLL綁到一起,感覺不是那麼愉快。