如果一个函数被频繁地调用很多很多次的时候,我们就应该从细节入手。有时候我们对代码本身的逻辑无从下手,往往这些细节能够带给我们意想不到的结果。类型修饰符就是其中之一。
const关键词无需多说,但是我们往往也能忽视,所以尽量养成一个习惯:在设计一个函数参数或者申明一个变量(无论是局部的还是全局的)的时候,下意识地考虑一下这个变量我们可不可以设计为不可更改的。
NOTE: 如果是指针的...
分类:
其他好文 时间:
2014-10-30 11:46:06
阅读次数:
204
If you want to use version 3.1 you need to use the following schema:
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd
Note that 3.0 and 3.1 are different: in 3.1 there's no Sun mentioned, so si...
分类:
Web程序 时间:
2014-10-29 19:25:41
阅读次数:
310
Cold Update
All changes other than the Hot update changes require a Cold Update.
Note:
A prerequisite for performing a cold update is that all documents are removed from the index. The standard...
分类:
其他好文 时间:
2014-10-29 17:12:50
阅读次数:
173
Update 10/24/12: If you’d like a new version of this tutorial fully updated for iOS 6 and Xcode 4.5, check out iOS 5 by Tutorials Second Edition!Note ...
分类:
其他好文 时间:
2014-10-29 16:54:07
阅读次数:
404
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:
编程语言 时间:
2014-10-29 16:22:58
阅读次数:
209
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m +
n) to hold additional elements from B...
分类:
其他好文 时间:
2014-10-29 14:59:27
阅读次数:
180
首先下面演示的博文来自于以下地址:http://www.douban.com/note/423939291/需要先通过博客备份专家将导出的博文导入到手机(还不会用的朋友请先阅读http://www.douyuehan.com/space/douyuehan/Blog1/Post/259.aspx),...
分类:
移动开发 时间:
2014-10-29 12:54:44
阅读次数:
261
非原创,只做学习记录来使用---------------------------------------------------------Docker使用的是Linux容器,这是运行在与它的宿主机器同样的操作系统上。这准许它可以和宿主机器共享许多系统资源。它也会使用AuFS作为文件系统,也为你管理...
分类:
其他好文 时间:
2014-10-29 12:11:53
阅读次数:
206
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
public class Solution {
//模拟手算乘法
...
分类:
编程语言 时间:
2014-10-29 09:14:28
阅读次数:
168
问题描述:
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be am...
分类:
其他好文 时间:
2014-10-28 21:52:13
阅读次数:
192