1、拆箱和装箱,我们都知道的是装箱:就是将值类型转换为引用类型拆箱:将引用类型转换为值类型2、那么看下面一个例子:string str=“123”int n=Convert.ToInt32(str);string是引用类型,int为值类型。那么,此处有没有发生拆装箱呢答案是:没有原因:看两种类型是否...
分类:
其他好文 时间:
2015-08-10 11:58:23
阅读次数:
136
【108-Convert Sorted Array to Binary Search Tree(排序数组转变为平衡二叉树)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
题目...
分类:
编程语言 时间:
2015-08-10 08:15:28
阅读次数:
136
【109-Convert Sorted List to Binary Search Tree(排序链表转换成二叉排序树)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a singly linked list where elements are sorted in ascending order, convert it to a height balanc...
分类:
编程语言 时间:
2015-08-10 08:14:28
阅读次数:
157
mplementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and a...
分类:
其他好文 时间:
2015-08-10 01:54:55
阅读次数:
121
1、Primary Key约束 SQLServer中有五种约束,Primary Key约束、Foreign Key约束、Unique约束、Default约束和Check约束. 在表中常有一列或多列的组合,其值能唯一标识表中的每一行。 这样的一列或多列成为表的主键(PrimaryKey)。一个表只能....
分类:
数据库 时间:
2015-08-09 22:05:20
阅读次数:
306
ASP.NET邦定数据“”运用三元运算符:60)?Convert.ToInt32(Eval("NowDate"))/60+"小时前":Eval("NowDate").ToString()+"分钟前"%> 来自优酷网ImageUrl=''数据绑定时多余的长度用“……”代替:10?Eval("NewsT...
分类:
其他好文 时间:
2015-08-09 18:45:20
阅读次数:
111
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Solution: 枚举,考虑每个字符以及每两个字符的组合 1 class Soluti...
分类:
其他好文 时间:
2015-08-08 21:05:42
阅读次数:
115
1、类型如果相兼容的两个变量,可以使用自动类型转换或者强制类型转换, 但是,如果两个类型的变量不兼容,比如 string与int或者string 与double, 这个时候我们可以使用一个叫做Convert的转换工厂进行转换。 注意:使用Convert进行类型转换,也需要满足一个条件: 面儿上必须要...
分类:
Web程序 时间:
2015-08-08 16:18:56
阅读次数:
116
1. standalone.xml中修改: enable-welcome-root="true" 改为 false <socket-binding name="http" port="80"/> 2. 在第一个项目中添加jboss-web.xml(和web.xml一个目录)。 <?xml version=‘1.0‘ encoding=‘UTF-...
分类:
其他好文 时间:
2015-08-08 10:37:23
阅读次数:
184