码迷,mamicode.com
首页 >  
搜索关键字:step return    ( 64763个结果
Javascript函数声明与函数表达式的区别
在定义函数时,我们一般使用下面这两种方法:使用函数声明定义:123function sum (a, b) {return a + b;}使用函数表达式定义:123var sum = function (a, b) {return a + b;}调用方法都是一样的:如求“1+1”等于几:1alert(...
分类:编程语言   时间:2014-05-23 23:43:04    阅读次数:442
正则表达式
//校验是否全由数字组成function isDigit(s){var patrn=/^[0-9]{1,20}$/;if (!patrn.exec(s)) return falsereturn true}//校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串function i...
分类:其他好文   时间:2014-05-23 22:42:29    阅读次数:423
struct寻址&for反汇编
//for 反汇编#includeint main(){ int i=0; int s=0; for(i=10;i=1;i--) { s=s+1; } return 0;}//for 反汇编#includeint main(){000000013F1...
分类:其他好文   时间:2014-05-23 12:41:04    阅读次数:434
判断一整数是不是质数
void IsPrimeInteger(int n){ if(n n) break; if(n%i == 0) return false; } return true;}
分类:其他好文   时间:2014-05-23 11:06:30    阅读次数:178
return 和 exit 的区别
return 和 exit 的区别 exit()          表示结束当前进程或当前程序,在整个程序中,只要有                   exit,就退出,并将应用程序的一个状态返回给OS。一般   和操作系统相关的是0为正常退出,非0为非正常退出。 return:     表示调用堆栈的返回。例如当程序进入函数调用时,当函数                   ...
分类:其他好文   时间:2014-05-22 06:22:02    阅读次数:258
javascript学习笔记(一)
一、javascipt的基本语法在基本语法方面与C语言等没有太大区别javascript的语法区别1、变量可以不进行数据类型的定义直接声明,其中用var声明的局部变量,不用var声明的是全局变量function square(num){ total=num1*num2; return total;}...
分类:编程语言   时间:2014-05-20 13:17:43    阅读次数:287
Leetcode:Add Binary
戳我去解题Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".分析:高精度加法,只是将10进制的高精度加法 换成了 2进制的高精度加法首先将 两个...
分类:其他好文   时间:2014-05-20 11:21:52    阅读次数:224
[Ubuntu] Autostart nginx, php-fpm and mysql in Ubuntu14.04
[nginx]Step 1Download the shell scriptwget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginxStep 2chmod +x /etc...
分类:数据库   时间:2014-05-20 09:00:18    阅读次数:401
Leetcode:Merge Two Sorted Lists
戳我去解题Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.分析:直...
分类:其他好文   时间:2014-05-20 08:52:09    阅读次数:277
Leetcode:Remove Nth Node From End of List
戳我去解题Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. Aft...
分类:其他好文   时间:2014-05-20 08:04:28    阅读次数:291
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!