package com.xxx.util;import java.security.*;import java.security.cert.Certificate;import java.security.cert.CertificateException;import java.security. ...
分类:
编程语言 时间:
2020-01-03 19:15:06
阅读次数:
208
[TOC] 认证组件authentication 一般使用全局配置 settings中配置 自定义权限类 1. 如果使用session认证,drf提供了SessionAuthentication类认证 2. 如果使用drf jwt认证框架,drf jwt提供了JSONWebTokenAuthenti ...
分类:
其他好文 时间:
2020-01-03 19:10:18
阅读次数:
81
先将 链接拼接编译 scope为snsapi_userinfo https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame ...
分类:
其他好文 时间:
2020-01-03 14:19:32
阅读次数:
146
本篇文章的目标是自定义Django基础镜像。与《为什么需要自定义一个基础镜像?》文章相同,基础镜像作用是为项目镜像提供支持。它构建在Python官方镜像之上,添加项目一些需要的扩展模块...
分类:
其他好文 时间:
2020-01-03 00:37:22
阅读次数:
94
一、Linux下安装、配置virtualenv #指定清华源下载pip的包pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv#升级pip工具pip3 install --upgrade pip 1.安装virtual ...
分类:
其他好文 时间:
2020-01-02 22:44:10
阅读次数:
81
"题意" 我自闭了,连蓝题都不会了,还得看题解。 以下是我理解的官方做法,献给给广大没看懂官方题解的神仙们。作者蒟蒻,如果有什么不对的地方请指出。 观察题目的限制,发现$q$是一个$p^z$的形式,因此我们可以考虑每个质数$p$。 对于每个质数$p$,我们求出一个$0 1$串$state_i$,其中 ...
分类:
其他好文 时间:
2020-01-01 23:27:03
阅读次数:
67
You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take tu ...
分类:
其他好文 时间:
2020-01-01 13:29:36
阅读次数:
62
"比赛链接" "A. Card Game" 显然,二者最大值大的人赢。 ${\frak{code:}}$ "C. Make Good" 异或与和进行比较不好处理,考虑先加一个数$xor$等于原数组的异或和,使异或值等于零,再加上$sum+xor$即可完成构造。 (因为$LL$输出$\%lld$ $W ...
分类:
其他好文 时间:
2020-01-01 10:02:17
阅读次数:
58
import osimport timeimport randomimport pygameimport colorama'''一些变量'''BGMPATH = 'bgm.mp3'colorama.init(convert=True)STARS = [2, 4, 8, 10, 14, 20, 26, ...
分类:
编程语言 时间:
2020-01-01 09:22:24
阅读次数:
271
最近在安装opencv时用pip install opencv-python命令,安装速度特别慢,多次试验后最终失败! 推荐安装时使用国内镜像链接 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc. ...
分类:
编程语言 时间:
2019-12-31 23:39:03
阅读次数:
86