前者适合将object类类型转换成int类型,如Convert.ToInt32(session["shuzi"]); (int)适合简单数据类型之间的转换; int.Parse适合将string类类型转换成int类型,如int.Parse(session["shuzi"].ToString())。(...
分类:
其他好文 时间:
2014-11-21 23:13:32
阅读次数:
167
--类型转换函数--+首先是一个算术运算符,只有当两边都是字符串类型的时候才是连接符select 1+'a'--cast(源数据 as 目标类型)select cast(1 as CHAR)+'a'select datalength(cast(1 as CHAR))--convert(目标类型,源数...
分类:
数据库 时间:
2014-11-20 23:35:09
阅读次数:
271
int Month = 9; //第一天 DateTime TheFirstDay = Convert.ToDateTime(DateTime.Now.Year + "/" + Month + "/1 00:00:00"); //最后...
分类:
其他好文 时间:
2014-11-20 15:04:31
阅读次数:
153
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.二分递归转换Hide TagsTreeDepth-first Search/** * Definition...
分类:
其他好文 时间:
2014-11-20 13:40:54
阅读次数:
171
以下语句为更改 tevent表中的eventtime字段为2011-7-16当eventtime为2012-02-29时update tevent set eventtime='2011-7-16'+right(convert(varchar(23),eventtime,121),13) where...
分类:
数据库 时间:
2014-11-20 13:29:10
阅读次数:
142
mac环境下制作windows系统U盘启动盘下载系统文件ylmf.iso转换为img文件hdiutilconvert/Users/os/Downloads/ylmf.iso-formatUDRW-o/Users/os/Downloads/ylmf.img3.卸载U盘diskutillist/dev/disk0#:TYPENAMESIZEIDENTIFIER0:GUID_partition_scheme*251.0GBdisk01:EFIEFI209.7MBdi..
今天项目要求从Apache转到Nginx,遇到了要将原来的rewrite规则移过来的问题,找了半天资源,居然有一个转换工具,地址如下:http://www.anilcetin.com/convert-apache-htaccess-to-nginx/转化后的代码如下: if ($args ~ "^(...
分类:
数据库 时间:
2014-11-19 20:23:25
阅读次数:
205
SELECT SPID=p.spid, DBName = convert(CHAR(20),d.name), ProgramName = program_name, LoginName = convert(CHAR(20),l.name), HostN...
分类:
数据库 时间:
2014-11-19 18:00:46
阅读次数:
188
usemasterselectloginame,count(0)fromsysprocessesgroupbyloginameorderbycount(0)descselectnt_username,count(0)fromsysprocessesgroupbynt_usernameorderbycount(0)desc如果某个SQLServer用户名test连接比较多,查看它来自的主机名:selecthostname,count(0)fromsysprocesses..
分类:
数据库 时间:
2014-11-19 16:22:25
阅读次数:
189
string与stream的相互转换 1 string test = “This is string″; 2 3 // convert string to stream 4 MemoryStream stream = new MemoryStream(); 5 StreamWrit...