原创 Nutch2.3 + Mysql(錯誤解決方案)

試了幾次,最後沒有成功 導致錯誤的原因是一些包的版本問題 (如果你還想用Nutch2.3+Mysql  那麼再搜一下有沒有對應的教程) 最後我用了Nutch2.2.1+Mysql  (參考了   http://blog.csdn.net

原创 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

原创 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. Bel

原创 Lucene 5.3 自定義同義詞分詞器

利用MMseg4j作爲中文分詞  自定義同義詞分詞器 MMseg4j-2.3jar包 : http://download.csdn.net/detail/u010167215/9178257 MMseg4j-2.3 源碼: http:/

原创 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

原创 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 ar

原创 LeetCode 297. Serialize and Deserialize Binary Tree

BFS # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x

原创 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 coi

原创 LeetCode 43. Multiply Strings

""" 大數相乘 1.開空間 2.逆序 3.對位相乘 4.處理進位 5.處理前導0 6.逆序轉化爲答案 """ class Solution(object): def multiply(self, num1, num2):

原创 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 di

原创 LeetCode 382. Linked List Random Node

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

原创 LeetCode 328. Odd Even Linked List

解法1 # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x

原创 Xgboost4j打包 java Ubuntu安裝

Xgboost4j打包 java Ubuntu安裝 1. 踩過的坑寫在最前 網上找了幾個教程,教程比較少,能用上的不多 (1)比如jni.h 和 jni_md.h 用來編譯xgboost4j_wrapper.cpp生成打包的動態鏈接庫

原创 Elasticsearch+Mongodb 用mongo-connector 實時更新

0.說明: (1)單機用mongo-connector連接ES和Mongo,ES也支持作爲後端數據庫,當爲了保持業務邏輯.用Mongo作爲後端數據庫,利用mongo-connector. 將mongo的數據導入到ES中 (2)原來想用nu

原创 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-mon