原创 Proverb

          Time flies. 光陰似箭.    Time is life. 時間就是生命.    Times change. 時代在改變

原创 Identify

ID as the unique identifier of the message is generated by the client .  The client uses it to keep track of the messag

原创 first-chance exception

 The first-chance exception can be ignored because it is safely handled by the operating system. INFO: First and Second

原创 設計思路

當用戶註冊時,不僅僅在數據庫的Register表中記錄下註冊信息,而且創建一張以用戶名命的表,用於存放狀態被訂閱的信息。用戶登入時,加載用戶的這張表到一個哈希表當中。當一個客戶端發來一個message 的時候,首先查看接收方是否avail

原创 The promise of MOM based on XMPP

I just want to write a server based on XMPP for communication with different people all over the world Originally. Grad

原创 Cognition of the agsXMPP

What the XMPP protocol depict ,In fact, it is totally the exchange of the XML datas between the client and server.  Usi

原创 accept a work

This months I accepted a project that write a IM client based on the GLOOX, I was interesting in Jabber and also did so

原创 VC中使用STL出現的警告.

當在使用STL時,VC有時會提出類似以下的警告:Compiling...test.cppC:/Windows/Desktop/test/test.cpp(13) : warning C4786: 'std::reverse_iterato

原创 Use SVN to manage your code

@echo off rem Create depot rem ------------------------- rem svnadmin create C:/depot rem Run depot rem --------------

原创 Dos批處理中符號作用大全

@ //隱藏命令的回顯。 ~ //在for中表示使用增強的變量擴展; 在set中表示使用擴展環境變量指定位置的字符串; 在set/a中表示按位取反。 % //使用兩個%包含一個字符串表示引用環境變量。比如一

原创 經典批處理分析(一)

 @echo off:: 把下一行的數字複製到前面一行的後面,並用空格分開setlocal enabledelayedexpansionfor /f %%i in (test.txt) do (    se

原创 格式化參數

 #include #include #include void error (lua_State *L, const char *fmt, ...) { va_list arg

原创 Singleton

今天發現singleton的設計模式還有多種不同的實現方法,以前一直這樣使用: static Singleton *GetInstance()...{     if (NULL == instance)  

原创 經典批處理分析(二)

 @echo off:: 保留空行替換字符串:: 當行首有冒號時會拋掉最開始的幾個連續冒號(這個問題可以解決):: 會忽略以分號開頭的行:: 不能正確處理感嘆號(因爲啓用了變量延遲):: code by j

原创 C的優先級口訣

括號成員第一;        //括號運算符[]() 成員運算符.  ->全體單目第二;        //所有的單目運算符比如++、 --、 +(正)、 -(負) 、指針運算*、&乘除餘三,加減四;   //這個"餘"是指取餘運算即%移