using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Tex...
分类:
其他好文 时间:
2014-05-22 12:36:05
阅读次数:
243
1、添加jar
2、web.xml配置
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://ja...
分类:
编程语言 时间:
2014-05-22 11:23:45
阅读次数:
436
本文以我自己设计植物大战僵尸碰撞检测算法为例进行分析,浅谈游戏开发中碰撞检测算法。本文所提及的碰撞算法与数据结构也可应用于跑酷等游戏中。...
分类:
其他好文 时间:
2014-05-22 11:01:30
阅读次数:
291
三. 事务传播属性
REQUIRED:业务方法需要在一个事务中运行。如果方法运行时,已经处在一个事务中,那么加入到该事务,否则为自己创建一个新的事务。
NOT_SUPPORTED:声明方法不需要事务。如果方法没有关联到一个事务,容器不会为它开启事务。如果方法在一个事务中被调用,该事务会被挂起,在方法调用结束后,原先的事务便会恢复执行。...
分类:
数据库 时间:
2014-05-22 10:14:19
阅读次数:
450
zTree实现更新根节点中第i个节点的名称
1、实现源码
zTree实现基本树
<!--
var setting = {
data: {
simpleData: {
enable: true
}
}
};
var zNodes =[
{ id:1, pId:0, name:"湖北省", ope...
分类:
其他好文 时间:
2014-05-22 10:02:06
阅读次数:
350
Robberies http://acm.hdu.edu.cn/showproblem.php?pid=2955
背包;第一次做的时候把概率当做背包(放大100000倍化为整数):在此范围内最多能抢多少钱 最脑残的是把总的概率以为是抢N家银行的概率之和…
把状态转移方程写成了f[j]=max{f[j],f[j-q[i].v]+q[i].money}(f[j]表示在概...
分类:
其他好文 时间:
2014-05-22 09:43:12
阅读次数:
282
指针悬空
指针悬空在我们使用指针的时候很容易被忽视,主要的表现是:指针所指向的内存
释放,指针并没有置为NULL,致使一个不可控制的指针。
#include
#include
int *pointer;
void func()
{
int n=8;
pointer=&n;
printf("pointer point data is %d\n",...
分类:
编程语言 时间:
2014-05-22 09:03:09
阅读次数:
371
zTree实现单独选中根节点中第一个节点
1、实现源码
zTree实现基本树
<!--
var setting = {
data: {
simpleData: {
enable: true
}
}
};
var zNodes =[
{ id:1, pId:0, name:"湖北省", open...
分类:
其他好文 时间:
2014-05-22 08:54:06
阅读次数:
309
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:
get and set.
get(key) - Get the value (will always be positive) of the key if t...
分类:
其他好文 时间:
2014-05-22 07:25:32
阅读次数:
254
信号量和P、V原语由Dijkstra(迪杰斯特拉)提出
信号量
互斥:P、V在同一个进程中
同步:P、V在不同进程中
信号量值含义
S>0:S表示可用资源的个数
S=0:表示无可用资源,无等待进程
S
信号量
struct semaphore
{
int value;
pointer_PCB queue;
}
P原语
P(s)
...
分类:
其他好文 时间:
2014-05-22 07:01:59
阅读次数:
319