LeetCode解题之Count and Say原题把一个数字用几个几的形式表示出来。如2就是1个2,即12。对12进行数数得到1112,依次类推。假设初始数字是1,求第n个数是什么。起始5个数字为1, 11, 21, 1211, 111221, …...
分类:
其他好文 时间:
2015-12-28 10:35:53
阅读次数:
149
问题引出:StringBuilder sqlQuery = new StringBuilder();sqlQuery.Append("SELECT COUNT([ProductID]) FROM ~~where [IsDelete]='F' );1.StringBuilder和String的区别 S...
分类:
移动开发 时间:
2015-12-27 16:07:38
阅读次数:
147
##创建表及数据CREATETABLEevents_all_time(idint(11)unsignedNOTNULLAUTO_INCREMENT,actionvarchar(255)NOTNULL,countint(11)NOTNULLDEFAULT0,PRIMARYKEY(id),UNIQUEKEYuniq_action(action));insertintoevents_all_time(action,count)values(‘yangdan‘,1000);insertintoevents..
分类:
数据库 时间:
2015-12-26 23:41:47
阅读次数:
286
You are given an integer arraynumsand you have to return a newcountsarray. Thecountsarray has the property wherecounts[i]is the number of smaller elem...
分类:
其他好文 时间:
2015-12-26 18:30:24
阅读次数:
144
var i:integer=1;procedure TForm4.BitBtn1Click(Sender: TObject);begin Inc(i);if i>ImageList1.Count-1 then i:=0;ImageList1.GetBitmap(i,image1....
分类:
其他好文 时间:
2015-12-26 16:38:48
阅读次数:
171
呵呵,不得不佩服Python的强大,寥寥几句代码就能做一个简单的刷博器。import webbrowser as webimport timeimport oscount=0while count<10: count=count+1 #你要刷的博客 web.open_new_tab...
分类:
编程语言 时间:
2015-12-26 16:34:25
阅读次数:
157
以多线程的方式向标准输出打印日志#!/usr/bin/pythonimport timeimport threadingclass PrintThread(threading.Thread): def __init__(self,threadid,count,mutex): th...
分类:
编程语言 时间:
2015-12-26 14:59:52
阅读次数:
169
1、按照1、2、3、4、5顺序显示 [@cms_channel id='1'] ${tag_bean.name!} [@cms_content_list count=5 channelId=tag_bean.id channelOption=1] [#list tag_list as t] ...
分类:
其他好文 时间:
2015-12-26 11:39:02
阅读次数:
150
#include int main(int argc, const char * argv[]) { // 定义变量 char str[100]; int words = 0; int count = 0; // 提示用户输入字符串 printf(...
分类:
其他好文 时间:
2015-12-26 08:35:24
阅读次数:
177
在查询mongo时用到了正则查询设字符串为 str = '/ab/cd.ef?g='直接用正则查询没有匹配。collection.find({"re":{'$regex':str},'b':{'$nin':[False]}}).count()原因是 / . ? 都是正则表达式中的特殊字符,如果要保留...
分类:
编程语言 时间:
2015-12-25 19:24:10
阅读次数:
332