def get(self, request, *args, **kwargs): # 获取当前页码 pg = int(request.GET.get('page', 1)) obj = Student.objects.all().order_by("id") # 创建分页器对象 page_obj = ...
分类:
其他好文 时间:
2020-07-22 20:58:35
阅读次数:
93
_all 可以改为自己的索引名称,也可以直接执行 curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete ...
1 with temp1 as ( 2 select 1 as id ,111 as barCode,'A1' name union 3 select 2 as id ,112 as barCode,'A2' name union 4 select 3 as id ,200 as barCode,' ...
分类:
数据库 时间:
2020-07-22 20:30:52
阅读次数:
84
Given an array arr. You can choose a set of integers and remove all the occurrences of these integers in the array. Return the minimum size of the set ...
分类:
其他好文 时间:
2020-07-22 20:09:57
阅读次数:
70
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n ...
分类:
其他好文 时间:
2020-07-22 15:50:36
阅读次数:
67
Given a list of folders, remove all sub-folders in those folders and return in any order the folders after removing. If a folder[i] is located within ...
分类:
其他好文 时间:
2020-07-22 15:45:22
阅读次数:
74
总是忘记,自己整理。 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; #开启mysql远程访问GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; #开启m ...
分类:
其他好文 时间:
2020-07-22 11:13:08
阅读次数:
81
一.下载 下载地址:https://www.scala-lang.org/download/all.html 下载对应得版本,有linux安装包、windows安装包,源码包,按需下载 二.windows安装 1)首先确保jdk1.8安装成功 2)解压文件到指定目录 3)配置环境变量 4)验证,如下 ...
分类:
其他好文 时间:
2020-07-22 02:13:37
阅读次数:
107
##1、创建数据库 create database xxx; 创建后台数据库 ##2、创建用户、授权 grant all on 数据库.* to 用户@'%'identified by 'password'; GRANT SELECT, INSERT, UPDATE, REFERENCES, DEL ...
分类:
数据库 时间:
2020-07-22 01:49:24
阅读次数:
102
Promise是一个构造函数,自己身上有all、reject、resolve这几个眼熟的方法,原型上有then、catch等同样很眼熟的方法。 那就new一个 var p = new Promise(function(resolve, reject){ //做一些异步操作 setTimeout(fu ...
分类:
其他好文 时间:
2020-07-21 22:52:13
阅读次数:
90