免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2012年2月23日 星期四

Chrome cookie/javascript settings

Tools(像板手/spanner/wrench 的那個圖案) -> Options
-> Under the hood -> Privacy -> Content settings
-> Cookies/Javascript -> Manage exceptions -> ...

先設定
 Block sites from setting any data
 Do not allow any site to run JavaScript

再允許例外
如果要讓網域 google.com 的網頁都可以用cookie/javascript
要輸入 [*.]google.com
而非 google.com

[ref]
http://support.google.com/chrome/bin/answer.py?...

CSS negative margin magic


過去在閱讀 CSS 檔案時 遇到 margin 為負值的情況
不求甚解 一直沒弄清箇中奧妙 ...
最近想自己湊個版型(theme template)
發覺負的margin 扮演關鍵角色!

尤其在 table-less CSS 的限制下
想把區塊擺置到適當的位置
似乎非 '負的margin' (negative margin) 不可

主要參考 css negative margins algebra
寫了以下簡化的 3-column layout css
不過我是先擺 left div , 而非先放 center div
"left_col"
Content for id "center_col" deliberately longer text
"right_col"

#container {
    width: 480px;
    background: #00cc00;
    margin: 0 auto;
    padding: 0px;
    overflow: hidden;
    border: 2px solid #00ff00;
    position: relative;

}

#left_col {
    width: 30%;
    background: #cc0000;
    margin-left: 0px;
   border: 2px solid #f00;
   float: left;  
}

#center_col {
    width: 35%;
    background: #00c100;
    margin-right:-66%;
       margin-left: 1%;    
   border: 2px solid #0f0;
   float: left;

}

#right_col {
    width: 30%;
    background: #0000cc;  
    padding-left: 10px;
   border: 2px solid #00f;
float:right;
}
//======



//=== 參考文章中 共同提到的關鍵詞
position: relative; ( for IE )
faux column (for unequal column heights)
...


[ref]
http://www.severnsolutions.co.uk/twblog/archive/2004/07/01/cssnegativemarginsalgebra
(用數學式子表達 個人覺得比較清楚)


http://www.alistapart.com/articles/negativemargins
http://coding.smashingmagazine.com/2009/07/27/the-definitive-guide-to-using-negative-margins/
http://www.communitymx.com/content/article.cfm?cid=b0029




2012年2月7日 星期二

如何離線安裝java?

[Q] How to offline install java (jre, java runtime environment)?

[ref] http://www.java.com/en/download/help/windows_offline_download.xml

在下載的頁面中, 選擇離線(Offline)的版本 
通常比online版本大, Java6 (jre-6u30-windows-i586-s.exe) 約 17MBytes



Notes:
[ref] http://www.java.com/en/download/help/index.xml

名稱及版本的混淆:

jre1.6 -> jre6.0 -> Java 6
jre1.5 -> Java2SE5 -> Java 5


[ref] http://www.java.com/en/download/faq/java_win64bit.xml
"... Note that because some web content may not work properly in a 64-bit browser, we recommend using the default 32-bit browser and downloading 32-bit Java. ..."

i.e.
* 最好用 32-bit java
* 64-bit 瀏覽器需要 64-bit java ?


p.s.
java.com 與 oracle.com 的關係 : java 本為 Sun 開發出來的語言/軟體 ,  Oracle 買下了 Sun