上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: 一般创建了scrapy文件夹后,可能需要写多个爬虫,如果想让它们同时运行而不是顺次运行的话,得怎么做? a、在spiders目录的同级目录下创建一个commands目录,并在该目录中创建一个crawlall.py,将scrapy源代码里的commands文件夹里的crawl.py源码复制过来,只修改 阅读全文
posted @ 2020-05-22 11:19 洛洛沙 阅读(509) 评论(0) 推荐(0)
摘要: 1 #ifdef WIN32 2 time_t clock; 3 struct tm tm; 4 SYSTEMTIME wtm; 5 GetLocalTime(&wtm); 6 tm.tm_year = wtm.wYear - 1900; 7 tm.tm_mon = wtm.wMonth - 1; 阅读全文
posted @ 2020-05-20 13:19 洛洛沙 阅读(13708) 评论(0) 推荐(0)
摘要: 对于c++里面的容器, 我们可以使用iterator进行方便的遍历. 但是当我们通过iterator对vector/map等进行修改时, 我们就要小心了, 因为操作往往会导致iterator失效, 之后的行为都变得不可预知. 比如: 1 #include <iostream> 2 #include 阅读全文
posted @ 2020-05-20 10:00 洛洛沙 阅读(1665) 评论(0) 推荐(1)
摘要: 1 char pBuf[MAX_PATH]; 2 //获取应用程序完全路径,比 GetCurrentDirectory 好用多了 3 GetModuleFileName(NULL,pBuf,MAX_PATH); 4 5 STARTUPINFO startupinfo; 6 PROCESS_INFOR 阅读全文
posted @ 2020-03-26 11:21 洛洛沙 阅读(777) 评论(0) 推荐(0)
摘要: 1 void Draw(CDCHandle hdc) 2 { 3 CRect rect; 4 GetClientRect(&rect); 5 6 CPen pen; 7 pen.CreatePen(PS_SOLID, 1, RGB(169, 169, 169)); 8 HPEN oldPen = h 阅读全文
posted @ 2020-03-24 10:51 洛洛沙 阅读(2385) 评论(0) 推荐(0)
摘要: 1 SYSTEMTIME st1,st2; 2 GetSystemTime(&st1); 3 GetSystemTime(&st2); 4 5 int re=memcmp(&st1,&st2,sizeof(SYSTEMTIME)); 这种方法有时候会出错,虽然两个都是无符号的时间,但是SYSTEMT 阅读全文
posted @ 2020-03-23 16:30 洛洛沙 阅读(1925) 评论(0) 推荐(0)
摘要: int转CString就不细说了,使用format即可, 这里简单介绍下CString转int的一种简便方法 1 CString strNum("100"); 2 3 int num; 4 5 //ANSI 6 7 num = atoi(strNum); 8 num = _ttoi(strNum); 阅读全文
posted @ 2020-01-10 10:38 洛洛沙 阅读(1446) 评论(0) 推荐(0)
摘要: 命令: vi /etc/crontab 阅读全文
posted @ 2020-01-03 16:20 洛洛沙 阅读(174) 评论(0) 推荐(0)
摘要: 问题描述: c++ 中 char*/string 形式的字符串无法正确的对中文字符串进行处理(如 find, strlen, substr 等常规操作) 。 比如当你在char* 中 find 英文逗号时,有可能匹配的不只是逗号,还找到了某个汉字的一个字节,而你无法在char*中区分它们。 问题原因 阅读全文
posted @ 2020-01-03 15:29 洛洛沙 阅读(5417) 评论(0) 推荐(0)
摘要: list与字符串相互转换: 字符串转list: 命令:list() list转字符串 命令:"".join(list) 其中,引号中是字符之间的分割符,如“,”,“;”,“\t”等等 阅读全文
posted @ 2019-12-23 11:30 洛洛沙 阅读(164) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 9 下一页