原创 Web.xml in REST

如果想要在 Restful 的工程中同時添加 html 等,一定不要將 restful 的servlet 的 path 設定爲 /* ,而是/som

原创 Get 415: Unsupported Media Type when posting something to Restful WS

if you have a restful ws written like this: @Path("/doadd") @POST @Consumes("application/x-www-form-urlenco

原创 Add new function to a prototype in javascript

// add escape function to String String.prototype.escape = function() { return this.replace(/&/gm, '&').replace(/</

原创 Increasing performance of inserting large amount of data simutaneously.

String sql; PreparedStatement ps; System.out.println("please wait..."); Date dt1 = new Date(); sql = "INSERT INTO TA

原创 Profiling in MYSQL

http://dev.mysql.com/doc/refman/5.0/en/show-profiles.html 13.7.5.29. SHOW PROFILES Syntax SHOW PROFILE [type [, type

原创 Using encodeURIComponent to avoid errors caused by special chars

var url = "/tryrest/analytics/addQuery?pid="+pid+"&qname="+encodeURIComponent(qname)+"&sqlstmt="+encodeURIComponent(qsc

原创 數據驅動的種蘿蔔方法

從前有一羣小白兔,他們辛勤的種蘿蔔。有一天他們發現他們種的蘿蔔不是太少無法滿足兔子們的需求,要不就是太多放在倉庫裏面爛掉了;蘿蔔的質量也是參差不齊的,小白兔們需要的是好吃的蘿蔔,但有些蘿蔔種出來後就是個翔,讓兔子們各種沒有食慾。於是他們

原创 數據驅動軟件工程,是時候把它召喚回來了

前陣因爲論文看到過有關駁數據驅動的文章。的確,數據驅動方法存在一些問題。在90年代,Google 曾經做過一個實驗,將程序員分成2組,一面教授模型驅動設計,另一面教授的是數據驅動設計。結果是,學習了數據驅動設計的開發者的代碼冗餘性提高,拓

原创 Dependency Walker

If you get an error like this in R when initializing rJava: Error occurred during initialization of VM Unable to load n

原创 Calculate Information Entropy

public double iEntropyDS(int[][] dataSource, int from, int to) { double e = 0.0; double col = dataSource.leng

原创 What if Eclipse doesn't show support methods automatically?

點贊 收藏 分享 文章舉報 solaris_navi 發佈了222 篇原創文章 · 獲贊 7 · 訪問量 33萬+ 私信

原创 Use StringBuilder to create large string

Sometimes we use this way to get string from a file locally or remotely: String resultData = "";

原创 How to convert CSV into Database Table?

CSV file: COL1;COL2;COL3 1;2.1;a 2;2.2;b 3;2.3;c the first line will be the column names, the rest of the data will be

原创 LaTex Templates and Samples for Writing IEEE Conference Paper

Main (http://quicklatex.blogspot.de/2011/12/how-to-use-latex-to-write-conference.html) \documentclass[conference]{IEEE

原创 Writing IEEE articles in Chinese with TeX

\documentclass[conference]{IEEEtran} \usepackage{cite} \usepackage{graphicx} \usepackage{CJKutf8} \begin{document} \be