06 2015 档案

c++ std::bitset
摘要:转载自作用:及 64位 移位 取或 用64个位存储64个位,取 或 merge 。 然后查索引即知道id是否存在~~ 目标:省空间。#include #include #include using namespace std;int main(){ //bitset b;/... 阅读全文

posted @ 2015-06-26 16:16 雨渐渐 阅读(2647) 评论(0) 推荐(0) 编辑

c++ std::string 用法
摘要:std::string用法总结 在平常工作中经常用到了string类,本人记忆了不好用到了的时候经常要去查询。在网上摘抄一下总结一下,为以后的查询方便:string类的构造函数:string(const char *s); //用c字符串s初始化string(int n,char c); //用n个... 阅读全文

posted @ 2015-06-25 18:37 雨渐渐 阅读(3587) 评论(0) 推荐(0) 编辑

c++ 关于换行符
摘要:windows: \r\nlinux: \nmac: \rhttp://blog.chinaunix.net/uid-12706763-id-10830.html不同的OS有不同的换行符:OS换行符汉字码UNIXLFJIS, EUC, (ShiftJIS)WindowsCR+LFShiftJ... 阅读全文

posted @ 2015-06-25 14:53 雨渐渐 阅读(5090) 评论(0) 推荐(0) 编辑

protocol buffer 整数序列化
摘要:http://blog.csdn.net/csfreebird/article/details/7624807varints用于正整数 (无符号整数)varints 是 一个很不错的技术。将一个整数序列化成1或者多个字节。想起以前我们总是使用4字节表示整数,真的很浪费啊。只有真正追求完美的人才会重视... 阅读全文

posted @ 2015-06-24 19:17 雨渐渐 阅读(601) 评论(0) 推荐(0) 编辑

c++ freelockquque
摘要:http://www.boost.org/doc/libs/1_56_0/doc/html/boost/lockfree/queue.htmlClass template queueboost::lockfree::queueSynopsis// In header: template class ... 阅读全文

posted @ 2015-06-23 12:11 雨渐渐 阅读(468) 评论(0) 推荐(0) 编辑

c++ 继承多个类 及虚函数
摘要:#include using namespace std;class BaseA {public: virtual void say() { cout << "hello world" << endl; }};class BaseB {public: virtual void eat() { cou... 阅读全文

posted @ 2015-06-18 21:14 雨渐渐 阅读(8547) 评论(0) 推荐(1) 编辑

c++ 从标注输入流读取行
摘要:#include #include #include #include #include #include int main() { //std::string bns = "list://cp01-spi-fresh2.cp01.baidu.com:8004"; std::string... 阅读全文

posted @ 2015-06-18 15:53 雨渐渐 阅读(633) 评论(0) 推荐(0) 编辑

文本编辑器 markdown
摘要:http://www.cnblogs.com/youxia/p/linux014.htmlmarkdown对数学公式的支持http://www.linuxidc.com/Linux/2014-08/104996.htm 阅读全文

posted @ 2015-06-16 16:35 雨渐渐 阅读(217) 评论(0) 推荐(0) 编辑

混乱的url编码||URL编码解码问题
摘要:转载自:http://www.ruanyifeng.com/blog/2010/02/url_encoding.html一。问题的由来。url就是网址,只要上网就一定会用到。一般来说,URL只能使用英文字母,阿拉伯数字和某些标点符号,不能使用其他文字和符号。比如,世界上有英文字母的网址,http:/... 阅读全文

posted @ 2015-06-15 11:32 雨渐渐 阅读(788) 评论(0) 推荐(0) 编辑

待买书籍
摘要:http://item.jd.com/11666319.html 贝叶斯思维 阅读全文

posted @ 2015-06-10 14:24 雨渐渐 阅读(106) 评论(0) 推荐(0) 编辑

无root权限安装python
摘要:http://lujialong.com/?p=150pipe 安装第三方包http://www.lfd.uci.edu/~gohlke/pythonlibs/#piphttp://www.cnblogs.com/ShepherdIsland/p/4239052.html最近在刚分的主机操作,发现p... 阅读全文

posted @ 2015-06-08 20:54 雨渐渐 阅读(2035) 评论(0) 推荐(0) 编辑

python 函数默认值的小坑啊
摘要:import datetimeimport timedef test(day=datetime.datetime.now()): print daywhile True: test() time.sleep(1)run result:2015-06-05 16:52:47.106... 阅读全文

posted @ 2015-06-05 16:55 雨渐渐 阅读(147) 评论(0) 推荐(0) 编辑

python 日期转星期
摘要:import timeimport datetimetoday = int(time.strftime('%w'))print todayanyday = datetime.datetime(2012, 04, 22).strftime('%w')print anyday 阅读全文

posted @ 2015-06-03 10:36 雨渐渐 阅读(1023) 评论(0) 推荐(0) 编辑

sed 命令
摘要:sed 's/http:\/\///g' | sed 's/https:\/\///g' 阅读全文

posted @ 2015-06-01 14:41 雨渐渐 阅读(165) 评论(0) 推荐(0) 编辑

导航