Skip to content

Zeroplex 生活隨筆

軟體開發、伺服器和生活瑣事

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

月份: 2008 年 4 月

Linus 大大真搞笑 XD

Posted on 2008 年 4 月 29 日2021 年 3 月 12 日 By 日落 在〈Linus 大大真搞笑 XD〉中有 4 則留言

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 wife

Version-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

Tags:分享, 新奇搞笑

找對老師真的很重要

Posted on 2008 年 4 月 27 日2021 年 3 月 12 日 By 日落 在〈找對老師真的很重要〉中有 5 則留言

今天算排列組合,算到有種身體都快要被排列組合的感覺。

原本高中花了不少時間在排列組合上,筆記也有厚厚一疊(至少 300 頁 A4),可以說是我高中數學唯一有在聽課的章節。結果大學選錯課,雖然不能說他教的不好,但是他的上課方式我真的完全不能接受,上一小時的課,筆記要整理二小時,要看懂則要花上三小時。不懂題問,講解方式也是千篇一律,有沒有題問其實差不了很多。

上了他一學期的課,我高中打的基礎現在全垮了,原本懂得現在都不懂了。今天一個題目花了一個半小時還是看不出所以然,不知道往後的半學期要怎麼過下去……..

現在很能體會春風化雨 1996 裡面的一句話:「天下沒有壞學生,只有壞老師。」

Tags:生活雜記

PHP Captcha 大惡搞

Posted on 2008 年 4 月 19 日2021 年 3 月 12 日 By 日落 在〈PHP Captcha 大惡搞〉中有 4 則留言

自從上次改過別人的 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;
?>

記得你把你用的字型和這個程式放在同一個目錄。

Tags:PHP, 程式設計

Mediawiki 參數設定

Posted on 2008 年 4 月 13 日2021 年 3 月 12 日 By 日落 在〈Mediawiki 參數設定〉中有 2 則留言

要更改 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

Tags:網路架站

The mottos in the library of Harvard

Posted on 2008 年 4 月 12 日2021 年 3 月 12 日 By 日落 在〈The mottos in the library of Harvard〉中有 4 則留言
  1. This moment will nap, you will have a dream; But this moment study, you will interpret a dream.
  2. I leave uncultivated today, was precisely yesterday perishes tomorrow which person of the body implored.
  3. Thought is already is late, exactly is the earliest time.
  4. Not matter of the today will drag tomorrow.
  5. Time the study pain is temporary, has not learned the pain is life-long.
  6. Studies this matter, lacks the time, but is lacks diligently.
  7. Perhaps happiness does not arrange the position, but succeeds must arrange the position.
  8. The study certainly is not the life complete. But, since continually life part of – studies also is unable to conquer, what but also can make?
  9. Please enjoy the pain which is unable to avoid.
  10. Only has compared to the others early, diligently diligently, canfeel the successful taste.
  11. Nobody can casually succeed, it comes from the thoroughself-control and the will.
  12. The time is passing.
  13. Now drips the saliva, will become tomorrow the tear.
  14. The dog equally study, the gentleman equally plays.
  15. Today does not walk, will have to run tomorrow.
  16. The investment future person will be, will be loyal to the reality person.
  17. The education level represents the income.
  18. One day, has not been able again to come.
  19. Even if the present, the match does not stop changes the page.
  20. Has not been difficult, then does not have attains.

中文翻譯:

  1. 此刻打盹,你將做夢;而此刻學習,你將圓夢。
  2. 我荒廢的今日,正是昨日殞身之人祈求的明日。
  3. 覺得為時已晚的時候,恰恰是最早的時候。
  4. 勿將今日之事拖到明日。
  5. 學習時的苦痛是暫時的,未學到的痛苦是終生的。
  6. 學習這件事,不是缺乏時間,而是缺乏努力。
  7. 幸福或許不排名次,但成功必排名次。
  8. 學習並不是人生的全部。但,既然連人生的一部分——學習也無法征服,還能做什麼呢?
  9. 請享受無法迴避的痛苦。
  10. 只有比別人更早、更勤奮地努力,才能嘗到成功的滋味。
  11. 誰也不能隨隨便便成功,它來自徹底的自我管理和毅力。
  12. 時間在流逝。
  13. 現在淌的哈喇子,將成為明天的眼淚。
  14. 狗一樣地學,紳士一樣地玩。
  15. 今天不走,明天要跑。
  16. 投資未來的人是,忠於現實的人。
  17. 教育程度代表收入。
  18. 一天過完,不會再來。
  19. 即使現在,對手也不停地翻動書頁。
  20. 沒有艱辛,便無所獲。
Tags:分享

文章分頁

1 2 下一頁

其他

關於我  (About me)

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD GCP Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.