2011年2月2日 星期三

[記事] 2011.02.02

1296622845421 copy 1

0558 AM 三鶯大溪龍潭關西竹林新竹大山後龍通霄宛裡大甲0723 AM 清水服務區沙鹿龍井和美彰化快官烏日中投公路霧峰草屯中興南投名間竹山斗六古坑梅山竹崎中埔水上白河烏山頭官田善化新化關廟田寮 1002 AM  ... 阿拔跟阿母。

4小時零四分的車程,347.2 公里的思念,一通電話,中華電信關心您 ...阿拔身体好像又更差了一點,說不出口的心疼,只能暗暗盤算要怎麼樣才能說服他們搬上來,算了,過完年再來煩惱這個。

幫忙灌了香腸,三十幾年來的頭一遭,希望不要有任何親友整個春節都在拉肚子。
1296621084365

拜完地基主(?), AKB 48 ... 年夜飯。
1296641184785 copy 1

對了,原來太陽沒有消失,只是被台北藏起來而已

2011年1月31日 星期一

[記遊] 2010 Sabah (6)

1276854731102


2011年1月29日 星期六

[記事] 2011.01.29


友直,友諒,友多聞,如此而己。友便辟,友善柔,友便佞,如此而己。

「鄉人皆好之,何如 ? 」
「未可也。」
「鄉人皆惡之,何如 ? 」
「未可也,不如鄉人之善者好之,不善者惡之。」

2011年1月27日 星期四

[記事] HOWTO UIPickerView

In short :

1. New the class files and name it as something like PickViewController

2. Edit PickViewController.h

#import <UIKit/UIKit.h>
@interface SelFormUIViewController : UIViewController <UIPickerViewDelegate, UIPickerViewDataSource> {
UIPickerView *startSitePicker;
NSArray *sites; 
}
@property (nonatomic, retain) IBOutlet UIPickerView *startSitePicker;
@property (nonatomic, retain) NSArray *sites;
@end

3. Modify PickViewController.xib

  1. drag a Pick View Component from library window to inspector window
  2. set dataSource and delegate to file owner and reference to startSitePick of file owner in connection window


4. Modify PickViewController.m (Remember to implement the 3 functions : (NSInteger) numberOfComponentsInPickerView:(UIPickerView *)pickerView , (NSInteger) pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component, NSString *) pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component. Xcode won't generate them for you.

#import "SelFormUIViewController.h"
@implementation SelFormUIViewController
@synthesize sites;
@synthesize startSitePicker;
- (void)viewDidLoad {
NSArray *x = [[NSArray alloc] initWithObjects:@"111", @"2222", @"3333", @"4444", nil];
self.sites = x;
[x release];
    [super viewDidLoad];
}
- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
}

- (void)viewDidUnload {
    self.startSitePicker = nil;
    self.sites = nil;
    [super viewDidUnload];
}

- (void)dealloc {
[startSitePicker release];
[sites release];
    [super dealloc];
}

- (NSInteger) numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 1;
}
- (NSInteger) pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
return [sites count];
}
- (NSString *) pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
return [sites objectAtIndex:row];
}
@end

5. build and run

Ref  :http://www.youtube.com/watch?v=I6kX4ZHo0SU&feature=channel (Single Pecker)

2011年1月25日 星期二

[記遊] 2010 Sabah (5)

1276762566313

(後記) 在海島之旅後,雖然海水清澈魚不少,親愛的PDA在水裡也飄呀飄地好不快活,沙巴還是被她打入這輩子再沒興趣發掘出更美好的一面之流,跟上了床後再跟人家說我們個性不適合差不多意思,poor sabah !