通过APIView进入找到Request的源码 可以看见一堆属性和方法,其中request.data其实是一个方法,被包装成一个属性 继续看__getattr__和query_params方法: 代码总结: Request其实就是原生request对象被包装后的Request,即重写了__getat ...
分类:
其他好文 时间:
2019-02-24 13:29:15
阅读次数:
145
[题目链接] https://www.luogu.org/problemnew/show/P5221 求 $\prod_{i=1}^{N}\prod_{j=1}^{N}\frac{lcm(i,j)}{gcd(i,j)}$ [题解] https://tbr blog.blog.luogu.org/so ...
分类:
其他好文 时间:
2019-02-24 12:15:20
阅读次数:
204
```C++ #include #include #include using namespace std; typedef long long LL; LL Map[256]; // 0 ~ 9, a ~ z 与 0 ~ 35 的对应 LL Y = 1; // 定义LL型的Y LL inf = (... ...
分类:
其他好文 时间:
2019-02-24 10:55:23
阅读次数:
160
题目要求 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontal ...
分类:
其他好文 时间:
2019-02-24 10:52:19
阅读次数:
183
```C++ #include #include char str[10][6] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; int main(){ int i = 0, ... ...
分类:
其他好文 时间:
2019-02-24 10:40:25
阅读次数:
164
```C++ include include using namespace std; const int INF = 1000000000; //初始化最低油价 struct station{ double oil_price; //加油站油价 int distance; //加油站离出发点的距离 ...
分类:
其他好文 时间:
2019-02-24 10:36:44
阅读次数:
182
二进制中1的个数 题目描述 输入一个整数,输出该数二进制表示中1的个数。其中负数用补码表示。 class Solution { public: int NumberOf1(int n) { int res = 0; int bit = 1; while (0 != bit) { if (n & bi ...
分类:
其他好文 时间:
2019-02-24 10:36:22
阅读次数:
155
```C++ include include using namespace std; const int N = 1005; int HashTable[N]; int main() { int n, m, a; scanf("%d %d", &n, &m); for(int i = 0; i ...
分类:
其他好文 时间:
2019-02-24 10:22:40
阅读次数:
143
Given a binary search tree and a node in it, find the in-order successor of that node in the BST. The successor of a node p is the node with the small ...
分类:
其他好文 时间:
2019-02-24 01:14:17
阅读次数:
141