2008年9月16日 星期二

[WordPress]ImageManager上傳圖失敗

SOLUTION:
在ImageManager
Options >> ImageManager
將Base image directory:改成正確的路徑

即可

2008年9月15日 星期一

Subversion - Cleanup Failed To Process The Following Paths

SOLUTION I
1) Try and determine what rev your Working Copy is checked out at -
file->properties->subversion should tell you this, but the picture may
be less clear if you have mixed revisions.

2) Check out a new Working Copy at the revision you've just determined

3) Create a patch from your broken Working Copy

4) Apply the patch to your new Working Copy

5) Continue using the new one. Delete the broken copy when you're
confident you no longer need it.

2008年9月12日 星期五

undefined / null in JavaScript

In JavaScript null is an object. undefined is used for things that don't exist. The DOM returns null for almost all cases where it fails to find some structure in the document, but in JavaScript itself undefined is the value used.

null and undefined are not strictly equivalent. If you really want to check for null, do:

if (varname == null) // with casting
if (varname === null) // without casting (i.e. same value, same type)

If you want to check if a variable exist

if (typeof(varname) != 'undefined')

The variable exists but you want to know if there's any value stored in it:

if (varname != undefined)

Check if a member variable exists (independent of whether it has been assigned a value or not) :

if ('varname' in object) // With inheritance
if (object.hasOwnProperty('varname')) // Without inheritance


摘自:http://blog.jails.fr/index.php?post/2007/08/01/undefined-/-null-in-JavaScript

2008年9月11日 星期四

[FreeBSD]如何將帳號加入到sudoers

1. 編輯 /usr/local/etc/sudoers
2. 加上 <帳號> ALL=(ALL) SETENV: ALL

2008年9月2日 星期二

WebSitePulse - 檢查網站是否被大陸封鎖?

相信大家對於中國大陸的防火長城(Great FireWall, 簡稱GFW)一定不陌生,如果網站遭受封鎖,不僅大陸地區的使用者無法進入你的網站之外,損失的流量數也是相當可觀。現在你可以透過WebSitePulse提供的”Website Test behind the Great Firewall of China“來檢測網站是否遭受GFW封鎖。


使用方式很簡單,只要在Enter Test Website處輸入欲檢測的網站網址,如果你希望看到HTTP表頭回應訊息的話,可以勾選Display HTTP Response headers選項。接著選擇要檢測的節點,目前共提供以下幾個網路節點供使用者使用:

上海(Shanghai, China)
北京(Beijing, China)
香港(Hong Kong, China)
西雅圖(Seattle, WA)
德國慕尼黑(Munich, Germany)
澳洲布利斯班(Brisbane, Australia)
選擇後別急著按檢測,看到Verification Code了嗎?請輸入你所看到的數字驗證碼,輸入確認後在送出即可進行檢測。

檢測完成後,如果跳出的狀態是綠色的OK, 那表示大陸地區的使用者可以正確訪問你的網站。


摘自:http://www.freegroup.org/free-website-test-behind-the-great-firewall-of-china

wibiya widget