前言 有时候我们使用drf的Response,会发现默认返回的格式不太友好,每次我们都需要写入以下的格式 return Response({ "status": 0, "message": "成功", "results": serializer.data }) 这样会非常麻烦,我们想默认就有stat ...
分类:
其他好文 时间:
2021-06-09 15:29:52
阅读次数:
0
namespace D{ class cnum{ public: double Val; cnum(double n): Val(n){ } operator double() { return this->Val; } }; class num{ public: double Val; num(d ...
分类:
其他好文 时间:
2021-06-09 15:24:44
阅读次数:
0
##题目 #####题目背景 Life种了一块田,里面种了有一些桃树。 Life对PFT说:“我给你一定的时间去摘桃,你必须在规定的时间之内回到我面前,否则你摘的桃都要归我吃!” PFT思考了一会,最终答应了 由于PFT的数学不好!它并不知道怎样才能在规定的时间获得最大的价值, 由于PFT不是机器人 ...
分类:
其他好文 时间:
2021-06-08 23:44:47
阅读次数:
0
官网样例 // Create orders LOAD CSV WITH HEADERS FROM 'https://gist.githubusercontent.com/jexp/054bc6baf36604061bf407aa8cd08608/raw/8bdd36dfc88381995e6823f ...
分类:
其他好文 时间:
2021-06-08 23:43:05
阅读次数:
0
错误现象 runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized ...
分类:
Web程序 时间:
2021-06-08 23:40:55
阅读次数:
0
效果图: (function(window,document,undefined){ var hearts = []; window.requestAnimationFrame = (function(){ return window.requestAnimationFrame || window. ...
分类:
其他好文 时间:
2021-06-08 23:26:42
阅读次数:
0
class Solution { //二刷没想到用动态规划。 public int longestValidParentheses(String s) { if(s.equals(""))return 0; int[] dp=new int[s.length()]; char[] ss=s.toCh ...
分类:
其他好文 时间:
2021-06-08 23:23:49
阅读次数:
0
1、 #include <stdio.h> #include <time.h> // time_t数据类型,日历时间头文件 int main(void) { time_t current = time(NULL); // 利用time函数获取日历时间(返回1970之后的秒数,整型) struct t ...
分类:
编程语言 时间:
2021-06-08 23:04:50
阅读次数:
0
1.实现一个算法,确定一个字符串 s 的所有字符是否全都不同。 示例 1: 输入: s = "leetcode"输出: false 示例 2: 输入: s = "abc"输出: true限制: 0 <= len(s) <= 100如果你不使用额外的数据结构,会很加分 先以人类的思路分析,1和2-8比 ...
分类:
其他好文 时间:
2021-06-08 22:52:13
阅读次数:
0
关闭自动更新 打开 Submine Text,找到 Preferences --> Settings-User 在花括号中间写入 "update_check":false, 注册码 https://www.pythonblogs.com/sublime-text-license-key/ — BEG ...
分类:
其他好文 时间:
2021-06-08 22:48:03
阅读次数:
0