#-*-coding:utf-8class Person: __privateName=None; count=0;#既可以被实例对象引用,也可以被当做静态对象引用,NND,好混乱。 def __init__(self,name): self.count+=1 ...
分类:
编程语言 时间:
2014-07-06 23:36:44
阅读次数:
354
主要备忘:DATE_FORMAT 函数1:微博对比图(按日统计)SELECT DATE_FORMAT(tw.article_publish_time, '%Y-%m-%d'),count(page_id) FROM `tab_weibo` tw where tw.page_id =100206507...
分类:
数据库 时间:
2014-07-06 22:37:48
阅读次数:
291
好久没写博文了,添加一个练习题,选自《head_first_python》~~python列表:以中括号开始和结束"[]";列表项以逗号","分隔开,使用赋值操作符"="赋予一个标识符。如:movies=["theholy",1975,"terryjones",91,["graham",["michael","john","gilliam","idle","haha"]]]注释:1..
分类:
编程语言 时间:
2014-07-04 00:56:23
阅读次数:
596
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-04 00:12:20
阅读次数:
249
$options = array( 'conditions' => $conditions, 'fields'=>array('Category.*','COUNT(`Entity`.`id`) as `entity_co...
分类:
Web程序 时间:
2014-07-03 21:36:21
阅读次数:
252
有一个字符串首尾相连(m个字符),有n种字符组成,求一段能使包含n种字符的子串,并使长短最短,时间复杂度要求O(n),空间复杂度O(1)#include int foo(const char* str, int m, int n){ int hit[256], count = 0, begin...
分类:
其他好文 时间:
2014-07-03 20:28:46
阅读次数:
312
jsonkit 解析nsarray 时候 报错
Assertion failure in -[TXJKArray count], /Users/mqq/hudson/1740/src/TencentOpenApi_IOS/Common/Util/JSONKit.m:738
解决办法:
Had the same issue, I was trying to set the ...
分类:
Web程序 时间:
2014-07-03 18:25:16
阅读次数:
356
题意,给你n个 x,y,c,意思就是区间[x,y]被染成C色,但是颜色会被覆盖的,染色操作完成以后 问你每种颜色有多少个 并输出颜色编号id跟个数cnt
经典问题,不过写的有点撮吧,没去看别人的,这个方法应该是最传统的最普通的,常规的开数组记录,也许大神们有更高端的方法
#include
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-07-03 17:54:49
阅读次数:
162
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-03 13:05:28
阅读次数:
210
1、在EF5.0修改实体的时候,出现“对一个或多个实体的验证失败。有关详细信息,请参见“EntityValidationErrors”属性这个错误db.Configuration.ValidateOnSaveEnabled = false; int count = db.SaveChanges();...
分类:
Web程序 时间:
2014-07-03 12:29:04
阅读次数:
279