摘要: 今天写一个单例类,在使用静态变量的时候发现了一个之前没有注意到的问题,这里总结并记录一下。 先看这个单例类: Singleton.h #pragma once class CSingleton { public: ~CSingleton(void); static CSingleton* getSi 阅读全文
posted @ 2020-10-27 16:35 willison 阅读(361) 评论(0) 推荐(0) 编辑
摘要: python try/excepy 局部变量共享 阅读全文
posted @ 2020-10-17 16:10 willison 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 2020年9月9日 17:29 220 人阅读 0 条评论 编辑 使用python3做爬虫的时候,一些网站为了防爬虫会在请求头设置一些检查机制,因此我们就需要添加请求头,伪装成浏览器正常访问。 字段情况,详见下表: 请求头字段 说明 响应头字段 Accept 告知服务器发送何种媒体类型 Conten 阅读全文
posted @ 2020-10-17 14:19 willison 阅读(6334) 评论(1) 推荐(2) 编辑
摘要: Redis使用过程中的坑 this is 阅读全文
posted @ 2020-10-13 23:34 willison 阅读(91) 评论(0) 推荐(0) 编辑
摘要: How to install PowerShell modules By Robert Allen | December 10, 2017 | 4 A PowerShell module is a grouping of various functions that operate as a sin 阅读全文
posted @ 2020-10-10 11:58 willison 阅读(677) 评论(0) 推荐(0) 编辑
摘要: 获取按键的ConsoleKey PS> while($true){ [System.Console]::ReadKey($true) } KeyChar Key Modifiers [ Oem4 0 ] Oem6 0 { Oem4 Shift } Oem6 Shift reference Modul 阅读全文
posted @ 2020-10-09 00:47 willison 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; // input yyyy mm, output calendar: // September 2020 // // Mon Tue Wed Thu Fri Sat Sun // 1 阅读全文
posted @ 2020-10-06 09:03 willison 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 字符与字符串 大小写转换 void lower_or_upper_case(char c) { int transferred_c; if ( ('a'<=c) && (c<='z') ) { transferred_c = (int)c - ( (int)'b' - (int)'B' ); cou 阅读全文
posted @ 2020-10-06 08:52 willison 阅读(249) 评论(0) 推荐(0) 编辑