10 2019 档案

摘要:template< typename... Args > std::string string_sprintf(const char* format, Args... args) { int length = std::snprintf(nullptr, 0, format, args...); if (length <= 0) { return ""; } char* buf = new cha 阅读全文
posted @ 2019-10-31 15:42 掉头发的666 阅读(5000) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-10-22 18:20 掉头发的666 阅读(775) 评论(0) 推荐(0) 编辑
摘要:shell脚本要求unix换行格式。在win上写好shell后,需先用dos2unix转换过文件才能执行 if语法片段 for语法片段 数组小例 一些踩的坑 阅读全文
posted @ 2019-10-22 14:50 掉头发的666 阅读(124) 评论(0) 推荐(0) 编辑
摘要:简单来说 先对vector sort。。再用 lower_bound( )和upper_bound( ) 利用二分查找加速查找 比如一个vector<string> aList; std::sort(aList.begin(), aList.end()); vector<string>::const 阅读全文
posted @ 2019-10-11 19:58 掉头发的666 阅读(1253) 评论(0) 推荐(0) 编辑
摘要:今天突然想到个问题。 这种写法情况下。mLongInt和mPairx的性能差距大不大。。然后就用vs写了个测试.测试结果还好。100W次insert差个1S多、find差个1s左右。。 记录下 阅读全文
posted @ 2019-10-10 15:38 掉头发的666 阅读(747) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示