09 2019 档案

摘要:智能指针有一个计数器,每次拷贝,传递等操作都会增加其计数器的值,当其计数器归0时会释放内存,因此不能混合使用常规指针与智能指针,当常规指针new得一块内存后,此时将其指向的内存传递给智能指针使用将会引起智能指针提前释放申请的内存,后面常规指针将无法正常使用,变为一个空悬指针(指向已经销毁的对象或已经 阅读全文
posted @ 2019-09-29 15:01 Lightmonster 阅读(718) 评论(0) 推荐(0)
摘要:import requests import re import json import time from openpyxl import workbook from openpyxl import load_workbook from pymongo import MongoClient from requests.exceptions import RequestException impo 阅读全文
posted @ 2019-09-28 14:20 Lightmonster 阅读(1286) 评论(0) 推荐(0)
摘要:import requests from urllib.parse import urlencode import os from hashlib import md5 from multiprocessing.pool import Pool def get_page(offset): headers={ 'user-agent':'Mozilla/5.0 (Windows NT 10.0; W 阅读全文
posted @ 2019-09-24 13:50 Lightmonster 阅读(983) 评论(0) 推荐(0)
摘要:import requests import re import time import json from requests.exceptions import RequestException def get_html_page(url): try: headers = { 'User-Agent': 'Mozilla/5.0 (Windows... 阅读全文
posted @ 2019-09-20 12:01 Lightmonster 阅读(1516) 评论(0) 推荐(0)
摘要: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 阅读(720) 评论(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 阅读(336) 评论(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 阅读(271) 评论(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 阅读(3011) 评论(0) 推荐(0)