Category Archives: Programming

Math Editor in C#

When you are acquiring to integrate a math editor into your application in WPF (Windows Presentation Foundation), I recommend you to use this math editor project called OOP in the Real World – Creating an Equation Editor in Code Project … Continue reading

Posted in C, Programming, WPF | Leave a comment

Resource Scheduler , Calculator, Short-Circuit in Hadoop YARN and HDFS

In order to execute the next-year plan, I search the research topics and technologies in Hadoop YARN and HDFS, then make a note as follows: Since Hadoop YARN was proposed, the new generation technology are continusly discussed. For knowing the … Continue reading

Posted in hadoop, Java, Programming, 學術研究, 程式設計 | Leave a comment

Process SequenceFile without Enabling Hadoop Platform

Recently I got a requirement for reading Hadoop’s SequenceFile without enabling Hadoop Platform. However, most examples introduce the read/write SequenceFile with Hadoop Platform. How do I read such files without hadoop? There’s a tricky solution in this case. 1. Download … Continue reading

Posted in hadoop, Java, Programming, 程式設計 | Leave a comment

Allen查字典故障一事

各位使用者好。上架許久的Allen查字典外掛,最近好像故障了。我目前著手修正中,看能不能趕在周六以前修正完畢,請耐心等候。謝謝!

Posted in browser, chrome, Programming, 程式設計 | 2 Comments

Print output while Processing HTML/XML data in Jsoup Project

Currently, I encountered one problem while retrieving XML data from one website. In my case, assume that the original XML document is like <result><device /><name>Allen’s device</name></result> If I use Jsoup.parse(File, “UTF-8”); without additional options, the returned document object will be like: … Continue reading

Posted in Java, Programming, XML, 程式設計, 網路 java | Leave a comment

How to fast calculate ( I mod N)?

Given integer I and an integer N which is power of 2, how does it work faster to calculate “I mod N”? OpenJDK’s java.util.HashMap.indexFor method gives us a best solution for it. It simply calculates ” I (bitwise AND) (N-1) … Continue reading

Posted in Java, Programming, 程式設計 | Leave a comment

The Problem of Ternary Operators in PHP

How do you think of the ternary operators in PHP? Recently, I’’ve used the code written as below: echo (1?”Y”:0?”N”:””); The code returns “N” but not “Y”. How does it work? It shoud be like: echo ((1?”Y”:0)?”N”:””); Finally, please follow … Continue reading

Posted in PHP, Programming, 程式設計 | Leave a comment

[PHP] Be discreet to use crypt function

Recently, the PHP’s crypt function crashed in my designed new system. In fact, in my database design, the length of password field is 64. It ran fine at CentOS 5.5 with PHP 5.2.x. However, when I moved this system to … Continue reading

Posted in Linux, PHP, Programming, Security, 程式設計, 資訊安全 | Leave a comment

Lucene中文斷詞

如果要使用Lucene的斷詞程式,最好看一下 1. Lucene介紹投影片 (推薦) 2. Lucene簡介 (推薦) 3. 當前幾個主要的Lucene中文分詞器的比較 4.  Lucene 3.0的中文分詞系統 (推薦) 5. Lucene 最新版4.6.1 內建的Smart中文斷詞 (推薦) 6. IKAnalyzer for Lucene 4.x版本 目前的Lucene斷詞系統都以支援簡體中文為先,如果要用繁體的話,就是用繁體轉簡體的API來製作。 JCC: A Java Chinese Covertor 懶得研究這麼多的話,可以直接使用Solr (基於Lucene實現的一個production) 1. Apache Solr 介紹(有寫說怎麼設定使用Solr斷詞,但還是以簡體字為主)

Posted in Java, Programming, 程式設計, 資工, 軟體(Software) | Leave a comment

艾倫查字典

筆者原本開發的「Yahoo字典查詢器」,因有商標權的問題,被強制下架。 不過這次記取教訓,把logo與名稱換掉,改名為「艾倫查字典」, 並修掉一些裡面codes不合理的地方。 宣傳連結請見我的網站介紹: http://www.allenworkspace.net/2-uncategorised/14-2013-12-17-17-25-26

Posted in chrome, jQuery, Programming, 程式設計, 資工 | Leave a comment