function quickSort(arr){ if(arr.length<=1){ return arr; } var num = Math.floor(arr.length/2); var numValue = arr.splice(num,1); var left... ...
分类:
编程语言 时间:
2016-09-24 16:17:58
阅读次数:
221
KoaHub.js demo KoaHub.js KoaHub.js -- 基于 Koa.js 平台的 Node.js web 快速开发框架。可以直接在项目里使用 ES6/7(Generator Function, Class, Async & Await)等特性,借助 Babel 编译,可稳定运行 ...
分类:
Web程序 时间:
2016-09-24 13:26:39
阅读次数:
173
方法一: 缺点:如果加载图片较多,比较麻烦 方法二: var images = new Array(); function preLoad() { for (var i = 0; i var head = document.getElementsByTagName('head')[0]; // a ... ...
分类:
其他好文 时间:
2016-09-24 13:26:16
阅读次数:
239
1、定义函数时,不需要使用function作为函数的命名。 函数不需要形参。 函数名不能以数字作为开头 2、 ...
分类:
其他好文 时间:
2016-09-24 12:02:27
阅读次数:
116
function Person(name,sex,age){ this.name = name; this.sex = sex; this.age = age;}Person.prototype.eat = function(){ console.log("每个人都会吃饭");}function P ...
分类:
其他好文 时间:
2016-09-24 11:49:26
阅读次数:
165
$(function(){ $("ul li:lt(5)").clone().appendTo("ul"); var $width = $("ul li:lt(5)").width() * 4; var currIndex = 0; $("#next").click(function(){ if(c ...
分类:
其他好文 时间:
2016-09-24 10:39:41
阅读次数:
254
ecshop最新uc.php sql注入漏洞,出现在后台管理,api/uc.php 程序。 影响到所有包括ecshop,大小京东,大小商创程序以ecshop为内核的程序。 到发文为止,ecshop官网还未做修复。 打开/api/uc.php修复方法(约在269行) 1 function update ...
分类:
Web程序 时间:
2016-09-24 10:21:50
阅读次数:
291
//判断是否为数字isNumeric: function( obj ) { //isFinite判断是否为有限的数字 return !isNaN( parseFloat(obj) ) && isFinite( obj );} ...
分类:
Web程序 时间:
2016-09-24 00:43:55
阅读次数:
201
LeetCode:Move Zeroes 【问题再现】 Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zer ...
分类:
其他好文 时间:
2016-09-24 00:38:11
阅读次数:
162
javascript中的toString()方法,主要用于Array、Boolean、Date、Error、Function、Number等对象。下面是这些方法的一些解析和简单应用,做个纪律,以作备忘。 (1)Array.toString():将数组转换成一个字符串,并且返回这个字符串。描述:当数组 ...
分类:
编程语言 时间:
2016-09-23 23:01:52
阅读次数:
204