爬虫推荐的工具:pyspider,BeautifulSouprequestsscrapymongodbrediskafka.repyV8:python执行js的插件phatomjs:一个无界面的,可脚本编程的WebKit浏览器引擎。它原生支持多种web 标准:DOM 操作,CSS选择器,JSON,C ...
分类:
其他好文 时间:
2017-09-08 16:26:09
阅读次数:
227
以Collections.synchronizedList(List<T> list)为例来讲一下如何将非线程安全的集合转为线程安全的集合。 Collections.synchronizedList源码如下:(注意这里:静态资源不认识范型,所以需要<T>来声明一下范型) 如果是Collections ...
分类:
其他好文 时间:
2017-09-08 14:57:15
阅读次数:
152
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except ...
分类:
编程语言 时间:
2017-09-08 10:14:57
阅读次数:
231
Given an integer array of size n, find all elements that appear more than ? n/3 ? times. The algorithm should run in linear time and in O(1) space. 题目 ...
分类:
其他好文 时间:
2017-09-08 09:59:29
阅读次数:
256
习题 32: 循环和列表 现在你应该有能力写更有趣的程序出来了。如果你能一直跟得上,你应该已经看出将“if 语句”和“布尔表达式”结合起来可以让程序作出一些智能化的事情。 然而,我们的程序还需要能很快地完成重复的事情。这节习题中我们将使用 for-loop (for 循环)来创建和打印出各种各样的列 ...
分类:
编程语言 时间:
2017-09-08 00:26:30
阅读次数:
272
要命的invalid signature。其实腾讯的文档已经写了,只能怪我自己理解能力太差,掉了好几次坑。 签名要用到的jsapi_ticket需要保存的,2小时有效期。如果在2小时内出现问题需要删除才能工作,一般是自身程序的问题,请检查。 nonceStr和noncestr的大小写,当心! url ...
分类:
微信 时间:
2017-09-07 19:32:26
阅读次数:
481
策略模式定义, 先看看维基上如何定义的: The strategy pattern(also known as the policy pattern) is a behavioural software design pattern that enables selecting an algorit ...
分类:
其他好文 时间:
2017-09-07 00:57:01
阅读次数:
150
Job for smb.service failed because the control process exited with error code. CentOS 7 I have this problem with my CentOS 7.2 server which will not s ...
分类:
其他好文 时间:
2017-09-06 21:28:42
阅读次数:
867
1,简单输入输出交互。 input('please input your name;') please input your name:hh 'hh' name=input('what your name:') what your name:hh print('你好,%s'%name) 你好,hh ...
分类:
编程语言 时间:
2017-09-06 21:26:17
阅读次数:
131
VMWare下Centos 6.9安装教程,记录如下 1、新建虚拟机 (1)点击文件-->新建虚拟机 (2)选择 自定义(高级)-->下一步 (3)选择Workstation 12.0-->下一步 (4)选择 稍后安装操作系统-->下一步 (5)选择 Linux à Red Hat Enterpri ...
分类:
系统相关 时间:
2017-09-06 21:25:41
阅读次数:
363