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 gist:67752
On Feb 20, 2009, at 4:24 PM, "Olusegun A.A" <> wrote:
** Avoid: wiring money, cross-border deals, work-at-home
** Beware: cashier checks, money orders, escrow, shipping
** More Info:
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, 所以我想這應該是技術用詞吧。但可能劇本比較接近台灣的日常用法, 所以還是由你決定是否保留吧。以下是參考連結:
-用例&variant=zh-hant [每個用例提供了一個或多個場景...]
- [單元 8-確定使用案例場景(Use Case Scenario)]
以下這個Powerpoint交替使用了場景和情境, 但我想反正都差不多還是統一一點, 不要introduce另一個confusion吧
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: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:262434
>> @item.tag_list = ""
=> ""
=> true
>> @item.tag_list
=> []
>> @item.tag_list = "Tom, Mary's lamb, Jerry"
=> "Tom, Mary's lamb, Jerry"
=> true
View gist:563455
# This is what I wanted to do...
class MyObject < SomeSuperClass
include SomeWebService::DataSource
data_source_id '123456' # data_source_id() is a class method added by the module
def initialize(name)
@name = name
View gist:563463
# This is what I wanted to do...
class MyObject < SomeSuperClass
@@data_source_id = '123456'
@@data = nil
def initialize(name)
@name = name
View gist:1744108
Road Removal
You are given a network with N cities and M bidirectional roads connecting these cities. The
first K cities are important. You need to remove the minimum number of roads such that in the
remaining network there are no cycles that contain important cities. A cycle is a sequence of
at least three different cities such that each pair of neighboring cities are connected by a
road and the first and the last city in the sequence are also connected by a road.
View gist:1744262
In a certain business sector there are currently N small companies, each having just a single
employee. These employees are numbered 1 through N.
The business sector is about to be transformed into a monopoly. This will happen through a
series of mergers, until there is only one company. A single merger involves two companies.
In a merger, the president of one company becomes the direct report of the president of the
You can’t perform that action at this time.