函数的属性length、prototype和方法call()、apply()
length指的是该函数所期望传递进来的参数个数。
function fun0(){} //0
function fun1(num1){} //1
function fun2(num1,num2){} //2
//prototype
function MyObje...
分类:
移动开发 时间:
2014-05-05 12:55:59
阅读次数:
306
awk 中除了函数的参数列表(Argument
List)上的参数(Arguments)外,所有变量不管于何处出现,全被视为全局变量。其生命持续至程序结束——该变量不论在function外或
function内皆可使用,只要变量名称相同所使用的就是同一个变量,直到程序结束。因递归函数内部的变量,.....
分类:
其他好文 时间:
2014-05-04 11:49:11
阅读次数:
316
在runjs.cn上找了段代码,不过作者有意卖萌,有意复杂化代码。我需要的只是从0到100%的加载,加载到100%就停止,不要再乱动!效果图:放码过来: 1
window.onload = function(){ 2 //canvas initialization 3 var can...
分类:
Web程序 时间:
2014-05-04 10:40:37
阅读次数:
435
测试中出错出错一# ./helloworld
-qwsQWSServerSocket::init: Function not implementedQWSServerSocket: unable to
create socket.QWSServerPrivate::initServer: serve...
分类:
其他好文 时间:
2014-05-04 09:56:40
阅读次数:
322
为了减少代码冗余,应将公共函数写在类中,供不同ASP.NET页面调用。
1,先新建一个类,并在类中添加函数逻辑
namespace public_function_demo
{
public class MyFunction
{
public static string tbName(string tbNo)
{
...
分类:
Web程序 时间:
2014-05-04 09:34:41
阅读次数:
342
1 // chinacoder.cn JavaScript Document 2 3
$(document).ready(function() { 4 5 //.filter(":not(:has(.selected))")
//去掉所有不包含class为.s...
分类:
Web程序 时间:
2014-05-03 22:23:20
阅读次数:
446
int BOOST_LOCAL_FUNCTION(int x, int y) { // Local function.
return x + y;
} BOOST_LOCAL_FUNCTION_NAME(add)
BOOST_TEST(add(1, 2) == 3); // Local function call.
int BOOST_LOCAL_FUNCTION(void) ...
分类:
其他好文 时间:
2014-05-03 21:47:48
阅读次数:
332
D. Match & Catch
可以用各种方法做,字符串hash,后缀数组,dp,拓展kmp,字典树。。。
字符串hash(模板)
http://blog.csdn.net/gdujian0119/article/details/6777239
BKDR Hash Function :
// BKDR Hash Function
unsigned int BKDRHash(c...
分类:
其他好文 时间:
2014-05-03 21:20:47
阅读次数:
282
//当属性和方法特别多时,编写起来不是很方便,可以通过json的格式来编写
//由于原型重写,而且没有通过Person.prototype来指定,此时的constructor不会再指向Person而是指向Object
//如果constructor真的比较重要,可以在json中说明原型的指向
function Person(){
}
Person.prototype = {...
分类:
Web程序 时间:
2014-05-03 21:02:22
阅读次数:
403