闭包function createComparisonFunction(propertyName) { return function (object1, object2) { var value1 = object1[propertyName]; var valu...
分类:
编程语言 时间:
2014-10-19 00:00:55
阅读次数:
300
关于模型部分参考http://blog.csdn.net/buyingfei8888/article/details/40208729
控制器部分:
<?php
class GoodsController extends Controller{
function actionShow(){
$goods_model = Goods::model(); //简单查询可以通过模型里面静...
分类:
其他好文 时间:
2014-10-18 22:23:32
阅读次数:
235
Write a function to find the longest common prefix string amongst an array of strings. 分析: 对一组字符串找到最长公共前缀。 因为只是找前缀所以可以以第一个字符串为基础,按个字符与其它字符串比较,直到有字符串已经...
分类:
其他好文 时间:
2014-10-18 22:17:24
阅读次数:
186
高级javascript---原型和原型继承在 JavaScript 中,prototype是函数的一个属性,同时也是由构造函数创建的对象的一个属性。函数的原型为对象。它主要在函数用作构造函数时使用。function Vehicle(wheels, engine) { this.wheels ...
分类:
编程语言 时间:
2014-10-18 22:13:19
阅读次数:
259
在scala中如果一个函数在最后一步调用自己(必须完全调用自己,不能加其他额外运算子),那么在scala中会复用函数栈,这样递归调用就转化成了线性的调用,效率大大的提高。If a function calls itself as its last action, the function's sta...
分类:
其他好文 时间:
2014-10-18 20:59:44
阅读次数:
188
今天做一个grid,里面的数据须要带明细,思来想去还是搞个表格嵌套吧!看下图对于grid中每一条记录点击左边的+号能展开一个明细的子表格 全部数据包含列名均从后台获得,子表格的数据临时在本地以做測试在此贴一些代码留下记录function displayInnerGrid(renderId) { .....
分类:
Web程序 时间:
2014-10-18 19:40:11
阅读次数:
386
1 //比较两种方式的不同,方式二会出现抖动的bug 2 3 $(document).ready(function(e) { 4 5 //方式一 6 $('#cont').hover ( fu...
分类:
其他好文 时间:
2014-10-18 19:39:31
阅读次数:
230
1. TextChanged事件前台触发回发后台,接上文,先给TextBox1加上事件,看看是怎么生成出来的, 注意AutoPostBack="true",找源代码,f4多出了个 listeners: { change: function () { ...
分类:
Web程序 时间:
2014-10-18 18:19:23
阅读次数:
192
PInvoke 允许managed code 来调用在DLL中实施的unmanged function。Platform invoke relies on metadata to locate exported functions and marshal their arguments at run...
分类:
其他好文 时间:
2014-10-18 18:15:29
阅读次数:
351
实现接口,必须实现接口里的所有方法。function Interface(name,fns){//声明一个接口类 this.name = name; this.methods=[]; for(var i=0;i<fns.length;i++){ if(typeof fns[i] !...
分类:
Web程序 时间:
2014-10-18 18:13:18
阅读次数:
223