2013年7月27日
摘要: using Windows.Networking.Connectivity; public String GetIPString() { String ipString = String.Empty; var icp = NetworkInformation.GetInternetConnectionProfile(); if (icp != null && icp.NetworkAdapter != null) { var hostname = ... 阅读全文
posted @ 2013-07-27 15:14 Simon Han 阅读(357) 评论(0) 推荐(0) 编辑
  2013年5月7日
摘要: What is the difference between UDP and TCP internet protocols?byNIXCRAFTonMAY 15, 2007·62 COMMENTS· last updated atDECEMBER 16, 2007Q. Can you explain the difference between UDP and TCP internet protocol (IP) traffic and its usage with an example?A. Transmission Control Protocol (TCP) and 阅读全文
posted @ 2013-05-07 21:27 Simon Han 阅读(585) 评论(0) 推荐(0) 编辑
  2013年4月15日
摘要: Some good books and website for multithreading programming.Windows via C/C++by Jeffrey M. Richter and Christopher Nasarre. (The book is not only about multithreading but has got a good section devoted to it.)Effective Concurrencyby Herb Sutter.He also is running his own blog ashttp://herbsutter.comC 阅读全文
posted @ 2013-04-15 20:18 Simon Han 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Some good books and website for multithreading programming.Windows via C/C++by Jeffrey M. Richter and Christopher Nasarre. (The book is not only about multithreading but has got a good section devoted to it.)Effective Concurrencyby Herb Sutter.He also is running his own blog ashttp://herbsutter.comC 阅读全文
posted @ 2013-04-15 20:18 Simon Han 阅读(164) 评论(0) 推荐(0) 编辑
  2013年4月14日
摘要: stl提供了三个最基本的容器:vector,list,deque。vector和built-in数组类似,它拥有一段连续的内存空间,并且起始地址不变,因此它能非常好的支持随即存取,即[]操作符,但由于它的内存空间是连续的,所以在中间进行插入和删除会造成内存块的拷贝,另外,当该数组后的内存空间不够时,需要重新申请一块足够大的内存并进行内存的拷贝。这些都大大影响了vector的效率。list就是数据结构中的双向链表(根据sgistl源代码),因此它的内存空间可以是不连续的,通过指针来进行数据的访问,这个特点使得它的随即存取变的非常没有效率,因此它没有提供[]操作符的重载。但由于链表的特点,它可以以 阅读全文
posted @ 2013-04-14 14:23 Simon Han 阅读(166) 评论(0) 推荐(0) 编辑