11 2015 档案
摘要:std::mutex m; std::condition_variable cond; int flag = 0; constexpr int kLoopTimes = 10; void foo(int id){ for (int i = 0; i != kLoopTimes; ++i){ std:
阅读全文
摘要:安装方法十分简单,打开 mysql 后输入 \. .../.../employees.sql; 就可以。吗?然后就遇到问题了,第一个是这样,我输入上面的代码之后,给我的是这个:Access denied for user为啥呢? 因为没有以 root 的身份登录,只需要这样登录就可以; mysql ...
阅读全文
摘要:templateIterator parallelFind(Iterator first, Iterator last, MatchType match){ struct FindElement { void operator()(Iterator begin, Itera...
阅读全文
摘要:const std::string getCurrentSystemTime(){ auto tt = std::chrono::system_clock::to_time_t (std::chrono::system_clock::now()); struct tm* ptm = local...
阅读全文
摘要:class ThreadsJoiner{ std::vector& threads;public: ThreadsJoiner(std::vector& threads_): threads(threads_) {} ~ThreadsJoiner() ...
阅读全文
浙公网安备 33010602011771号