摘要: import requests import re from requests.exceptions import RequestException import json from multiprocessing import Pool def get_one_page(url): headers = { 'User-Agent':'Mozilla/5.0 (Windows N... 阅读全文
posted @ 2019-09-16 20:17 Lightmonster 阅读(707) 评论(0) 推荐(0) 编辑
摘要: using namespace std; using namespace std::placeholders; bool comP(string &a, string& b) { return a head; string v; while (getline(ifile, v)) { head.push_back(v); } so... 阅读全文
posted @ 2019-09-11 13:39 Lightmonster 阅读(322) 评论(0) 推荐(0) 编辑
摘要: #pragma once #define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #include <iostream> #include <string> #include <cstring> #include <vector> #include <queue> #include <initializer_list> #include <algor 阅读全文
posted @ 2019-09-11 10:15 Lightmonster 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #include <opencv2/opencv.hpp> #include <iostream> using namespace std; using namespace cv; void ChangeImgBG(); Mat HandleImgData(Mat &img); /* 图片背景替换 知识点:分水岭分割、高斯模糊 处理步骤:数据组装-KMeans分割-背景消除-生成遮罩-模糊-输出 阅读全文
posted @ 2019-09-03 16:46 Lightmonster 阅读(2875) 评论(0) 推荐(0) 编辑
摘要: class YMD { private: unsigned int year; unsigned int month; unsigned int day; public: YMD(string date); void show() { cout << "today is " << year << "-" << month << "-" <<... 阅读全文
posted @ 2019-08-30 13:34 Lightmonster 阅读(589) 评论(0) 推荐(0) 编辑
摘要: endl,ends,flush都可以刷新缓冲区。如果程序异常终止,输出缓冲区是不会被刷新的。当一个程序崩溃后,它所输出的数据很可能停留在输出缓冲区中等待打印。 当调试一个已经崩溃的程序时,需要确认那些你认为已经输出的数据确实已经刷新了。否则,可能将大量时间浪费在追踪代码为什么没有执行中,而实际上代码 阅读全文
posted @ 2019-08-26 15:40 Lightmonster 阅读(1172) 评论(0) 推荐(0) 编辑
摘要: 排序算法的动图演示 冒泡排序 选择排序 插入排序 希尔排序 基数排序 归并排序 图片转自--https://www.runoob.com/w3cnote_genre/algorithm 阅读全文
posted @ 2019-07-24 14:44 Lightmonster 阅读(256) 评论(0) 推荐(0) 编辑
摘要: int v = 0x0D0C0B0A; char* c = (char*)&v; if (*c == 0x0A) cout << "little endian"; else cout << "big endian"; 阅读全文
posted @ 2019-07-14 22:13 Lightmonster 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 回波损耗是传输线端口的反射波功率与入射波功率之比,以对数形式的绝对值来表示,单位是dB,一般是正值。 反射系数(r)为反射波电压与入射波电压的比值取对数,而回波损耗(rL)为反射功率与入射功率之比。取对数运算时,可以推到出两者的相互关系如下: 例如:当r=0.1时可以得到回拨损耗为20dB;即反射功 阅读全文
posted @ 2019-07-10 18:02 Lightmonster 阅读(6805) 评论(0) 推荐(0) 编辑
摘要: 括号匹配 //裁剪字符串,掐头去尾只保留被括号包围的部分 void trim(const char exp[], int& lo, int& hi) { while ((lo <= hi) && (exp[lo] != '(') && (exp[lo] != ')')) lo++; while (( 阅读全文
posted @ 2019-06-16 21:36 Lightmonster 阅读(311) 评论(0) 推荐(0) 编辑