码迷,mamicode.com
首页 >  
搜索关键字:javascript jquery jquery源码    ( 95386个结果
对象里的handleEvent
最近看swipe.js源码看到handleEvent这个属性。查了一下资料才知道:使用 addEventListener 可以绑定事件,并传入回调函数。Mozilla 0.9.1 和 Netscape 6.1 之后的版本不但支持传递函数引用,也都允许直接把拥有 handleEvent 方法的对象作为...
分类:其他好文   时间:2014-04-29 15:11:22    阅读次数:416
《Cracking the Coding Interview》——第17章:普通题——题目12
2014-04-29 00:04题目:给定一个整数数组,找出所有加起来为指定和的数对。解法1:可以用哈希表保存数组元素,做到O(n)时间的算法。代码: 1 // 17.12 Given an array of integers and target value, find all pairs in ...
分类:其他好文   时间:2014-04-29 15:08:13    阅读次数:469
苹果地图2,定位,标注,返回中心。
//// ViewController.m// mapdemo001//// Created by apple on 14-4-28.// Copyright (c) 2014年 apple. All rights reserved.//#import "ViewController.h"#...
分类:移动开发   时间:2014-04-29 15:05:05    阅读次数:596
Java 同步示例
同步1)同步方法2)同步块 21)实例变量 22) 类变量锁定的内容1)锁定类的某个特定实例2)锁定类对象(类的所有实例)一。同步类实例:同步方法public class Demo { public synchronized void m1(){ ...
分类:编程语言   时间:2014-04-29 15:01:02    阅读次数:493
动态规划:背包问题
m(i,v) = max{m(i-1,v),m(i-1,v-vi) + wi } ,v > vi
分类:其他好文   时间:2014-04-29 14:59:56    阅读次数:599
《Cracking the Coding Interview》——第18章:难题——题目1
2014-04-29 00:56题目:不用算数运算,完成加法。解法:那就位运算吧,用加法器的做法就可以了。代码: 1 // 18.1 add two numbers wihout using arithmetic operator. 2 #include 3 using namespace std....
分类:其他好文   时间:2014-04-29 14:58:53    阅读次数:383
《Cracking the Coding Interview》——第17章:普通题——题目13
2014-04-29 00:15题目:将二叉搜索树展开成一个双向链表,要求这个链表仍是有序的,而且不能另外分配对象,就地完成。解法:Leetcode上也有,递归解法。代码: 1 // 17.13 Flatten a binary search tree into a doubly linked li...
分类:其他好文   时间:2014-04-29 14:51:49    阅读次数:460
asp.net中利用JSON进行增删改查中运用到的方法
//asp.net中 利用JSON进行操作,//增加://当点击“增加链接的时候”,弹出增加信息窗口,然后,在窗体中输入完整信息,点击提交按钮。//这里我们需要考虑这些:我会进行异步提交,使用jquery中的方法,$.post("网页名",JSON,callback);//JSON的写法:{"nam...
分类:Web程序   时间:2014-04-29 14:47:44    阅读次数:623
Tomcat学习 HttpConnector和HttpProcessor启动流程和线程交互
一、tomat启动流程1、启动HttpConnector connector等待连接请求,只负责接受socket请求,具体处理过程交给HttpProcessor处理。 tomcat用户只能访问到connector,能设置接受的数据的buffer大小,而不能看见HttpProcessor的处理过程.....
分类:编程语言   时间:2014-04-29 14:45:40    阅读次数:641
《Cracking the Coding Interview》——第18章:难题——题目4
2014-04-29 01:05题目:数数从0到n总共有多少个数字‘2’?解法:数位动态规划,可以O(log10(n))时间内解决。代码: 1 // 18.4 Count the number of 2s from 0 to n. 2 #include 3 using namespace std;....
分类:其他好文   时间:2014-04-29 14:44:34    阅读次数:380
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!