随笔分类 -  Tools

编程常用代码
摘要:采用rand()函数生成 阅读全文
posted @ 2019-02-13 16:38 BlueOceans 阅读(1824) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/jiwu999/article/details/79626773 方法: step1:git clone https://github.com/ethereon/netscope step2:cd netscope step3: python -m Sim 阅读全文
posted @ 2018-10-31 10:46 BlueOceans 阅读(1081) 评论(0) 推荐(0)
摘要:visual studio下 Linux下 阅读全文
posted @ 2018-10-12 11:13 BlueOceans 阅读(697) 评论(0) 推荐(0)
摘要:网址:https://kinddragon.github.io/vld/ 阅读全文
posted @ 2018-09-26 11:47 BlueOceans 阅读(126) 评论(0) 推荐(0)
摘要:string s = " test "; size_t n = s.find_last_not_of(" \r\n\t"); if (n != string::npos){ s.erase(n + 1, s.size() - n); } n = s.find_first_not_of(" \r\n\t"); if (n !... 阅读全文
posted @ 2018-09-04 20:18 BlueOceans 阅读(6790) 评论(0) 推荐(1)
摘要:替换单个字符串 string fnd = "dataset"; string rep = "labels"; string buf = "d:/data/dataset/ii.jpg"; buf = buf.replace(buf.find(fnd), fnd.length(), rep); 替换所 阅读全文
posted @ 2018-09-03 14:54 BlueOceans 阅读(17620) 评论(0) 推荐(1)
摘要:/* MAKEPATH.C */ #include #include void main( void ) { char path_buffer[_MAX_PATH]; char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; char fname[_MAX_FNAME]; char... 阅读全文
posted @ 2018-06-19 20:51 BlueOceans 阅读(2442) 评论(1) 推荐(1)
摘要:#ifdef WIN32 #include #include #else #include #include #endif #include #include #define MAX_PATH_LEN 256 #ifdef WIN32 #define ACCESS(fileName,accessMode) _access(fileName,accessMode) #defin... 阅读全文
posted @ 2018-06-19 20:41 BlueOceans 阅读(13514) 评论(0) 推荐(0)
摘要://按字符分割,可以为多个分割符同时分割,例如 split(str, "\",[]{}) vector split(string str, string pattern){ vector ret; if (pattern.empty()) return ret; size_t start = 0, index = str.find_first_of(pattern, ... 阅读全文
posted @ 2017-06-04 13:11 BlueOceans 阅读(606) 评论(0) 推荐(0)