Getting Started with Core Data
Introduction to Core Data Programming Guide
Core Data Tutorial for iOS
Introduction to Core Data Utility Tutorial
XCode Entity Modeling Tools for Core Data
XCode Mapping Tool for Core Data
Core Data Model Versioning and Data Migration
Core Data Release Notes for iOS v5.0
Using Core Data with iCloud Release Notes
Sample Code:
Top Songs
iPhoneCoreDataRecipes
ThreadedCoreData
PhotoLocations
TaggedLocations
Locations
CoreDataBooks
DateSectionTitles
Reference:
Core Data Framework Reference
2012年2月29日 星期三
2012年2月19日 星期日
[Marathon] 第六屆台南古都馬拉松 12-Feb. 2012
這次的全馬算是最順利的一次....
20公里內都在肌肉能負荷的情況下....
大致跑了 2:20 ....
過了20公里....
一些平常沒在訓練的肌肉就被拿出來用了....
像是股二頭肌, 半腱肌, 半膜肌, 臀中肌, 臀大肌, 髂脛束......(我抄網路的, 有錯請更正....)
很怕受傷, 就放慢了速度....
目標只要能平安跑完全程就好....
這個時候遇到了 Holy Allan....
邊跑邊哈啦....
大概一公里後我就追不上了....^^
望著那神一般的背影....
說聲 byebye.....
一路跑到30公里....
半腱肌實在是痛到不行....
就開始停下來用走的....
這時候就被一堆人輾過....
包括三超人....蝙蝠俠..蜘蛛人..超人....
走到最後 4 公里的時候....
百馬陪跑團上來了....
陪跑了 1 公里....
這時時間是 4:42....
心想這次不可能五小時內了....
那就........輕鬆走吧.....^^
回到終點....
時間顯示: 5:08....(晶片時間:05:06:18)
PS: 這次全馬第一次吃到西瓜..小蕃茄..手工饅頭....以往都是看人家收攤啊!!
2012年2月17日 星期五
[iOS] Class 1: NSArray, NSMutableArray, NSDictionary, NSMutableDictionary
NSArray
Add an empty object
Retrieve NSArray
NSMutableArray
1. Similar to NSArray.
2. Contents of array can be modified. (add, remove and sort)
Create NSMutableArray
Add an object (append to the end of the bookList)
Insert an object at an specific place "index".
Remove an object at "index".
Sort Array: in alphabetical order
NSDictionary
1. Cannot be modified. (add, remove and sort)
Create NSDictionary
Retrieve Object
NSMutableDictionary
1. Can be modified. (add, remove and sort)
Create NSMutableDictionary
Add an object
2. Contents of array cannot be modified. (add, remove and sort)
Create NSArray
NSArray *bookList = [NSArray arrayWithObjects: @"iPhone4", @"iOS", @"MacX", nil];
Add an empty object
[NSNull null]
Retrieve NSArray
NSArray *bookList = [NSArray arrayWithObjects:@"Moby", @"Frank", @"Tom", nil];
for (int y=0; y < bookList.count, y++) {
NSLog (@"Book Title is %@", [bookList objectAtIndex:y])
}
result:
Book Title is Moby
Book Title is Frank
Book Title is Tom
NSMutableArray
1. Similar to NSArray.
2. Contents of array can be modified. (add, remove and sort)
Create NSMutableArray
NSMutableArray *bookList = [NSArray arrayWithObjects:@"iPhone4", @"iOS", @"MacX", nil];
Add an object (append to the end of the bookList)
[bookList addObject:@"New book"];
Insert an object at an specific place "index".
[bookList insertObject:@"New book" atIndex:index];
Remove an object at "index".
[bookList removeObject:index];
Sort Array: in alphabetical order
[bookList sortUsingSelector:@selector(caseInsensitiveCompare:)];
NSDictionary
1. Cannot be modified. (add, remove and sort)
Create NSDictionary
NSDictionary *book = [NSDictionary dictionaryWithObjectsAndKeys:
@"a", @"1",
@"b", @"2",
@"c", @"3",
@"d", @"4",
@"e", @"5",
nil];
Retrieve Object
[book objectForKey: @"1"];
NSMutableDictionary
1. Can be modified. (add, remove and sort)
Create NSMutableDictionary
NSMutableDictionary *book = [NSDictionary dictionaryWithObjectsAndKeys:
@"a", @"1",
@"b", @"2",
@"c", @"3",
@"d", @"4",
@"e", @"5",
nil];
Add an object
[book setObject: @"Value" forKey: @"KeyIndex"];
2012年2月16日 星期四
2012年2月8日 星期三
[LVM] Resolve to mount duplicate LVM
I built a new Linux system(Fedora10) in newH.D.(/dev/sda) and wanted to mount the oldH.D.(/dev/sdb) into it. But the oldH.D. has been installed the Linux system(also Fedora 10) before. Therefore, both newH.D. and oldH.D. has the same LVM group, "VolGroup00".
I'm trying to mount the oldH.D. and finally success.
1. Check the volume group.
2. Get the VG UUID of /dev/sdb2.
3. Change the VG group name of /dev/sdb2.
4. Reboot the system. You will see the LVM group of /dev/sdb2 is changed to VG1T.
5. Mount the /dev/sdb2 into our new system.
I'm trying to mount the oldH.D. and finally success.
1. Check the volume group.
[root@vincent local]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 465.56G 32.00M (newH.D.)
/dev/sdb2 VolGroup00 lvm2 a- 931.31G 32.00M (oldH.D.)
2. Get the VG UUID of /dev/sdb2.
[root@vincent local]# vgdisplay
--- Volume group ---
VG Name
VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 931.31 GB
PE Size 32.00 MB
Total PE 29802
Alloc PE / Size 29801 / 931.28 GB
Free PE / Size 1 / 32.00 MB
VG UUID CQVzV7-xVVy-Om3Y-P2Ng-67d5-juHK-vTTj5a
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.56 GB
PE Size 32.00 MB
Total PE 14898
Alloc PE / Size 14897 / 465.53 GB
Free PE / Size 1 / 32.00 MB
VG UUID 65loFF-2Tee-K4Wa-uUFf-oMRD-E1EH-iCKsQg
The VG UUID of /dev/sdb2 is CQVzV7-xVVy-Om3Y-P2Ng-67d5-juHK-vTTj5a.
3. Change the VG group name of /dev/sdb2.
[root@vincent local]# vgrename CQVzV7-xVVy-Om3Y-P2Ng-67d5-juHK-vTTj5a VG1T
4. Reboot the system. You will see the LVM group of /dev/sdb2 is changed to VG1T.
[root@vincent local]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 465.56G 32.00M
/dev/sdb2 VG1T lvm2 a- 931.31G 32.00M
5. Mount the /dev/sdb2 into our new system.
[root@vincent local]# mkdir /mnt/oldHD
[root@vincent local]# mount /dev/VG1T/LogVol00 /mnt/oldHD
2012年2月6日 星期一
[Linux] USB Mouse support
make menuconfig
select USB_HID
NOTE: You have also need to select CONFIG_INPUT first.
Reference
Reference: The Linux USB sub-system
select USB_HID
NOTE: You have also need to select CONFIG_INPUT first.
Reference
Reference: The Linux USB sub-system
2012年2月4日 星期六
訂閱:
文章 (Atom)