Google自訂搜尋

作得還挺累的.. 不過原始碼也寫得挺亂的XD
原始碼下載:
http://stmail.tajen.edu.tw/~593092514/ajaxLogin.tar.gz
沒錯,如你所見
是tar ball檔案..
不過裡面不是Shell Script啦!
是純正的PHP=  =
XD
 


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

早上坐車時.. 畜生居然沒有給我搭到車,害我再高雄多待了一段時間..
等AJNeoK過來,聊個天吃頓飯就到石眼咖啡廳參加兩點的KaLUG演講
這次主題有:
mikimoto:Design Patten
Lightwind:密碼學 -- 數學和密碼
Yuren Ju:Gaim Plugins開發

演講一切順利,不過中間還是出了些小差錯
mikimoto的PowerBook居然沒辦法正常運作,先是Eclipse不能開啟,再來是不能關閉Orz...
Yuren Ju則沒有太大的問題
倒是Lightwind... 喵的,居然沒給我到場!
=  =+.. Lightwind,要是看到這篇文章,命你交出十片Irie Saaya的寫真集!!!
嗯.. 當Yuren Ju講到一半的時候,BlueT打電話來說他不會走(爆料XD..)
穿著DOT(Debian.Org.TW)的Mat大大就出去帶他嚕..
hmmm.. BlueT你忘記整理頭髮唷=  =..

後來Mat大大展示了在Console mode下正常顯示萬國碼的程式,看起來真的很不錯耶:)
嗯,更何況看到Ion之後,我更想去用了!
其實.. wmii也不錯>///<...>
嗯,還遇到Python傳教士!聽到這句話我當場嚇到 (你問我為什麼?我推Ruby的啊!打對台Orz...)
沒錯,我沒想錯!當AJNeoK表明自己是Ruby@TW(我認為應該稱為TWRUG)社群的一員時
Python傳教士跟著同伴說:怎麼辦!打對台的來了!
Orz...

不過昨天還真的很有趣:)
其餘就不贅述啦... 被周老大拉去玩翻滾=  =
(我的演講稿還沒寫好阿Orz...)



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

搭配物件導向@@

觀看可讀性高的原始碼請按此

class Stack

  def initialize ary=0, max=0, lvl=0
    @ary = ary
    @max = max
    @lvl = lvl
  end
 
  def add
    if @lvl       puts "Please input a value for add to the stack!"
      @ary[@lvl] = self.get_value
      @lvl+=1
      puts "Now you have #{@lvl} elements for the array!"
    else
      puts "Stack is full!"
    end
  end
 
  def del
    puts "#{@ary[@lvl-1]} has been removed!"
    @lvl -= 1
    if @lvl       puts "You have no element in the array!"
    else
      puts "Now you have #{@lvl} elements in the array!"
    end
  end
 
  def get_value
    return gets.chomp
  end
 
  def list
 
    if @lvl       puts "You have no element in the array!"
    else
      for ele in 0 ... @lvl
        puts @ary[ele]
      end
    end
    true
  end

  public :initialize, :add, :del, :list
  protected :get_value
end

puts "Please input a number for the stack max!"
ary = {}
max = gets.chomp.to_i
lvl = 0

stack = Stack.new(ary, max, lvl)

=begin

Actions:
  1. add -- for add elements
  2. del -- for remove elements
  3. list -- for list elements
  4. exit -- end this program
=end


while true
  puts "Please select a action!"
  puts Actions:
  1. add -- for add elements
  2. del -- for remove elements
  3. list -- for list elements
  4. exit -- end this program
EOF
 
 
  action = gets.chomp
 
  case action
    when "add" ,"1"
      puts "Adding array element!"
      stack.add
    when "del", "2"
      puts "Removing array element!"
      stack.del
    when "list", "3"
      puts "Listing array elements!"
      stack.list
    when "exit", "4"
      puts "Bye~ bye!"
      exit
  end
end



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

看可讀性高的程式碼請按此

程式碼有點亂,可是跟C++比起來我覺得很簡單了= =

def stack(ary, lvl, max, input)
if lvl ary[lvl] = input
puts "#{input} has been added in the stack!"
lvl+=1
get_element ary
else
puts "Stack is full!!!!"
exit
end

lvl
end

def get_element ary
print "Element in the array:"
ary.each do |x|
print "#{x} "
end
puts
end


puts "Please input a number for the stack max!"
max=gets.to_i
lvl=0
ary={}
puts "Please input elements into the stack, type exit to exit."
arg = gets.chomp
while arg != "exit"
lvl=stack(ary, lvl, max, arg)
arg = gets.chomp
end


目前只有新增的版本
至於刪除嘛... Orz..
還沒有寫@@



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

http://www.youtube.com/watch?v=ezTawpAldAQ&search=superE38080play
這是網址
說真的,當我看到這個不知道該說什麼
不過我建議在看的時候準備一點吃的喝的
畢竟看東西有點東西可以吃是比較輕鬆的:)


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

哈哈,第一次進去屏女耶=  ="
對她們教室還有點不熟悉=  =
不過大致上摸清楚了@@..
話說今天走在其中一棟的二樓.. 一個女生手上拿著一張單子在走廊上欄人
經過時我誤以為是發傳單的
就順手給他Capture一下...
結果=  =... 那位女同學說..
「阿阿阿阿,這張不能拿走拉>"我趕緊把傳單丟給阿斯
哈哈哈Orz...

在這之前,跟小銘還有阿斯去找我學妹
學妹班上有遊戲,嗯.. 都是吹球的@@
嘿嘿,小銘不錯!懂得花錢消災... 他出錢給我們玩(X,明年你就給我小心一點)
換到我跟阿斯就不怎麼好了.. 學妹的同學一直邀我們玩遊戲(學妹好好加油!保險業靠妳了... 妳還真會拉=  =)
後來阿斯提議猜拳,贏的去玩!請注意,是"贏"的去玩!
結果... 我輸了
阿斯我對不起你ˊˋ... 你就乖乖的被麵粉包住臉吧= = (遊戲是碗裡裝麵粉,上面乒乓球!30秒比賽看誰吹最多!關主是我家學妹Orz...)

OK,開始倒帶...
話說小銘開始想買園遊卷,叫我去買
一百塊鈔票濤出來的結果,就是被我丟在地板!
阿斯撿起來驗明是否真鈔!因此彈了國父幾下!
可是沒有流鼻血,確定是假鈔!
然後就拿去買園遊卷了...=  =a
接著我就很瀟灑的把一百塊放在桌上,說:「一百塊在這邊,園遊卷不用給了」
賣園遊卷的學妹當場傻在那邊,她朋友也是=  =...
嗯.. 表情豐富啊!
Nice!

當然還有其他事情.. 只是都忘了
唉.. 給那個屏女的學妹.. 「對不起拉Q_Q」



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