Sql Server 中一个非常强大的日期格式化函数Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AMSelect CONVERT(varchar(100), GETDATE(), 1): 05/16/06Select CON...
分类:
数据库 时间:
2015-05-11 14:39:36
阅读次数:
162
1、XML第一行:
encoding = "utf-8" standalone = 'yes'?> 住:红色部分顺序不能换
2、XML元素可以具有属性,属性的形式为:
属性名 = “属性值”, 比如:
多个属性之间使用空格分开。
3、 标签的名字严格区分大小写
4、 使用样式使XML内容与展现形式的分离。
5、 XML注释:示例,。注释不能嵌套,只有一种...
分类:
其他好文 时间:
2015-05-10 22:25:59
阅读次数:
125
根据官方文档来说,http://www.yiichina.com/doc/guide/2.0/input-validation#standalone-validators需要对模型中定义规则的rules方法指定使用范围,否者的话每一次调用保存都会调用这个方法官方文档解释:对于每个规则,你至少需要指定该规则适用于哪些特性,以及本规则的类型..
分类:
其他好文 时间:
2015-05-10 20:46:47
阅读次数:
200
题目描述:
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
题目解析:
将一个整形数的罗马形式表示出来。罗马数字和整形数转换规则参考http://blog.csdn.net/sinat_24520925/arti...
分类:
其他好文 时间:
2015-05-10 09:57:55
阅读次数:
136
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:
其他好文 时间:
2015-05-09 17:29:40
阅读次数:
125
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
基本思路:
中序遍历的过程,与有序链表的顺序是一一对应的。
采用中序遍历构造进树的构造。
并利用取值范围,确定,根的位置,以及子树的范围。
故需要遍历整个链表,求...
分类:
其他好文 时间:
2015-05-09 11:43:53
阅读次数:
140
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:
其他好文 时间:
2015-05-09 08:56:30
阅读次数:
104
Problem:
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
Solution:
时间复杂度O(n)
题目大意:
与12题相反,给一个罗马数字,要求转化为十进制数字
解题思路:
Java源...
分类:
编程语言 时间:
2015-05-08 18:15:03
阅读次数:
161
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
基本思路:
由于队列已经进行排序,每次取其中点,作为树的根。
即可建得一棵平衡二叉树。
/**
* Definition for a binary tree node.
*...
分类:
其他好文 时间:
2015-05-08 18:14:35
阅读次数:
111
在Docker中安装mongodb采用的mongodb镜像:https://registry.hub.docker.com/u/tutum/mongodb/以该镜像启动一个容器(注意此时mongodb是standalone模式):dockerrun-d--name=mongodb-p27017:27017-p28017:28017tutum/mongodb:3.0dockerlogsmongodb输出信息:==================..
分类:
数据库 时间:
2015-05-08 15:09:31
阅读次数:
260