在有些情况下我们需要按指定顺序输出数据,比如选择了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
2014-71 应用某门网应用排序管理1: 接收参数, 初始化int totalRows = 7;int type = 0;protected void Page_Load(object sender, EventArgs e){ try { type = Convert.ToInt32(Reque...
分类:
Web程序 时间:
2014-07-03 00:32:08
阅读次数:
328
首先在绑定的时候进行转换: public class RegionConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, Syste...
分类:
其他好文 时间:
2014-07-02 22:36:41
阅读次数:
317
原文:SQL 无限级分类语句原表数据为:此处用到了with关键字,在程序中也可以用递归实现,但觉得还是没有一条sql方便with tb (ID,Name,ParentID,Sort)as( select a.*,convert(varchar,convert(varchar,partid)+'->'...
分类:
数据库 时间:
2014-07-02 20:30:12
阅读次数:
244
这两个函数的作用是把字符串的大写字母和小写字母进行转换。如:
$side = uc $attrs[0]; 把attrs[0]转换成大写,然后给side变量赋值。
$gender = lc $attrs[1]; 把attrs[1]转换成小写,然后给gender赋值。
注意:
两个函数都是把转换之后的字符串作为返回的值 。uc是大写,表示upper convert,lc是小写,表示...
分类:
其他好文 时间:
2014-07-02 06:56:44
阅读次数:
456
原表数据为:此处用到了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 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