High level search with PHP and Apache Solr

Posted on 23rd March 2010 by Nio in Java, Lucene, 程序人生 - Tags: , , ,

High level search with PHP and Apache Solr

When data sets get large and MySQL database querying to search become too load heavy and slow, full indexing is required. Several solutions are available but in this article I will be demonstrating the Apache foundations Solr Java Lucene implementation. For this a Java build will be required. Linux or Mac is less of a problem but for windows I use the Apache Tomcat server.

New language features in Java 7

Posted on 25th November 2009 by Nio in Java, 程序人生 - Tags:

New language features in Java 7

I’m just back from the Devoxx conference in Antwerp. An update was given on the new language changes that will be in Java 7. The JDK currently has a release date of September 2010.

Here are 7 of the new features that have been completed:

* Language support for collections
* Automatic Resource Management
* Improved Type Inference for Generic Instance Creation (diamond)
* Underscores in numeric literals
* Strings in switch
* Binary literals
* Simplified Varargs Method Invocation

很多特性都非常有意思,比如:


List<String> list = new ArrayList<String>();
list.add("item");
String item = list.get(0);

Set<String> set = new HashSet<String>();
set.add("item");

Map<String, Integer> map = new HashMap<String, Integer>();
map.put("key", 1);
int value = map.get("key");

可以变为:


List<String> list = ["item"];
String item = list[0];

Set<String> set = {"item"};

Map<String, Integer> map = {"key" : 1};
int value = map["key"];

最有意思的是数字:


int one_million = 1_000_000;

:)

Virtual Ant

Posted on 19th June 2007 by Nio in Java, Testing, 程序人生

Virtual Ant 是可视化的 Ant,你可以直接在窗口中录制测试过程,创建 target,运行测试,基本就是点点鼠标的操作,很酷呀。此外它还可以整合到你喜欢的 IDE 中,如 Eclipse、Intellij Idea 和 Netbeans 等。唯一遗憾的是目前还不是开源的,也不是完全免费的。可以看一下官方提供的 demo 视频

Synchronizing a Web Client Database: LocalCalendar and Google Calendar

Posted on 23rd January 2007 by Nio in AJAX, Java, JavaScript, 程序人生

Synchronizing a Web Client Database: LocalCalendar and Google Calendar

Rich Internet Applications (RIAs) are becoming more and more popular as the capabilities available to internet clients increase. There is a growing demand for RIAs to be able to store rich, structured, searchable data on the same machine as the web browser, and to be able to synchronize this data with a centralized data store running behind the web server.

The Benefits of Java EE 5

Posted on 20th December 2006 by Nio in Java, 程序人生

The Benefits of Java EE 5

From its inception more than a decade ago, the Java platform has matured considerably making it the preferred choice of many professionals & organizations for developing applications. In its most recent version for the enterprise — dubbed Java EE 5 — its designers have placed a special emphasis on doing more with less, so whether you're a seasoned expert or just starting out, it's likely you will find some fresh approaches that will simplify and ease your development efforts � this article takes a closer look.