- 博客(46)
- 资源 (1)
- 收藏
- 关注
原创 nginx负载均衡策略
1、轮询(Round Robin)-默认依次转发,适用于多台服务器性能相近2、加权轮询(Weighted Round Robin)weight高的优先分配,适用于多台服务器性能相差较大3、IP hash基于客户端 IP 地址的负载均衡策略,适用于客户端始终访问同一台服务器的场景4、最小连接数(Least Connections)将请求发送到当前连接数最少的服务器上,适用于后端服务器性能差异较大,连接数分布不均的场景5、随机(Random)将请求随机发送到一个后端服务器上,适用于多台服务器性能相近,没有特别要
2024-04-25 15:19:55
362
4
原创 argon2-cffi-bindings 安装卡住不动
使用pip 安装argon2-cffi包时,在依赖Collecting argon2-cffi-bindings 位置卡住不动。
2023-08-24 20:29:48
926
1
原创 Error in parsing ‘.arclint‘ file, in key ‘bin‘ for linter ‘pylint‘
Error in parsing '.arclint' file, in key 'bin' for linter 'pylint'
2023-07-04 20:42:55
385
原创 Pandas TypeError: cannot convert the series to <class ‘int‘>
pandas 条件过滤,使用强制类型转换失败。使用map或者astype进行类型转化。
2023-06-01 16:52:18
4982
原创 django数据库单元测试报错:django.test.testcases.DatabaseOperationForbidden:
django orm单元测试
2023-05-16 18:04:10
606
原创 [问题记录]‘get_installed_distributions‘ cannot import
【代码】[问题记录]‘get_installed_distributions‘ cannot import。
2023-03-30 23:29:11
265
原创 Jetbrains 使用技巧
左侧project 工具栏窗口 - 顶部齿轮 - show member 选项;打开show member 选项,左侧结构会显示class和method。
2023-03-28 15:56:05
335
原创 http请求报错SSLError: HTTPSConnectionPool:Max retries exceeded with url
http请求报错SSLError
2022-09-06 15:41:19
15530
2
原创 sudo报错:xxx is not in the sudoers file. This incident will be reported
sudo报错:xxx is not in the sudoers file. This incident will be reported
2022-07-22 19:41:37
1237
原创 go字符串遍历遇到坑
遍历字符串每个字符func main() { str := "12345" for i := 0; i < len(str); i++ { //输出为对应字符的ASCII值 fmt.Println(str[i]) }}Output:4950515253func main() { str := "12345" for i := 0; i < len(str); i++ { //输出符合预期 //'0'对应ASCII码为4
2022-05-21 20:26:43
161
原创 记一次Set-Cookie本地浏览器写入问题
1、问题现象:通过api响应set-cookie在浏览器种植cookie,发现无法写入2、实现代码:3、问题定位:打开浏览器secure 报错定位发现请求使用的http 协议,而且cookie的secure 属性设置true,修改为false后成功。Secure属性是说如果一个cookie被设置了Secure=true,那么这个cookie只能用https协议发送给服务器,用http协议是不发送的4、成功解决:...
2022-05-19 14:13:48
762
原创 硬链接和软链接区别
1、创建方式:硬链接:ln target link_name软连接:ln -s target link_name2、区别:硬链接:硬链接相当于别名。不会创建inode号的,链接文件与源文件存在相同的inode,只是在源文件的inodelinkcount域里再增加1,因此硬链接不可以跨文件系统,软链接可以 删除源文件,链接文件依然可以正常访问(文件实体并未删除) 不能跨分区,不能对目录使用 不可以对不存在的文件和目录创建软链接:软链接相当于快捷方式。会创建新的inode,所..
2022-04-08 17:54:55
2585
原创 []struct{}{}和[]interface{}{}
//struct{} 匿名结构体类型//[]struct{} 匿名结构体切片类型//[]struct{}{} 匿名空结构体切片类型创建,并初始化data:=[]struct{}{}//interface{} 匿名空接口类型//[]interface{} 匿名空接口切片类型//[]interface{}{} 匿名空接口体切片类型创建,并初始化data:=[]interface{}{}...
2021-12-21 21:05:13
269
原创 whistle高级用法
1、host配置127.0.0.1:3000 https://www.qq.com/a/b/c2、重定向将 baidu.com 重定向到 qq.comhttps://www.baidu.com/ redirect://https://www.qq.com/3、修改返回体http://example.com/api/getUserList file://D:/path/to/your/file/userList.json如果嫌弃磁盘文件麻烦,可采用简洁版本:http:/
2021-12-20 19:14:49
1879
原创 gosched:为什么代码执行结果不一致?
gosched:为什么代码执行结果不一致?package mainimport "runtime"//Gosched 暂停,释放线程去执行其他任务。【当前任务放回队列】,等待下次调度恢复执行func main() { runtime.GOMAXPROCS(1) exit := make(chan struct{}) go func() { defer close(exit) go func() { //b 任务 println("b") }() for i :
2020-11-16 23:44:03
240
原创 二、小试牛刀-APK文件分析
1、androguardanalyze开启一个iPython shell窗口,androguard 会启动并打印版本信息。此时对于分析加载apk或者dex文件,一些包装器函数已经存在了。下面我们就可以get start..2、AnalyzeAPK(filename)orAnalyzeDEX(filename)$ androguard analyzeAndroguard ver...
2019-12-09 15:38:15
645
原创 一、androguard 安装
安装说明:确保Python版本大于3.0以下3 种安装方式,根据情况自由选择:1、pip$ virtualenv venv-androguard$ source venv-androguard/bin/activate$ pip install -U androguard[magic,GUI]2、Debian / UbuntuDebian自己的库中有androguard,...
2019-12-06 15:18:46
1949
原创 SDS VS C字符串
什么是SDS? SDS是Redis使用C语言构建的一种字符串类型,名为简单动态字符串(Simple Dynamic String)。用途:①保存数据库中字符串值 ②用作缓冲区其实质就是结构体:struct sdshdr{ int len; //buf数组字节的数量,等于SDS字符串的长度 int free;//buf数组未使用字节的数量...
2018-09-17 21:32:13
216
原创 Win10 下搭建PHP开发环境(自定义方式)
Apache 安装1、点击链接进入下载官网http://httpd.apache.org/download.cgi2、下载3、解压下载的文件4、打开Apache24\conf下httpd.conf 文件,修改以下关键位置,用记事本或EditPlus打开即可。修改默认SRVROOT 的值为Apache 安装位置即可。(旧版本需要手动修改好多值,网络上有教程,不...
2018-09-04 18:18:11
14742
5
原创 telnet不是内部或外部命令也不是可运行的程序或批处理
1、Win+R之后输入appwiz.cpl打开【卸载更改应用程序】2、点击左侧【启动或关闭Windows功能】3、选中Telnet客户端,点击确定就欧凯啦/~ 问题出现的原因就是Windows的Telnet默认是关闭的 什么是Telnet? Telnet协议是一种应用层协议,使用于互联网及局域网中,使用虚拟终端机的形式,提供双向、以文字字符串为主的...
2018-08-29 05:19:41
644
原创 Netty【第一个netty应用】
Netty完成时间请求服务Netty时间服务器服务端 TimeServerpackage com.helloworld.hellonetty.server;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.ChannelFuture;import io.netty.channel.ChannelIni...
2018-08-25 10:11:21
596
原创 eclipse中 父包与子包呈现并列的视觉效果
eclipse中 父包创建的子包与父包呈现并列效果,类似于下图虽然在逻辑上其也是父子关系,但呈现效果层次不明显。我们只需更改一下Package Presentation的属性值之后就okay啦 >_<...
2018-08-22 03:56:19
1124
Netty jar包
2018-08-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人