Skip to content

Instantly share code, notes, and snippets.

View kaochenlong's full-sized avatar
🖐️
World Peace!

Eddie Kao kaochenlong

🖐️
World Peace!
View GitHub Profile
def make love
puts "I've made #{love} today"
end
def you want
want
end
love, want = "love", true
require 'gmail'
gmail = Gmail.new("your@gmail.com", "password")
puts gmail.inbox.count # 印出目前信箱裡的總數量
puts gmail.inbox.count(:unread) # 印出目前信箱裡的未讀的數量
{
"literate-haskell"=>"Literate Haskell",
"smarty"=>"Smarty",
"gettext"=>"Gettext catalogs",
"gcc-messages"=>"GCC Messages",
"html+django"=>"Django / Jinja Templates",
"csv"=>"CSV",
"sourceslist"=>"sources.list",
"pycon"=>"Python Console Sessions",
"jsp"=>"JSP",
Dear all,
目前我在幫奇摩Yahoo招募正職軟體工程師,新鮮人可!(正職)
職缺:Yahoo的網頁前端 /後端軟體工程師(依背景與專業分發)
學歷:大學以上畢業、資訊相關背景
工作地點: 台北南港軟體園區
Requirement:
1.熟悉PHP/ JAVA / JavaScript /AJAX
2.熟悉CSS/ HTML
Titanium.UI.setBackgroundColor('#fff');
var tabGroup = Titanium.UI.createTabGroup();
var my_window = Titanium.UI.createWindow({
title:'This is my window',
url:'views/my_window.js'
});
var my_tab = Titanium.UI.createTab({
title:"Main Window",
val = [0,1]
10.times do |n|
puts val[n] ||= val[n-1] + val[n-2]
end
@kaochenlong
kaochenlong / gist:1099086
Created July 22, 2011 08:25
AS2常見的迴圈插旗子法
// AS2常見的迴圈插旗子法
for (var i = 0; i < 10; i++)
{
this["mc_" + i].i = i;
this["mc_" + i].onRelease = function(){
trace(this.i);
}
}
public function afterRefreshItem($itemKey, &$iterator)
{
$itemData = $iterator[$itemKey];
$iterator[$itemKey]['subtotal'] = $itemData['quantity'] * $itemData['price'];
$this->_total += $iterator[$itemKey]['subtotal'];
}
class Hello
constructor: (@words) ->
greeting: ->
alert @words
new Hello("CoffeeScript").greeting()
padding_left = (str, len) ->
str = "#{str}"
str = "0#{str}" while str.length < len
str
padding_right = (str, len) ->
str = "#{str}"
str = "#{str}0" while str.length < len
str