码迷,mamicode.com
首页 >  
搜索关键字:note to self    ( 21530个结果
消除nonnull警告
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
分支结构(if/else,switch选择判断)
分支结构 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异常检测算法实现
#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
RobotFramework框架执行UI自动化用例,都调用一个公共测试库,怎么只打开一个浏览器
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
pytest 生成测试报告
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
django-rest-framework-源码解析004-三大验证(认证/权限/限流)
三大验证模块概述 在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
Django手写分页
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
解决python+selenium无法获取提示内容
问题场景:修改查询数据时,页面有提示信息,但是定位到提示信息的位置后,通过ele.text或者其他方法都无法获取具体的提示内容;最后通过get_attribute('innerHTML')搞定。 示例:ele = self.driver.find_element_by_xpath("//div[2] ...
分类:编程语言   时间:2020-07-22 20:17:32    阅读次数:83
21530条   上一页 1 ... 47 48 49 50 51 ... 2153 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!