6 月6th

Code Highlight

t-matsuda wordpress Read on

wordpressに
WP-Syntax
という、code highlightのプラグインを入れてみた。

GeSHiを使っているみたいだ。

ためしにいくつか。
■PHP

$topics = array();
$fp = fopen ($filename,"r");
while ($data = fgetcsv ($fp, 1000, ",")) {
    $encoding_data = array();
    foreach ($data as $item) {
        $encoding_data[] = mb_convert_encoding($item, "UTF-8", "Shift-JIS");
    }
    $topics[] = $encoding_data;
}
fclose ($fp);

■ActionScript

var btn = eval(btnName);
btn.onRollOver = function () {
	if (this._currentframe != "3" ) {
		trace("set 2 :" + this._name);
		this.gotoAndPlay("roll");
	}
}

■CSS

body{
	padding:0px;
	margin:0px;
	font-family:Arial, Helvetica, sans-serif;
	font-size:11px;
	background:#131313;
} 

img{
	border:0px;
} 

a{
	color:#003333;
	text-decoration:none;
}

■SQL

select
  key1,
  concat(data1, data2) as stritem,
  data3
from testm
order by key1
;

About this entry