寝付けないので文章を書いてみることにする。普段はブログに記事を書くのだが、最近GitHubに移住することを検討しているので、試しにGitHubのGistに書いてみることにした。どうせ同じMarkdown記法だし。
面白い。他人のコードをダウンロードできるのもいいが、幾多のグループが世界中でプロジェクトを作っている様子が見えるのが、とても未来的。
これからのプログラマーは、GitHubに自分のプロジェクトを積極的に乗せていったほうが良い気がする。良いものがあれば使ってもらえるし、改善提案を受けることもできる。
私はStackOverflowで出てきた質問に対する回答が動くかどうかを確かめるためにレポジトリを作ることが多い。
This file contains 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
[[UIImage alloc] initWithContentsOfFile:self.filePath] |
This file contains 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
- (IBAction)upload:(id)sender { | |
NSURL *url = [NSURL URLWithString:@"http://192.168.100.203:4567/"]; | |
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; | |
NSData *imageData = UIImageJPEGRepresentation([UIImage imageNamed:_filePath.lastPathComponent], 0.5); | |
NSMutableURLRequest *request = [httpClient multipartFormRequestWithMethod:@"POST" path:@"/upload" parameters:nil constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) { | |
[formData appendPartWithFileData:imageData name:@"file" fileName:_filePath.lastPathComponent mimeType:@"image/jpeg"]; | |
}]; | |
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; | |
// [operation setUploadProgressBlock:^(NSInteger bytesWritten, NSInteger totalBytesWritten, NSInteger totalBytesExpectedToWrite) { |
This file contains 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
// | |
// JDMasterViewController.m | |
// JpegDisplayTestByTatsuroUeda | |
// | |
// Created by on 12/07/03. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import "JDMasterViewController.h" | |
#import "JDDetailViewController.h" |
This file contains 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 <UIKit/UIKit.h> | |
#import <CoreLocation/CoreLocation.h> | |
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |
{ | |
CLLocationManager *locationManager; | |
} | |
@end | |
@implementation AppDelegate |
This file contains 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
static final int SLOWNESS = 4; | |
static final int FALLING_RECTANGLE_WIDTH = 150; | |
static final int FALLING_RECTANGLE_WEIGHT = 20; | |
static final int FALLING_RECTANGLE_DEPTH = 40; | |
import SimpleOpenNI.*; | |
SimpleOpenNI context; | |
PImage maskImg; | |
PImage maskedImg; |
This file contains 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
static final int SLOWNESS = 2; | |
static final int FALLING_RECTANGLE_WIDTH = 250; | |
static final int FALLING_RECTANGLE_WEIGHT = 20; | |
static final int FALLING_RECTANGLE_DEPTH = 40; | |
FallingRectangle[] fall = new FallingRectangle[50]; | |
HumanRectangle hRct = new HumanRectangle(); | |
int num; | |
// ----- |
This file contains 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 processing.video.*; | |
import jp.nyatla.nyar4psg.*; | |
MultiMarker nya; | |
import SimpleOpenNI.*; | |
SimpleOpenNI context; | |
void setup() | |
{ | |
context = new SimpleOpenNI(this); |
This file contains 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
google.maps.event.addListener(marker[i], 'click', function () { | |
// for (var j = 0; j < json.spots.length; j++) { | |
// if (info[j]) info[j].close(); | |
// } | |
info[i].open(map, marker[i]); | |
}); |