- 博客(5)
- 收藏
- 关注
原创 Python抓取小说
Python抓取小说前言此脚本为了在MAC上抓取小说而写,用Python几句代码就可以了。代码[python] view plaincopy# coding=utf-8 import re import urllib2 import chardet
2014-05-14 15:43:56
360
原创 leetCode解题报告5道题(七)
题目一:Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return tru
2014-05-14 15:43:08
250
原创 第七章 快速排序
快速排序最坏情况下时间复杂度是O(n*n),但是它平均时间复杂度是O(N*logn),并且常数因子很小,可实现就地排序,所以被作为内排序的常用排序方法.为什么张木匠在演讲www.fewnai.com[cpp] view plaincopyprint?#include using namespace std; vo
2014-05-14 01:42:14
375
原创 Intent传递简单对象与集合
们在Intent传递传递对象,可以有三种方式,实现Serializable接口、实现Parcelable接口,使用json格式序列化与反序列化。 在此我们使用第二方式,现实Parcelable接口,实现Parcelable需要以下操作。 1.writeToParcel 方法:该方法将类的数据写入外部提供的Parcel中。 2.describeContents 方法
2014-05-14 01:41:31
254
原创 .Net、Java、为我作证,随机数是骗人的
几乎所有编程语言中都提供了"生成一个随机数"的方法,也就是调用这个方法会生成一个数,我们事先也不知道它生成什么数。比如在.Net中编写下面的代码:Random rand = newRandom();Console.WriteLine(rand.Next());运行后结果如下: Next()方法用来返回一个
2014-05-13 19:29:18
340
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人