C#多线程及控制线程数量,对for循环输出效率。虽然输出不规律,但是效率明显提高。思路:如果要删除1000条数据,只使用for循环,则一个接着一个输出。所以,把1000条数据分成seed段,每段10条数据。int seed = Convert.ToInt32(createCount.Value) %...
分类:
编程语言 时间:
2014-07-07 21:52:32
阅读次数:
259
原文: DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决: DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决:DateTime.ParseExact(this....
分类:
其他好文 时间:
2014-07-07 20:08:26
阅读次数:
206
在有些情况下我们需要按指定顺序输出数据,比如选择了ID in(3,1,2,5,4)我们希望按这个3,1,2,5,4的顺序输出,这样只使用order by ID是无法实现的,但是我们可以使用order by charindex(','+convert(varchar,ID)+',',',3,1,2,5...
分类:
数据库 时间:
2014-07-03 11:00:26
阅读次数:
352
cat ascii.hex | ascii2binary -b h -t us > ascii.bin x86dis -e 0 -s att -f ascii.bin echo "d8 01 77 c4 90 90 90 90" | ascii2binary -b h -t uc | x86d...
分类:
其他好文 时间:
2014-07-03 10:07:55
阅读次数:
275
原表数据为:此处用到了with关键字,在程序中也可以用递归实现,但觉得还是没有一条sql方便with tb (ID,Name,ParentID,Sort)as( select a.*,convert(varchar,convert(varchar,partid)+'->'+convert(varch...
分类:
数据库 时间:
2014-06-30 23:34:46
阅读次数:
332
convert(varchar(10),字段名,转换格式)CONVERT(nvarchar(10),count_time,121)CONVERT为日期转换函数,一般就是在时间类型(datetime,smalldatetime)与字符串类型(nchar,nvarchar,char,varchar)相互...
分类:
数据库 时间:
2014-06-30 23:19:30
阅读次数:
292
在使用PHP处理字符串时,我们经常会碰到字符编码转换的问题,你碰到过iconv转换失败吗?发现问题时,网上搜了搜,才发现iconv原来有bug ,碰到一些生僻字就会无法转换,当然了配置第二个参数时,可以稍微弥补一下默认缺陷,不至于无法转换是截断,用法如下iconv(“UTF-8″,”GB2312//...
分类:
Web程序 时间:
2014-06-30 22:08:40
阅读次数:
282
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
给定一个罗马数字,把它转换成一个整数。
把罗马数字字符串转换成字符数组先,如下表,每个数字仅对应一个字符,而且字符不一样。故可从头开始取值进行对应。
The R...
分类:
其他好文 时间:
2014-06-30 09:52:40
阅读次数:
251
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
给定一个整数,把它转换成罗马数字。
输入可以保证在1到3999之间。
下图是转换规则。
1
2
3
4
...
分类:
其他好文 时间:
2014-06-30 09:28:05
阅读次数:
308
题目
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitte...
分类:
其他好文 时间:
2014-06-30 00:46:38
阅读次数:
262