使用 jsonify 时,返回的 http response 的 Content-Type 是:Content-Type: application/json 使用json.dumps时,Content-Type则是:Content-Type: text/html; charset=utf-8 其他基 ...
分类:
Web程序 时间:
2021-04-06 14:40:10
阅读次数:
0
小明种树 试题编号: 201909-1 试题名称: 小明种苹果 时间限制: 2.0s 内存限制: 512.0MB 题解:模拟一下,记录坏果数量和对应的果树的序号,排下序 3 3 73 -8 -6 -4 76 -5 -10 -8 80 -6 -15 0 1 n,m=map(int, input().s ...
分类:
编程语言 时间:
2021-04-06 14:37:49
阅读次数:
0
Python编码解码技巧汇总 encode encode将字符串转换为bytes类型的对象 (即b为前缀, bytes类型), 即Ascll编码, 字节数组 a = "检测到网站攻击" print(a.encode()) print(type(a.encode())) # b'\xe6\xa3\x8 ...
分类:
编程语言 时间:
2021-04-06 14:32:28
阅读次数:
0
项目地址: github.com/brython-dev/brython 当前版本 3.9.1 ,支持cpython3.9.0 cdn加速: https://www.bootcdn.cn/brython/ django中使用cpython : django-brython 最新版本发布于2020年1 ...
分类:
编程语言 时间:
2021-04-06 14:04:12
阅读次数:
0
归并排序模板 code: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; typedef long long ...
分类:
编程语言 时间:
2021-04-05 12:52:30
阅读次数:
0
s = set('hello,word') print(s) #set 方法 s = {'xiaoming', 'xiaoming', 'xiaoming1'} print(s) s.add('s') # 添加元素 s.clear(s) # 清空集合 s1 = s.copy(s) # 复制集合 s. ...
分类:
编程语言 时间:
2021-04-05 12:51:32
阅读次数:
0
# %s 全能 print('I am %s my hobby is %s' %('A','alex')) print('I am %s , I`m %s year old' %('A',1)) # %d 整型 # name = input('你的姓名:') # age = int(input('你 ...
分类:
编程语言 时间:
2021-04-05 12:51:05
阅读次数:
0
一 for循环 #for循环可以循环任何序列的项目 for i in range(1,10): for j in range(1,i+1): print('%s*%s=%s'%(i,j,i*j),end="") print() 二 可变不可变类型 #for循环可以循环任何序列的项目 for i in ...
分类:
编程语言 时间:
2021-04-05 12:49:56
阅读次数:
0
1 重写 authenticate 函数 目的是取代自带的登录校验方式 from django.contrib.auth.backends import ModelBackend, UserModel from . import models class CustomBackend(ModelBac ...
分类:
其他好文 时间:
2021-04-05 12:37:18
阅读次数:
0
仅供自己学习 思路: 按照题目要求我们需要定义一个head头节点,并且因为树是二叉搜索树,所以要采取中序遍历才能得到从小到大的排序。 按照中序遍历的模板 dfs(root->left); cout<<root->val; dfs(root->right); 同样我们也通过这个模板写DFS,这里因为是 ...
分类:
其他好文 时间:
2021-04-05 12:33:29
阅读次数:
0