首页
归档
标签
RSS
c++智能指针
2020-10-13
文章来源:https://www.zhihu.com/question/319277442/answer/1517987598 std::unique_ptr std::unique_ptr 对其持有的堆内存具有唯一拥有权,也就是说引用计数...
查看
Redis持久化RDB和AOF
2020-10-11
Redis 还可以同时使用 AOF 持久化和 RDB 持久化。 在这种情况下, 当 Redis 重启时, 它会优先使用 AOF 文件来还原数据集, 因为 AOF 文件保存的数据集通常比 RDB 文件所保存的数据集更完整。你甚至可以关闭持久...
查看
Redis的RDB和AOF选择
2020-10-11
aof,rdb是两种 redis持久化的机制,用于crash后,redis的恢复。 rdb特性 写操作频繁的时候,不启用备份来换取更高的性能,待手动运行save的时候,再做备份. fork一个进程,遍历hash table,利用co...
查看
c++ 宏
2020-10-11
https://github.com/Light-City/CPlusPlusThings/tree/master/basic_content/macro 字符串化操作符“#” 如果熟悉 C++ 宏的小伙伴,可能知道里面有个 # 的用法,...
查看
std::string 转 std::wstring
2020-10-11
inline std::wstring StringToWString(const std::string& str) { int len = ::MultiByteToWideChar(CP_ACP, 0, str.c_str...
查看
C++11函数返回多个不同类型的值, std::tuple
2020-10-10
std::tuple<bool, std::vector<std::string> > find_urls(const std::string& content) { ... return std:...
查看
C++11函数返回多个不同类型的值
2020-10-10
std::tuple<bool, std::vector<std::string> > find_urls(const std::string& content) { ... return std:...
查看
C++11:参数按成员函数启动线程
2020-10-08
使用非静态类成员上述作为线程启动函数 #include <thread> #include <atomic> class Task { public: Task(){ cnt_thread.store(0...
查看
功能日志回调接口
2020-09-27
功能日志接口 // 定义一个输出接口 void on_error(std::function<void(std::string const&)> const& callback) { m_err_call...
查看
C++11新特性
2020-09-23
转自:https://zhuanlan.zhihu.com/p/139515439 auto & decltype https://zhuanlan.zhihu.com/p/137662774 左值右值 https://zhuanl...
查看
上一页
下一页