- 博客(7)
- 收藏
- 关注
原创 zookeeper
资料 zookeeper doc 简介 ZooKeeper: A Distributed Coordination Service for Distributed Applicationsfeature: high performance, highly available, strictly ordered access. watches 服务器有修改,通知所有watch的客户端o
2016-08-16 10:09:15 113
原创 boost
lamda #include <boost/lamda.hpp> std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " );bind #include <boost/bind.hpp>boost:bind(f,x,_1)()//x=1 不能出现常数_1 和 lamda歧义,现在还没搞定fun
2016-08-10 15:28:22 190
原创 python基础1
os.walk 如果不使用这个方法,遍历同样能达到效果.不过使用 os.walk 方便很多了.这个方法返回的是一个三元tupple(dirpath, dirnames, filenames), 其中第一个为起始路径, 第二个为起始路径下的文件夹, 第三个是起始路径下的文件. dirpath是一个string,代表目录的路径, dirnames是一个list,包含了dirpath下所有
2016-07-26 18:15:32 91
原创 c++内存分配陷阱
资源获取就是初始化auto_ptr 不能指向数组,不能用于vector,拷贝会清空之前的对象auto_ptr<Employee> e1(new Hourly);auto_ptr<Employee> e2(e1);//e1 is nulle1=e2;//e2 is null throw 抛出局部对象,而不是指针,最好是匿名对象
2016-07-22 12:03:28 120
原创 c++模版编程实例
map转字符串的工具类#ifndef STRUTIL__#define STRUTIL__#include <string>#include <sstream>#include <map>#include <vector>class StrUtil{ public: template <typename T1,typename T2> static std::string
2016-07-19 10:44:22 110
原创 cmake 一
学习资料 cmake.pdf写一个最简化的 CMakeLists.txt:PROJECT(HELLO)ADD_EXECUTABLE(hello main.c)开始构建 内部构建,不推荐,生成的大量cache文件,影响代码观赏cmake .make外部构建,生成的cache在build目录下。#创建build目录mkdir buildcd buildcmake ..make
2016-07-15 14:47:19 148
原创 git 配置新的源
gitgit remote rm origin git remote add origin git@github.com:Liutos/foobar.gittestgit remote -v
2016-07-14 14:40:24 202
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人