document.onkeydown = function () {if (window.event && window.event.keyCode == 13) {window.event.returnValue = false;}}
分类:
Web程序 时间:
2014-10-10 14:25:24
阅读次数:
136
function menufalse(){ return false; } document.oncontextmenu = menufalse; //禁用快捷菜单
分类:
编程语言 时间:
2014-10-10 13:02:04
阅读次数:
181
一直以来,我们操作SQLITE,都是基于PHP默认的SQLITE操作模块。
今天介绍一个可以操作SQLITE2,和SQLITE3的PHP类,此为我封装的。
<?php
abstract class Db{
public static function factory($type){
return call_user_func(array($type , 'getInstanc...
分类:
数据库 时间:
2014-10-10 11:56:24
阅读次数:
283
java.lang.UnsupportedOperationException: Required method instantiateItem was not overridden
把return super.instantiateItem(container, position);
换成:
return container;...
分类:
其他好文 时间:
2014-10-10 11:49:24
阅读次数:
572
什么是abstract bean?简单来说,就是在java中的继承时候,所要用到的父类。
案例文件结构:
其中Person类为父类,Student类为子类,其具体类为:
package com.test.mySpring;
public class Person {
public String getName() {
return name;
}
public void ...
分类:
编程语言 时间:
2014-10-10 11:46:24
阅读次数:
289
#include #include #include using namespace std;int stb[102][102];//int min(int x,int y)//{// return xlinemax) { linemax=stb[i][j]; } ...
分类:
其他好文 时间:
2014-10-10 11:21:24
阅读次数:
151
代码: #include?<stdlib.h>
int?main(void)?{
int?arr1[]?=?{?1,?3,?5,?7,?9,?};
const?int?arr2[]?=?{?2,?4,?6,?8,?10,?};
//?普通的指针
int?*?p1?=?arr1;
//?可以改变指...
分类:
其他好文 时间:
2014-10-10 03:11:44
阅读次数:
199
第一种方法是DFS,将所有可能的前缀找到,递归调用partition(剩余字符串)
复杂度为O(2^n)
代码如下:
vector> partition(string s) {
vector> res;
vector patition;
if (s.size() == 0) return res;
partition(s...
分类:
其他好文 时间:
2014-10-10 01:33:23
阅读次数:
464
一、多线程下的单例设计模式
利用双重判断的形式解决懒汉式的安全问题和效率问题
//饿汉式
/*class Single
{
private static final Single t = new Single();
private Single(){}
public static Single getInstance()
{
return t;
}
}
*/
//懒汉式...
分类:
编程语言 时间:
2014-10-10 00:56:53
阅读次数:
271
Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a...
分类:
其他好文 时间:
2014-10-10 00:17:43
阅读次数:
355