Google自訂搜尋
I'll be your dream
I'll be your wish
I'll be your fantasy.
I'll be your hope
I'll be your love
Be everything that you need.
I love you more with every breath
Truly madly deeply do..
I will be strong I will be faithful
'Cos I'm counting on a new beginning.
A reason for living.
A deeper meaning.
Chorus

I want to stand with you on a mountain.
I want to bathe with you in the sea.
I want to lay like this forever.
Until the sky falls down on me...
Verse 2

And when the stars are shining brightly
In the velvet sky,
I'll make a wish
Send it to heaven
Then make you want to cry..
The tears of joy
For all the pleasure and the certainty.
That we're surrounded
By the comfort and protection of..
The highest power.
In lonely hours.
The tears devour you..
I want to stand with you on a mountain,
I want to bathe with you in the sea.
I want to lay like this forever,
Until the sky falls down on me...
Bridge

Oh can't you see it baby?
You don't have to close your eyes
'Cos it's standing right before you.
All that you need will surely come...

I'll be your dream
I'll be your wish
I'll be your fantasy.
I'll be your hope
I'll be your love
Be everything that you need.
I'll love you more with every breath
Truly madly deeply do...
Chorus

hechian 發表在 痞客邦 留言(0) 人氣()

都是我的錯
是我惹的禍
It's all my fault..

希望是我的錯覺
感情依然是沒變
變質的感情,我也不知怎樣挽回
或許放手是最好的決定

傷心也是我自己
離開,妳會較開心
過去的幸福也許如雲煙
過往再也無法追回

如果還有次機會...


愛妳..

hechian 發表在 痞客邦 留言(0) 人氣()

呼.. 為了EasyURL,剛剛花了點時間自己搞了個產生亂碼的程式
程式碼在這邊
想看的請用Shift + 左鍵點選(或者右鍵開新視窗;如果是Firefox使用者建議使用”用新分頁開啟”)

程式碼修正:
心得:被GSR用一行嗆明.. 我真的該檢討>"<

class CA
  def generate times=1
    times = 1 if times <= 0
    return (1..times.to_i).to_a.collect{|x| (('a'..'z').to_a+('A'..'Z').to_a+('0'..'9').to_a)[rand(62)]}.join 
  end
 
  def gen times=1
    generate times
  end
end


hechian 發表在 痞客邦 留言(0) 人氣()

昨晚在逛Railscn時看到AJAX Scaffold
當時在想:”AJAX腳手架?不會吧… ” 看過Rails的scaffold後感覺到真的很恐怖
因此就在想… 該不會真的這麼棒?只要幾個步驟就可以搞定了嗎?
點進去後,發現只要五個步驟就可以搞定… “嘿!挺有趣的說!”
網址是:

我簡單的寫個步驟好了…

1. 當然是先建立一個Rails專案拉!記得要去設定config/database.yml
  • rails ajax
2. 產生一個model
  • script/generate model member
3. 編輯db/migrate/001_create_members.rb
  • 請根據下面去修改
    class CreateMembers < ActiveRecord::Migration
    def self.up
    create_ table :members do |t|
    t.column :name, :string
    t.column :email, :string
    t.column :address, :string
    end
    end
    def self.down
    drop table :members
    end
    end
4. 好!開始rake migrate
  • rake migrate
5. 產生AJAX Scaffold
  • script/generate ajax_scaffold member

好拉!去看看吧!

script/server -p 3000

http://localhost:3000/members

哈哈!
這邊可以看到範例

 

hechian 發表在 痞客邦 留言(0) 人氣()

由於我是Ubuntu Linux,屬於Debian派系的(因此,如果你是Debian使用者,這篇也可以看)
所以我們在安裝東西前,最好把Ruby的所有東西都裝好
還有,Ubuntu的使用者,請記住
$ sudo apt-get install build-essential
↑一定得作

$ sudo apt-get install ruby ruby1.8 ri rdoc
$ cd rubygems; sudo ruby setup.rb
$ sudo gem update;sudo gem install -y rails;sudo gem install -y mongrel

接著,Apache2裝好後

參考此篇文章設定
http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable

首先,將mongrel啟動

$ cd my_app/
$ mongrel_rails start -d
$ a2emod proxy

設定一下Rails的VirtualHost or Proxy

ProxyPass / http://cfc.zuso.tw:3000/
ProxyPassReverse / http://cfc.zuso.tw:3000/

好了之後設定/etc/apache2/mods-available/proxy.conf


  Order deny,allow
  Allow from all


存檔離開後就重新啟動Apache2

hechian 發表在 痞客邦 留言(0) 人氣()

嘿嘿
真感謝Windows
沒有它的故障,我不會火大到想要換成Ubuntu
好啦~ 先不廢話
這次安裝,將SSH default port改掉
並且用proxy的方式將連線到80,且是Rails程式要求都轉到mongrel去
參考此篇文章:http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable

安裝mongrel的時候發現他說找不到mkmf
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)

因此就去Google了一下,找到這篇:
http://mentalized.net/journal/2006/01/24/no_such_file_to_load_mkmf/

OK,原來只要
$ sudo apt-get install ruby1.8-dev



hechian 發表在 痞客邦 留言(0) 人氣()