摘要: 摘要 接触ElasticSearch已经有一段了。在这期间,遇到很多问题,但在最后自己的不断探索下解决了这些问题。看到网上或多或少的都有一些介绍ElasticSearch相关知识的文档,但个人觉得都不是很全面。因此就有了写ElasticSearch开发教程的想法,将学习到的技术经验分享出来,帮助更多 阅读全文
posted @ 2017-01-07 21:45 白衣秀才 阅读(1942) 评论(0) 推荐(0) 编辑
摘要: 该系列博客列表请访问:http://www.cnblogs.com/penglei-it/category/934299.html 摘要 GitHub 是一个开源项目的托管网站,相信很多人都听过。在上面有很多高质量的项目代码,我们也可以把自己的项目代码托管到GitHub,与朋友们共享交流。GitHu 阅读全文
posted @ 2017-01-07 14:19 白衣秀才 阅读(2287) 评论(1) 推荐(1) 编辑
摘要: 在前几天的一个项目中,由于数据库字段的命名原因 其中有两项:一项叫做"市场价格"一项叫做"商店价格" 为了便于区分,遂分别将其命名为market_price和shop_price.对应的实体类命名于此相似。可是在后台使用Xstream将数据读出转换为对xml对象时,前台使用Extjs的ajax请求, 阅读全文
posted @ 2016-04-25 09:23 白衣秀才 阅读(4622) 评论(0) 推荐(1) 编辑
摘要: 首先说明一下,hibernate的延迟加载特性(lazy)。所谓的延迟加载就是当真正需要查询数据时才执行数据加载操作。因为hibernate当中支持实体对象,外键会与实体对象关联起来。如果没有这一特性,当查询某一个含有外键的实体对象时,hibernate会把其他实体对象的数据都查询出来。简单的来说, 阅读全文
posted @ 2016-04-25 09:20 白衣秀才 阅读(7620) 评论(0) 推荐(0) 编辑
摘要: 在使用JSONObject.fromObject的时候,出现“There is a cycle in the hierarchy”异常。 意思是出现了死循环,也就是Model之间有循环包含关系; 解决办法: 使用setCycleDetectionStrategy防止自包含 代码: JsonConfi 阅读全文
posted @ 2016-04-25 09:17 白衣秀才 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 1. web.xml中<url-pattern>路径,(叫它Servlet路径!) > 要么以“*”开关,要么为“/”开头 2. 转发和包含路径 > *****以“/”开头:相对当前项目路径,例如:http://localhost:8080/项目名/request.getRequestdispach 阅读全文
posted @ 2016-02-29 11:28 白衣秀才 阅读(1683) 评论(0) 推荐(0) 编辑
摘要: sloves: package BackPack; public class Solves { public int[] DecimaltoBinary(int n,int m) { int r;//求余数 int consult=1;//求商 int j = 0; int []arr=new in 阅读全文
posted @ 2016-02-26 13:42 白衣秀才 阅读(1624) 评论(0) 推荐(0) 编辑
摘要: // 0.1背包求解.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #define N 5 #define ST 10 using namespace std; int main() { //给定n个重量,价值为不同的 阅读全文
posted @ 2016-02-26 13:42 白衣秀才 阅读(2548) 评论(0) 推荐(0) 编辑
摘要: // KMP.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; int BF(char S[], char T[]) { int i=0, j=0; int index = 0; w 阅读全文
posted @ 2016-02-26 13:40 白衣秀才 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h" #include<iostream> #include<cmath> #define TRUE 1 #define FALSE 0 using namespace std; typedef struct Node//坐标点 { double x; double 阅读全文
posted @ 2016-02-26 13:38 白衣秀才 阅读(1555) 评论(0) 推荐(0) 编辑