排序算法:(1)冒泡排序 1 $arr = array(15,8,20,50,37,85,10,5,11,4); 2 //冒泡排序 3 function maoPao($arr){ 4 for($i = 0; $i $arr[$j+1]){ 7 $t...
分类:
编程语言 时间:
2014-10-26 18:13:37
阅读次数:
158
function getRootPath(){ //获取当前网址,如: http://localhost:8088/test/test.jsp var curPath=window.document.location.href; //获取主机地址之后的目录,如: test/test...
分类:
Web程序 时间:
2014-10-26 18:09:10
阅读次数:
129
var name = 'kl';function person(){ alert(name); var name = 'ko'; }person(); 这段代码输出 ‘undefined’,这种现象也叫‘声明’提前或‘预解析’,下面就来探讨一下其背后的原因,JS引擎执行一段代码的步骤...
分类:
其他好文 时间:
2014-10-26 18:09:04
阅读次数:
138
unit?uGetTickCount64;
interface
uses?windows;
?function?_GetTickCount64():?Int64;
implementation
type
????LARGE_INTEGER?=?record
??????lowpart??:integer?;
??????highpart?...
分类:
其他好文 时间:
2014-10-26 17:08:25
阅读次数:
407
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 numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-10-26 17:04:21
阅读次数:
193
1、添加CSS和JS引用2、在某些使用DIV并设置了z-index的页面里使用可能需要重写css的内容3、页面初始化后绑定事件 1 $( "#vip_code" ).autocomplete({ 2 source: function(request, response){ 3...
分类:
Web程序 时间:
2014-10-26 16:48:22
阅读次数:
239
javascript有一些奇怪的性质,恩,比如说,非常容易写一个quine,即自己输出自己代码的东西。function a(){console.log(a.toString()+";a();")};a();
分类:
编程语言 时间:
2014-10-26 15:27:30
阅读次数:
120
//Method one//document.oncontextmenu=new Function('event.returnValue=false;'); document.oncontextmenu = function (e) { e = e || window.event; e.return...
分类:
Web程序 时间:
2014-10-26 13:05:37
阅读次数:
138
在设置处理事件的时候要充分考虑浏览器的兼容性;页面加载:window.onload = function(){};window.onload = funcName;
分类:
Web程序 时间:
2014-10-26 13:00:34
阅读次数:
139
IOSChecker.prototype.getMacOSXVersion = function (cb) {exec("sw_vers -productVersion", function (err, stdout) {if (err === null) {if (stdout.match('10...
分类:
移动开发 时间:
2014-10-26 11:44:28
阅读次数:
230