Linux IPv6 HOWTO
Linux IPv6 HowTo Guide
Linux 上的 IPv6 路由
DomLinux支援IPv6
Individual Lab: RIP IPv6 Routing (RIPng)
IPv6 RIPng Introduction
USAGI Project
IBM IPv6 Static Routing
IBM IPv6 RIP Protocol
2012年12月18日 星期二
2012年12月4日 星期二
2012年12月3日 星期一
2012年11月29日 星期四
2012年11月21日 星期三
2012年10月29日 星期一
2012年10月24日 星期三
2012年10月17日 星期三
2012年10月16日 星期二
[iOS] iOS 6 - Contact's Privacy
Programmatically Request Access to Contacts in iOS 6
iOS 6 Address Book not working?
How do I correctly use ABAddressBookCreateWithOptions method in iOS6?
iOS 6 Address Book not working?
How do I correctly use ABAddressBookCreateWithOptions method in iOS6?
Request Permission
ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL);
if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) {
ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error) {
// Do whatever you need.
});
}
2012年10月3日 星期三
[Programming] scanf()
Issue: scanf() by char or string goes wrong result.
Solution1: Discard the last character "\n" by "%*c".
Solution3: Read out the "\n" by getchar();
#include <stdio.h>
int main(int argc, char **argv)
{
int valA;
char valB;
scanf ("%d", &valA);
printf ("valA=%d\n", valA);
scanf ("%c", &valB);
printf ("valB=%c\n", valB);
return 0;
}
Result:
3
valA=3
valB=
Expect result:
3
valA=3
4
valB=4
Reason: scanf() doesn't handle new line character, "\n".
Solution1: Discard the last character "\n" by "%*c".
#include <stdio.h>
int main(int argc, char **argv)
{
int valA;
char valB;
scanf ("%d%*c", &valA);
printf ("valA=%d\n", valA);
scanf ("%c%*c", &valB);
printf ("valB=%c\n", valB);
return 0;
}
Solution2: Add a space character to second scanf().
#include <stdio.h>
int main(int argc, char **argv)
{
int valA;
char valB;
scanf ("%d", &valA);
printf ("valA=%d\n", valA);
scanf (" %c", &valB); // It is " %c". There is a space character in front of %c.
printf ("valB=%c\n", valB);
return 0;
}
Solution3: Read out the "\n" by getchar();
#include <stdio.h>
int main(int argc, char **argv)
{
int valA;
char valB;
scanf ("%d", &valA);
getchar();
printf ("valA=%d\n", valA);
scanf ("%c", &valB);
getchar();
printf ("valB=%c\n", valB);
return 0;
}
2012年10月1日 星期一
2012年9月21日 星期五
[iOS] Retina display
iPhone and iPod touch
Portrait: 320 x 480 pixels
Portrait Retina: 640 x 960 pixels (@2x)
iPhone 5 and iPod touch (5th generation)
Portrait: 640 x 1136 pixels (@2x)
iPad
Portrait: 768 x 1004 pixels
Portrait Retina: 1536 x 2008 pixels (@2x)
Landscape: 1024 x 748 pixels
Landscape Retina: 2048 x 1496 pixels (@2x)
2048x1536 with 264 ppi.
960x640 with 326 ppi.
retina: 64x64: image@2x.png
App-Related resources
Font size for Retina display
How to Define UIImageView size as UIImage resolution?
Preparing your iPhone App for Higher Resolution
Detect Retina device
How to serve high-resolution website images for retina displays
2012年9月18日 星期二
2012年9月12日 星期三
2012年9月11日 星期二
2012年9月9日 星期日
2012年9月6日 星期四
[iOS] Icon glossy
Add a row with key named "Icon already includes gloss effects" and boolean value set to "YES".
Glossy icon
Not glossy icon
2012年9月2日 星期日
2012年8月30日 星期四
2012年8月29日 星期三
2012年8月26日 星期日
2012年8月24日 星期五
2012年8月21日 星期二
2012年8月14日 星期二
2012年8月9日 星期四
2012年8月7日 星期二
2012年8月6日 星期一
2012年8月3日 星期五
2012年7月25日 星期三
2012年7月23日 星期一
2012年7月18日 星期三
2012年7月17日 星期二
2012年7月16日 星期一
[Linux] Shell Script check value enable/disable
#!/bin/sh
CHECK_FILE="/var/value_check"
CHECK_ENABLE=`cat $CHECK_FILE`
echo "CHECK_ENABLE=$CHECK_ENABLE"
if [ -f $CHECK_FILE -a -n $CHECK_ENABLE ]; then
if [ $CHECK_ENABLE -eq 1 ]; then
echo "enable";
else
echo "disable 1";
fi
else
echo "disable 2";
fi
2012年7月12日 星期四
2012年7月11日 星期三
2012年7月5日 星期四
[C++] static data member
reference
public static data member: for all object class, fetch by Class::member name, init before function declare.
private static data member: for class only, direct fetch, use it inter class is OK
public static data member: for all object class, fetch by Class::member name, init before function declare.
private static data member: for class only, direct fetch, use it inter class is OK
2012年6月28日 星期四
[Linux] Minimal syslog file
# fix logs into memory instead of /var/log/messages. and the log size is 512 KB
syslogd -C 512
# to read the logs
logread
syslogd -C 512
# to read the logs
logread
2012年6月26日 星期二
2012年6月23日 星期六
[iOS] Link new xib to File's Owner
The correct answer was given by user763308:
To link a .xib to a class under Xcode4:
- Open your .xib.
- In placeholder: select File's Owner.
- In the third thumbnail:"Identity Inspector" of the right panel, edit the "Custom Class" field and enter the name of your class.
I also then had to:
- Click the root view under Objects.
- Click the last tab: "Show Connections".
- Drag "New referencing outlet" to "File's Owner" and select "view".
2012年6月21日 星期四
2012年6月19日 星期二
2012年6月18日 星期一
[iOS] Hide Status Bar
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
or
[application setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
plist:
UIStatusBarHidden, value boolean
2012年6月7日 星期四
[Technology] 3G-4G 理論速度
Downstream | Upstream | |||
3G | WCDMA | 384kbps | 384kbps | 中華電信, 台灣大, 遠傳, 威寶 |
CDMA2000 | 3.1Mbps | 1.8Mbps | 亞太 | |
3.5G | HSDPA | 14.4Mbps | 384kbps | |
3.75G | HSUPA | 14.4Mbps | 5.76Mbps | |
---- | HSPA+ | 21.6Mbps | 5.76Mbps | |
3.9G | HSDPA+ | 42Mbps | 5.76Mbps | 威寶 |
4G | LTE | 326.4Mbps | 86.4Mbps |
2012年6月6日 星期三
[TOOL] CVS add directories recursively
First, add all the directories, but not any named "CVS":
find . -type d \! -name CVS -exec cvs add '{}' \;
Then add all the files, excluding anything in a CVS directory:
find . \( -type d -name CVS -prune \) -o \( -type f -exec cvs add '{}' \; \)
find . -type f -print0| xargs -0 cvs add
Reference
2012年6月5日 星期二
[Linux] DNS Relay
1. Download BIND
http://www.bind9.net/download
2. Cross compile
3. to fix gen issue (bind-tools-BJA-gen-HOSTCC.diff) : modify configure
to
4. to fix epoll issue (or compile it with "--disable-epoll" in step 2.)
bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff
5. /var/named.conf
6. run named
7. messages and logs
References:
DNS BIND - Operations Statements
DNS HOWTO
bind - DNS 設定
example 1
example 2
http://www.bind9.net/download
2. Cross compile
./configure --host=mips --disable-static --prefix=$(TOOLCHAIN) --includedir=$(INC_GPL_HEADER_PATH) --libdir=$(INC_GPL_LIB_PATH) --with-openssl=no --with-pkcs11=no --with-gssapi=no --with-randomdev=no --without-iconv --without-libiconv --without-docbook-xsl --with-libxml2=no --with-purify=no --with-docbook-xsl=no --with-libiconv=no --with-iconv=no --with-idnlib=no --with-atf=no --with-dlopen=no --with-dlz-mysql=no --with-dlz-postgres=no --with-dlz-bdb=no --with-dlz-filesystem=no --with-dlz-ldap=no --with-dlz-odbc=no --with-dlz-stub=no --disable-developer --disable-devpoll --disable-epoll --disable-largefile --disable-backtrace --disable-isc-spnego --disable-chroot
3. to fix gen issue (bind-tools-BJA-gen-HOSTCC.diff) : modify configure
if test "$cross_compiling" = "yes"; then
if test -z "$BUILD_CC"; then
as_fn_error $? "BUILD_CC not set" "$LINENO" 5
fi
BUILD_CFLAGS="$BUILD_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS"
BUILD_LIBS="$BUILD_LIBS"
else
to
if test "$cross_compiling" = "yes"; then
#if test -z "$BUILD_CC"; then
# as_fn_error $? "BUILD_CC not set" "$LINENO" 5
#fi
BUILD_CC="$CC"
BUILD_CFLAGS="$BUILD_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS"
BUILD_LIBS="$BUILD_LIBS"
else
4. to fix epoll issue (or compile it with "--disable-epoll" in step 2.)
bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff
5. /var/named.conf
#Disable query logging
logging {
category default { null; };
category lame-servers { null; };
category edns-disabled { null; };
}
options {
directory "/var/named";
version "not currently available";
listen-on { 192.168.0.1; };
avoid-v4-udp-ports { range 1 32767; };
avoid-v6-udp-ports { range 1 32767; };
forwarders { 168.95.1.1;168.95.192.1; };
forward only;
max-ncache-ttl 3;
allow-transfer { none; };
allow-update-forwarding { none; };
allow-notify { none; };
};
6. run named
mkdir /var/named
named -c /var/named.conf -d 10 -p 53
7. messages and logs
/var/log/messages (if syslogd exists.)
/var/log/named.run
References:
DNS BIND - Operations Statements
DNS HOWTO
bind - DNS 設定
example 1
example 2
2012年6月4日 星期一
[iOS] Redirect to App store
http://stackoverflow.com/questions/5638563/link-to-app-store-with-no-redirects
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"
itms-apps://itunes.apple.com/us/app/easygroup-full/id513988942"]]
[iOS] Game Center
Game Center for Developers
Game Kit Programming Guide
iOS SDK: Game Center Achievements and Leaderboards - Part1
iOS SDK: Game Center Achievements and Leaderboards - Part2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 2/2
Game Center memory deallocation (with Cocos2D)
Game Center memory leak
Game Kit Programming Guide
iOS SDK: Game Center Achievements and Leaderboards - Part1
iOS SDK: Game Center Achievements and Leaderboards - Part2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 2/2
Game Center memory deallocation (with Cocos2D)
Game Center memory leak
2012年5月30日 星期三
[iOS] iOS App Programming Guide
iOS App Programming Guide
UIApplication Class Reference
UIDevice Class Reference
Delegates for enter foreground and background
Disable Lock Screen:
[UIApplication sharedApplication].idleTimerDisabled = NO;
UIApplication Class Reference
UIDevice Class Reference
Delegates for enter foreground and background
Disable Lock Screen:
[UIApplication sharedApplication].idleTimerDisabled = NO;
2012年5月27日 星期日
2012年5月26日 星期六
2012年5月15日 星期二
2012年5月14日 星期一
2012年4月30日 星期一
[iOS] Facebook
iOS Tutorial - Facebook Developers
Making Your iOS Apps Social - Facebook Developers
Facebook Query Language: FQL
iOS SDK Reference - Facebook
Facebook iOS SDK - download
How To Use Facebook's New Graph API from your iPhone App
Facebook: Graph API
Facebook: Graph API Explorer
Multi-app
Get Friends and Friends's group
Check Phone type
multi-queries
Publishing links to user's wall using Facebook's iOS SDK
Publishing images on Facebook iOS
Publishing Facebook new feeds in home
Making Your iOS Apps Social - Facebook Developers
Facebook Query Language: FQL
iOS SDK Reference - Facebook
Facebook iOS SDK - download
How To Use Facebook's New Graph API from your iPhone App
Facebook: Graph API
Facebook: Graph API Explorer
Multi-app
Get Friends and Friends's group
Check Phone type
multi-queries
Publishing links to user's wall using Facebook's iOS SDK
Publishing images on Facebook iOS
Publishing Facebook new feeds in home
2012年4月29日 星期日
[iOS] iCloud
1. Enable iCloud Storage on Provision file.
2. Turning on iCloud entitlement
3. Remove the Apps with previous version on devices.
4. An example to store/fetch key-value iCloud.
How to check if iCloud is configured programmatically.
5. iCloud: Backup and restore overview.
6. Getting Start with iCloud Storage.
7. About File Metadata Queries.
8. Your Third iOS App.
9. Filesystem Programming Guide.
10. About Document-Based Applications in iOS.
iOS App Programming Guide: iCloud
iCloud - Apple Developer
Tools Workflow Guide for Mac
iCloud Design Guide
Turning On Applications Entitlements
If everything not goes well, try delete ~/Library/Containers/.
2. Turning on iCloud entitlement
3. Remove the Apps with previous version on devices.
4. An example to store/fetch key-value iCloud.
How to check if iCloud is configured programmatically.
5. iCloud: Backup and restore overview.
6. Getting Start with iCloud Storage.
7. About File Metadata Queries.
8. Your Third iOS App.
9. Filesystem Programming Guide.
10. About Document-Based Applications in iOS.
iOS App Programming Guide: iCloud
iCloud - Apple Developer
Tools Workflow Guide for Mac
iCloud Design Guide
Turning On Applications Entitlements
If everything not goes well, try delete ~/Library/Containers/.
2012年4月26日 星期四
2012年4月25日 星期三
[iOS] In App Purchase
In App Purchases: A Full Walkthrough
In-App Purchase 實作心得
In-App Purchases 的實作心得分享
iOS In App Purchase 學習筆記 (1)
iOS In App Purchase 學習筆記 (2)
iOS In App Purchase 學習筆記 (3)
In-App Purchases Programming Guide
Store Kit In-App Purchase Tutorials
iPhone Tutorial - Enabling Reviewers to Use your In-App Purchase for free
Restore button for In-App Purchase
Invalid Product IDs
In-App Purchase 實作心得
In-App Purchases 的實作心得分享
iOS In App Purchase 學習筆記 (1)
iOS In App Purchase 學習筆記 (2)
iOS In App Purchase 學習筆記 (3)
In-App Purchases Programming Guide
Store Kit In-App Purchase Tutorials
iPhone Tutorial - Enabling Reviewers to Use your In-App Purchase for free
Restore button for In-App Purchase
Invalid Product IDs
2012年4月24日 星期二
2012年3月29日 星期四
2012年3月23日 星期五
2012年3月22日 星期四
2012年3月20日 星期二
2012年3月11日 星期日
[iOS] UIAlertView
UIAlert View with multiple options.
in .h: include UIAlertViewDelegate
in .m: implement delegate for UIAlertViewDelegate
in .h: include UIAlertViewDelegate
@interface MyController : UIViewController <UIAlertViewDelegate> {
}
in .m: implement delegate for UIAlertViewDelegate
#pragma UIAlertView
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSLog(@"%d", buttonIndex);
[iOS] UIActionSheet
UIActionSheet Class Reference
Move Cancel Button from top to bottom
In .h: include UIAlertViewDelegate
In .m: implement delegates
Move Cancel Button from top to bottom
In .h: include UIAlertViewDelegate
@interface MyController : UIViewController <UIAlertViewDelegate> {
}
In .m: implement delegates
- (void) ShowActionSheet:(NSString *)title {
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:title
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles: nil];
[actionSheet addButtonWithTitle:@"Option 1"];
[actionSheet addButtonWithTitle:@"Option 2"];
[actionSheet addButtonWithTitle:@"Option 3"];
[actionSheet addButtonWithTitle:@"Cancel"];
actionSheet.cancelButtonIndex = actionSheet.numberOfButtons;
[actionSheet showInView:self.view];
[actionSheet release];
}
- (void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
NSLog(@"title=%@, buttonIndex: %d, cancelButtonIndex: %d, firstOtherButtonIndex: %d",
actionSheet.title,
buttonIndex,
actionSheet.cancelButtonIndex,
actionSheet.firstOtherButtonIndex);
}
2012年3月10日 星期六
2012年3月9日 星期五
[iOS] Apple Certification Expired
When your Apple certification is expired, you have to remove it and request a new cert as well as provision profiles. Here is the solution for this issue.
Code Sign Errors: profile doesn’t match any valid certificate/private key pair in the default keychain
2012年2月29日 星期三
[iOS] Core Data references
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
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月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日 星期六
2012年1月30日 星期一
2012年1月29日 星期日
[iOS] Icons for App submission
iOS Human Interface Guidelines
Make iPhone & iPod Touch icons
3. 512x512: iTunesArtwork
4. 1024x1024: iTunesArtwork@2x
For Ad-hoc distribution.
For iPhone/iPod touch:
1. 57x57: Icon.png
2. 114x114: Icon@2x.png
3. 320x480: Default.png
4. 640x960: Default@2x.png
5. 29x29: Icon-small.png
6. 58x58: Icon-small@2x.png
7. 50x50: Icon-small-50.png
8. 640x1136: Default-568h@2x.png
For iPad:
1. 72x72: Icon-72.png
2. 144x144: Icon-72@2x.png
3. 1024x748: Default.png
4. 2048x1496: Default@2x.png
5. 50x50: Icon-small.png
6. 100x100: Icon-small@2x.png
Images:
[UIImage imageNamed:@"bg-name-ip5"];
1. bg-name-ip5@2x.png
2. bg-name-ip4@2x.png
3. bg-name-ip4.png
~ipad, ~iphone, ~2x
Free Icons:
1. Reference1
2. Reference2
3. Reference3
4. Reference4
icon companies:
1. icondesign
2. The Iconfactory
3. IconDrawer
Make iPhone & iPod Touch icons
3. 512x512: iTunesArtwork
4. 1024x1024: iTunesArtwork@2x
For Ad-hoc distribution.
For iPhone/iPod touch:
1. 57x57: Icon.png
2. 114x114: Icon@2x.png
3. 320x480: Default.png
4. 640x960: Default@2x.png
5. 29x29: Icon-small.png
6. 58x58: Icon-small@2x.png
7. 50x50: Icon-small-50.png
8. 640x1136: Default-568h@2x.png
For iPad:
1. 72x72: Icon-72.png
2. 144x144: Icon-72@2x.png
3. 1024x748: Default.png
4. 2048x1496: Default@2x.png
5. 50x50: Icon-small.png
6. 100x100: Icon-small@2x.png
Images:
[UIImage imageNamed:@"bg-name-ip5"];
1. bg-name-ip5@2x.png
2. bg-name-ip4@2x.png
3. bg-name-ip4.png
~ipad, ~iphone, ~2x
Free Icons:
1. Reference1
2. Reference2
3. Reference3
4. Reference4
icon companies:
1. icondesign
2. The Iconfactory
3. IconDrawer
2012年1月28日 星期六
[iOS] AddressBook
1. Address Book Programming Guide for iOS
1.1 Address Book Framework Reference for iOS
1.2 Address Book UI Framework Reference for iOS
2. Address Book Reference for iOS
3. Address Book UI Reference for iOS
4. AddressGroup sample code
5. ABAddressBook Reference
5.1 address book change notification callback
ABExternalChangeCallback
ABAddressBookRegisterExternalChangeCallback
ABAddressBookUnregisterExternalChangeCallback
example from Stack Overflow
6. ABPerson Reference
6.1. ABPerson Properties
6.2. An example to get all the properties.
7. ABGroup Reference
8. ABRecord Reference
9. Get All Keys
1.1 Address Book Framework Reference for iOS
1.2 Address Book UI Framework Reference for iOS
2. Address Book Reference for iOS
3. Address Book UI Reference for iOS
4. AddressGroup sample code
5. ABAddressBook Reference
5.1 address book change notification callback
ABExternalChangeCallback
ABAddressBookRegisterExternalChangeCallback
ABAddressBookUnregisterExternalChangeCallback
example from Stack Overflow
6. ABPerson Reference
6.1. ABPerson Properties
6.2. An example to get all the properties.
7. ABGroup Reference
8. ABRecord Reference
9. Get All Keys
訂閱:
文章 (Atom)