Skip to content

Instantly share code, notes, and snippets.

@neiraza
neiraza / FirstViewController.m
Created February 21, 2014 07:12
Storyboardのsegueでパラメタ受け渡したった ref: http://qiita.com/neiraza/items/6eba4e57dffa993b4933
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"openChatView"]) {
SecondViewController *controller = segue.destinationViewController;
controller.name = @"neiraza";
}
}
@neiraza
neiraza / 0_reuse_code.js
Created August 28, 2014 00:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
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: }
@neiraza
neiraza / reverseGeocoder
Created September 23, 2014 13:52
位置情報から住所を検索する
- (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);
@neiraza
neiraza / gradle-highlight
Last active August 29, 2015 14:15
Vimで.gradleをシンタックスハイライト
echo 'au BufRead,BufNewFile *.gradle set filetype=groovy' > ~/.vim/ftdetect/gradle.vim