MySQL 服务器硬件和操作系统调节:1. 拥有足够的物理内存来把整个InnoDB文件加载到内存中——在内存中访问文件时的速度要比在硬盘中访问时快的多。2. 不惜一切代价避免使用Swap交换分区 – 交换时是从硬盘读取的,它的速度很慢。3. 使用电池供电的RAM(注:RAM即随机存储器)。4. 使用...
分类:
数据库 时间:
2014-06-28 13:09:18
阅读次数:
251
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example, Given n = 3, there are a total of 5 unique BST'...
分类:
其他好文 时间:
2014-06-28 11:57:50
阅读次数:
232
微软近期Open的职位:Group: Search Technology Center Asia (STCA)/Data Platform teamTitle: Senior Software Development EngineerLocation: Beijing, ChinaThe R&D o...
分类:
其他好文 时间:
2014-06-24 09:07:51
阅读次数:
249
一 在进行条件查询(带分页)时,有时候会出现一种情况:根据查询条件查找得到第一页数据,当你点击下一页后,不会携带查询条件进行分页。解决方案:获取查询条件 var data=$('#search').serializeJson();将查询条件绑定到分页控件上var queryParams = $('#...
分类:
其他好文 时间:
2014-06-23 06:32:14
阅读次数:
156
class Solution {public: int searchInsert(int A[], int n, int target) { if (A == NULL || n target) { q = mi; } els...
分类:
其他好文 时间:
2014-06-23 06:29:20
阅读次数:
169
1、关键类
Lucene的搜索过程中涉及的主要类有以下几个:
(1)IndexSearcher:执行search()方法的类
(2)IndexReader:对索引文件进行读操作,并为IndexSearcher提供搜索接口
(3)Query及其子类:查询对象,search()方法的重要参数
(4)QueryParser:根据用户输入的搜索词汇生成Query对象。
(5)TopDocs:s...
分类:
其他好文 时间:
2014-06-22 16:56:47
阅读次数:
187
现在微信公众平台很多娱乐的,都有用到周边搜索功能,研究下比较简单,通过百度周边搜索接口封装如下:
调用格式:
$wechatBaiduAPI = new WechatBaiduAPI();
$ret = $wechatBaiduAPI->Place_search($str_key,$location['x'].",".$location['y'] );
参数说明:...
分类:
微信 时间:
2014-06-22 14:43:44
阅读次数:
481
题目大意:
给出的东西要求建立一个堆,使得后面的数字满足堆的性质,而且字符串满足搜索序
思路分析:
用线段树的最大询问建树。在建树之前先排序,然后用中序遍历递归输出。
注意输入的时候的技巧。。。
#include
#include
#include
#include
#define lson num<<1,s,mid
#define rson num<<1|1,m...
分类:
其他好文 时间:
2014-06-21 21:38:34
阅读次数:
205
微软近期Open的职位:Title: Principal Dev ManagerLocation: BeijingThe R&D of Shared Data Platform at Search Technology Center Asia aims to build a unified data...
分类:
其他好文 时间:
2014-06-21 16:13:42
阅读次数:
241
Divide two integers without using multiplication, division and mod operator.Analysis: 我自己用binary search做老是出TLE的错误,看了网上思路,有了如下方法:long did = dividend, l...
分类:
其他好文 时间:
2014-06-21 16:06:48
阅读次数:
144