https 39 whitelist protocol
HttpClient绕过https验证
场景: 使用HttpClient请求https的WebService接口 报错: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertP ......
https://blog.csdn.net/qfturauyls/article/details/127044930
轻松升级gcc:背景: 直接通过yum install gcc安装的版本4.8.5太老了,很多新的库的用不起,没办法,只能升级。手动编译安装太过于麻烦,于是乎网上找到了这个方法。 方法: 第一步:安装centos-release-sclsudo yum install centos-release- ......
Xcode building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'
https://stackoverflow.com/questions/63607158/xcode-building-for-ios-simulator-but-linking-in-an-object-file-built-for-ios-f 改项目配置 EXCLUDED_ARCHS[sdk=i ......
39.类属性
类对象与实例对象不同,可以理解为实例对象是由类对象复制而来,每个实例对象之间具有数据独立性。而类对象在程序运行过程中,只有一个。 既然是对象,那么就可以拥有自己的属性,在类中定属性时,属性名有self前缀的是实例属性,而在类中直接定义的属性即为类属性。 # 定义一个饮水机类class WaterDi ......
pip生成与安装项目依赖包---提示:No such file or directory: 'requirement.txt'
错误的原因:安装项目依赖包的文件命令: pip install -r requirement.txt 问题:ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirement.txt' ......
UVA 11178 Morley's Theorem 题解
计算几何 Link UVA 11178 Morley's Theorem Question Morley 定理是这样的,作三角形 ABC 每个内角的三等分线,相交成三角形 DEF,则 DEF 是等边三角形 给出 \(A,B,C\) 坐标,求 \(D,E,F\) 坐标 Solution 其实是一道计算 ......
出现UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbc in position 2: invalid start byt解决办法
直接在代码第一行写下这段代码 # -*- coding: utf-8 -*- 为什么这个有注释符号还是可以起作用? 在 Python 中,`# -*- coding: utf-8 -*-` 这行代码并不是注释,而是一个特殊的声明,称为“编码声明”(encoding declaration)。它告诉 ......
BERT语言模型微调出现错误: AttributeError: 'str' object has no attribute 'item'
如下代码报错为 AttributeError: 'str' object has no attribute 'item' for step, batch in enumerate(self.train_data): if step % 40 == 0 and not step == 0: elaps ......
如何解决AttributeError: 'DictVectorizer' object has no attribute 'get_feature_names'
这个错误通常是因为 DictVectorizer 对象没有 get_feature_names 属性。这可能是因为你使用的 sklearn 版本过低,或者是因为你没有正确地导入 DictVectorizer 类。 要解决这个问题,你可以尝试升级 sklearn 版本,或者使用以下代码导入 DictV ......
P9840 [ICPC2021 Nanjing R] Oops, It's Yesterday Twice More
P9840 [ICPC2021 Nanjing R] Oops, It's Yesterday Twice More 注意到最后袋鼠要集中到一个点上,显然先走到四个角落之一再移动到点 \((a,b)\) 是最优的,可以证明,步数一定不超过 \(3(n-1)\)。 因为不知道具体要到哪一个角落里,因此 ......
Cannot read properties of undefined (reading 'indexOf') at VueComponent.resetField (index.js:...
Cannot read properties of undefined (reading 'indexOf') at VueComponent.resetField (index.js:1:370572) elementUI源码报错,原因竟然是form-item没加prop,折腾了一两个小时,真是服 ......
node连接mysql时报错Client does not support authentication protocol requested by server; consider upgrading MySQL client
尝试用node编写一个简单的登录接口,结果启动服务后请求接口出现了该错误。 其问题就是访问的工具身份验证协议过于落后,在node内安装的2.18.1 mysql包。 解决: 先登录数据库。 use mysql;(mysql为数据库名) 提示Database changed; 查询表中信息 ; sel ......
uniapp打包Android,出现崩溃Didn't find class "io.dcloud.application.DCloudApplication"
自己创建的新的Android项目打包的时候一直崩溃,报错:Didn't find class "io.dcloud.application.DCloudApplication" 查找之后在app/build.gradle中发现添加 multiDexEnabled true compileOption ......
nodejs "Client does not support authentication protocol requested by server; consider upgrading MySQL client"
登录mysql输入以下命令: -- 选择mysql数据库:use mysql-- laremehpe是登录用户名ALTER USER 'laremehpe'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;-- laremehpe ......
HTTP和HTTPS区别
1、HTTP是明文传输,不安全。HTTPS是加密传输,更安全,有效防止数据被第三方篡改,但是双方加解密也带来了更多的资源消耗。 2、HTTP标准端口是80,HTTPS标准端口是443. 3、HTTP不用认证证书,HTTPS需要认证证书(要钱) 4、连接方式不同,HTTP三次握手,HTTPSLTS1. ......
spring boot配置RestTemplate发送https请求
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.springframework.beans.factory.annot ......
2023-11-15 Using insecure protocols with repositories, without explicit opt-in, is unsupported. ==> Gradle不支持不安全的 Maven 仓库协议,也就是http,请改为https
前言:运行android项目报错: A problem occurred configuring root project 'xxx'.> Could not resolve all dependencies for configuration ':classpath'. > Using insec ......
Chen Shuo's Practical Network Programming - TTCP Lecture代码注释
下面是C语言版本的TTCP,主要注释的是void receive(const Options& opt);函数,负责在服务器接收客户端发送的数据: // muduo/examples/ace/ttcp/ttcp_blocking.cc #include ... // 接受新的TCP连接 static ......
KET.Application 报错:pywintypes.com_error: (-2147221005, '无效的类字符串', None, None)
电脑突然有一天调用 KET.Application 总是报错,代码: import win32com.client xcl = win32com.client.DispatchEx("KET.Application") xcl.Quit() 报错:pywintypes.com_error: (-21 ......
browsermob-proxy-2.1.4启动失败,报错ProxyServerError: The Browsermob-Proxy server process failed to start. Check <_io.TextIOWrapper name='D:\server.log' mode='w' encoding='cp936'>for a helpful error message.
server.log文件错误信息: Running BrowserMob Proxy using LittleProxy implementation. To revert to the legacy implementation, run the proxy with the command-li ......
chrome浏览器报Cannot read properties of undefined (reading 'getUserMedia')
chrome访问摄像头的时候可能报这个错误。使用https协议可以解决这个问题,如果不能使用https可以通过修改chrome配制解决。 在chrome地址栏输入chrome://flags/#unsafely-treat-insecure-origin-as-secure 在Insecure or ......
Charles抓https包内容显示乱码
抓https包内容显示乱码 原因: 1.在电脑上安装SSL证书。 2.要在模拟器或移动设备(手机、平板)安装SSL证书。 3.Android 7以前安装证书后就可以正常抓包;Android 7以后,需要把证书添加到系统证书才行。 4.有些APK会检查是否有Charles这类抓不包软件,如果有就跳过用 ......
清醒时刻记 39
我加入了我发布博文的聊天群,大家都在畅所欲言地讨论这个平台的周边和店铺规划等, 我很少遇到这种情况,就是和创始团队一同讨论决策层面的事情,虽然原本的红人工作 室是我一手创办的,但是我一般也拒绝跟其他人讨论我想做的一些事情,这可能就是我 没有一直干下去的原因也说不定。 都说一个人走得快,一群人走得远, ......
var a = parseInt([0,0,1,0,0].join('')+1) a的值为
var a = parseInt([0,0,1,0,0].join('')+1) a的值为 A 2 B 101 C 1001 D NaN 正确答案:C 官方解析:"00100"+1 = "001001" 再转换为整数为1001 var a = parseInt([0,0,1,0,0].join('' ......
Git提交上传报错 :提交的时候有个文件一直依然显示未提交,提交了还是没用 。fatal: will not add file alias '/xxxx/xxxx/xxx.html' , will not add file alias already exists in index
解决办法: 修改文件名称,再重新提交,再改回来就可以了。 原因分析: 母鸡啊 ......
Mysql中如何解决You can't specify target table '表名' for update in FROM clause报错
Mysql中如何解决You can't specify target table '表名' for update in FROM clause报错 为什么会出现这个错误呢?这是因为在MySQL使用时,在同一条SQL语句中,不允许先SELECT出同一个表的某些值,再对该表进行UPDATE操作。 解决方 ......
创建自己的https证书(转)
使用mkcert工具创建证书1、下载mkcert工具,下载地址如下: mkcert工具下载 百度下载:链接: https://pan.baidu.com/s/10ym5W91g612LDk3t9isFGQ 提取码:1234 2、解压后运行https本地证书生成工具.bat(文件上点 ......
XMLHttpRequest 使用方法:var xhr=new XMLHttpRequest();xhr.open('get','xxxx',true);xhr.send();
Ajax技术核心就是XMLHttpRequest对象。 Ajax技术的工作原理:可以分成3步 1.创建Ajax对象:var xhr = new XMLHttpRequest(); 2.xhr 发送请求:xhr.open('get','test.html','true'); xhr.send(); 3 ......
由['a', 'b', 'c']变为['c', 'a', 'b', 'c'],有没有优雅一点的写法?
大家好,我是皮皮。 一、前言 前几天在Python最强王者交流群【吴超建】问了一个Python基础问题,一起来看看吧。由['a', 'b', 'c']变为['c', 'a', 'b', 'c'] 请教下有没有优雅一点的写法? 二、实现过程 这里【巭孬🕷】给了一个思路:如下所示: 通过字符串插入的方 ......