2011-07-05 15:02

關閉 Firefox 外掛套件的版本檢查

最近 Firefox 升級的速度實在太頻繁了,導致很多外掛套件不能用了,再加上外掛套件不可能一致的推出新版,所以最快的方式就是暫時關閉外掛套件的版本檢查。
  1. 在網址列輸入 about:config 進入進階設定中
  2. 新增 Boolean 值 extensions.checkCompatibility.5.0false
    PS: 5.0 為你當前 Firefox 的版本,請以你目前的版本更換參數名稱。
  3. 重啟 Firefox

參考來源:[每週技巧]使firefox可安裝與使用不相容add-on的方法
2011-07-04 16:54

創:光速戰記 (Tron Legacy) console 上的指令

$ whoami
flynn

$ uname -a
SolarOS 4.0.1 Generic_50203-02 sun4m i386
Unknown.Unknown

$ login -n root
Login incorrect
login:backdoor
No home directory specifed in password file!
Logging in with home=/

#bin/history
  488  cd /opt/LLL/controller/laser/
  489  vi LLLSDLaserControl.c
  490  make
  491  make install
  492  ./sanity_check
  493  ./configure -o test.cfg
  494  vi test.cfg
  495  vi ~/last_will_and_testament.txt
  496  cat /proc/meminfo
  497  ps -a -x -u
  498  kill -9 2207
  499  kill 2208
  500  ps -a -x -u
  501  touch /opt/LLL/run/ok
  502  LLLSDLaserControl -ok 1

#
2011-05-23 17:07

CSS Selector 優先權計算表

資料來源:小繁的blog
2011-05-19 13:16

Hotmail, Yahoo!Mail, Gmail 郵件CSS樣式表

轉載自:
Guide to CSS support in email clients - Articles & Tips - Campaign Monitor
CSS support in HTML emails of Hotmail, Yahoo! Mail and Gmail

style element Gmail Hotmail Yahoo! Mail
<style> element in the <head> No No Yes, but...
<style> element in the <body> No Yes, but... Yes, but...
link element Gmail Hotmail Yahoo! Mail
<link> element in the <head> No No No
<link> element in the <body> No No No
CSS selector Gmail Hotmail Yahoo! Mail
* untestable Yes Yes, but...
e untestable Yes Yes, but...
e > f untestable No Yes, but...
e:link untestable Yes Yes, but...
e:active, e:hover untestable Yes Yes, but...
e:focus untestable No Yes, but...
e:lang© untestable No Yes, but...
e+f untestable Yes Yes, but...
e[foo] untestable Yes Yes, but...
e.className untestable Yes Yes, but...
e#id untestable Yes Yes, but...
e:first-line untestable Yes Yes, but...
e:first-letter untestable Yes Yes, but...
CSS property Gmail Hotmail Yahoo! Mail
background-color Yes Yes Yes
background-image No Yes, but... Yes
background-position No No No
background-repeat No Yes Yes
border Yes Yes Yes
border-collapse Yes Yes Yes
border-spacing Yes No Yes
bottom No Yes Yes
caption-side Yes No Yes
clear No Yes Yes
clip No Yes, but... Yes, but...
color Yes Yes Yes
cursor No Yes Yes
direction Yes Yes Yes
display No Yes Yes
empty-cells Yes No Yes
filter No No Yes
float No Yes Yes
font-family No Yes Yes
font-size Yes Yes Yes
font-style Yes Yes Yes
font-variant Yes Yes Yes
font-weight Yes Yes Yes
height No Yes Yes
left No Yes Yes
letter-spacing Yes Yes Yes
line-height Yes Yes Yes
list-style-image No Yes, but... Yes
list-style-position Yes No No
list-style-type Yes Yes Yes
margin Yes No Yes
opacity No No Yes
overflow Yes Yes Yes
padding Yes Yes Yes
position No No No
right No Yes Yes
table-layout Yes Yes Yes
text-align Yes Yes Yes
text-decoration Yes Yes Yes
text-indent Yes Yes Yes
text-transform Yes Yes Yes
top No Yes Yes
vertical-align Yes Yes Yes
visibility No Yes Yes
white-space Yes Yes Yes
width Yes Yes Yes
word-spacing Yes Yes Yes
z-index No Yes Yes
Others Gmail Hotmail Yahoo! Mail
@import untestable No No
IE Mac hack No No Yes
javascript in url() No No No
url() No No Yes
Inline comments No No Yes
2011-05-19 12:06

[JavaScript] zerofill 以零填滿指定位數

function zerofill(num,length){
    num=""+num;
    while(num.length<length){num="0"+num;}
    return num;
} 
2011-04-19 09:54

[Oracle] PDO-OCI 的 DSN 連接字串

最近重裝我的開發環境,結果連 oracle 一直連不上,出現了以下幾種訊息,最後是因為我的 TNS listener 沒設好,或是我的 DSN 錯誤,整理出我試過的幾個 DSN 連接字串:

ORA-12154: TNS:could not resolve service name
ORA-06401: NETCMN: invalid driver designator
ORA-12514: TNS:listener could not resolve SERVICE_NAME
ORA-12505: TNS:listener could not resolve SID given in connect descriptor

$DSN="oci:dbname=jaxdb;charset=utf-8";

$DSN="oci:dbname=127.0.0.1:1521/jaxdb;charset=utf-8";

$DSN = "oci:dbname=(
    DESCRIPTION = (
        ADDRESS_LIST = (
            ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)
        )
    )(CONNECT_DATA=
        (SID = jaxdb)
    )
);charset=utf8";
    
$DSN = "oci:dbname=(
    DESCRIPTION = (
        ADDRESS_LIST = (
            ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)
        )
    )(CONNECT_DATA=
        (SERVICE_NAME = jaxdb)
    )
);charset=utf8";
2011-04-15 13:16

[PHP] 計算時間的秒數

/*計算時間的秒數*/
function timeStrToSecs($timeStr) {
    return strtotime($timeStr)-strtotime('today');   
}

/*show*/
var_dump(timeStrToSecs('00:01:22'));
2011-04-10 23:46

Facebook 推文按鈕 失效了

之前寫過Blogger 的標題加上 Facebook 官方的推文按鈕這篇文章
最近 blogger 加了新功能用 ajax 換頁
結果 Facebook 推文按鈕在第二頁就完全不會動了

Google 一下找到 保留 Blogger Ajax 換頁功能,觸發自訂 JS 功能做法這篇文章

在範本中加入以下程式碼就好了:
<img onload='if(FB){FB.Share.stopScan();}' src='http://www.blogblog.com/1kt/transparent/white80.png' width='0' />