- 博客(91)
- 资源 (1)
- 收藏
- 关注
原创 python解决ssl certificate problem unable to get local issuer certificate问题
【代码】python解决ssl certificate problem unable to get local issuer certificate问题。
2023-11-01 13:37:36
362
原创 VC2019配置Onnxruntime和OpenCV环境
一、环境配置0、配置Debug或Release模式1、配置包含目录:D:\openvino\openvino_2021.4.689\opencv\include和D:\onnxruntime\include2、设置Windows运行库目录D:\onnxruntime\lib和D:\openvino\openvino_2021.4.689\opencv\lib3、配置附加依赖项:D:\openvino\openvino_2021.4.689\opencv\lib\*.l
2022-02-19 16:49:25
4330
2
原创 LeetCode152:翻转字符串里面的单词
题解和题目链接力扣class Solution {public: string reverseWords(string s) { string ans; int i = s.size() - 1; while (i >= 0) { int c = 0; while (i >= 0 && s[i] == ' ') i--; whil...
2021-12-27 00:14:37
226
原创 LeetCode394:字符串解码
题解:class Solution {public: string decodeString(string s) { string res = ""; stack<string> strs; stack<int> nums; int num = 0; int n = s.size(); for (int i = 0; i < n; i++) { ...
2021-12-26 23:25:03
307
原创 LeetCode43:字符串相乘
解题思路:代码class Solution {public: string multiply(string num1, string num2) { if (num1 == "0" || num2 == "0") { return "0"; } string ans; int m = num1.size(), n = num2.size(); // 依次用num2的值乘n..
2021-12-26 01:22:01
262
原创 LeetCode415:字符串相加
class Solution {public: string addStrings(string num1, string num2) { int i = num1.size()-1, j = num2.size()-1, add = 0; string ans; while (i >= 0 || j >= 0 || add != 0) { int x = i >= 0 ? num1.at(i) ...
2021-12-26 00:46:37
176
原创 LeetCode22题:括号生成
题解:class Solution {public: vector<string> generateParenthesis(int n) { vector<string> vec; string str = ""; dfs(vec, str, n, n); return vec; } void dfs(vector<string> &vec, const str...
2021-12-25 20:39:50
220
原创 clion配置opencv环境
因为安装教程在网上已经很多了Windows10 环境下使用 Cmake 和 MinGW-w64 编译安装 OpenCV 4.0.1_木偶不哭不笑的博客-优快云博客这里主要在这里记录两个出现过的报错:(主要是因为python环境为python2,建议使用anaconda的python3问题会少很多)报错1:(python安装目录)\include\pyconfig.h下添加#define MS_WIN64报错2:mingw安装目录下mingw64\lib\gcc\x86_64-w64-min
2021-11-10 23:13:14
3349
原创 多线程下fwrite和write是否线程安全问题
一、代码#include <fcntl.h>#include <pthread.h>#include <stdio.h>#include <string.h>#define USE_CLIB#define LOOPS 1000000#ifdef USE_CLIBstruct thr_data { FILE *fp; const char *data;};static void *write_data(void *d
2021-08-13 15:32:56
1435
原创 C++中多线程对同一文件的读写
一、product内未加锁,在for循环内进行join1、代码#include <fstream>#include <pthread.h>using namespace std;pthread_mutex_t file_mutex;void* product(void* args){// pthread_mutex_lock(&file_mutex); ofstream file; file.open("file.txt", ios::app);
2021-08-13 10:09:59
3944
原创 GoogleTest系列:TEST_P的基本用法
一、代码部分#include <gtest/gtest.h>class Bis {public: bool Even(int n) { if (n % 2 == 0) { return true; } else { return false; } }; bool Suc(bool bSuc)
2021-07-28 10:42:18
6113
原创 C++四种类型转换运算符:static_cast、dynamic_cast、const_cast和reinterpret_cast
一、前言refrenced link:http://c.biancheng.net/cpp/biancheng/view/3297.html
2021-07-26 09:55:31
131
原创 工作安排(c++)
题目:https://www.nowcoder.com/questionTerminal/937d8a6766a5488d958d55ddf3ec5cef?f=discussion#include<iostream>#include<vector>#include <algorithm>using namespace std;int main() { int n, a, b; cin >> n; vector<vector<in
2021-07-20 17:42:06
387
原创 LeetCode509-斐波那契数列
题解:class Solution {public: int fib(int n) { if (n == 0) return 0; if (n == 1 || n == 2) return 1; vector<int> dp(n+1, 0); dp[1] = dp[2] = 1; for (int i = 3; i <= n; i++) { dp[i] = dp[i...
2021-07-17 01:37:28
120
原创 IDEA/Clions/AndroidStudio编辑器格式设置
一、序言git检查代码格式的时候会有一定的要求,不同公司有不同的要求,下面介绍一些常用的设置格式的方法。二、设置格式File中Settings1、设置每行最大字符数为80
2021-05-20 21:45:09
826
原创 c++中指针和引用的简单区分
#include <iostream>using namespace std;void func1(int& ref){ ref = 100;}void func2(int* ref){ *ref = 200;}void func3(int ref){ ref = 300;}int main() { int a = 2; //指针常量: int* const ref = &a, 代表指针指向不可改变; in.
2021-03-10 15:44:15
110
原创 c语言中创建线程与线程锁
#include <stdio.h>#include <pthread.h>#include <windows.h>#define MAX_COUNT 10000int count = 0;pthread_mutex_t mutex_lock;void* counter1(void* args){ int i = 1; while(i <= MAX_COUNT/4){ pthread_mutex_lock(&.
2021-03-10 14:02:45
479
原创 pywin32api报错问题
一、报错提示ImportError: DLL load failed while importing win32gui: 找不到指定的模块。解决方案:pywin32==300版本时候提示,将版本改为pywin32==225之后报错消失。
2021-02-01 20:45:11
279
原创 c++预处理器
#include <iostream>using namespace std;int main(){#define PI 3.1415 cout << PI << endl;#define DEBUG#ifdef DEBUG cerr << "Debug" << endl;#endif // DEBUG#if 0 //注释功能; cout << "comment" << endl;#end.
2020-12-25 11:32:50
119
原创 C++ STL基本介绍和使用
#include <array>#include <vector>#include <queue>#include <map>#include <unordered_map>#include <utility>#include <set>#include <unordered_set>#include <tuple>#include <iostream>using .
2020-12-25 10:56:48
128
原创 Uiautomator2手动安装部分工具
一、需要安装内容app-uiautomator.apk app-uiautomator-test.apk atx-agent minicap minitouch二、自动安装python -m uiautomator2 init三、手动安装1、安装apkwget https://github.com/openatx/android-uiautomator-server/releases/download/$VERSION/app-uiautomator.apkwget ht
2020-12-14 10:33:37
1985
原创 windows下安装mmcv报错
一、环境问题报错一:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.解决:安装pytest-runnerpip install pytest-runner报错二:Command "python setup.py egg_info" failed with error code 1解决:更新pip和setup..
2020-11-26 13:12:37
3191
4
原创 通过conda或者pip安装包时出现There was a problem confirming the ssl certificate报错
一、通过.txt安装package1、pip install -r xxx.txt2、conda install --yes --file xxx.txt二、解决报错参考地址:https://www.itread01.com/content/1542198799.html--trusted-host很重要pip install xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com其他源:1.
2020-11-23 10:18:42
864
原创 windows下的pytorch-gpu环境搭建方法
一、配置国内镜像源conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/#必不可少,不然会出现找不到包,或者只有cpu版本的pytorch包conda config --add channels https://mi
2020-11-06 20:27:37
293
原创 CondaHTTPError: HTTP 000 CONNECTION FAILED for url错误
操作方法:修改C:\Users\<本机用户名>\.condarc下内容为:channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ssl_verify: trueshow_channel_urls: true且一定要将https改为http!!!
2020-09-03 17:18:59
122
原创 Pyinstaller进行手动安装和简单使用方法
背景使用pip或conda无法安装时可通过手动安装的方式进行安装pyinstaller安装下载地址:https://github.com/pyinstaller/pyinstaller/releases,选择需要的版本,建议新版本,打包成功的概率更大!1、解压下载好的文件到python安装目录中Script下:pyinstaller-4.0.tar.gz;2、进入解压后的文件夹中输入命令:python setup.py install;3、完成安装;使用1、进入需..
2020-09-03 09:22:09
5061
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人