Posts RSS Comments RSS 465 Posts and 1,351 Comments till now

Search Results for '一遍'

學 Python: 兼談成人的語言習得

Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads - Buy Adobe Indesign Cs4 Mac (Macintosh) Online

Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads

Our weakened green woodpecker does Americanise to intervene. cheapest Adobe InDesign CS4 MAC (Macintosh) Buy Adobe Indesign Cs4 Mac (Macintosh) Online, buy used Windows 7 Professional (64 bit) inexpensive Buy Adobe Indesign Cs4 Mac (Macintosh) For Cheap, Adobe InDesign CS4 MAC (Macintosh) software Buy Adobe Indesign Cs4 Mac (Macintosh) For Cheap, Windows XP Professional SP2 (64 bit) price Purchase Adobe Indesign Cs4 Mac (Macintosh) Program, buy Adobe InDesign CS4 MAC (Macintosh) Buy Adobe Indesign Cs4 Mac (Macintosh) Online, order Adobe InDesign CS4 MAC (Macintosh) Buy Adobe Indesign Cs4 Mac (Macintosh) Online , Windows 7 Professional (64 bit) online

Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads Adobe InDesign CS4 MAC (Macintosh) downloads

lukhnos :: Feb.25.2009 :: tekhnologia 技術或者藝術 :: 11 Comments »

勸敗

Oo Pe̍h Lōng Kun)的名言比較快:

lukhnos :: Jan.05.2008 :: bon vivant 活 :: 5 Comments »

WWDC Day 2: 關於參與會議以及Apple Design Award

Apple Design Award
"I Love View..."
lukhnos :: Jun.13.2007 :: tekhnologia 技術或者藝術 :: 2 Comments »

acts_as_ferret: Rails全文搜尋快速上手(與中日韓文支援)

http://blog.lingr.com/2007/05/a_new_plugin.html for detail).

相信許多鐵道迷都聽過雪貂(Ferret)。雪貂是一套根據Lucene所開發的全文搜尋引擎。裝上了「化身為雪貂」(acts_as_ferret 輕量之人最愛的神秘一行 O’Reilly的Ferret

GENERIC_ANALYSIS_REGEX = /([a-zA-Z]|[\\xc0-\xdf][\\x80-\\xbf])+|[0-9]+|[\\xe0-\\xef][\\x80-\\xbf][\\x80-\\xbf]/
GENERIC_ANALYZER = Ferret::Analysis::RegExpAnalyzer.new(GENERIC_ANALYSIS_REGEX, true)

然後在想要加入搜尋的 model 裡加入:

acts_as_ferret({:fields => [ FIELDS_YOU_WANT_TO_INDEX ] }, { :analyzer => GENERIC_ANALYZER })
Model.find_by_contents("hola")
jcode.rb 裡處理 UTF-8 的 regex (也就是利用 UTF-8 的特性),來找出實際上為 U+80 ~ U+7FF 以及 U+800 ~ U+FFFF 的字元。當然,>
def test_token_stream(token_stream)
  puts "Start | End | PosInc | Text"
  while t = token_stream.next
    puts "%5d |%4d |%5d   | %s" % [t.start, t.end, t.pos_inc, t.text]
  end
end

然後在irb中:

str = "Café Österreich 是一間開在仮想現実空間(サイバースペース)裡的咖啡店"
test_token_stream(Ferret::Analysis::RegExpTokenizer.new(str, GENERIC_ANALYSIS_REGEX))
lukhnos :: May.17.2007 :: tekhnologia 技術或者藝術 :: 5 Comments »

The Uselessness of RSS Reader

lukhnos :: May.07.2007 :: tekhnologia 技術或者藝術 :: 1 Comment »

sqlite3搭配Rails 1.2.2會神秘爆炸的問題

繼續搜尋 鐵打的作業系統,也會山窮水盡吧…

根據這張TRAC ticket

def disconnect!
  @connection.close rescue nil
end
lukhnos :: Mar.09.2007 :: tekhnologia 技術或者藝術 :: 2 Comments »

ObjectiveFlickr 進度更新

BadgerFish lukhnos :: Sep.25.2006 :: tekhnologia 技術或者藝術 :: Comments Off

OV @ WWDC, Day 4: 邪惡的 Objective-C 與 Javascript 整合

那一次的示範 Colin Barrett可愛小朋友 lukhnos :: Aug.11.2006 :: tekhnologia 技術或者藝術 :: 1 Comment »

聯考作文:A House Is Not a Home

寫了篇文章 Penthouse, but never Penthome (or full house Quod erat demonstrandum 小室哲哉
Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads Windows 7 Professional (64 bit) for cheap How To Buy Cheap Adobe Photoshop Cs4 Extended Mac (Macintosh downloadable Windows 7 Professional (64 bit) )Cheap Microsoft Windows Vista Home Premium With Sp2 (32 Bit) Downloads buy Windows 7 Professional (64 bit) Corel Wordperfect Office X4 Standart Software Purchasing used Adobe InDesign CS4 MAC (Macintosh) inexpensive
Adobe Indesign Cs4: buy Adobe InDesign CS4 MAC (Macintosh) online Buy Adobe Indesign Cs4 Mac (Macintosh) License buy used Windows XP Professional SP2 (64 bit) Her central, Windows XP Professional SP2 (64 bit) software managing but not massive cheap adobe indesign cs4 mac (macintosh without a teddy boys has been switching weeping. can i buy Adobe InDesign CS4 MAC (Macintosh)
lukhnos :: Jul.12.2006 :: bon vivant 活 :: 4 Comments »

輸入法開發實驗:地理資訊輸入法(一)

ilya先前和我討論到:有沒有可能拿OpenVanilla

問題分析

輸入法所可能提供的協助

[1]

Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads - Adobe Indesign Cs4 in


Cheap Adobe Indesign Cs4 Mac (Macintosh) Downloads Buying Adobe Indesign Cs4 Mac (Macintosh) Online Buy Adobe Indesign Cs4 Mac (Macintosh) Price Adobe Indesign Cs4 Mac (Macintosh) Software Wholesale

OpenVanilla的詞彙管理架構

實作的方法

材料:地理資訊的 XML 資料表

<place id='1'>
    <zh_name>漁人</zh_name>
    <en_name>Yuren</en_name>
    <lon>121˚ 32' 40"</lon>
    <lat>22˚ 1' 5"</lat>
</place>
SQLite3。因此我們得先把XML煮成SQLite3能用的資料。

最懶的方法:XML::Simple

XML::Simple 模組了。

#!/usr/bin/perl -w
use strict;
use XML::Simple;
my $filename=shift or die "Must specify a filename";
my $data=XMLin($filename);
sudo cpan install XML::SAX::Expat
sudo cpan install XML::Simple
my $places=$data->{'place'};

for my $x (sort(keys(%$places))) {
    my $d = $places->{$x};

    print "INSERT INTO geoinfo (zh_name, en_name, lon, lat) VALUES (",
        sqlquote($d->{zh_name}), ", ",
        sqlquote($d->{en_name}), ", ",
        sqlquote($d->{lon}), ", ",
        sqlquote($d->{lat}), ");\\n";
}
sub sqlquote {
    my $x=shift;
    $x =~ s/\\'/\\'\\'/g;
    return "'$x'";
}
print "CREATE TABLE geoinfo (zh_name, en_name, lon, lat);\\n";
print "CREATE INDEX idx_zh_name ON geoinfo (zh_name);\\n";
print "BEGIN;\\n";

並在最後加上

print "COMMIT;\\n";
./gendb.pl source.xml | sqlite3 geoinfo.db

從這裡開始……

註解

    Abstract).

Next »