var imagesrcname='a',thissrolltop=300, lazyLoad=(function(){ var map_element = {}, element_obj = [], download_count = 0, last_offset =...
分类:
其他好文 时间:
2014-08-12 18:43:54
阅读次数:
205
在排查一个比较复杂的功能时,怎么查都结果不对,后来发现是因为empty()函数用错了!!!我理所当然的以为$list=array();if(empty(count($list))){ $course_rate = 0;}这样写没什么问题。。。。事实上这是错的。。。因为empty只能检查变量,不能检查...
分类:
其他好文 时间:
2014-08-12 18:15:24
阅读次数:
220
Main reference:http://zhaohongze.com/wordpress/2014/01/04/leetcode-minimum-window-substring/The ART of counting. So difficult and beautiful problem. I...
Count Good SubstringsTime Limit: 2000msMemory Limit: 262144KBThis problem will be judged onCodeForces. Original ID:451D64-bit integer IO format:%I64d ...
分类:
其他好文 时间:
2014-08-12 12:43:24
阅读次数:
237
查询及删除重复记录的SQL语句1、查找表中多余的重复记录,重复记录是根据单个字段(Id)来判断select * from 表 where Id in (select Id from 表 group byId having count(Id) > 1)2、删除表中多余的重复记录,重复记录是根据单个字段...
分类:
数据库 时间:
2014-08-12 03:05:23
阅读次数:
239
declare @i intdeclare @j intdeclare @phone varchar(20)set @j=1 select @i=count(*) from LatestLocationDECLARE L_cursor CURSOR FOR SELECT Phone FROM Lat...
分类:
数据库 时间:
2014-08-12 00:27:13
阅读次数:
290
其实本题和:http://www.geeksforgeeks.org/count-possible-decodings-given-digit-sequence/是类似的。但是这道题需要考虑错误情况。 1 class Solution { 2 public: 3 int numDecodin...
分类:
其他好文 时间:
2014-08-11 20:33:52
阅读次数:
204
今天操作XML的时候,用到了批量循环删除节点.出现了问题,即循环未结束,程序就跳出循环。搞了好久才弄明白。解决前的代码:XmlNodeList items = xn.ChildNodes; //获取节点列表//删除所有节点for (int i = 0; i < items.Count; i++){ ...
分类:
Web程序 时间:
2014-08-11 17:15:12
阅读次数:
175
在ADO中,我们需要在SQL语句中使用乘法运算,可是添加'*'以后执行程序总是会出错,这是因为‘*’与sql中的‘*’关键字重合了,所以编译会出错。解决办法:将乘法运算放到sql语句外面,将结果放入一个变量中,然后在sql语句中引用即可int count = (this.AspNetPager1.C...
分类:
数据库 时间:
2014-08-11 11:50:32
阅读次数:
205
'每页的记录数
dim pagesize
pagesize= "30"
'读出总记录数,总页数,作者注
Dim TotalRecords,TotalPages
SQLstr="Select count(id) As RecordSum From table1"
Set Rs=conn.Execute(SQLstr,0,1)
TotalRecords=Rs("RecordSum")...
分类:
Web程序 时间:
2014-08-11 10:08:31
阅读次数:
257