memo.xight.org - 2005-07

2005-07-31 Sun
2005-07-30 Sat
2005-07-27 Wed
2005-07-26 Tue
2005-07-25 Mon

Vores Oel - An Open Source Beer

- Summary
  IT University of Copenhagenの学生グループが世界初のオープンソースビール「Vores Oel」を公開した.
  製法,ラベルデザインに至るまでクリエイティブコモンズ 帰属 - 同一条件許諾 2.0のライセンスで公開されている.
  Vores Oel

- Reference
  Vores oel
  http://www.voresoel.dk/

  IT University of Copenhagen
  http://www1.itu.dk/sw5211.asp

  Creative Commons 帰属 - 同一条件許諾 2.0
  http://creativecommons.org/licenses/by-sa/2.0/

  コーラ白書 - OpenCola
  http://www.colawp.com/colas/400/cola467_recipe.html

  Wikipedia - オープンコーラ
  Wikipedia - Vores_%C3%98l

- via
  Slashdot Japan - 2005-07-22 - オープンソースのビール
  http://slashdot.jp/articles/05/07/22/020255.shtml

2005-07-24 Sun

Go square, Gone square

- Summary
  ファミコンピコピコ系音楽.
- Reference
  場所無き場所のヤルハラ
  http://homepage1.nifty.com/cheap/untitled/
  Go square
  http://www.ismusic.ne.jp/nagatsuta/sound/gosquare.htm
  Gone square
  http://yaruhara.seesaa.net/
- via
  窓の杜 - 2005-07-21 - ボスを倒してプレイ時間を延ばしスコアを稼ぐシューティング「WispLisp++」
  http://www.forest.impress.co.jp/article/2005/07/21/wisplisp.html

2005-07-21 Thu

既知の MIME タイプに対し "ファイルのダウンロード" ダイアログ ボックスを開く

- Summary

Content-disposition: attachment; filename=filename.ext


- Reference
  Microsoft - サポートオンライン - [HOWTO] 既知の MIME タイプに対し [ファイルのダウンロード] ダイアログ ボックスを開く
  http://support.microsoft.com/default.aspx?scid=kb;JA;260519
- via
  Landscape - 2005-05-24 - IE 内で pdf や Excel を開かせない方法
  http://sonic64.com/2004-05-24.html#2004-05-24-1

  cl.pocari.org - 2005-07-19 - IE 内で pdf や Excel を開かせない方法
  http://cl.pocari.org/2005-07-19-10.html

2005-07-19 Tue

ChangeLogメモ 50000行達成

- 記録

Line 50108 (行)
Entry 3797 (エントリ)
File size 1769738 (byte)

- 備考
  ChangeLog開始日は[2002-11-28-1]
  ChangeLog開始1周年は[2003-11-28-1]
  ChangeLog開始2周年は[2004-11-28-1]
  10000行達成は[2003-10-04-1]
  20000行達成は[2004-05-06-23]
  30000行達成は[2004-09-10-12]
  40000行達成は[2004-12-26-1]

WordPressの 改行 -> <br>タグ 変換

- Summary
  勝手に改行を<br>タグに変換するので,やたら空行が目立つ.

- 解決!
/path/to/xoops/modules/wordpress/wp-includes/functions-formatting.php を変更

preg_replace でタグを置換している箇所に ignore case を付加
58-81行目

function wpautop($pee, $br = 1) {
	$pee = $pee . "\n"; // just to make things a little easier, pad the end
	$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); // Space things out a little
	$pee = preg_replace('!(<(?:table|thead|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)!i',"\n$1", $pee);
	$pee = preg_replace('!(</(?:table|thead|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])>)!i',
"$1\n", $pee);
	$pee = preg_replace("/(\r\n|\r)/", "\n", $pee); // cross-platform newlines
	$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
	$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "\t<p>$1</p>\n",$pee); // make paragraphs, including one at the end
	$pee = preg_replace('|<p>\s*?</p>|i', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
	$pee = preg_replace('!<p>\s*(</?(?:table|thead|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*</p>!i',"$1", $pee); // don't pee all over a tag
	$pee = preg_replace("|<p>(<li.+?)</p>|i", "$1", $pee); // problem with nested lists
	$pee = preg_replace('|<p><blockquote([^>]*)>|i',"<blockquote$1><p>", $pee);
	$pee = str_replace('</blockquote></p>', '</p></blockquote>',$pee);$pee);
	$pee = preg_replace('!<p>\s*(</?(?:table|thead|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)!i',"$1", $pee);
	$pee = preg_replace('!(</?(?:table|thead|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*</p>!i',"$1", $pee);
	if ($br) $pee = preg_replace('|(?<!<br />)\s*\n|i', "<br />\n",$pee); // optionally make line breaks
	$pee = preg_replace('!(</?(?:table|thead|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*<br/>!i', "$1", $pee);
	$pee = preg_replace('!<br/>(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)!i', '$1', $pee);
	$pee = preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1',$pee);
	$pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', "stripslashes('$1') .  clean_pre('$2')  . '</pre>' ", $pee);
 
	return $pee;
}


- Patch
functions-formatting.phpのパッチ
- Reference
  WordPress Japan - 改行のBR変換について
  http://phpbb.xwd.jp/viewtopic.php?p=990

Spreadsheet::ParseExcel

- Debian でインストール

# aptitude install libspreadsheet-parseexcel-perl


- サンプル
日本語での利用のサンプルは以下にある
/usr/share/doc/libspreadsheet-parseexcel-perl/examples/sample_j.pl

- 特徴
複数シートのExcelファイルが難なく読める.
とても便利!

- Reference
河馬屋二千年堂 - Perlの小技 - Spreadsheet::ParseExcel - Excelファイルから情報を取得する
http://homepage3.nifty.com/hippo2000/perltips/Spreadsheet/ParseExcel.htm

Spreadsheet::ParseExcel
Debian パッケージディレクトリ検索 (バイナリ) - libspreadsheet-parseexcel-perl

- Reference 追記 [2006-07-10]
Spreadsheet::ParseExcel - ごくごく普通の使い方メモ - iandeth.
http://iandeth.dyndns.org/mt/ian/archives/000626.html

Linux マシンのメモリ使用量を節約する

- 不要なサービスを止める

- 仮想コンソールの数を減らす
/etc/inittab のttyをコメントアウト

1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6



- Reference
Debian GNU/Linux スレッドテンプレ - Tips - 少しでもメモリ使用量を節約したい
http://debian.fam.cx/?Tips#content_1_5
Debian セキュリティマニュアル - インストール前およびインストール中 - 3.6 必要最小限のサービスを走らせる
http://www.jp.debian.org/doc/manuals/securing-debian-howto/ch3.ja.html#s3.6
日本の Linux 情報 - Linux JF (Japanese FAQ) Project. - Small Memory mini-HOWTO - 3. 仮想コンソール
http://www.linux.or.jp/JF/JFdocs/Small-Memory/vconsole.html
- via
Landscape - 2004-04-08 - Linux マシンのメモリ使用量を節約する
http://sonic64.com/2004-04-08.html#2004-04-08-1

Debian - grub

- grub-install を実行

# grub-install /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/hda


- update-grub を実行

# update-grub
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file...

Could not find /boot/grub/menu.lst file. Would you like
/boot/grub/menu.lst generated for you? (y/N) y
Searching for splash image... none found, skipping...
Found kernel: /vmlinuz-2.4.18-bf2.4
Updating /boot/grub/menu.lst ... done


- /boot/grub/menu.lst を編集

- 再度 update-grub を実行

# update-grub
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file... found: /boot/grub/menu.lst
.
Searching for splash image... none found, skipping...
Found kernel: /vmlinuz-2.4.18-bf2.4
Updating /boot/grub/menu.lst ... done


- LILOの問い合わせを無くし,update-grubを自動的に実行させる
/etc/kernel-img.conf を作成

postinst_hook = /sbin/update-grub
postrm_hook = /sbin/update-grub
do_bootloader = no


- Reference
Iwatani Electronics - Debian GNU/Linux で利用する GNU GRUB
http://www2.i-e-c.co.jp/grubindex.html

Apache の conf.d ディレクトリを活用する

- /etc/apache/httpd.confの変更
  最終行に以下を追加(されていた)

Include /etc/apache/conf.d


- 用途に応じたconfファイルを作成
/etc/apache/conf.d/php4.conf
/etc/apache/conf.d/awstats.conf
/etc/apache/conf.d/xoops.conf
/etc/apache/conf.d/phpmyadmin.conf
/etc/apache/conf.d/chalow.conf

暗黙のインターネットルール

- Summary
  以下の「暗黙のインターネットルール」を盲信することの危険性について.

暗黙のルールその1:疑わしいときは「ここをクリック」リンクを貼る
暗黙のルールその2:「詳細はこちら」リンクを使う
暗黙のルールその3:「さらに読もう」「続きを読もう」「次は」といったあいまいなハイパーリンクをできるだけ多く使う
暗黙のルールその4:検索エンジンのために書く
暗黙のルールその5:オンラインでは短いコピーがいいのか。 それともオンラインでは長いコピーがよいのか


- Reference
  Japan.internet.com - Webマーケティング - 2005-07-08 - 暗黙のインターネットルール
  http://japan.internet.com/wmnews/20050708/6.html
- via
  たつをのChangeLog - 2005-07-11
  http://chalow.net/2005-07-11-2.html

Optimus keyboard - 全キートップがカラーディスプレイのキーボード

- Summary
  ロシアのデザイン会社 Art.Lebedev Studio が発表した,
  全てのキートップにカラーディスプレイを搭載したキーボード.
- 特徴
  ・テンキー装備のフルキーボード.
  ・左端にマクロキーを装備.
  ・全てのキートップにはソフトウェアで表示が変更できるディスプレイを装備.
  ・1つのキーボードで複数の言語に対応可能.
クリックして拡大クリックして拡大クリックして拡大クリックして拡大クリックして拡大

- Reference
  Art.Lebedev Studio - Optimus keyboard
  http://www.artlebedev.com/portfolio/optimus/
- via
  Slashdot Japan - 2005-07-15 - 全キートップがカラーディスプレイのキーボード
  http://slashdot.jp/articles/05/07/15/0841256.shtml
  PC Watch - 2005-07-14 - 全キートップにカラーディスプレイを搭載したキーボード
  http://pc.watch.impress.co.jp/docs/2005/0715/lebedev.htm

Food Force - 国連の緊急食糧援助活動を紹介する無料ゲーム

- Summary
  WFP(世界食糧計画)が緊急食糧援助活動を紹介するゲームを開発.

ゲームの内容は,内戦と飢饉にあえぐインド洋に浮かぶ架空の島国に派遣された主人公が
ヘリコプターで飢えた人々を捜し,迅速安価に食料を調達し,安全にトラックを誘導するといった
実際のWFPの活動を模したものとなっている

- Reference
  Food Force
  http://www.food-force.com/
- via
  Slashdot Japan - 2005-07-16 - 国連の緊急食糧援助活動を紹介する無料ゲームが大ヒット
  http://slashdot.jp/articles/05/07/15/2119211.shtml
  YOMIURI ONLINE - 2005-07-13 - 世界食糧計画のゲームが大ヒット、援助活動を追体験
  http://www.yomiuri.co.jp/world/news/20050713it13.htm

2005-07-18 Mon

Windows Updateで エラー番号 0x800700C1 が発生

- 問題点
  Windows Updateで以下のメッセージが出てUpdateが失敗

[エラー番号: 0x800700C1]
Web サイトに問題が発生したため、このページを表示できません。


- 解決方法 1
  %systemroot%\system32\msxml3.dll
  %systemroot%\system32\msxml3r.dll
  をリネームする.
  %systemroot%\system32\msxml3.dll
  %systemroot%\system32\msxml3r.dll
  が再生成される.

- 解決方法 2
  Microsoft XML Parser (MSXML) 3.0 Service Pack 5 (SP5)を再インストール.
  
- 補足
  リネーム後の再起動の必要は無し.
  リネーム後,Windows Update を再実行すればOK.
  
- Reference
  Microsoft - サポートオンライン - Windows Update や Microsoft Update サイトにアクセスすると 0x800700C1 エラーが表示される
  http://support.microsoft.com/default.aspx?scid=kb;ja;904392
  Microsoft - ダウンロードセンター - Microsoft XML Parser (MSXML) 3.0 Service Pack 5 (SP5)
  http://www.microsoft.com/downloads/details.aspx?FamilyID=4a3ad088-a893-4f0b-a932-5e024e74519f&DisplayLang=ja
  HotFix Report BBS - Windows 2000 SP4 ロールアップ 1不具合情報
  http://bbs.hotfix.jp/ShowPost.aspx?PostID=3358
- via
  Landscape - 2005-07-15
  http://sonic64.com/2005-07-15.html#2005-07-15-1

2005-07-17 Sun
2005-07-16 Sat
2005-07-14 Thu

SEO,ユーザビリティ,アクセシビリティ関連の本

chalow Google Local Plug-in

- Source

### Google Local Plug-in
# usage: {{google_local('what','where')}}
sub google_local {
	my ($what,$where) = @_;
	my $prefix = q(http://local.google.co.jp);
 
	my $what_enc = q();
	$what_enc = Jcode->new($what)->utf8;
	$what_enc =~ s/([^0-9a-z_ ])/'%'.unpack('H2', $1)/gei;
	$what_enc =~ s/\s/+/g;
 
	my $where_enc = q();
	$where_enc = Jcode->new($where)->utf8;
	$where_enc =~ s/([^0-9a-z_ ])/'%'.unpack('H2', $1)/gei;
	$where_enc =~ s/\s/+/g;
 
	my $ret  = qq(<a href="$prefix/local?q=$what_enc&near=$where_enc" title="Google Local - $where の $what">);
	   $ret .= qq(Google Local - $where$what);
	   $ret .= qq(</a>);
	return $ret;
}

map.rails2u.com

- Summary
クリックして拡大
  郵便番号から住所を取得.
  そのまま緯度,経度を取得してGoogle Mapsを表示.
  郵便番号は日本郵政公社のデータ[2005-10-20-2]を,
  緯度,経度は街区レベル位置参照情報ダウンロードサービス[2003-11-14-4]のデータを利用.
- Reference
  map.rails2u.com
  http://map.rails2u.com/
  map.rails2u.com - help
  http://map.rails2u.com/help.html
  日本郵政公社 - 郵便番号データ
  http://www.post.japanpost.jp/zipcode/dl/kogaki.html
  街区レベル位置参照情報ダウンロードサービス
  http://nlftp.mlit.go.jp/isj/top.html
- via
  cl.pocari.org - 2005-07-12
  http://cl.pocari.org/2005-07-12-2.html

世界のCMフェスティバル

2005-07-13 Wed
2005-07-11 Mon

ネットに落ちてる動画バトン

- Summary
  江渡 浩一郎さんからバトンが回ってきたよ!
  とってもウレシイので早速回答しちゃいます.

- #1 : The movie file most recently played.
  いい仕事をするタイヤ
  http://pds.gamechosun.co.kr/2005/05/04/wheel.wmv
  - via
    http://blog.livedoor.jp/stardom/archives/21104029.html

- #2 : 3 to 5 movies I play to a lot, or that mean a lot to me.
  BALANCE[2005-03-02-1]
  http://www.lauenstein.tv/balance_beyond/

  FLOW[2003-11-25-7]
  http://bobandmark.com/funstuff/flow.swf

  Bruno Bozzetto - EUROPE and ITALY[2004-10-07-8]
  http://www.infonegocio.com/xeron/bruno/italy.html

  FOTOPRIX
  http://pya.cc/pyaimg/pimg.php?imgid=7929

  HONDA - ACCORD - cog[2005-03-03-12]
  http://multimedia.honda-eu.com/accord/

- 次点など (多すぎかな)
  The Umbilical Brothers[2004-07-20-4]
  http://www.compfused.com/directlink/188/

  futureshock "late at night"[2005-03-08-12]
  http://www.ne-o.co.uk/fshock.html

  hypershorts.com - RING[2004-05-17-8]
  http://hypershorts.free.fr/html/edito.html

  David Elsewhere[2005-03-02-5]
  http://freakazoid.superprovider.de/

  Chrono Resurrection[2004-12-02-14]
  http://www.opcoder.com/projects/chrono/

  菅井君と家族石[2004-09-07-6]
  http://www.kaeruotoko.com/contents.html

  華麗なヌンチャクさばき
  http://pya.cc/pyaimg/pimg.php?imgid=6642

  タマゴ爆発
  http://the-trickster.com/archives/200410161358.php

  仮装大賞第69回優勝 ピンポン[2004-08-18-5]
  http://www.ntv.co.jp/kasoh/past_movie/

  ピアノでマリオ
  http://pya.cc/pyaimg/pimg.php?imgid=5503
  http://homepage.mac.com/mrspleen/iMovieTheater6.html

- #3 : 0 to 5 people to whom I'm passing the baton.
  砂岡さん
  とくひろさん
  うぞよとさん
  たまださん
  miyabiさん

- Reference
  eto.com - ネットに落ちてる動画バトン
  http://eto.com/d/MovieBatton.html#ZYXZ52Obf9C5PVQlzaQetA

2005-07-10 Sun
2005-07-09 Sat
2005-07-08 Fri
2005-07-07 Thu
2005-07-04 Mon
2005-07-03 Sun
2005-07-02 Sat

FreeMind Flash Browser

- Summary
  FreeMind Flash Browser[2005-03-23-2] を利用したい!
- Reference
  VisorFreeMind
  http://www.efectokiwano.net/mm/visorFreemind.swf
  http://www.efectokiwano.net/mm/freeMindFlashBrowser.zip
  SourceForge - FreeMind - File List
  http://sourceforge.net/project/showfiles.php?group_id=7118
  SourceForge - FreeMind - Test Version
  http://freemind.sourceforge.net/testversions/
- via
  読書記録ChangeLog - 2005-03-22
  http://dkiroku.com/2005-03-22-24.html
  読書記録ChangeLog - 2005-05-31
  http://dkiroku.com/2005-05-31-8.html
  読書記録ChangeLog - 2005-05-31
  http://dkiroku.com/2005-05-31-18.html
  読書記録ChangeLog - 2005-06-01
  http://dkiroku.com/2005-06-01-19.html
  読書記録ChangeLog - 2005-07-01
  http://dkiroku.com/2005-07-01-22.html

2005-07-01 Fri

香港閣

- Summary
  会社の近くの中華料理屋.
  開店してすぐに行った時に出された水が,歯医者の水の味がした….
  それ以来行っていない.
- 追記 - 2005-08-27
  水を出さずにお茶を出すようになったらしい.