Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 1 class Solution { 2 public: 3 int roma...
分类:
其他好文 时间:
2015-07-20 10:41:04
阅读次数:
98
Description将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下的矩形棋盘共有n块矩形棋盘。(每次切割都只能沿着棋盘格子的边进行)原棋盘上每一格有一个分值,一块矩形棋盘的总分为其所含各格分值之和。现在...
分类:
其他好文 时间:
2015-07-20 10:40:43
阅读次数:
88
原文:十五天精通WCF——第七天 Close和Abort到底该怎么用才对得起观众 一:文起缘由 写这一篇的目的源自于最近看同事在写wcf的时候,用特别感觉繁琐而且云里雾里的嵌套try catch来防止client抛出异常,特别感觉奇怪,就比如下面的代码。 1 public void StartNor...
分类:
其他好文 时间:
2015-07-20 10:38:25
阅读次数:
92
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2015-07-20 10:37:39
阅读次数:
110
upload_max_filesize :300Moutput_buffering onvi /etc/ssh/sshd_config/etc/init.d/sshd restart基础配置命令信息有:'./configure' '--disable-fileinfo' '--enable-bcma...
分类:
其他好文 时间:
2015-07-20 10:38:57
阅读次数:
116
最近准备针对手机做开发,遇到页面显示特别小,所以搞了这么一篇文章!其实主要就是改掉HTML页面声明:在网页中加入以下代码,就可以正常显示了:代码如下: 解释:width - viewport的宽度height - viewport的高度initial-scale - 初始的缩放比例minimum.....
分类:
其他好文 时间:
2015-07-20 10:36:35
阅读次数:
97
math模块、cmath模块floor:向下取整ceil:向上取整sqrt:求平方根>>> import math>>> math.floor(1.1)1>>> math.ceil(1.1)2>>> math.sqrt(1)1.0>>> math.sqrt(-1)Traceback (most re...
分类:
其他好文 时间:
2015-07-20 10:36:42
阅读次数:
124
Rotate an array ofnelements to the right byksteps.For example, withn= 7 andk= 3, the array[1,2,3,4,5,6,7]is rotated to[5,6,7,1,2,3,4].Note:Try to come...
分类:
其他好文 时间:
2015-07-20 10:36:03
阅读次数:
94
这题第一感觉是用搜索做,暴力就可以解决,这里将水管转换成一个个3*3的矩阵,然后搜素就可以了。写完之后确实一遍过掉了,31ms。附上代码:#include"iostream"#include"stdio.h"#include"algorithm"#include"cmath"#include"que...
分类:
其他好文 时间:
2015-07-20 10:36:14
阅读次数:
108
Given an integer, write a function to determine if it is a power of two. 1 bool isPowerOfTwo(int n) 2 { 3 if(n1)10 {11 if(n%2==0)12 ...
分类:
其他好文 时间:
2015-07-20 10:37:32
阅读次数:
124
原文:十五天精通WCF——第五天 你需要了解的三个小技巧 一: 服务是端点的集合 当你在开发wcf的时候,你或许已经注意到了一个service可以公布多个endpoint,确实是这样,在wcf中有一句很经典的话,叫做“服务是端点的集合",就 比如说一个普普通通的服务,它就公布了一个服务端点,一个元数...
分类:
其他好文 时间:
2015-07-20 10:36:03
阅读次数:
107
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2015-07-20 10:35:21
阅读次数:
101
自定义里面设置了第一级为大写,2级、3级首字跟着变为大写,是因为2、3级没有勾选“正规形式编号”,如图:
分类:
其他好文 时间:
2015-07-20 10:36:21
阅读次数:
802
The row source tree is the core of the execution plan. The tree shows the following information: An ordering of the tables referenced by the statem...
分类:
其他好文 时间:
2015-07-20 10:34:38
阅读次数:
104
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:
其他好文 时间:
2015-07-20 10:34:14
阅读次数:
106
风险投资的过程其实就是一个科技公司创办的过程。在美国,一个新兴的科技公司(Startups)的创业过程通常是这样的:来自思科公司的工程师山姆和IBM公司的工程师强尼发明了一种无线通信的技术,当然这种技术和他们所在公司的核心业务无关,两人觉得这种技术很有商业前景,他们就写了个专利草案,又花五千美元.....
分类:
其他好文 时间:
2015-07-20 10:33:34
阅读次数:
107
Given an array of integers, every element appearsthreetimes except for one. Find that single one. 1 int singleNumber(int* nums, int numsSize) 2 { 3 .....
分类:
其他好文 时间:
2015-07-20 10:34:13
阅读次数:
121