点击打开链接
求MST的最长边~
prim
#include
#include
#include
#include
#define Min(a,b) (a)<(b)?(a):(b)
using namespace std;
const int INF = 1000000000;
const int maxn = 2000 + 5;
struct pto
{...
分类:
其他好文 时间:
2014-06-11 06:45:17
阅读次数:
235
场景应用:银行转账时,A给B转账,C给D转账。两者都是调用的connection.begainTransaction();connection.commit();
如何才能保证A,B同在一个线程中,C、D同在一个线程中,且A,BC,D在线程内共享,在线程外独立。...
分类:
编程语言 时间:
2014-06-11 00:29:20
阅读次数:
357
importjava.util.*;
publicclassPay{
publicstaticvoidmain(String[]args){
Scannerinput=newScanner(System.in);
System.out.println("************消费单************");
System.out.println("购物物品\t单价\t个数\t金额");
System.out.println("T桖\t¥245\t2\t¥..
分类:
编程语言 时间:
2014-06-10 22:47:01
阅读次数:
315
语法说明 1、procedure-name:
存储过程的名字,在同一个数据库的同一模式下,不能存在存储过程名相同参数数目相同的存储过程,即使参数的类型不同也不行。2、(IN | OUT | INOUT
parameter-name data-type,...) :传入参数 IN:输入参数 OUT:....
分类:
数据库 时间:
2014-06-10 20:58:52
阅读次数:
296
昨天调试远程服务器,为了增加socket链接数,理所当然的进行了limits.conf配置,之后悲剧发生了。
利用xshell再度远程时,被强制T了。链接瞬间即断,如果幸运,会弹出 ”Connection closed by foreign host“ 提示。
开始以为是防火墙或网络行为的原因,沟....
分类:
其他好文 时间:
2014-06-10 20:29:10
阅读次数:
472
java类加载
先来看一段小程序:
package com;
public class Main1 {
static {
System.out.println("1111") ;
}
public static void main(String[] args) {
System.out.println("2222") ;
}
}
输出结果为:
111...
分类:
编程语言 时间:
2014-06-10 17:27:38
阅读次数:
272
linux下编译hello.c 程序,使用gcc hello.c,然后./a.out就可以运行;在这个简单的命令后面隐藏了许多复杂的过程,这个过程包括了下面的步骤
宏定义展开,所有的#define 在这个阶段都会被展开
预编译命令的处理,包括#if #ifdef 一类的命令
展开#include 的文件,像上面hello world 中的stdio.h , 把stdio.h中...
分类:
系统相关 时间:
2014-06-10 15:11:16
阅读次数:
414
try{
String cmds="java -version";
Process p = Runtime.getRuntime().exec(cmds);
int exitValue = 1;
if((exitValue = p.waitFor()) != 0)
{
p.destroy();
System.out.println("exitValue:"+exitValue);
...
分类:
编程语言 时间:
2014-06-10 07:57:42
阅读次数:
341
我手动配置hibernate4.3.4,测试的时候出现:
Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
我是按照官方文档配置的,但是官方文档的代码好像有点问题
这是官方文档里面的那个工具类的部分代码:return new Confi...
分类:
系统相关 时间:
2014-06-10 07:26:34
阅读次数:
371
以前碰到过好几次eclipse不能自动弹出提示的情况,每次总是弄好之后就不再管它,结果下次遇到相同的问题,又到网上去搜索一大堆答案很多都不能解决实际问题,费了时间还没有效果,现在这里记录下来以下两种方法:
一、只弹出简单的单词提示(如输入system.的时候自动弹出out、in等字段的那种):
点击eclipse上面的windows-->
preferences --> ...
分类:
系统相关 时间:
2014-06-10 06:34:14
阅读次数:
320