Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte ...
分类:
其他好文 时间:
2017-10-24 14:04:26
阅读次数:
146
原文转自:http://jingpin.jikexueyuan.com/article/33478.html 这个比较好玩,或许有时能用上。 只需在浏览器地址栏里输入一行代码: 为什么它能奏效?这是用了数据URI的格式(Data URI’s format),并告诉浏览器渲染 HTML。不过 cont ...
分类:
其他好文 时间:
2017-10-23 20:49:36
阅读次数:
346
调频96.8有一种游戏:游戏中,出题者写下一件东西,其他人需要猜出这件东西是什么。当然,如果游戏规则仅此而已的话,几乎是无法猜出来的,因为问题的规模太大了。为了降低游戏的难度,答题者可以向出题者问问题,而出题者必须准确回答是或者否,答题者依据回答提出下一个问题,如果能够在指定次数内确定谜底,即为胜出 ...
分类:
编程语言 时间:
2017-10-23 20:43:35
阅读次数:
178
list 是一个允许内容重复的组合 tuple 是一个允许内容重复的组合 dict set 是一个不允许内容重复的组合,而且set里的内容位置是随意的,所以不能用索引列出 set的建立: set的常用方法: ...
分类:
编程语言 时间:
2017-10-20 16:50:45
阅读次数:
207
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the ...
分类:
其他好文 时间:
2017-10-19 21:16:10
阅读次数:
266
566. Reshape the Matrix In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but ...
分类:
其他好文 时间:
2017-10-19 20:00:26
阅读次数:
174
团队编程项目代码设计规范(爬取豆瓣电影top250) 基本格式 缩进 使用4个空格进行缩进 行宽 每行代码尽量不超过80个字符 理由: 这在查看side-by-side的diff时很有帮助 方便在控制台下查看代码 太长可能是设计有缺陷 换行 Python支持括号内的换行。这时有两种情况。 第二行缩进 ...
分类:
其他好文 时间:
2017-10-19 17:38:09
阅读次数:
183
diff -r 递归 -N 不存在则视为空文件 -u 上下文显示,默认三行 以合并的方式来显示文件内容的不同 来自: http://man.linuxde.net/di 以合并的方式来显示文件内容的不同 来自: http://man.linuxde.net/diff patch -E 删除补丁后的空 ...
分类:
系统相关 时间:
2017-10-19 16:03:10
阅读次数:
178
35w/m 43 Mary and her husband Dimitri lived in the tiny village of Perachora in southern Greece. One of Mary's prize possessions was a little white la ...
分类:
其他好文 时间:
2017-10-17 10:01:24
阅读次数:
177
版本上线,有个洗数据的流程。 根据一个文件,把sql生成出来。 习惯了利用php,非常简单的几句代码就写出来。因为没写过python,就想用py写下,虽然没啥技术含量,也就当练习下。 原文件格式如下: php 代码: py代码: 执行后,diff下俩文件一致 python的语法不太熟悉,第一次写比较 ...
分类:
编程语言 时间:
2017-10-16 23:34:30
阅读次数:
298