`
beneo
  • 浏览: 54331 次
  • 性别: Icon_minigender_1
  • 来自: 希伯來
社区版块
存档分类
最新评论
文章列表
凌弃同学已经介绍了EventBus的使用方式 ​如何使用——三步走: ​1、定义一个observer,并加入@Subscribe作为消息回调函数; 2、将observer注册到EventBus;EventBus.register(this); ​3、消息投递: eventBus.post(logTo); 本文将深入EventBus的源代码,和大家一起深入研究EventBus的让人惊叹的设计思路。由于作者水平有限,无法面面俱到,希望大家先读读EventBusExplained。 注:Guava的版本   <dependency> &l ...
根据wiki mahout 产生 vector 的方式有2种: #1 from lucene index to vector $MAHOUT_HOME/bin/mahout lucene.vector <PATH TO DIRECTORY CONTAINING LUCENE INDEX> \ --output <PATH TO OUTPUT LOCATION> --field <NAME OF FIELD IN INDEX> --dictOut <PATH TO FILE TO OUTPUT T ...
我们要发现一个富文本中的http链接,发现一些群体行为,获取URL 第一步:提取http链接 使用 Jsoup 来做 Document doc = Jsoup.parse(stream.getText()) Elements links = doc.select("a[href]") for (Element element: links) { link = element.attributes().iterator().next().getValue() // l ...
    mahout是基于hadoop的数据挖掘工具,因为有了hadoop,所以进行海量数据的挖掘工作显得更为简单。但是因为算法需要支持M/R,所以不是所有常用的数据挖掘算法都会支持。这篇文章会告诉你,如何使用hadoop + mahout搭出一个简易的聚类工具。     第一步:搭建hadoop平台。 我使用的是ubuntu 11.04,如果没有ubuntu的开发环境,就参考我的帖子《Ubuntu 10.10 java 开发环境》     #1 在ubuntu下面建立一个用户组与用户 beneo@ubuntu:~$ sudo addgroup hadoop beneo@ubunt ...

RabbitVCS

我真的要感谢 wowubuntu,没有这篇文章我估计还要折腾一整天 http://wowubuntu.com/rabbitvcs.html ortoiseSVN 是 Windows 平台上版本控制程序 Subversion 的前端客户端,而 RabbitVCS 就是 Linux 平台下 TortoiseSVN 的最佳替代者。 RabbitVCS 是一款 Linux 平台上的版本控制前端程序,使用 Python 技术构建。可以与文件管理器 Nautilus 紧密整合,支持 Subversion (SVN) , Git 版本控制系统,未来还将支持 Mercurial 。 项目主页: http ...
转自 http://wowubuntu.com/ibu-googlepinyin.html Shellexy大神发布了ibus 的谷歌拼音输入法,现在各位同学可以试试在 ibus 使用谷歌拼音 安装方法 sudo apt-get install cmake build-essential opencc mercurial ibus hg clone http://code.google.com/p/libgooglepinyin/ cd libgooglepinyin mkdir build; cd build cmake .. -DCMAK ...
spring batch 给出了如下几个使用场景 商用场景 Commit batch process periodically Concurrent batch processing: parallel processing of a job Staged, enterprise message-driven processing Massively parallel batch processing Manual or scheduled restart after failure Sequential process ...
spring-batch-sample是一个很好学习batch的例子,里面还包含了maven管理等有趣的知识。不过spring-batch-sample下下来是会遇到很多问题的,这里就写个文章与大家分享一下。 1. 下载spring工程 http://static.springsource.org/downloads/nightly/release-download.php?project=BATCH BATCH/spring-batch-2.1.8.RELEASE-no-dependencies.zip 2. 进入sample,然后修改pom.xml,添加 <plugi ...
在java 1.5的时候,我还得写bash脚本去loop获得所有的jar,然后写到classpath下面,现在换到1.6,发现有个classpath wildcard,原来classpath也有通配符 看这里 引用     Class path entries can contain the basename wildcard character *, which is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. Fo ...

mark一句话

    博客分类:
  • java
Working as an effective professional Java developer requires two major skills: thinking like a Java developer and having a broad understanding of Java APIs, tools, and techniques to solve a wide variety of Java problems.

Ruby #1

    博客分类:
  • ruby
ubuntu 10.10开始安装ruby on rails 按照官网step by step,结果发现在rails server这个代码的时候,出现 引用 Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile. 仔细阅读安装步骤,发现我是用 引用 sudo apt-get install ruby1.9.1 而不是 引用 sudo apt-get install ruby1.9.1-full 重新安装后搞定,可以登陆到http://localhost:8808了。 ...
直接上代码 public static void main(String[] args) { System.out.println(1.0 - 0.1); System.out.println(1.0 - 0.2); System.out.println(1.0 - 0.3); System.out.println(1.0 - 0.4); System.out.println(1.0 - 0.5); System.out.println(1.0 - 0.6 ...
http://hi.baidu.com/%B7%DB%D2%C0%C0%D9%CB%BF/blog/item/823a80ed6cbef05f79f055c9.html 秀秀是我高中很要好的朋友,同在一个班里度过了高三的辛苦时光。她学习努力,成绩很棒,后来考上了北京的名校,现在在离我不远的大学里读研究生,同时在 ...
上两周问答大赛的时候,看到了很多人问为什么自己调用的Runtime.getRuntime().exec(...)方法没有返回。其实没有返回的原因很多,但是前提你要写出一个正确的exec 如果想要了解更多的信息,参阅代码里面给的链接 下面是这个正确的例子 public class RuntimeExec { /** * Runtime execute. * * @param cmd the command. * @return success or failure * @see {@link http://www.java ...
自己留作一个备份,share给大家 maven-webapp的pom.xml,关于jetty + spring + bonecp的配置 不过前提是你要懂一点点maven <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
Global site tag (gtag.js) - Google Analytics