2015년 11월 1일 일요일

하나씩 하나씩

하나
둘
셋

이건 뭐여

2010년 3월 6일 토요일

Learned from gerrard.

Gerrard, the legend.

I'm used to watch the game of gerrard's.

Today, england and egypt have a tryout match.

I learned something from gerrard in the game.

I can change myself only.
Sometime passive mode is more proper rather than active mode.

2010년 3월 1일 월요일

simple korean search using lucene

Environments:

All text files are encoded in UTF-8.
query.txt is also encoded in UTF-8.

windows xp


apache-ant-1.8.0-bin.zip

Set Path:
ANT_HOME is set to c:\ant
JAVA_HOME is set to c:\Program Files\Java\jdk1.6.0_18
ADD c:\ant\bin to PATH
CLASSPATH is set to C:\lucene\build\lucene-core-3.0.1-dev.jar;C:\lucene\build\lucene-demos-3.0.1-dev.jar

Edit demo source files:
C:\lucene\src\demo\org\apache\lucene\demo\FileDocument.java

add
import java.io.*;

modify
doc.add(new Field("contents", new FileReader(f)));
to
try {         doc.add(new Field("contents", new InputStreamReader(new FileInputStream(f), "UTF-8")));   
} catch (UnsupportedEncodingException e) {
e.printStackTrace(); }
C:\lucene\src\demo\org\apache\lucene\demo\SearchFiles.java

add
import java.io.*;

modify
in = new BufferedReader(new FileReader(queries));
to
try {         in = new BufferedReader(new InputStreamReader(new FileInputStream(queries), "UTF-8"));   
} catch (UnsupportedEncodingException e) {
e.printStackTrace(); }

Command Line:
C:\lucene>ant
C:\lucene>ant war-demo
C:\lucene>java org.apache.lucene.demo.IndexFiles c:\docs
C:\lucene>java org.apache.lucene.demo.SearchFiles -queries query.txt

References:

2010년 2월 25일 목요일

You deserved it.

No pain, No gain.

Why we should get pain?

I don't like pain.

No one like pain.

But you deserved int.

int? something like occupational disease.

2010년 2월 17일 수요일

EventLog Class

심심해서 찾아봤더니, 아주 잘 만들어 놨네.

아주 좋아.





EventLog myLog = new EventLog();
myLog.Source = "MyLog";

myLog.MaximumKilobytes = 16384;
myLog.WriteEntry("Writing to event log.", System.Diagnostics.EventLogEntryType.Error);
myLog.Close();

2010년 2월 15일 월요일

아웃룩에 저장된 메일을 Gmail에 백업

아웃룩에 저장되어 있는 것을 계속 유지하려면, .pst파일을 계속 들고 댕기야 되고 무지 귀찮다.

컴퓨터를 새로 세팅할 때, 특히 OS를 재설치할 때 너무 귀찮다.

그래서 이번에 기냥 다 Gmail에다 백업했다.

이제 Google이 안망하길 바라는 수밖에?

2010년 1월 15일 금요일