一.Berkeley DB的介绍 (1)Berkeley DB是一个嵌入式数据库,它适合于管理海量的.简单的数据.如Google使用其来保存账户信息,Heritrix用其来保存froniter. (2)key/value是Berkeley DB用来管理数据的基础,每个key/value对代表一条记录. (3)Berkeley DB在底层实现采用B树,可以看成能够存储大量数据的HashMap. (4)它是Oracle公司的一个产品,C++版本最新出现,之后JAVA等版本也陆续出现.它不支持SQL语…
一.Java Script 1.由于Solr本身可以返回Json格式的结果,而JavaScript对于处理Json数据具有天然的优势,因此使用JavaScript实现Solr客户端是一个很好的选择. 2.在之前,主要使用SolJS作为solr的客户端,目前主要使用ajax-solr,信息请见:https://github.com/evolvingweb/ajax-solr/wiki/Reuters-tutorial%3A-step-1. 3.以下示例未使用上述所述的客户端,而是使用了ajax的基…
一.SolrJ基础 1.相关资料 API:http://lucene.apache.org/solr/4_9_0/solr-solrj/ apache_solr_ref_guide_4.9.pdf:Client APIs---Using SolrJ http://wiki.apache.org/solr/Solrj solr in action:Using the SolrJ client library to add documents from Java, Using SolrJ from…
Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14091 Accepted: 7959 Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit r…
Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21851 Accepted: 8984 Special Judge Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only t…
DZY Loves Chessboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the ches…
Ultra-QuickSort Time Limit: 7000MS   Memory Limit: 65536K Total Submissions: 48111   Accepted: 17549 Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swappin…
Drainage Ditches Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 62016 Accepted: 23808 Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by wate…
#include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <cmath> #include <map> #include <vector> using namespace std; long long num[1000005]; long long fz[1000005]; long long xds[100…
#include <cstdio> #include <iostream> #include <cstring> #include<queue> #include<cmath> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int pre[1005]; int m; int bfs(int s,int t) { queue<int>q; q.pu…