3.1搜索的简单实现1.创建IndexReaderpackagecom.mzsx.index;
importjava.io.File;
importjava.io.IOException;
importorg.apache.lucene.index.CorruptIndexException;
importorg.apache.lucene.index.IndexReader;
importorg.apache.lucene.store.Directory;
importorg.apac..
分类:
其他好文 时间:
2014-07-20 15:26:11
阅读次数:
313
和网络相关的配置文件1./etc/sysconfig/network/etc/sysconfig/network:该文件定义了是否启用网络功能以及系统的主机名。
[root@Server3network-scripts]#cat/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=Server3
[root@Server3network-scripts]#
说明:
NETWORKING={yes|..
分类:
其他好文 时间:
2014-07-20 15:33:11
阅读次数:
238
上章已经介绍了LVM的基本使用方法,现在说一下LVM的动态扩展,缩减,快照功能。LVM动态扩展上次mylv1创建的为4G,扩展前首先查看myvg1是否还有剩余空间,如果有就可以直接使用,木有就要再次创建物理卷,并添加到卷组:查看myvg1myvg1还有足够的剩余空间,接下来就可以进行mylv..
分类:
其他好文 时间:
2014-07-20 15:22:11
阅读次数:
306
Stockbroker Grapevine
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 26395
Accepted: 14558
Description
Stockbrokers are known to overreact to rumours. You...
分类:
其他好文 时间:
2014-07-21 09:29:57
阅读次数:
240
Joseph
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 47657
Accepted: 17949
Description
The Joseph's problem is notoriously known. For those who are not f...
分类:
其他好文 时间:
2014-07-20 15:42:51
阅读次数:
341
Codeforces Round #257 (Div. 2) A. Jzzhu and Children(简单题)...
分类:
其他好文 时间:
2014-07-20 15:23:51
阅读次数:
206
Codeforces Round #258 (Div. 2) B. Jzzhu and Sequences(矩阵快速幂)...
分类:
其他好文 时间:
2014-07-20 15:34:51
阅读次数:
178
UVA 10870 - Recurrences
题目链接
题意:f(n) = a1 f(n - 1) + a2 f(n - 2) + a3 f(n - 3) + ... + ad f(n - d), for n > d.
已知前d项求第n项
思路:矩阵快速幂,对应矩阵为
|a1 a2 a3 ... ad|
|1 0 0 ... 0 0 0|
|0 1 0 ... 0 0 ...
分类:
其他好文 时间:
2014-07-21 09:30:29
阅读次数:
211
什么是捕获?
捕获就是捕捉某一瞬间的值,通常用它来测量外部某个脉冲的宽度或周期。使用捕获功能可以非常准确的测量脉冲宽度或周期,他的工作原理是:单片机内部有两组寄存器,其中一组的内部数值是按照固定的机器周期递增或递减,通常这组寄存器就是定时器的计数器寄存器(TLX,THX),当与捕获功能相关的外部某引脚有一个负跳变时,捕获便会立即将此时第一组寄存器中的数值准确地获取,并且存入另一组寄存器中,这组寄...
分类:
其他好文 时间:
2014-07-20 15:16:51
阅读次数:
160
Description
Problem C: A Walk Through the Forest
Jimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to ...
分类:
其他好文 时间:
2014-07-21 09:27:14
阅读次数:
300
|--TreeSet:可以对Set集合中的元素进行排序。
底层数据结构是二叉树。
保证元素唯一性的依据:compareTo方法return 0....
分类:
其他好文 时间:
2014-07-21 09:16:34
阅读次数:
1526
在Cocos2d-x存储数据使用的类是UserDefault类,下面分析下该类的使用
//.h
#include "base/CCPlatformMacros.h"
#include
#include "base/CCData.h"
NS_CC_BEGIN
/**
* @addtogroup data_storage
* @{
*/
/**
* UserDefault act...
分类:
其他好文 时间:
2014-07-20 15:45:51
阅读次数:
221
题目链接:点击打开链接
嘿嘿
#include
#include
#include
#include
#include
#include
#include
#define N 2011
using namespace std;
int lef[N], pn;//lef[v]表示Y集的点v 当前连接的点 , pn为x点集的点数
bool T[N]; //T[u] 表示Y集 u 是否已连...
分类:
其他好文 时间:
2014-07-21 09:30:20
阅读次数:
262
Investment
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 8019
Accepted: 2747
Description
John never knew he had a grand-uncle, until he received the no...
分类:
其他好文 时间:
2014-07-20 15:38:51
阅读次数:
240
Problem Description
There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can chan...
分类:
其他好文 时间:
2014-07-20 15:41:50
阅读次数:
213
这里要注意的就是:先给糖果,然后如果有人糖果数为奇数,就加1 ,然后再判断是不是相等...
分类:
其他好文 时间:
2014-07-21 09:31:25
阅读次数:
221
做出一款cocos2d-x游戏,如果修改游戏名、游戏图标和游戏的屏幕方向呢?请点击进来。...
分类:
其他好文 时间:
2014-07-20 15:46:42
阅读次数:
7851