码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
iScroll学习笔记2--浅读源码
iscroll的架子是这样的 (function (window, document, Math){ var utils = (function (){ var me = {}; // 扩展一些常用的工具方法为me的方法 return me; }()); function IScroll(el, o...
分类:其他好文   时间:2015-10-02 01:29:14    阅读次数:299
javascript面向对象之this指针
下午用面向对象的方法写一个幻灯片插件的时候不小心写出了这样的代码:Slider.prototype.auto=function(){ setInterval(this.toRun,4000);//注意}Slider.prototype.toRun=function(){ if(this.i...
分类:编程语言   时间:2015-10-01 23:05:07    阅读次数:400
[LeetCode In C++] 1. Two Sum
题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two...
分类:编程语言   时间:2015-10-01 23:04:32    阅读次数:383
ajax遇到的问题
今天做了个小小的实验,用ajax XMLHttpRequest对象读取服务器上的txt文件里的内容,展示出来直接把html文件放在桌面用浏览器打开,没有反应,部分代码如下:function oHttp_readyStateChange(){ if(oHttp.readyState==4){ ...
分类:Web程序   时间:2015-10-01 22:59:02    阅读次数:278
函数构造前面的关键字的区别是什么?public construct private static
1.public construct private staticpublic function index(){...}
分类:其他好文   时间:2015-10-01 21:38:22    阅读次数:192
js 预加载
01.window.onload = function() {02.03. setTimeout(function() {04. 05.// reference to 06. var head = document.getElementsByTagName('head...
分类:Web程序   时间:2015-10-01 20:27:28    阅读次数:166
laravel authorize(授权)
1.方法一namespace App\Providers;...class AuthServiceProvider extends ServiceProvider{... public function boot(GateContract $gate) { parent::...
分类:其他好文   时间:2015-10-01 16:38:58    阅读次数:1619
二分法查找
1 var arr = [1, 2, 3, 4, 5, 6, 7, 8]; 2 var a = 1; 3 var start = 0; 4 var end = arr.length - 1; 5 6 // 二分法递归方法 7 function find(arr, a, start, end) {.....
分类:其他好文   时间:2015-10-01 12:49:48    阅读次数:154
shell实现的计算器
1#!/bin/bash2#FUNCTIONcalculator3#AUTHORwangbo4#DATE2015-09-26567functionchecknum()8{9expr$1+0&>/dev/null1011case$?in120)13return$114;;15*)1617read-t50-p"pleaseinputinteger:"int1819check"$int"2021return"$int"2223;;24esac25}2627functionoperate()28{29e..
分类:系统相关   时间:2015-10-01 01:52:28    阅读次数:588
angularJS directive中的controller和link function辨析
在angularJS中,你有一系列的view,负责将数据渲染给用户;你有一些controller,负责管理$scope(view model)并且暴露相关behavior(通过$scope定义)给到view;你有一些directive,负责将user interaction和$scope behav...
分类:Web程序   时间:2015-10-01 01:41:18    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!