Skip to content

Instantly share code, notes, and snippets.

Godfrey Chan chancancode

Block or report user

Report or block chancancode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View method_defined_within.rb
def method_defined_within?(name, klass, superklass = klass.superclass) # :nodoc:
if klass.method_defined?(name) || klass.private_method_defined?(name)
if superklass.method_defined?(name) || superklass.private_method_defined?(name)
klass.instance_method(name).owner != superklass.instance_method(name).owner
else
true
end
else
false
end
View gbSortableComponent.js
//= require jquery.ui.sortable
App.GbSortableComponent = Ember.Component.extend({
name: null,
items: '> *',
connectWith: false,
classNameBindings: [':gb-sortable', 'name'],
_didInitialize: false,
View time_helpers.rb
class Time
class << self
def now_with_travel
Thread.current[:travelled_to] || now_without_travel
end
alias_method_chain :now, :travel
end
end
View gist:67752
On Feb 20, 2009, at 4:24 PM, "Olusegun A.A" <xxxxxx@gmail.com> wrote:
** CRAIGSLIST ADVISORY --- AVOID SCAMS BY DEALING LOCALLY
** Avoid: wiring money, cross-border deals, work-at-home
** Beware: cashier checks, money orders, escrow, shipping
** More Info: http://www.craigslist.org/about/scams.html
Hello,
Do you still have this item available for sale at the moment? Get back asap.
View gist:71763
feature: 功能 - 這個應該大家都同意吧
background: 背景 - 這個也是
scenario: 場景 | 劇本
我參考了中文Wikipedia和一本台灣的UML教科書, 發覺他們都用了"場景"來翻譯 Use Case Scenario, 所以我想這應該是技術用詞吧。但可能劇本比較接近台灣的日常用法, 所以還是由你決定是否保留吧。以下是參考連結:
- http://zh.wikipedia.org/w/index.php?title=用例&variant=zh-hant [每個用例提供了一個或多個場景...]
- http://www.scholars.com.tw/flytown/itemdesc.asp?ProductID=PG20143&menu=6 [單元 8-確定使用案例場景(Use Case Scenario)]
以下這個Powerpoint交替使用了場景和情境, 但我想反正都差不多還是統一一點, 不要introduce另一個confusion吧
- http://ngis.moi.gov.tw/get_file.aspx?file_name=20080918111016.pdf&folder=edu_train/20080819171003546/&file_id=20080918111016590
View gist:189628
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
public class C {
/**
* @param args
*/
View gist:189629
import java.util.Scanner;
public class E {
/**
* @param args
*/
private static int opp;
private static int win;
View gist:189627
import java.util.Scanner;
import java.util.Arrays;
public class A {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
View gist:262434
>> @item.tag_list = ""
=> ""
>> @item.save
=> true
>> @item.tag_list
=> []
>> @item.tag_list = "Tom, Mary's lamb, Jerry"
=> "Tom, Mary's lamb, Jerry"
>> @item.save
=> true
View application.template.hbs
<expandable-content>
<p>Lorem ipsum dolor sit amet, eu reque aperiam vix. Vel cu albucius cotidieque, ut mel admodum vivendo. Paulo populo vivendo vix in, vix malorum dignissim et, te simul libris persecuti sea. Ut conceptam consectetuer vel, civibus patrioque per no, no habemus commune argumentum vim. Ius in etiam choro iuvaret, pro accusata periculis dissentiunt ea. Pri te nobis phaedrum, in nihil molestie pro.</p>
<p>Novum efficiendi eu ius. Mea id fuisset verterem, eu eum ipsum democritum. Suas ullum pro ut, mei ex elit explicari. Te vero delicata mea. Graeci discere pro ex, illum habemus vivendum est et. Iisque aperiri ea mel. Eu malis dolorem usu.</p>
<p>Ut eos eloquentiam definitionem, ad quem libris bonorum ius. Explicari consequat ex duo, dolores honestatis eu pro, dictas persius mel eu. Vidit graece quaeque ut vel, qui magna dolorum ne, pro volumus expetenda cu. Et sed quaeque accumsan, cum ei alienum accusamus.</p>
<p>Dicta saperet perfecto usu cu. Assueverit dissentias no eum. Nec ex du
You can’t perform that action at this time.