上一页 1 2 3 4 5 6 7 8 ··· 15 下一页

2014年11月14日

mysql引擎

摘要: MySQL常用的存储引擎为MyISAM、InnoDB、MEMORY,其中InnoDB提供事务安全表,其他存储引擎都是非事务安全表。MyISAM是MySQL的默认存储引擎。MyISAM不支持事务、也不支持外键,但其访问速度快,对事务完整性没有要求。InnoDB存储引擎提供了具有提交、回滚和崩溃恢复能力... 阅读全文

posted @ 2014-11-14 23:15 kangbry 阅读(325) 评论(0) 推荐(0) 编辑

socket可读可写

摘要: 一、 下列四个条件中的任何一个满足时,socket准备好读: 1.socket接收缓冲区中已经接收的数据的字节数大于等于socket接收缓冲区低潮限度的当前值;对这样的socket的读操作不会阻塞,并返回一个大于0的值(即:准备好读入的数据的字节数).我们可以用socket选项SO_RCVLOWAT... 阅读全文

posted @ 2014-11-14 20:54 kangbry 阅读(388) 评论(0) 推荐(0) 编辑

2014年11月13日

中文字符

摘要: #include#include #include using namespace std;void char2Hex(char c) // 将字符以16进制表示{ char ch = ((c&0xF0)>>4)+'0'; // char ch = c/0x10 + '0'; // 汉字占两位 ... 阅读全文

posted @ 2014-11-13 21:18 kangbry 阅读(225) 评论(0) 推荐(0) 编辑

哈弗曼编码

摘要: #include "stdafx.h"#include #include #include using namespace std;#define N 5#define M 2*N-1#define MAXINT 100struct Node{ int weight; int parent; in... 阅读全文

posted @ 2014-11-13 13:26 kangbry 阅读(134) 评论(0) 推荐(0) 编辑

erase

摘要: vector(deque)是一个顺序容器,erase后,后面的元素自动前移,后面所有迭代器失效(地址前移)对顺序容器的erase正确操作方法是使用erase的返回值,erase返回被删元素的下一个元素地址。 iterator erase(iterator __position) { if (... 阅读全文

posted @ 2014-11-13 12:17 kangbry 阅读(309) 评论(0) 推荐(0) 编辑

2014年11月12日

a*算法

摘要: #include #include #include using namespace std;#define max_width 10#define max_height 10struct item{ int posx; int posy; item* parent; item() { posx ... 阅读全文

posted @ 2014-11-12 23:09 kangbry 阅读(151) 评论(0) 推荐(0) 编辑

账号系统

摘要: 新账号1 玩家登陆 2 根据db注册返回账号生成hashid,并更新db3 db检测到重复hashid 重新生成账号 直到不重复为止4 重新生成token 并返回登陆成功账号登陆1 根据账号获取hashid2 根据hashid查询db是否存在该用户3 根据db返回密码进行校验4 重新返回token ... 阅读全文

posted @ 2014-11-12 23:07 kangbry 阅读(200) 评论(0) 推荐(0) 编辑

sort unique cut wc

摘要: http://www.cnblogs.com/ggjucheng/archive/2013/01/13/2858385.html 阅读全文

posted @ 2014-11-12 22:15 kangbry 阅读(156) 评论(0) 推荐(0) 编辑

grep命令

摘要: 1.从单个文件中搜索指定的字串grep的基础用法是如下例的从指定的文件中搜索特定的字串。语法:grep "literal_string" filename2.用 grep -i 进行大小写无关的搜索语法:grep -i "string" FILE3.grep -w搜索整个词,而不是词中的部分字串使用... 阅读全文

posted @ 2014-11-12 21:37 kangbry 阅读(155) 评论(0) 推荐(0) 编辑

awk命令

摘要: awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大。简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再进行各种分析处理。使用方法awk '{pattern + action}' {filenames}调用aw... 阅读全文

posted @ 2014-11-12 18:41 kangbry 阅读(152) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 15 下一页

导航