源码:/// /* 2014-9-3 by tonglu_wzq*/; (function ($) { var tool = { format: function (source, params) { if (arguments.length =...
分类:
其他好文 时间:
2014-10-06 17:21:00
阅读次数:
183
1、 仿函数
仿函数又名函数对象,具有函数性质的对象,就是传入一些参数,然后对参数进行某些运算,然后返回一个值。为了能够使行为类似函数,需要在类别定义中必须自定义function call 运算子operator()。
仿函数有如下几类:算术类仿函数(plus、minus)关系运算类仿函数(equal_to、less)逻辑运算类仿函数(logical_and、logical_or、logica...
分类:
其他好文 时间:
2014-10-06 16:42:50
阅读次数:
231
宏的高级使用--##,__VA_ARGS__, __FILE__, __FUNCTION__等转自 http://blog.csdn.net/yiya1989/article/details/7849588先说一下本文中会提到的内容:##,__VA_ARGS__, __FILE__, __LINE_...
分类:
其他好文 时间:
2014-10-06 16:33:30
阅读次数:
271
--函数声明create function myAdd(@a int, @b int)returns intas begindeclare @c intset @c = @a + @breturn @cend --函数调用declare @a1 intdeclare @b1 int declare ...
分类:
数据库 时间:
2014-10-06 02:00:09
阅读次数:
206
--创建表值函数create function GetClassMember(@className nvarchar(50))returns tableasreturn(select * from Students where ClassName=@className)go--调用表值函数selec...
分类:
数据库 时间:
2014-10-06 01:20:29
阅读次数:
264
$("#wanwan").animate({ opacity: 'toggle' }, "slow", null, function () {$("#wanwan").attr("src", "images/back_1.gif");$("#wanwan").animate({ opacity: '...
分类:
Web程序 时间:
2014-10-05 23:55:19
阅读次数:
291
本系列作为EffectiveJavaScript的读书笔记。
在将function当做构造函数使用时,需要确保该函数是通过new关键字进行调用的。
function User(name, passwordHash) {
this.name = name;
this.passwordHash = passwordHash;
}
如果在调用上述构造函数时,忘记了使用new...
分类:
编程语言 时间:
2014-10-05 21:43:58
阅读次数:
247
怎样推断js中的类型呢,先举几个样例:var a = "jason";var b = 123;var c = true;var d = [1,2,3];var e = new Date();var f = function(){ alert('jason');};一、最常见的推断方法:typeof ...
分类:
Web程序 时间:
2014-10-05 21:03:58
阅读次数:
265
方案一:function getRandomColor(){ varstr="0123456789abcdef"; vart="#"; for(j=0;j>0).toString(16)).slice(-6); //return '#'+('00000'+(Math.random()*...
分类:
编程语言 时间:
2014-10-05 20:52:38
阅读次数:
189
Write a function to find the longest common prefix string amongst an array of strings.class Solution: # @return a string #最长公共前缀 def longestC...
分类:
编程语言 时间:
2014-10-05 20:35:58
阅读次数:
202