4/30/2012

How to Forward Your Network Solutions Domain Name to a Free Blog Service

原文件網址: Click here

In order to point your domain name to a free blog service, like Blogger.com or Wordpress.org, you will need to make modifications to your domains Advanced DNS records.

Be sure you have read the instructions provided by your free blogging service. For example, Blogger.com will ask you to utilize a name server called "ghs.google.com".

Network Solutions has always allowed domains to be pointed to IP addresses (A Records) or Host Aliases (CNAME records).  This feature is enhanced by redirecting the "@ none" A Record to the "www" CNAME.    Simply put, we are pointing yourdomain.com to www.yourdomain.com. 

Here's how.
  1. Within Account Manager, select My Domain Names
  2. Select the domain name that you want to manage
  3. In the green box, select Change Where Domain Points
  4. Select Advanced DNS, then Continue
  5. First, edit the A Records by selecting Edit A Records.  For the "@ none" enter the following IP address 205.178.189.129, clear the records for the "www" and "* (All others)", then select Continue 
  6. Second, edit the Host Aliases (CNAME records) by selecting Edit CNAME Records.  Enter "www" in the Alias column.  Leave TTL set to 7200 but on the same line, enter the name servers provided by the blogging service in the Other Host section (for blogger.com, this name server would be ghs.google.com)
Select Continue

4/29/2012

Install JDK/JRE on Ubuntu 12.04

Install JRE: 原文網址

   
     Quick Note:
  1. Open a Terminal sudo apt-get purge openjdk* 
  2. Download update to date JRE from Oracle 
  3. tar -xvf ~/Downloads/jre-7u3-linux-i586.tar.gz sudo mkdir -p /usr/lib/jvm/jre1.7.0 
  4. sudo mv jre1.7.0_03/* /usr/lib/jvm/jre1.7.0/ 
  5. sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 0 
  6. mkdir ~/.mozilla/plugins 
  7. /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Install JDK: 原文網址

   
     Quick Note:
  1. Open a Terminal
  2. sudo apt-get purge openjdk*
  3. Download update to date JDK from Oracle
  4. tar -xvf ~/Downloads/jdk-7u3-linux-i586.tar.gz
  5. sudo mkdir -p /usr/lib/jvm/jdk1.7.0 
  6. sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
  7. sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1 
  8. sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
  9. mkdir ~/.mozilla/plugins
  10. ln -s /usr/lib/jvm/jre1.7.0/lib/i386/libnpjp2.so ~/.mozilla/plugins/
  11. ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

How to delete Ubuntu Unity history log?

原文請參考這一篇: http://askubuntu.com/questions/86544/delete-entire-history-of-the-dash

必須用下列指令安裝 activity-log-manager

sudo apt-get install activity-log-manager

一旦安裝完畢之後, 直接執行, 就可以針對 log 的項目加以控管, 並且刪除不必要的 Log 動作.

xdebug 在 Eclipse 不 work 的狀況

長久以來, 自從 Eclipse 換到 3.5 以後, xdebug 一直不能在 PHP 中使用.

今天偶然發現, 把一個設定加在 /etc/php5/conf.d/xdebug.ini 中即可.


zend_extension=/usr/lib/php5/20090626/xdebug.so
zend_debugger.allow_hosts=127.0.0.1, 192.168.9.0/255
zend_debugger.expose_remotely=always
xdebug.remote_enable=1 
;xdebug.remote_host="127.0.0.1"
;xdebug.remote_port=12345
;xdebug.remote_handler="dbgp"
;xdebug.remote_mode="req"
;xdebug.remote_connect_back=1

上面是從 Internet 找人家的檔案來改, 一個個 try 過之後, 發現只要 xdebug.remmote_enable=1, 就可以使用了.

4/11/2012

Get Database Table Field Name

有的時候, DB Table 的 fields 太多, 要慢慢打嫌多, 又怕打錯, 所以從 DB 中抓出來是最保險的. 底下指令可以這個動作,

For MSSQL:

SELECT * FROM information_schema.columns WHERE table_name = 'TableName'; 

For MYSQL:

SHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name] [LIKE 'pattern' | WHERE expr]

4/10/2012

Classifieds Ad software - OSClass on Hostgator

朋友公司在找分類廣告軟體, 我找到兩個看起來不錯的, 都是 Open Source.

OSClass : http://osclass.org/

OpenClassifieds : http://open-classifieds.com/

其中 OSClass 已經安裝到 Hostgator 上測試, 看起來蠻 Ok 的.

在安裝到 Hostgator 的過程中, 一開始都有 500 Internal Server Error 出現, 找了半天, 找到原因.

如果有些目錄或檔案設定權限時, Group 或 Others 有 Write 權限的話, Hostgator 的 Server 就會出現 Error.

所以 Download OSClass 下來後, 先把檔案解開, 權限都改成 755, 再 Upload 到 Hostgator 上安裝, 就不會出現 500 Internal Error 了.

4/02/2012

ASP.Net Menu Control work in Chrome

當使用 ASP.net Menu 元件, 在 Chrome 中不 work 時, 要在程式中加入下列這段 Code.


protected void Page_PreInit(object sender, EventArgs e) 
{
             // This is necessary because Safari and Chrome browsers don't display the Menu 

                control correctly.
             // All webpages displaying an ASP.NET menu control must inherit this class.
             if (Request.ServerVariables["

http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
                 Page.ClientTarget = "uplevel"; 
}