句動詞 lead to他

lead to cause 〔道などが〕〜に通じる[つながる・至る] 〔事が〕〜につながる、結果{けっか}として〜に導く、結局{けっきょく}〜となる、〜を引き起こす、〜をもたらす、〜を招く、〜の原因{げんいん}となる、結局{けっきょく}〜が落ちだ put off…

iDistanceを用いた多次元空間におけるK近傍法

元ネタは H. V. Jagadish, Beng Chin Ooi, Kian-Lee Tan, Cui Yu, and Rui Zhang. iDistance: An adaptive B+-tree based indexing method for nearest neighbor search. ACM Trans. Database Syst., Vol. 30, No. 2, pp. 364–397, 2005. iDistanceは多次元…

JavaScriptのラベル

JavaScriptにはラベルという概念がある.C言語にもラベルがあり,goto文と共に使用されるが,JavaScriptのラベルはC言語のそれとは違う.JavaScriptでラベルを使った例は以下の通りとなる. loop: for (;;) { for (;;) { break loop; } } この例では二重ルー…

tooとeitherとneitherとso

肯定文の同意はtooを使い,否定文の同意はeitherを使うというのは基本だが,soやneitherを使う事もできる.しかし,eitherとneitherは似ているし,soやneitherを使うと語順が変わったりするしで,どうにも覚えにくい.neither or so + 動詞 + 名詞,という順…

Distance Based Hashingによる多次元データのK近傍探索

元ネタは Vassilis Athitsos, Michalis Potamias, Panagiotis Papapetrou, and George Kollios. Nearest Neighbor Retrieval Using Distance-Based Hashing. In ICDE, pp. 327–336. IEEE, 2008. Locally Sensitive Hashing(LSH) 多次元データのK近傍探索を行…

SpiderMonkeyでJavaScriptからCの関数を呼び出す

オブジェクトへ関数を定義する SpiderMonkeyを使えば,JavaScriptからC言語で書かれた関数を呼び出すことが出来る.サンプルによると,JSFunctionSpecの配列を定義して,JS_DefineFunctions関数を呼び出すことで,C言語の関数がJavaScriptの任意にオブジェク…

I wish I did ...

We use the past after wish. We use wish to say that we regret something, that something is not as we would like it to be: I wish I knew Paul's phone number. (=I don't know it and I regret this) It rains a lot here. I wish it didn't rain so…

If I do ... and If I did ...

If I do ... Lisa has lost her watch. She tells Sue: Lisa: I've lost my watch. Have you seen it anywhere? Sue: No, but if I find it, I'll tell you. In this example, Sue feels there is a real possibility that she will find the watch. So she …

JavaScriptにおける変数のスコープ

JavaScriptのスコープはCやC++と少し違う. 変数のスコープ 次のようなプログラムを考えてみる. var a; b = 'b:global'; function f() { a = 'a':global; var c = 'c:local'; d = 'd:global'; } f(); document.write(a); // a:globalが出力される document.…

have something done

We use have something done to say that we arrange for somebody else to do something for us. Compare Lisa repaired the roof. (リサは屋根を修理した) Lisa had the roof repaired. (リサは屋根を修理してもらった) Examples Where did you have y…

It is said that ..., He is said to ...

彼は108歳だと言われる. It is said that he is 108 years old. He is said to be 108 years old. They say that he is 108 years old. の受身はitを仮主語としたものと,heを主語としたものがある. The strike started three weeks ago. それは,すぐに終…

Content-based similarity search over peer-to-peer systemsにある多次元空間から1次元空間へのマッピング

元ネタは Ozgur D. Sahin, Fatih Emekc ̧i, Divyakant Agrawal, and Amr El Abbadi. Content-based similarity search over peer-to-peer systems. In DBISP2P, 2004. 定義1 ある次元の点とが存在したとする.このとき,この2点間の距離は と表される. 定義…

should have done

You should have done something = you didn't do it, but it would have been the right thing to do: You missed a great party last night. You should have come. Why didn't you? (= you didn't come, but it would have been good to come) You should…

passive. I don't like being...

active I don't like people telling me what to do. passive I don't like being told what to do. people telling me (人々が私に言う事)が,being told(言われること)と受身となっている. I remember being taken to the zoo when I was a child. (=…

ルーピーズ?

鳩山首相が海外の新聞にloopyと揶揄されたため,鳩山内閣の閣僚や民主党関係者,もしくは民主党支持者などを指す用語としてルーピーズなる単語が使わることがある. しかし,loopyは名詞ではなく形容詞であるため,loopiesと格変化しないはずだが,はてさて.

SpiderMonkey 1.8 rc1をMacに入れる

まず,NSPRを入れる. チェックアウト $ cvs cvs -q -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r NSPR_4_8_4_RTM mozilla/nsprpub $ cd mozilla/nsprpub コンパイル&インストール $ ./configure $ sudo make install/usr/local以下にイン…

句動詞・熟語 come with他

英語の句動詞・熟語が未だに覚えられない. 英語は異音同義語が多すぎる. come with accompany 〜と共に[一緒{いっしょ}に]目的地へ進む[やって来る]、(人)に同伴{どうはん}する 〜を搭載{とうさい}している[備えている・装備{そうび}してい…

C言語でのオブジェクト指向を可能とするCos

The C Object System: Using C as a High-Level Object-Oriented Language http://arxiv.org/abs/1003.2547v1C言語をオブジェクト指向っぽく使えるライブラリである.論文中にはオブジェクト指向言語との対比としてObjective-Cを挙げている.C Object System…

ブラウザ上でのx86サンドボックス thefbi

http://code.google.com/p/thefbi/thefbiはブラウザ上でx86ネイティブコードを実行するプラグインらしい.ブラウザ上でネイティブコードを走らせるにはいくつか方法がある. OSのプロセスとして走らせる 隔離環境のもとでOSのプロセスとして走らせる 仮想マ…

セキュア分散ストレージ Tahoe-LAFS

http://allmydata.org/trac/tahoe-lafsTahoe-LAFSはセキュア分散ストレージを実現するソフトウェアらしい.現在,Amazon S3などクラウドを用いたストレージなどが流行っているが,彼らの言うセキュアとは,データの可用性が高く,紛失などの起きないと言う意…

気になるプロジェクト

いくつか気になるプロジェクトをメモっておく.

boostのobject_poolをスマートポインタで利用する

boostにはメモリプールをやってくれる親切なobject_poolと言うライブラリがある.この使い方は至って簡単で,テンプレートの引数にクラスを渡してプール用のオブジェクトを作成するだけとなる.指定したクラスの生成を行いたい場合(new classに相当)はcons…

RFC 908 - Reliable Data Protocolにある間違い

20年以上も前に書かれたRFCを実装していたところ,間違いを見つけたのでメモっておく.問題の箇所は,24ページにある以下の記述となる.本記述は,アクティブオープンを行う際の擬似コードとなる. If active Open If remote port not specified Return "Err…

なぜJavaは嫌われているのか?

Why Do People Hate Java? http://ja.reddit.com/r/programming/comments/b7eo5/proggit_why_do_people_hate_java/c0lc00n にあった返答が面白かった.個人的なJavaの感想だが,良い言語であるかもしれないが,Javaを使うぐらいならPythonを使うし,Webサイ…

Windows 7をMacOS XのBootcampとVirtualBoxの両方で動かす

利用するホストOSはMacOS X Snow Leopardで,まず,普通にBootcampを使ってWindows 7をインストールする.ここら辺の説明は割愛.インストール後のディスクは以下のようになる. Current MBR partition table: # A Start LBA End LBA Type 1 1 409639 ee EFI…

スラッシュドットの「研究者はコードを公開すべきか」という記事に対するコメントが熱いことになってる

元記事(http://slashdot.jp/developers/article.pl?sid=10/02/11/0312255)はこんな感じ 科学者はその研究で使っているプログラムのコードを公開すべきであるとの主張が英Guardian誌で取り上げられている(本家/.より)。 このコラムで Open Universityの Darre…

人類は宇宙人によって創られた存在である

今現在,人工知能・生命,二足歩行ロボティクスなど様々な研究が行われている.これらが研究されている目的は様々であるが,ここで,これらの最終的な目標は,我々人類と同等かあるいはそれ以上の知能・知性・生命力を備えた,もうひとつの,人類とは別の知…

Macでファインダのウィンドウタイトルに絶対パスを表示させる

ファインダでフォルダを開くとカレントパスがわからないので,これしておくと便利. Snow Leopardで大丈夫. % defaults write com.apple.finder _FXShowPosixPathInTitle -bool yes % killall Finder

Dragonfly BSDでavahiを動かす

avahiはdbusというプロセス間通信ライブラリを利用しているため,dbusも起動しなければならない.コンパイル&インストール # cd /usr/pkgsrc/net/avahi # bmake install 起動スクリプトをコピー # cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/ # cp /u…

Present Continuous and Present Simple

Present Continuous We use the continuous for things happening at or around the time of speaking. The action is not complete. We use the present continuous when we talk about changes happening around now, especially with these verbs: get ch…