[] 和 () 创建的列表推导式不同 lst = [i for i in range(4)] print(lst) print(type(lst)) gen = (i for i in range(4)) print(gen) print(type(gen)) 对 () 创建的对象进行遍历 gen ...
分类:
其他好文 时间:
2020-05-07 13:17:12
阅读次数:
79
#自然语言处理词纠错,编辑距离计算,DP算法 def edit_distance(s,p): if len(s)==0:return len(p) if len(p)==0:return len(s) dp=[[0 for i in range(len(p)+1)] for j in range(l ...
分类:
编程语言 时间:
2020-05-07 00:54:50
阅读次数:
74
1.坚果云下载 坚果云从deepin的应用商店消失了,所以要从官网下载坚果云,我下的ubuntu的64位deb 2.安装 sudo dpkg -i nautilus_nutstore_amd64.deb sudo apt install -f 3.依赖处理 安装完后应该是打不开坚果云界面 cd ~/ ...
分类:
其他好文 时间:
2020-05-07 00:50:46
阅读次数:
384
0x01 修改金币到8位,才能买东西 robots.txt中发现.git泄露 下载附件,得到源码 审计api.php 我们传入的值与随机生成的值进行比较, 按照相同的个数,得到不同的钱 if($numbers[$i] == $win_numbers[$i]) 存在若类型比较 抓包修改json值 tr ...
分类:
其他好文 时间:
2020-05-07 00:46:32
阅读次数:
132
题目链接: 用到print字符串小数点方法 ...
分类:
编程语言 时间:
2020-05-06 21:27:52
阅读次数:
111
Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and ino ...
分类:
其他好文 时间:
2020-05-06 13:56:18
阅读次数:
55
题目描述 给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。示例: 输入: "abcabcbb" 输出: 3 解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。 思路补充: 使用set而不是数组,因set是用哈希表实现的,查找效率更高,为O(1) 要检查一个字符串是否有 ...
分类:
其他好文 时间:
2020-05-06 01:07:33
阅读次数:
46
async/await https://javascript.info/async-await 需要浏览器支持,后者使用webpack转换为ES5. There’s a special syntax to work with promises in a more comfortable fashio ...
分类:
Web程序 时间:
2020-05-05 20:24:56
阅读次数:
120
函数 易错点总结 可更改(mutable)与不可更改(immutable)对象 在 python 中,strings, tuples, 和 numbers 是不可更改的对象,而 list,dict 等则是可以修改的对象。 不可变类型 :变量赋值 a=5 后再赋值 a=10 ,这里实际是==新生成一个 ...
分类:
其他好文 时间:
2020-05-05 17:44:50
阅读次数:
94