自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 资源 (6)
  • 收藏
  • 关注

原创 LeetCode 297. Serialize and Deserialize Binary Tree

BFS # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None """ 首刷 """ class Code...

2018-08-20 23:36:33 133

原创 LeetCode 382. Linked List Random Node

蓄水池算法 # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def __init__(self, h...

2018-08-20 23:07:57 126

原创 LeetCode 43. Multiply Strings

""" 大数相乘 1.开空间 2.逆序 3.对位相乘 4.处理进位 5.处理前导0 6.逆序转化为答案 """ class Solution(object): def multiply(self, num1, num2): """ :type num1: str :type num2: str :rtype: str ...

2018-08-20 22:50:05 126

原创 LeetCode 328. Odd Even Linked List

解法1 # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None """ 首刷 O(n)时间复杂度 顺序不能变 分开2条链 难点:停止条件是什么? """ class...

2018-08-16 11:26:05 127

原创 LeetCode 312. Burst Balloons

Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get nums[le...

2018-08-09 00:05:48 119

原创 LeetCode 87. Scramble String

Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = "great": great / \ gr ...

2018-08-04 00:03:02 168

原创 LeetCode 877. Stone Game

Alex and Lee play a game with piles of stones.  There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i]. The objective of the game is to en...

2018-08-02 20:19:57 554

原创 LintCode 395. Coins in a Line II

395. Coins in a Line II There are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more coins left. The player who take the co...

2018-08-02 19:32:08 270

原创 LintCode 394. Coins in a Line

Description There are n coins in a line. Two players take turns to take one or two coins from right side until there are no more coins left. The player who take the last coin wins. Could you please ...

2018-08-02 16:50:40 289

原创 LeetCode 329. Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside o...

2018-08-02 15:55:30 103

原创 Xgboost4j打包 java Ubuntu安装

Xgboost4j打包 java Ubuntu安装1. 踩过的坑写在最前网上找了几个教程,教程比较少,能用上的不多(1)比如jni.h 和 jni_md.h 用来编译xgboost4j_wrapper.cpp生成打包的动态链接库 (只存在旧版本,但是还是以java文件夹名,现在是jvm-packages),没生成成功 (2)去网上找了个别人的动态链接库libxgboostjavawrapper.

2017-09-20 19:54:29 1749 1

翻译 Elasticsearch+Mongodb+nutch

0.环境: Ubuntu14.04 ES 1.4.4 Mongodb 2.7.6 Nutch 2.3 1.参考链接: http://www.aossama.com/search-engine-with-apache-nutch-mongodb-and-elasticsearch/

2016-01-12 17:46:04 865

原创 Elasticsearch+Mongodb 用mongo-connector 实时更新

0.说明: (1)单机用mongo-connector连接ES和Mongo,ES也支持作为后端数据库,当为了保持业务逻辑.用Mongo作为后端数据库,利用mongo-connector. 将mongo的数据导入到ES中 (2)原来想用nucth作为连接ES和Mongo,没有成功.指定nutch的gora配置,用nucth形成index的时候(nutch index -all),出现问题. (

2016-01-12 16:17:52 3537

原创 Nutch2.3 + Mysql(错误解决方案)

Nutch2.3 Mysql(错误解决方案)

2015-10-16 15:18:57 3121

原创 Lucene 5.3 自定义同义词分词器

Code 1:MySameWordTokenFilter public class MySameWordTokenFilter extends TokenFilter{ private CharTermAttribute cta = null;//自定义流的属性 private PositionIncrementAttribute pia = nu

2015-10-13 20:22:51 734

原创 Lucene 5.3 使用Lucene自定义StopAnalyzer

一、不包含原来分词器StopAnalyZer信息 Code 1: public class MyStopAnalyzer extends Analyzer { //一组数组产生分词对象 private CharArraySet stopWordsSet;//自己要屏蔽的一些单词 //构造函数 public My

2015-10-12 10:23:42 908

原创 Lucene错误_解决方案

(1)java.lang.NoSuchFieldError: CONSTANT_SCORE_REWRITE     at org.apache.lucene.queryparser.classic.QueryParserBase.(QueryParserBase.java:68)     at org.apache.lucene.queryparser.classic.QueryParser.

2015-10-05 20:08:29 1307

原创 Lucene-学习笔记 (版本3,5VS 5.3)

Lucene5.3 与Lucene3.5 的一些区别 (1)Lucene3.5   Document.setBoost  //对文档设置权值            Lucene5.3:   只有Field.setBoost   //对域设置权值 (2)3.5  有IndexReader.undeleteALL()   //将一些逻辑删除的索引复原           5.3

2015-10-05 19:48:23 974

python-pip安装脚本(Ubuntu14.04可用)

python-pip安装脚本(Ubuntu14.04可用)

2016-01-12

sonar-ant-task-2.2.jar

sonar-ant-task-2.2.jar

2015-10-16

com.sun.tools(jdk 1.7)

com.sun.tools(jdk 1.7)

2015-10-16

mmseg4j 2.3 源码

mmseg4j 2.3 源码 Lucene 中文分词器

2015-10-13

mmseg4j 2.3 jar包

mmseg4j 2.3 jar包 lucene中文分词器

2015-10-13

mmseg4j 2.3 源码

Lucene中文分词 mmseg4j 2.3 源码

2015-10-13

空空如也

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

TA关注的人

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