0-1背包问题:
描述:给定n中物品和一背包。物品i的重量是wi,其价值为vi,背包的容量为c,问应如何选择装入背包中的物品,使得装入背包中的物品总价值最大?
0-1背包问题是一个特殊的整数规划问题。 设所给0-1背包问题的子问题; 其最优值为m(i,j),即m(...
分类:
其他好文 时间:
2014-07-22 23:00:35
阅读次数:
319
这篇对应的是习题16,读写文件
# -*- coding: utf-8 -*-
#对文件更多操作复制A文件的内容到B文件
#from sys import argv
from os.path import exists
prompt = "> "
from_file = raw_input("please input the filename where you want to copy...
分类:
编程语言 时间:
2014-05-05 12:54:02
阅读次数:
402
参考:http://docs.jboss.org/hibernate/annotations/3.4/reference/zh_cn/html_single/1、系统配置:
可以通过使用 mapping的 resource,于class 属性混合配置在创建SessionFactory 也可以通过代码...
分类:
系统相关 时间:
2014-05-03 22:50:55
阅读次数:
584
Spring AOP注解通过@Autowired,@Resource,@Qualifier,@PostConstruct,@PreDestroy注入属性的配置文件详解,代码下载地址:http://www.zuidaima.com/share/1772661373422592.htm...
分类:
编程语言 时间:
2014-05-02 10:09:20
阅读次数:
297
oracle 优化or 替换为in、exists、union的几种写法,测试没有问题!
根据实际情况用选择相应的语句吧!如果有索引,or全表扫描,in 和not in 也要慎用,否则会导致全表扫描,...
分类:
数据库 时间:
2014-05-01 22:12:59
阅读次数:
755
参考boke:http://blog.csdn.net/hguisu/article/details/71061591 .where 语句里面如果带有or条件,
myisam表能用到索引, innodb不行。(在mysql5.6下测试如此)CREATE TABLE IF NOT EXISTS `a`...
分类:
数据库 时间:
2014-05-01 20:58:57
阅读次数:
601
题目: Given a string S, find the longest palindromic
substring in S. You may assume that the maximum length of S is 1000, and there
exists one unique lo...
分类:
其他好文 时间:
2014-05-01 20:07:13
阅读次数:
429
WEP:Wired EquIValent
PrIVacy,有线等效加密,WEP算法是一种可选的链路层安全机制,用来提供访问控制,数据加密和安全性检验等。WPA :Wi-Fi Protected
Access,有WPA 和 WPA2两个标准,是一种保护无线电脑网络(Wi-Fi)安全的系统,它是应研究者...
分类:
其他好文 时间:
2014-05-01 03:23:02
阅读次数:
326
PwnPad是Pwnie Express为了让用户在移动过程中也能更方便地检测网络漏洞,而推出的一款基于Nexus 7的平板套装。这款产品的平板部分使用了 Android 4.2 和 Ubuntu 12.04 双系统,预装有各类检测工具(如 Kismet)。通过 USB 相连的收发器则支持蓝牙、以太网络、Wi-Fi 和 OTG,可以增强整个套装的检测能力。
本文档翻译自Pwnie Express官网的PwnPad用户手册:《PwnieExpressUserManual-PwnPad.pdf》。...
分类:
其他好文 时间:
2014-04-30 22:13:40
阅读次数:
501
<?php
$filename="胡主席好.pdf";
if(!file_exists($filename))
{
echo "不存在此文件";
return;
}
$fp=fopen($filename,"r");
$file_size=filesize($filename);
//配置头文件
/...
分类:
Web程序 时间:
2014-04-29 13:42:20
阅读次数:
356