while (true) { Console.Write("请输入一个年份:"); int rn =Convert .ToInt32 ( Console.ReadLine()); //输入一个年份 //string s = ""; try //尝试,保护起来,使程序出错也能执行 { DateTim....
分类:
其他好文 时间:
2015-04-17 23:42:52
阅读次数:
130
题目链接:Convert Sorted List to
Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
这道题的要求是将有序链表转化成高度平衡的二叉搜索树(BST)。
1. 利...
分类:
其他好文 时间:
2015-04-17 18:16:32
阅读次数:
165
题目链接:Convert Sorted Array
to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
这道题的要求是将有序数组转化成高度平衡的二叉搜索树(BST)。
由于数组有序,因此相当于二叉搜索树...
分类:
其他好文 时间:
2015-04-17 18:15:21
阅读次数:
187
String to Integer (atoi)
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 ...
分类:
其他好文 时间:
2015-04-17 15:46:41
阅读次数:
133
7、LoadRunner回放脚本时,在浏览器显示的中文是乱码解决办法(1):首先设置Run-Time Settings – Browser – Browser Emulation – User-Agent解决办法:使用lr_convert_string_encoding函数来转换编码下面是一个使用的...
分类:
其他好文 时间:
2015-04-17 10:59:31
阅读次数:
450
while (true) { Console.Write("请输入一个时间(24小时制):"); //string s = Console.ReadLine(); int hour = Convert.ToInt32(Console .ReadLine ()); if(hour >= 0 && h....
分类:
其他好文 时间:
2015-04-16 23:27:42
阅读次数:
187
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.class Solution {public: string intToRoman...
分类:
其他好文 时间:
2015-04-16 23:25:42
阅读次数:
117
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.class Solution {public: int romanToInt(st...
分类:
其他好文 时间:
2015-04-16 23:22:05
阅读次数:
205
static void Main(string[] args) { // 本月的成兔=上月的小兔+上月的成兔 // 本月的小兔=上月的小兔 // 本月的幼兔=本月的成兔 Console.WriteLine("请输入月数:"); int m = Convert.ToInt32(Console.R...
分类:
其他好文 时间:
2015-04-16 23:14:39
阅读次数:
154
daemon翻译成中文的意思就是“守护神,恶魔,计[守护进程]”,我们经常用linux作为服务器,用来提供一些服务。每一个服务的实现后台都需要有一个daemon监听在某个套接字上。daemon可分为两类,standalone(独立守护进程)和superdaemon(超级守护进程)。独立守护进程:服务自..
分类:
Web程序 时间:
2015-04-16 20:06:37
阅读次数:
212