自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

xiaoidea的专栏

落霞与孤鹜齐飞,秋水共长天一色

  • 博客(10)
  • 收藏
  • 关注

原创 记一个诡异的ES查询失败

下面的查询条件只有第一个查不出来: 1. 出发城市:北京,沙县 2. 出发城市:北京 3. 出发城市:北京,上海 4. 出发城市:北京,沙县 & 到达城市:上海ES数据库中不存在depCity为沙县的文档查询语句1 出发城市:北京,沙县 { "from" : 0, "size" : 20, "query" : { "bool" : { "must" : {

2016-09-21 00:47:58 2186

原创 "Calendars" and "DateFormats" should not be static

“Calendars” and “DateFormats” should not be static 级别:bug, multi-threading Not all classes in the standard Java library were written to be thread-safe. Using them in a multi-threaded manner is h

2016-09-01 00:13:27 1464

原创 BigDecimal(double)

“BigDecimal(double)” should not be used 级别:bug Because of floating point imprecision, you’re unlikely to get the value you expect from the BigDecimal(double) constructor.From the JavaDocs: Th

2016-08-30 00:54:14 1765

原创 @Deprecated & @Override

1. @Deprecated” code should not be used 级别:cwe, obsolete, owasp-a9, security Once deprecated, classes, and interfaces, and their members should be avoided, rather than used, inherited or extende

2016-08-28 17:09:43 2400

原创 不要使用equals方法对AtomicXXX进行是否相等的判断

1. “.equals()” should not be used to test the values of “Atomic” classes 级别:bug AtomicInteger, and AtomicLong extend Number, but they’re distinct from Integer and Long and should be handled diff

2016-08-26 00:42:50 4752

原创 堆排序(算法导论实现)

#include #include using namespace std;int heap_size;int left(int i){ return 2 * i + 1;}int right(int i){ return 2 * i + 2;}void exchange(vector& v, int k, int largest){ int temp = v[k];

2015-07-22 20:57:05 550

原创 二叉树的前序、中序、后续遍历,递归、非递归实现

前序遍历递归:#include #include using namespace std;struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {}};void pre_order_recursive(TreeN

2015-07-22 15:47:06 557

原创 归并排序C++

#include using namespace std;/* *把数组从中间分为2部分,分别将两部分排好序后,调用merge将2个有序序列合并成1个有序序列 * */void merge(int* arr, int start, int mid, int end){int* p = new int[1000];int* q = new int[1000];for(int i = start; i

2015-07-19 22:31:57 442

原创 快速排序&易错点

#include using namespace std;int partition(int* arr, int p, int q){ int pivot = arr[p]; while (p < q) // while中统一使用p < q 而不是p <= q { while(pivot <= arr[q] && p < q) q--; arr[p] = arr[q];

2015-07-19 21:55:35 701

原创 读《Finding and evaluating community structure in networks》Newman&Girvan

待编辑

2013-09-21 09:30:08 5145 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除