上一页 1 2 3 4 5 6 ··· 57 下一页

2015年12月3日

c++ >>

摘要: _bit = new char[(_bit_arr_length >> 3) + 1]; if (_bit == NULL) {std::cout << "malloc failed" << std::endl; _success = false;return;} memset(_bit, 0, ( 阅读全文

posted @ 2015-12-03 23:20 雨渐渐 阅读(198) 评论(0) 推荐(0) 编辑

2015年11月27日

c++ ip地址相关

摘要: #include #include #include #include #include #include #define NUM 20void *working(void *args) { in_addr* inaddr = (in_addr* )args; //inaddr.s_ad... 阅读全文

posted @ 2015-11-27 18:49 雨渐渐 阅读(293) 评论(0) 推荐(0) 编辑

2015年11月26日

c++ ip地址的操作 c版

摘要: http://blog.csdn.net/cpp_funs/article/details/69881541、htonl ()和ntohl( )u_long PASCAL FAR ntohl (u_long netlong);u_short PASCAL FAR ntohs (u_short net... 阅读全文

posted @ 2015-11-26 19:05 雨渐渐 阅读(1230) 评论(0) 推荐(0) 编辑

2015年11月25日

c++ 缺少动态库

摘要: http://www.cnblogs.com/smartvessel/archive/2011/01/21/1940868.html总结下来主要有3种方法:1. 用ln将需要的so文件链接到/usr/lib或者/lib这两个默认的目录下边ln -s /where/you/install/lib/*.... 阅读全文

posted @ 2015-11-25 21:06 雨渐渐 阅读(439) 评论(0) 推荐(0) 编辑

2015年11月18日

c++ dirname() basename()

摘要: http://linux.about.com/library/cmd/blcmdl3_dirname.htm#include #include int main(void) { char *path = "../conf/pipe_client.conf"; std::cout << p... 阅读全文

posted @ 2015-11-18 21:23 雨渐渐 阅读(4209) 评论(0) 推荐(0) 编辑

shell ulimit -n

摘要: 通过ulimit -n命令可以查看linux系统里打开文件描述符的最大值,一般缺省值是1024, 阅读全文

posted @ 2015-11-18 15:05 雨渐渐 阅读(350) 评论(0) 推荐(0) 编辑

shell 进程查询相关的命令

摘要: 同一个进程部署多个,如何知道删除哪个:ll /proc/61147会显示位置查看pid下哪些socket链接ll /proc/61147/fd 阅读全文

posted @ 2015-11-18 14:49 雨渐渐 阅读(224) 评论(0) 推荐(0) 编辑

shell grep 高亮

摘要: grep "socket" a --color=auto 阅读全文

posted @ 2015-11-18 14:45 雨渐渐 阅读(394) 评论(0) 推荐(0) 编辑

2015年11月17日

c++ swap 函数

摘要: 转载地址1,最通用的模板交换函数模式:创建临时对象,调用对象的赋值操作符。 template void swap ( T& a, T& b ) { T c(a); a=b; b=c; } 需要构建临时对象,一个拷贝构造,两次赋值操作。2,针对int型... 阅读全文

posted @ 2015-11-17 15:10 雨渐渐 阅读(1201) 评论(0) 推荐(0) 编辑

堆排序

摘要: 转载自:http://blog.csdn.net/caimo/article/details/7783970堆堆是一个完全二叉树的数组对象。树每一层都是满的,最后一层可能除外(从一个节点的左子树开始填)。给定节点 i ,可以很容易计算父节点和子节点的位置。Parent(i) =floor(i/2) ... 阅读全文

posted @ 2015-11-17 08:55 雨渐渐 阅读(151) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 57 下一页

导航