2009/06/27

Oracle 10g ExpressをDebian 5.0.1 lennyにインストール

Oracleのレポジトリを/etc/apt/souces.listに追加する。

deb http://oss.oracle.com/debian unstable main non-free

公開アーカイブの鍵を追加する

$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O - | apt-key add -
$ apt-get update
$ apt-get install oracle-xe

オラクルの設定をする。

$ /etc/init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"

Oracleを操作するユーザの.bashrcに以下の行を追加して、必要な環境変数を設定する。

# environmental variables for oracle database
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

.bashrcを再読み込みさせる。

$ source .bashrc

これでSQL*Plusが使えるようになっている。SYSDBA権限でログインしてみる。

$ sqlplus sys as sysdba

以上。

2009/06/22

2009/06/19

拡張現実採用事例

ニコニコで紹介されている拡張現実(Augmented Reality)を見るたびに、「これ商売にならないかなぁ?」と思っていた。
で、採用事例を見つけたのでメモ。


Augmented Reality Technology Brings Useful Service to USPS @ Marketing VOX

郵便物が箱にはいるかどうかを調べられるサービスらしい。透明化などがARでないとできない事なので、面白い。

だけど…。
やっぱ、サイズを示してメジャーで測ってもらうのにくらべて敷居が高すぎるなぁ…。



2009/06/16

JavaScriptを使わずにWebブラウザの閲覧履歴を盗む

JavaScriptを使わずにWebブラウザの閲覧履歴を盗む @ /.J

ネットは怖いことを再認識。これを防ぐ対策してる人は本当にごくわずかだと思う。
行動ターゲティング広告のシステムを作る場合、防ぐ方法が難しいので切り札的になると思う。だけど、「不正指令電磁的記録作成等の罪」にがっつり当たるような気がするなぁ…。

それを考えると、ドリコムのad4Uはうまくグレーゾーンをついてるなぁと再認識。

参考:行動ターゲティング広告はどこまで許されるのか

2009/06/15

2009/06/10

KAKASI - 漢字→かな(ローマ字)変換プログラム


大量の漢字を含む情報をカナに変換する必要が出てきたのでメモ。
公開されている辞書でもそこそこの精度があった。

Linux版だけでなくWin32版もあるのがありがたい。

exec関数を使えばWin32+PHPという環境からでも簡単に利用できる。
一例、

function kakasi($str) {
$res = exec("echo ".escapeshellcmd($str)." | c:\\kakasi\\bin\\kakasi.exe -JK");
return $res;
}

今回はコマンドラインのみの使用だけだったが、ブラウザから利用するにはもう一工夫必要。
apacheのサービスをローカルシステムアカウントで動作させればよい。
(ただしそれによるセキュリティが低下しても、私は責任もてないし、知ったことではない。)