memo.xight.org

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

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

カテゴリ: [XOOPS]

いきなりPDF Professional

- Summary
  複数ファイルに対して,一括で暗号化,パスワード,印刷の可否,変更の可否の設定が可能.
  Amazon - ソフトウェア: いきなりPDF Professional 2 (説明扉付きスリムパッケージ版)
- Reference
  ソフトウェア: いきなりPDF Professional 2 (説明扉付きスリムパッケージ版)

カテゴリ: [Software]

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

カテゴリ: [Perl]

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

カテゴリ: [Linux]

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

カテゴリ: [Debian][Software][Stub]

SEOコラム - かんたん!SEO実践講座 第4回

- Reference
SEMリサーチ - かんたん!SEO実践講座 第4回
http://www.sem-r.com/16/20050711145407.html
CPIで人気サイトを作ろう!
http://comsite.jp/call/

カテゴリ: [SEO]

ハクナマタータ

- Summary

ハクナマタータとはスワヒリ語で、直訳すると「問題ない」という意味

- Reference
世界一周旅行記「つあーめん〜非恋愛バラエティ〜」 - 旅行記161
http://www.geocities.jp/tourman524/ryokouki161.htm

カテゴリ: [雑学]

セキュリティー検査ツール Microsoft Baseline Security Analyzer (MBSA) 2.0

- Reference
Microsoft TechNet - Microsoft Baseline Security Analyzer (MBSA)
http://www.microsoft.com/japan/technet/security/tools/mbsahome.mspx
- via
Slashdot Japan - 2005-07-09 - セキュリティー検査ツールMBSA 2.0がリリース
http://slashdot.jp/security/05/07/09/0147239.shtml

カテゴリ: [Windows][Secutiry]

Agile Planet

- Reference
Agile Planet
http://www.agileplanet.org/
- via
capsctrldays - 2005-07-12
http://capsctrl.que.jp/kdmsnr/diary/20050712.html#p01

カテゴリ: [Agile]

PHP Graph Library

- Reference
  JpGraph - PHP Graph Creating Library[2004-05-10-9]
  http://www.aditus.nu/jpgraph/
  PHPLOT
  http://www.phplot.com/
  Welcome to PHPlot - PHPlot 5.0 へようこそ (邦訳)
  http://tec-tech.org/phplot5/doc/index-j.php
  SourceForge - PHPLOT
  http://sourceforge.net/projects/phplot/

カテゴリ: [PHP][視覚化]

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

カテゴリ: [Apache]

How Search Engines Rank Web Pages

- Reference
  Search Engine Watch - How Search Engines Rank Web Pages
  http://searchenginewatch.com/webmasters/article.php/2167961

カテゴリ: [Search Engine]

第10回 セマンティックウェブとオントロジー研究会

- Summary
  参加予定.
- Reference
  (社) 人工知能学会 - 第10回セマンティックウェブとオントロジー研究会
  http://www.jaist.ac.jp/ks/labs/kbs-lab/sig-swo/fnext.htm

カテゴリ: [Event]

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

- 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

カテゴリ: [Usability]

楽譜表示ソフト Score Grapher View

- Reference
  楽譜表示ソフト Score Grapher View ダウンロード
  http://www.rimshot.co.jp/download/sgvdl.html

カテゴリ: [Software][音楽]

JST Clock - 日本標準時

- Summary
  独立行政法人情報通信研究機構が提供する日本標準時
- Referene
  独立行政法人情報通信研究機構 - JST Clock(日本標準時)
  http://www2.nict.go.jp/cgi-bin/JST.pl

カテゴリ: [Memo]

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

カテゴリ: [Hardware]

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

カテゴリ: [Game]
2005-07 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Color Reference

ChangeLogを検索
携帯電話からアクセス!

カテゴリ

最近の話題

リンク

過去ログ

Google

QR Code

Since
2002-11-28
Update
2008-09-05 14:14
Copyright © 2005 xight.org All Rights Reserved.