As a simple way to play with functions and loops, implement the square root function using Newton's method.In this case, Newton's method is to approxi...
分类:
其他好文 时间:
2014-10-27 00:18:38
阅读次数:
219
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:
其他好文 时间:
2014-10-27 00:08:57
阅读次数:
277
注释就是对代码的解释和说明。目的是为了让别人和自己很容易看懂。为了让别人一看就知道这段代码是做什么用的。代码注释有几类
①行尾注释
就是每行代码末尾的注释。这些注释只能用于较短的描述,比如变量。
②内部注释
内部注释是最常用和最重要的注释。使用内部注释可以说明过程的实现方法,使读者能够顺利通过各个不同的转折。如:IF语句、Select Case语句、循环语句、全局变量、重要的变量。 内部注释将有益于理解这些代码。
③注释标头。
在模块、类、属性、方法前一行添加注释,以便调用的时候提示用...
分类:
其他好文 时间:
2014-10-26 21:17:28
阅读次数:
151
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-10-26 14:18:54
阅读次数:
158
转自:http://blog.csdn.net/tulituqi/article/details/7651049这一讲主要说一下案例设计了。还记得我们前面做的case么?先打开浏览器访问百度,输入关键字,点击搜索。我们再加上个检查点,检查一下标题是否包含我的关键字,然后关闭浏览器。就是下面这样了。这...
分类:
其他好文 时间:
2014-10-26 11:33:31
阅读次数:
588
6.1①条件语句在脚本中称为控制流。②尽管JavaScript不支持“elseif”关键字,但是允许通过if/else语句链创建这种类型的语句。③switch条件语句中default项中也用上break语句,因为如果它没有在最后,后面的case依...
分类:
其他好文 时间:
2014-10-25 23:08:13
阅读次数:
400
1、case语句select case 2 when 1 then '男' when 2 then '女' else 'xoap' end as result;2、if语句select if(1>2,'yes','no');3、ifnull如果不是空,返回第一个select ifnull (1,0)...
分类:
数据库 时间:
2014-10-25 21:17:48
阅读次数:
218
Ubuntu may stop working after a Chrome OS update. If that's the case, update all the installed targets using the following command (in Chrome OS, open...
分类:
其他好文 时间:
2014-10-25 17:06:23
阅读次数:
128
@Override
public void onClick(View v) {
switch (v.getId()) {
1.
case R.id.btn_addPic:
break;
2.
case R.id.btn_reflectPic:
break;
default:
break;
}
}
如果黑色字体的break你忘记了写。。。
那么程序就会从...
分类:
其他好文 时间:
2014-10-25 11:55:59
阅读次数:
150
1. CASE WHEN ... THEN ...var expr = from p in context.Products select new { 商品ID = p.ProductID, ...
分类:
数据库 时间:
2014-10-24 22:10:19
阅读次数:
265