https://stackoverflow.com/questions/32539285/pointer-is-missing-a-nullability-type-specifier To disable this warning across your entire project Go to ...
分类:
其他好文 时间:
2020-07-24 16:21:59
阅读次数:
78
分支结构 Note:switch中支持的类型为byte,short,int,char,String(JDK7+),枚举共6种,不支持浮点型 1.if结构 if:如果 格式: if(布尔表达式){ //条件成立逻辑代码块 } import java.util.Scanner; public class ...
分类:
其他好文 时间:
2020-07-23 23:25:18
阅读次数:
87
#LOF异常检测算法主要用异常点的检测输出from scipy.spatial.distance import cdistimport numpy as npclass LOF: def __init__(self, data, k, epsilon=1.0): self.data = data s ...
分类:
编程语言 时间:
2020-07-23 22:41:37
阅读次数:
93
WebOpLib.py测试库 from selenium import webdriver from cfg import *class WebOpLib(): def openwebsite(self): self.driver=webdriver.Chrome() self.driver.max ...
分类:
其他好文 时间:
2020-07-23 18:56:59
阅读次数:
112
pip安装 pip install pytest-html 编写脚本 import pytest class TestClass(object): def test_one(self): x = "this" assert 'h' in x def test_two(self): x = "hell ...
分类:
其他好文 时间:
2020-07-23 16:50:29
阅读次数:
121
二叉树重建 问题:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重 复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。 解决: #递归一 # class Tree ...
分类:
其他好文 时间:
2020-07-23 16:17:32
阅读次数:
71
三大验证模块概述 在DRF的APIView重写的dispatch方法中, self.initial(request, *args, **kwargs) 这句话就是执行三大验证的逻辑, 点进去可以看到依次执行的就是认证(authentication)/权限(permission)/限流(throttl ...
分类:
其他好文 时间:
2020-07-23 16:05:48
阅读次数:
66
问题:输入一个链表,按链表从尾到头的顺序返回一个ArrayList。 解决: #方法一: class Solution: def printListFromTailToHead(self, listNode): # write code here ArrayList = [] while listN ...
分类:
其他好文 时间:
2020-07-23 01:36:18
阅读次数:
62
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
问题场景:修改查询数据时,页面有提示信息,但是定位到提示信息的位置后,通过ele.text或者其他方法都无法获取具体的提示内容;最后通过get_attribute('innerHTML')搞定。 示例:ele = self.driver.find_element_by_xpath("//div[2] ...
分类:
编程语言 时间:
2020-07-22 20:17:32
阅读次数:
83