【python】Leetcode每日一题-存在重复元素3 【题目描述】 给你一个整数数组 nums 和两个整数 k 和 t 。请你判断是否存在 两个不同下标 i 和 j,使得 abs(nums[i] - nums[j]) ? t ,同时又满足 abs(i - j) ? k 。 如果存在则返回 tru ...
分类:
编程语言 时间:
2021-04-20 14:30:59
阅读次数:
0
https://blog.csdn.net/weixin_32572129/article/details/112536413 https://blog.csdn.net/qq_33431368/article/details/84777906 https://www.cnblogs.com/For ...
分类:
编程语言 时间:
2021-04-20 14:30:22
阅读次数:
0
Pyinstaller原理详解 什么是Pyinstaller Pyinstaller可以把Python程序打包成exe文件,可以在没有Python的电脑上运行,主要用于生产用。 Python.h! 在讲原理之前,我们讲一下python.h这个东东。 众所周知,Python是用C语言编写的,内部各种复 ...
分类:
其他好文 时间:
2021-04-20 14:07:38
阅读次数:
0
这个自动 focus 设置的效果是:我们从 Spartacus Unit list 页面,随便选择一行,进入明细页面之后: 键盘 focus 会自动停留在 detail 页面(下图右边红色矩形框内)第一个 focusable 的元素上: 敲回车试试: 发现 (i) icon 是 unit 明细页面第 ...
分类:
其他好文 时间:
2021-04-19 16:06:00
阅读次数:
0
前好几天学了Map集合,简单总结下重点: Map集合中有各种重要的方法,包括增加,删除元素,获取集合的大小,清空集合,对Map集合进行遍历:1.get(k) 返回为value 2.将Map集合转换成Set集合,然后对Set集合进行遍历(即利用迭代器的方式:其中分别包含for()+get()方法或者f ...
分类:
其他好文 时间:
2021-04-19 15:57:16
阅读次数:
0
#! /bin/bash # @author # @breif auto ssh function show_usage(){ echo -e " This is Usage " echo -e " -h: which host to go,for example dev041" } functio ...
分类:
其他好文 时间:
2021-04-19 15:50:26
阅读次数:
0
Python自带的random库 函数名称函数功能 random.randint(n,m) 产生n-m间的一个随机数 random.random() 产生0-1间的浮点数 random.uniform(1.1,5.4) 产生n-m间的浮点数 random.randrange(n,m,k) 产生n-m ...
分类:
编程语言 时间:
2021-04-19 15:47:15
阅读次数:
0
技巧一:字典排序 在python的中,字典里的元素(键值对)是没有排列顺序的,因此想要对字典里的元素进行排序的想法是错误的。但如果我们想要按键或值的顺序查看键值对,可以使用sorted函数进行排序,再将结果打印出来即可。 d = {'刘一':22, '陈二':20, '张三':15, '李四':19 ...
分类:
编程语言 时间:
2021-04-19 15:39:07
阅读次数:
0
Panda模块读取txt文本文件 使用pandas.read_csv函数 1. 如果txt文本中有表头(标题行) import panda as pd data = pd.read_csv('data.txt') print(data) 2. 如果txt文本中无表头 import panda as ...
分类:
编程语言 时间:
2021-04-19 15:38:55
阅读次数:
0
特殊属性 1 # 2 # @author:浊浪 3 # @version:0.1 4 # @time: 2021/4/17 9:34 5 # 6 7 8 class A: 9 pass 10 class B: 11 pass 12 class C(A,B): 13 def __init__(self ...
分类:
编程语言 时间:
2021-04-19 15:35:56
阅读次数:
0