Given a string S and a string T, count the
number of distinct subsequences of T in S.A subsequence of a string is a new
string which is formed from th...
分类:
其他好文 时间:
2014-05-12 09:37:51
阅读次数:
287
Problem DescriptionIn 2100, since the sea level
rise, most of the cities disappear. Though some survived cities are still
connected with others, but m...
分类:
其他好文 时间:
2014-05-10 07:33:38
阅读次数:
265
import MySQLdb# 打开数据库连接db =
MySQLdb.connect("localhost","testuser","test123","TESTDB" )# 使用cursor()方法获取操作游标
cursor = db.cursor() #cursor用来执行命令的方法:
分类:
数据库 时间:
2014-05-10 06:03:19
阅读次数:
309
在执行/etc/init.d/ndbd--initial出现下列错误[root@ndbd1~]#/etc/init.d/ndbd--initialUnabletoconnectwithconnectstring:nodeid=0,localhost:1186Retryingevery5seconds.Attemptsleft:121110987654321,failed.解决办法1.查看/etc/my.cnf文件配置[root@ndbd1~]#cat/etc/my.cnf..
分类:
数据库 时间:
2014-05-10 04:07:58
阅读次数:
1778
首先需要保证PC与手机在同一局域网内或有独立公网IP, 以下以在同一局域网为例(保证手机能访问到这台PC机器):
1. PC端配置
1). 安装Fiddler
2). 开启Fiddler以下功能:
1).allow romote computer to connect.
2).decrypt https traffic
3).ignore server...
分类:
其他好文 时间:
2014-05-10 03:25:39
阅读次数:
380
Problem DescriptionThere are N villages, which
are numbered from 1 to N, and you should build some roads such that every two
villages can connect to e...
分类:
其他好文 时间:
2014-05-10 02:28:50
阅读次数:
374
Mr. Pote's shop sells beans now. He has N bags of beans in his warehouse, and he has numbered them with 1, 2, …, N according to their expired dates. The i-th bag contains Wi units of beans. For sellin...
分类:
其他好文 时间:
2014-05-09 22:41:06
阅读次数:
503
Windows Socket+TCP服务器客户端
Winsock是 Windows下套接字标准。
1.UDP socket编程:
UDP(用户数据报协议)是一个无连接,不可靠的数据传输,其特点是简单,快捷。相比与TCP,UDP不需要建立连接(不需connect、accept函数),数据发送接收...
Long 无法转化成Integer类型.
这个异常 经常出现在hinbernate分页查询的时候.
原因:
这里在Hibernate2.0之前版本list.get(0)返回的是Integer类型.
但是在Hibernate3.0以后版本list.get(0)返回的是Long类型.
解决方法
public Intege...
分类:
编程语言 时间:
2014-05-09 22:00:46
阅读次数:
327
phpize可以往php种追加新的模块
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script....
分类:
Web程序 时间:
2014-05-09 21:06:27
阅读次数:
375