原创 signal SIGCHLD

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <pthread.h> #include <signal.h>

原创 telnet protocol related RFCs

There are also some draft about telnet before rfc854.   RFC854 - Telnet Protocol Specificationhttp://www.faqs.org/ftp/r

原创 多級目錄中的Makefile

以下示例演示瞭如何在多級目錄下維護多個Makefile,以使每級目錄都可單獨支持'make'命令。   目錄結構: [user@localhost maketest]$ tree . |-- Makefile --- Makefile 1

原创 4 type cast operators in C++

摘自《高質量程序設計指南》第3版(林銳,韓永泉)263頁。 C++新增了4個類型轉換運算符,它們是: 1.       static_cast<dest_type>(src_obj),作用相當於C風格的強制轉換,但是在多重繼承的情況下,它

原创 ASKING FOR AND GIVING OPINIONS (from www.globalenglish.com)

Asking for Opinions We use these expressions when we want to ask what another person thinks about something. All these

原创 敏捷軟件開發(Agile Software Development)

敏捷軟件開發(Agile Software Development) From 《敏捷軟件開發 原則、模式與實踐》(Agile Software Development: Principles, Patterns, and Practic

原创 RTTI in C++

  RTTI(Runtime Type Identification/Information)   如果要實現運行時的RTTI,必須在類中加入一些唯一識別信息,靜態成員變量則提供了這樣一種方法。對於類而言,靜態成員的地址信息是唯一確定的,

原创 註冊

 2009年9月9日夜,決定在CSDN上註冊這個ID,希望從這裏一切會有新的開始...  剛剛註冊的時候發現了csdn的一個bug,不過並無太大危害,看來開發人員的測試不夠全面啊。

原创 Useful cmds under Linux

1. 'nm', 'eu-readelf' and 'c++filt'  Example code: #include <iostream> using namespace std; class Test { public: st

原创 A design & implementation of reflection in C++

Reflection in C++ 前幾天看一個java演示的設計模式講解視頻,裏面提到了java中的反射機制,感覺反射這個東西很有意思,於是心血來潮想寫一個C++中的反射。 反射機制可以簡單地理解爲:當需要一個類型的實例時,根據類型的名

原创 C++中的new和delete

C++中的new/delete運算符有兩種含義: 1.  new/delete operator,內置的運算符(即new和delete這兩個keywords),用來分配內存(需要調用2中描述的運算符)並初始化變量/對象(調用構造函數等)。

原创 TCP/IP memo 1: MTU、路徑MTU、路徑MTU的發現機制

(以下內容摘自《TCP/IP詳解 卷1:協議》) MTU及路徑MTU 以太網和802.3對數據幀的長度都有一個限制,其最大值分別是1500(46~1500)和1492字節。鏈路層的這個特性稱作MTU,最大傳輸單元。不同類型的網絡大多數都有

原创 VirtualBox 3.2.12 + openSUSE 11.2 + VBoxLinuxAdditions

1) Maybe you need to install all these required packages > zypper install gcc gcc-c++ make kernel-source [linux-kernel-

原创 ~/.vimrc

Remember to convert EOL(end of line) to Unix format when you copy the following content !   --------------------------

原创 getopt under Linux

#include <stdio.h> #include <unistd.h> void mygetopt(int argc, char *argv[], const char *optstr) { extern char *opta