摘要:
今天写一个单例类,在使用静态变量的时候发现了一个之前没有注意到的问题,这里总结并记录一下。 先看这个单例类: Singleton.h #pragma once class CSingleton { public: ~CSingleton(void); static CSingleton* getSi 阅读全文
摘要:
python try/excepy 局部变量共享 阅读全文
摘要:
2020年9月9日 17:29 220 人阅读 0 条评论 编辑 使用python3做爬虫的时候,一些网站为了防爬虫会在请求头设置一些检查机制,因此我们就需要添加请求头,伪装成浏览器正常访问。 字段情况,详见下表: 请求头字段 说明 响应头字段 Accept 告知服务器发送何种媒体类型 Conten 阅读全文
摘要:
Redis使用过程中的坑 this is 阅读全文
摘要:
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 阅读全文
摘要:
获取按键的ConsoleKey PS> while($true){ [System.Console]::ReadKey($true) } KeyChar Key Modifiers [ Oem4 0 ] Oem6 0 { Oem4 Shift } Oem6 Shift reference Modul 阅读全文
摘要:
#include <iostream> #include <string> using namespace std; // input yyyy mm, output calendar: // September 2020 // // Mon Tue Wed Thu Fri Sat Sun // 1 阅读全文
摘要:
字符与字符串 大小写转换 void lower_or_upper_case(char c) { int transferred_c; if ( ('a'<=c) && (c<='z') ) { transferred_c = (int)c - ( (int)'b' - (int)'B' ); cou 阅读全文