“2020年4月”存档文章有30 篇
WebStorm Angular default .gitignore file
2020/4/30 18:40:58
# See http://help.github.com/ignore-files/ for more about ignoring files.# compiled output/dist/tmp/out-tsc# Only exists if Bazel was run/bazel-out# dependencies/node_modules# profiling fileschrome-pr...
sogou spider IP range
2020/4/30 9:22:56
123.183.224.9123.183.224.84123.183.224.7123.126.113.159123.126.113.100111.202.101.164123.126.113.169123.183.224.91
baidu spider IP range
2020/4/28 17:56:37
baidu spider IP range:123.125.67.158123.125.66.15836.110.199.3636.110.199.5136.110.199.15236.110.199.29116.179.32.72116.179.32.101
python 判断list是否为空
2020/4/27 11:09:58
判断python list是否为空,有以下几种写法:a = [] if not a: print("List is empty")根据长度判断:a = [] if not len(a): print("List is empty")或则是这么写:a = [] if len(a) == 0: print("List is empty")两个空list对...
TypeError: can only concatenate str (not "list") to str
2020/4/27 10:27:34
最近在写代码的时候,出现了如下错误:TypeError: can only concatenate str (not "list") to str具体截图如下:出现错误的原因:类型错误,具体代码如下:response = drive_service.files().list( q="mimeType='application/vnd.google-...
利用X-Forwarded-For伪造客户端IP漏洞成因及防范
2020/4/25 10:05:53
问题背景在Web应用开发中,经常会需要获取客户端IP地址。一个典型的例子就是投票系统,为了防止刷票,需要限制每个IP地址只能投票一次。如何获取客户端IP在Java中,获取客户端IP最直接的方式就是使用request.getRemoteAddr()。这种方式能获取到连接服务器的客户端IP,在中间没有代理的情况下,的确是最简单有效的方式。但是目前互联网Web应用很少会将应用服务器直接对外提供服务,一般...
google drive Insufficient Permission: Request had insufficient authentication scopes.
2020/4/24 16:14:54
最近再使用Google Drive新建文件夹的时候,出现了如下错误:googleapiclient.errors.HttpError: HttpError 403 when requesting https://www.googleapis.com/drive/v3/files?fields=id&alt=json returned "Insufficient Permission: Reques...