CAST和CONVERT:都是将一种数据类型转换成为另一种数据类型。CAST:CAST ( expression AS data_type [ ( length ) ] )EG: CAST(ListPrice AS varchar(12))cast(Round(SalesYTD / commissi...
分类:
其他好文 时间:
2014-08-18 12:21:24
阅读次数:
159
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 t...
分类:
其他好文 时间:
2014-08-18 12:20:34
阅读次数:
148
int.TryParse,Convert.ToInt32,(int)这几种类型在将浮点类型转换整数时是有差别Convert.ToInt32则会进行四舍五入int.TryParse只能转换整数,即浮点类型全部会返回0(int)不会进行四舍五入,只取整数部分,小数点部分完全舍弃usingSystem;p...
分类:
其他好文 时间:
2014-08-18 12:08:54
阅读次数:
414
class Solution {public: string convert(string s, int nRows) { int len = s.length(); if (len cols; int si = 0; int ri =...
分类:
其他好文 时间:
2014-08-17 21:21:32
阅读次数:
218
proftpd的配置方式类似apache,比vsftpd更易用,xampp就集成了proftpd. apt-cache search proftpd 搜索相关包 sudo apt-get install proftpd-basic 安装 安装时默认作为一个standalone server运行proftpd,如果每天的...
分类:
其他好文 时间:
2014-08-17 18:43:02
阅读次数:
296
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.思路:取数组的中点为树的根,前半部分为左子树,后半部分为右子树。 1 class Solution { 2...
分类:
其他好文 时间:
2014-08-17 13:02:12
阅读次数:
210
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.思路:使用两个指针分别以1、2的速度遍历链表,以定位出链表的中点,进而将链表分割成...
分类:
其他好文 时间:
2014-08-17 02:21:36
阅读次数:
246
一、类型转换1.强制转换(显示转换)A.变量=(需要转换的类型)变量--仅适合于同一类型内转换.例:float a; double b=3.14; a=(float)b;B.变量=Convert.To数据类型 (变量)--值类型转换.PS:TO数据类型必须用".net数据类型"来表示.例:float...
分类:
其他好文 时间:
2014-08-16 13:47:10
阅读次数:
234
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2014-08-16 12:19:20
阅读次数:
227
首先是加密byte[] bytes = Encoding.Default.GetBytes("要转换的字符");string str = Convert.ToBase64String(bytes);然后是解密byte[] outputb = Convert.FromBase64String(str)...
分类:
其他好文 时间:
2014-08-16 10:58:20
阅读次数:
275