import requests import time import threading from queue import Queue import random import sys def getheaders(): user_agent_list = [ "Mozilla/5.0 (Wind ...
分类:
其他好文 时间:
2020-09-18 00:18:15
阅读次数:
29
class Solution(object): def isBalanced(self, root): """ :type root: TreeNode :rtype: bool """ if not root: return True # 求左子树深度 leftDenth = self.treeD ...
分类:
其他好文 时间:
2020-09-18 00:02:14
阅读次数:
32
__call__方法和可调用对象 定义了call方法的对象,称为可调用对象,即该对象可以像函数一样调用 a = 30 b = 50 c = a+b >c = a.__add__(b) obj() >__call__ 1 class SalaryAcount: 2 def __call__(self, ...
分类:
编程语言 时间:
2020-09-18 00:01:28
阅读次数:
36
Swagger进行接口测试 1、导入依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</version> </dependency> ...
分类:
其他好文 时间:
2020-09-17 22:53:16
阅读次数:
45
当我们对于一些查询条件需要用到复杂子查询时,聚合函数操作起来非常麻烦,因此使用开窗函数能够轻松实现 窗口函数的引入是为了解决想要既显示聚集前的数据,又要显示聚集后的数据。 开窗函数对一组值进行操作,不需要使用GROUP BY子句对数据进行分组,能够在同一行中同时返回基础行的列和聚合列。 强调:使用 ...
分类:
其他好文 时间:
2020-09-17 22:00:28
阅读次数:
24
一个分页查询set statistics time on; -- 分页查询(通用型) select top pageSize * from (select row_number() over(order by sno asc) as rownumber,* from student) temp_ro ...
分类:
Web程序 时间:
2020-09-17 20:00:44
阅读次数:
39
修改sql_modelSET@@GLOBAL.sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";查看SQl_modelselect@@GLOBAL.sql_mode备注:设置成功以后重新启动
分类:
数据库 时间:
2020-09-17 19:55:51
阅读次数:
32
需求:启动后、路由加载前加载一段代码 步骤: 1.创建一个app组件 2.编写ready方法 from django.apps import AppConfig class Person(AppConfig): name = 'person' def ready(self): from django ...
分类:
其他好文 时间:
2020-09-17 19:02:27
阅读次数:
32
class http_server { const HOST = "127.0.0.1"; const PORT = 8811; protected $server = null; public function __construct() { $this->server = new swoole_ ...
分类:
Web程序 时间:
2020-09-17 16:57:29
阅读次数:
37
题目: 给你一个整数数组 nums,请你将该数组采用选择排序方式进行升序排列。 算法描述: 选择排序(Selection-sort)是一种简单直观的排序算法。它的工作原理:首先在未排序序列中找到最小(大)元素,存放到排序序列的起始位置,然后,再从剩余未排序元素中继续寻找最小(大)元素,然后放到已排序 ...
分类:
编程语言 时间:
2020-09-17 15:32:29
阅读次数:
29