Recently in Programming Category

FancyUpload

| | Comments (0)

FancyUpload 是一套 Flash + Ajax 的檔案上傳程式,
無名 也是用這個元件, 滿不錯的.
Queued Photo Uploader Demo

中文化辭彙搜尋已修復

| | Comments (0)

看到 這篇, 才知道 中文化辭彙搜尋 已經掛了很久了,
原因是 DreamHost 那邊取消了 register_globals,
而中文化辭彙搜尋是 2004 年寫的,
是用 $query 變數, POST 變數代不進來, 當然也搜尋不到任何東西,
改成 $_POST["query"] 就 OK 了.

王大頭,0912345678
這個 CSV 檔在 Excel 打開, 電話會變成數字 912345678
若要保留前面的 0, 必需這樣表示
王大頭,="0912345678"

ref. Excel vs. Leading Zero & Space

Firefox Preferences Editor

| | Comments (0)

Firefox Preferences Editor is a CLI tool for batch configure Firefox about:config preferences. (Source Code)
Note:

  • Please close Firefox before using this tool.
  • If preference name exist, it just append another new line to the end of prefs.js,
    Firefox will arrange prefs.js, so don't worry about duplicate entry.

    Usage: ffprefs {preference name} {value}
    e.g.
    ffprefs browser.startup.homepage http://www.google.com
    ffprefs browser.cache.disk.parent_directory r:\

    v0.2 Update: Read %APPDATA% environment variable instead of %USERPROFILE%, support Windows 2000/XP/2003/Vista/2008/7

  • Uninstall All Windows Live Software

    | | Comments (0)

    寫了一個程式可以快速移除所有的 Windows Live 程式
    Uninstall All Windows Live Software (Source Code)
    它會去 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
    找 DisplayName 有包含 Windows Live 字串的, 然後用 MsiExec /passive /uninstall GUID 的方式移除, 適用所有的版本.

    PHP MySQL Improved Extension

    | | Comments (0)

    在 PHP 下用 pcntl_fork 同時存取 MySQL Server, 必需用 mysqli
    用一般的 mysql function 會出現 MySQL server has gone away 的錯誤訊息.
    範例:
    $mysqli=mysqli_init();
    mysqli_real_connect($mysqli,$dbhost,$dbuser,$dbpassword,$dbname) or die ('Unable to connect');
    $result=mysqli_query($mysqli,$sql);

    ref. MySQL Improved Extension

    Get MySQL Field Comment

    | | Comments (0)

    show full fields from table_name
    可以取得 MySQL 的欄位註解,
    註解輸入中文名稱, 在寫程式時用上面的方式取得註解, 非常方便.
    ref. 取得MySQL表單的註解

    Mail Subject Encoding

    | | Comments (0)

    根據 RFC 2047 的規範, Mail Header 中的 Non-ASCII Text 要用這個格式
    「=?charset encoding?encoding code?header content?=」
    encoding code 有可能是 b (base64編碼) 或 q (QP編碼)
    例如:「測試郵件」編碼後就變成「=?UTF-8?B?5ris6Kmm6YO15Lu2?=」
    用 PHP 的話可以用 mb_send_mail(), 會自動幫你編碼.

    ref. 石頭閒語:PHP mail() and charset encoding question

    jaPBe for PureBasic 4

    | | Comments (0)

    原始的 jaPBe 已不相容於 PureBasic 4.x
    (會出現 Can't initialize compiler)
    需使用 jaPBe for PB400

    ref. Gnozal's purebasic place

    PHP short_open_tag

    | | Comments (0)

    一直以為 <? ... ?> 跟 <?php ... ?> 是一樣的, 省略 php 沒差,
    原來當 short_open_tag=off 時是不能用前者的
    php.ini-recommended 的預設值是 short_open_tag = Off

    凱莉手工坊

    凱莉手工坊

    September 2009

    Sun Mon Tue Wed Thu Fri Sat
        1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30      

    About this Archive

    This page is a archive of recent entries in the Programming category.

    Photo is the previous category.

    Shell is the next category.

    Find recent content on the main index or look in the archives to find all content.