原创 stl_hash_set.h

stl_hash_set.h // Filename: stl_hash_set.h // Comment By: 凝霜 // E-mail: [email protected] // Blog: ht

原创 stl_algobase.h

stl_algobase.h // Filename: stl_algobase.h // Comment By: 凝霜 // E-mail: [email protected] // Blog: ht

原创 Makefile經典教程(掌握這些足夠)

 再正式進入講解之前插入一個多級目錄編譯的小例子: mkdir rootdir cd rootdir  mkdir subdir1 mkdir subdir2 rootdir 下面的Makefile文件內容如下: SUBDIRS = su

原创 HTTP協議詳解(真的很經典)

 轉自:http://blog.csdn.net/gueter/archive/2007/03/08/1524447.aspx Author :Jeffrey 引言                                  

原创 DNS解析過程詳解

 先說一下DNS的幾個基本概念: 一. 根域 就是所謂的“.”,其實我們的網址www.baidu.com在配置當中應該是www.baidu.com.(最後有一點),一般我們在瀏覽器裏輸入時會省略後面的點,而這也已經成爲了

原创 stl_hash_map.h

stl_hash_map.h // Filename: stl_hash_map.h // Comment By: 凝霜 // E-mail: [email protected] // Blog: h

原创 stl_hashtable.h

stl_hashtable.h // Filename: stl_hashtable.h // Comment By: 凝霜 // E-mail: [email protected] // Blog:

原创 查看gcc的默認宏定義命令

   有些時候我們在編寫代碼或者閱讀開源項目時經常會遇到一些陌生的宏定義,在找遍所有源代碼都沒發現其在哪裏被定義過,這時這些宏定義很可能是系統編譯器自己定義的,例如 [cpp] view plaincopyprint? #i

原创 vector 釋放內存 swap

 http://blog.csdn.net/jerryjbiao/article/details/7389233  相信大家看到swap這個詞都一定不會感到陌生,甚至會有這樣想法:這不就是簡單的元素交換嘛。的確,swap交換函數

原创 boost::implicit_cast

 boost::implicit_cast 在stackoverflow上看到這個帖子, 於是發現了boost::implicit_cast這個小東西. 先來看看這段代碼: struct top {}; struct mid_a :

原创 Boost智能指針——scoped_ptr

 Boost智能指針——scoped_ptr boost::scoped_ptr和std::auto_ptr非常類似,是一個簡單的智能指針,它能夠保證在離開作用域後對象被自動釋放。下列代碼演示了該指針的基本應用: #includ

原创 CAS原子操作實現無鎖及性能分析

Author:Echo Chen(陳斌) Email:[email protected] Blog:Blog.csdn.net/chen19870707 Date:Nov 13th, 2014 最近在研究nginx

原创 LINUX內核內存屏障

      =================                          LINUX內核內存屏障                          ================= By:

原创 cmake 學習筆記(三)

學習一下cmake的 finder。 finder是神馬東西? 當編譯一個需要使用第三方庫的軟件時,我們需要知道: 去哪兒找頭文件 .h 對比GCC的 -I 參數 去哪兒找庫文件 (.so/.dll/.lib/.d

原创 Raft協議實戰之Redis Sentinel的選舉Leader源碼解析

http://www.blogjava.net/jinfeng_wang/archive/2016/12/14/432108.html Raft協議是用來解決分佈式系統一致性問題的協議,在很長一段時間,Paxos被認爲是解決分佈式系