window.document.onkeydown = disableRefresh;
function disableRefresh(evt){
evt = (evt) ? evt : window.event
if (evt.keyCode) {
if(evt.keyCode == 116){
//do something
}
}
}
keycode 8...
分类:
Web程序 时间:
2014-05-15 06:08:18
阅读次数:
315
LeetCode-001 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 numbers such that they add up to the target, where index1 must be less than index2...
分类:
其他好文 时间:
2014-05-15 04:34:50
阅读次数:
293
Call back function easily implement
#include
void HelloWorld(int nIndex)
{
printf("%d person say Hello World\n",nIndex);
}
void MyName(int len)
{
printf...
分类:
其他好文 时间:
2014-05-15 04:21:05
阅读次数:
270
Same Tree
Total Accepted: 16072 Total
Submissions: 38790My Submissions
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal i...
分类:
其他好文 时间:
2014-05-15 04:00:39
阅读次数:
319
Oracle Table Function在Oracle9i时引入,完美的兼容了view和存储过程的优点,推荐一用....
分类:
数据库 时间:
2014-05-15 03:15:18
阅读次数:
329
理解原型对象
在Javascript中无论什么时候,只要创建一个新的函数,就会根据一组特定的规则为该函数创建一个prototype属性,这个属性指向函数的原型对象(这个对象的用途是包含可以有特定类型的所有实例共享的属性和方法)。如果按照字面上的意思来理解,那么原型属性就是通过调用构造函数而创建的那个对象的实例的原型对象。
在默认的情况下,所有的原型对象都会自动获得一个constructor...
分类:
编程语言 时间:
2014-05-15 02:38:59
阅读次数:
386
string库中所有的字符索引从前往后是1,2,...;从后往前是-1,-2,...string库中所有的function都不会直接操作字符串,而是返回一个结果...
分类:
其他好文 时间:
2014-05-14 21:44:00
阅读次数:
346
【题目】
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype shoul...
分类:
其他好文 时间:
2014-05-14 21:36:52
阅读次数:
348
获取服务器mac
<?php
/**
获取网卡的MAC地址原码;目前支持WIN/LINUX系统
获取机器网卡的物理(MAC)地址
**/
class GetmacAddr{
var $result = array(); // 返回带有MAC地址的字串数组
var $macAddr;
/*构造*/
function __construct($...
分类:
Web程序 时间:
2014-05-14 20:48:33
阅读次数:
387
上文讲述过js实现面向对象,一定是可以实现继承的效果的。虽然说很多的js框架都帮助我们实现了继承的功能,或者说在日常的工作和学习中我们压根就用不到js的继承,但是我们还是需要了解一下js中继承,以方便我们阅读框架中的继承是如何实现的。在下面的文章中我会给大家模拟一下js中继承的实现。
先来看一下下面创建对象的一种方式:
/*
* 对象工厂
*/
function objectFact...
分类:
Web程序 时间:
2014-05-14 14:18:44
阅读次数:
278