用Xpath定位元素的方法总是记不住,经常要翻出各种文档链接参考,干脆把需要用到的内容整到这个笔记中方便查找。
分类:
编程语言 时间:
2014-05-09 05:00:54
阅读次数:
436
http://oj.leetcode.com/problems/edit-distance/class Solution: # @return an
integer def minDistance(self, word1, word2): len1 = len(word1)...
分类:
编程语言 时间:
2014-05-09 04:19:03
阅读次数:
407
为什么归并排序如此有用?1.
快捷和稳定归并排序成为?一个非常棒的排序算法主要是因为它的快捷和稳定。它的复杂度即使在最差情况下都是O(n log
n)。而快速排序在最差情况下的复杂度是O(n^2),当n=20的时候,它比归并要慢4.6倍。2.容易实现#coding:utf-8def merge_so...
分类:
编程语言 时间:
2014-05-09 03:44:58
阅读次数:
386
2951:浮点数求高精度幂总时间限制:1000ms内存限制:65536kB描述有一个实数 R (
0.0 4 #include 5 #define SIZE 126 6 #define LEN 5 7 8 int a[SIZE],b[LEN]; 9 10
int mul( int alen,i...
分类:
其他好文 时间:
2014-05-09 03:28:02
阅读次数:
379
Data Types1,list 2,tuple 3,sets 4,dictionary,
分类:
编程语言 时间:
2014-05-09 03:21:50
阅读次数:
244
http://wiki.apache.org/hadoop/Hbase/ThriftApi首先根据Hbase.thrift文件生成Python接口代码,Hbase.thrift在Hbase的源码中有,路径src/main/resources/org/apache/hadoop/hbase/thrif...
分类:
编程语言 时间:
2014-05-09 02:51:31
阅读次数:
344
看了一下python的书,拿个小游戏来练练手,其实就一...
分类:
编程语言 时间:
2014-05-09 02:36:00
阅读次数:
251
在Python中异常通常可以用于各种用途,下面是最常见的几种。
错误处理
每当运行时检测到错误,Python的默认异常处理行为将启动(停止程序,打印错误信息)。如果不想启动这种默认
行为,就要写try语句捕捉异常并从异常中恢复。当检测到错误是,Python会跳到try处理器,程序在try之后会接着
继续运行。
事件通知
发出有效状态的信号
特殊情况处理
很难调整代码去处理的问题...
分类:
编程语言 时间:
2014-05-09 00:31:33
阅读次数:
394
c:\python33\python.exe c:\python33\trycoding.py
分类:
编程语言 时间:
2014-05-08 23:34:49
阅读次数:
399
#include#include#include#includeusing namespace
std;const int M=1000;int main(){ string china; int
a[M]={-1},b[M]={-1},i,indexa,indexb,len,m; ...
分类:
其他好文 时间:
2014-05-08 23:27:02
阅读次数:
540