This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'au BufRead,BufNewFile *.gradle set filetype=groovy' > ~/.vim/ftdetect/gradle.vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)reverseGeocoder:(CLLocation *)location { | |
CLGeocoder *geocoder = [[CLGeocoder alloc] init]; | |
[geocoder reverseGeocodeLocation:location | |
completionHandler:^(NSArray* placemarks, NSError* error) { | |
for (CLPlacemark *placemark in placemarks) { | |
NSLog(@"addressDictionary : %@", [placemark.addressDictionary description]); | |
NSLog(@"name : %@", placemark.name); | |
NSLog(@"thoroughfare : %@", placemark.thoroughfare); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01:import java.util.Hashtable; | |
02: | |
03:public class HashSearch { | |
04: | |
05: public static int exec(Hashtable vals, int target) { | |
06: if (vals.containsKey(target)) { | |
07: return (Integer) vals.get(target); | |
08: } else { | |
09: return -1; | |
10: } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
if ([segue.identifier isEqualToString:@"openChatView"]) { | |
SecondViewController *controller = segue.destinationViewController; | |
controller.name = @"neiraza"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; | |
tweetSheet.view.hidden = YES; | |
[self presentViewController:tweetSheet animated:NO completion:^{ | |
[self dismissViewControllerAnimated:NO completion:nil]; | |
}]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
typedef void (^BlockSampleCallBack)(NSArray *foo); | |
@interface BlockSample : NSObject | |
- (void)hoge:(NSString *)fuga callback:(BlockSampleCallBack)callback; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mon Feb 17 11:36:30 +0000 2014 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGFloat lat, lng; | |
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(lat,lng); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HogeAppDelegate *appDelegate = (HogeAppDelegate *)[[UIApplication sharedApplication] delegate]; |
NewerOlder