(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo
(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo
// | |
// MUtility.m | |
// Magazine | |
// | |
// Created by wang xuefeng on 10-12-9. | |
// Copyright 2010 www.5yi.com. All rights reserved. | |
// | |
#import "MUtility.h" | |
#import "MFoundation.h" |
NSDictionary *magazineDict = [NSDictionary dictionary]; | |
[[NSUserDefaults standardUserDefaults] registerDefaults:magazineDict]; | |
// write data to /Library/Preferences. | |
[[NSUserDefaults standardUserDefaults] synchronize]; |
- (void) fadeOut: (id) sender | |
{ | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
[UIView beginAnimations:nil context:context]; | |
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; | |
[UIView setAnimationDuration:1.0]; | |
[[self.view viewWithTag:999] setAlpha:0.0f]; | |
[UIView commitAnimations]; | |
self.navigationItem.rightBarButtonItem = BARBUTTON(@"Fade In", @selector(fadeIn:)); | |
} |
# Douban OAuth认证包括以下四步内容 | |
# 1. 获取Request Token | |
# 2. 用户确认授权 | |
# 3. 换取Access Token | |
# 4. 访问受限资源 | |
require "rubygems" | |
gem 'oauth','0.4.3' | |
require 'oauth' |
# OAuth认证包括以下四步内容 | |
# 1. 获取Request Token | |
# 2. 用户确认授权 | |
# 3. 换取Access Token | |
# 4. 访问受限资源 | |
require 'rubygems' | |
gem 'oauth','0.4.3' | |
require 'oauth' |
1. 将你需要的splash界面的图片,存成Default.png | |
2. 在XXXAppDelegate.m程序中,插入如下代码: | |
- (BOOL)application:(UIApplication *)application | |
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
//–insert a delay of 5 seconds before the splash screen disappears– | |
[NSThread sleepForTimeInterval:5.0]; | |
// Override point for customization after application launch. | |
// Add the view controller’s view to the window and display. | |
[window addSubview:viewController.view]; |
#import <UIKit/UIKit.h> | |
@interface DragView : UIImageView | |
{ | |
CGPoint startLocation; | |
} | |
@end | |
@implementation DragView |
- (void)getContactList | |
{ | |
ABAddressBookRef addressBook = ABAddressBookCreate(); | |
NSMutableArray *peopleArray = (NSMutableArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); | |
for (id *people in peopleArray) | |
{ | |
// phone | |
ABMultiValueRef phones = (ABMultiValueRef) ABRecordCopyValue(people, kABPersonPhoneProperty); | |
int nCount = ABMultiValueGetCount(phones); |