哈,原來課本上看到的孔子人像和銅像都不是真的,大家以後不能太相信課本啦~
孔夫子的鞋
http://tw.myblog.yahoo.com/elton-blog/article?mid=27661&next=27146&l=f&fid=9
軟體開發、伺服器和生活瑣事
哈,原來課本上看到的孔子人像和銅像都不是真的,大家以後不能太相信課本啦~
孔夫子的鞋
http://tw.myblog.yahoo.com/elton-blog/article?mid=27661&next=27146&l=f&fid=9
Linus Torvalds 也就是 Linux 的原作,回報了一個 Firefox 在 Fedora 上面部能看 YouTube 影片的錯誤,最後還說這是一個「高優先權」的錯誤,因為如果 Firefox 不能看影片,他的老婆會殺了他 XD
原文:https://bugzilla.redhat.com/show_bug.cgi?id=439858
Opened by Linus Torvalds on 2008-03-31 15:37 EST
Description of problem:
youtube no workee – fedora 9 not usable for wifeVersion-Release number of selected component (if applicable):
swfdec.x86_64 0.6.2-1.fc9
swfdec-gtk.x86_64 0.6.2-1.fc9
swfdec-mozilla.x86_64 0.6.0-1.fc9…………………..
Additional info:
This is “high” priority because the wife will kill me if she doesn’t have her
videos. And the adobe player won’t install on current rawhide due to some
library issues.“Obi-wan Kenobi, you’re our only hope”
ps. 為什麼會出現歐比王 XDDDD
今天算排列組合,算到有種身體都快要被排列組合的感覺。
原本高中花了不少時間在排列組合上,筆記也有厚厚一疊(至少 300 頁 A4),可以說是我高中數學唯一有在聽課的章節。結果大學選錯課,雖然不能說他教的不好,但是他的上課方式我真的完全不能接受,上一小時的課,筆記要整理二小時,要看懂則要花上三小時。不懂題問,講解方式也是千篇一律,有沒有題問其實差不了很多。
上了他一學期的課,我高中打的基礎現在全垮了,原本懂得現在都不懂了。今天一個題目花了一個半小時還是看不出所以然,不知道往後的半學期要怎麼過下去……..
現在很能體會春風化雨 1996 裡面的一句話:「天下沒有壞學生,只有壞老師。」
自從上次改過別人的 PHP Captcha 以後,這次玩得更瘋了。
今天跟 scwu 聊過以後想出一堆鬼主意來當作 captcha 上面的文字,可以考慮的有注音文、火星文和一堆有的沒的符號。後來想整人所以決定讓大家動動頭腦,出點數學題目讓大家做,如加減乘除:
不過加減乘除對對電腦來說太簡單了,以後要試試看來點方程式求解,有必要來個微積分也行,不過這樣就得大費周章的請 LeTex 出來幫忙了。
上面的 captcha 我改名叫做「mathcha」,程式碼如下:
<?php
$font_face = 'arialbd.ttf'; //font you want to use
$width='80';
$height='25';
$font_size = $height * 0.65;
$image = imagecreate($width, $height) or die('Cannot initialize new GD image stream');
$background_color = imagecolorallocate($image, 0, 0, 0);
$text_color = imagecolorallocate($image, 255, 255, 255);
$noise_color = imagecolorallocate($image, 150, 255, 150);
//create dots
for( $i=0; $i<($width*$height)/3; $i++ ) {
imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);
}
//print text
$n1 = mt_rand(1,20);
$n2 = mt_rand(1,20);
$string = "$n1 + $n2";
$textbox = imagettfbbox($font_size, 0, $font_face, $string) or die('Error in imagettfbbox function');
$x = ($width - $textbox[4])/2;
$y = ($height - $textbox[5])/2;
imagettftext($image, $font_size, 0, $x, $y, $text_color, $font_face , $string) or die('Error in imagettftext function');
/* output captcha image to browser */
header('Content-Type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
$_SESSION['mathcha'] = $n1 + $n2;
?>
記得你把你用的字型和這個程式放在同一個目錄。
要更改 Mediawiki 的權限設定,只要在 LocalSettings.php 更改一些變數值即可。不過因為前面會先載入預設值,所以自行增加的語句一定要在下面的語句之後:require_once( "$IP/includes/DefaultSettings.php" );
未註冊使用者不可編輯:
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
允許註冊使用者上傳檔案:
$wgEnableUploads = true;
$wgGroupPermissions['user']['upload'] = true;
禁止使用者註冊:
$wgGroupPermissions['*']['createaccount'] = false;
修改預設時區:
#Set Default Timezone
$wgLocaltimezone = "Asia/Taipei";
#Calculate the timezone offset with UTC
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 60;
putenv("TZ=$oldtz");
參考網頁:
Manual:$wgGroupPermissions – MediaWiki
MediaWiki timezone | LemonWiki