Skip to content

Instantly share code, notes, and snippets.

View tatsuro-ueda's full-sized avatar

Tatsuro Ueda tatsuro-ueda

View GitHub Profile
@tatsuro-ueda
tatsuro-ueda / Cent OSのダウンロードURL.md
Created August 9, 2012 01:44
Cent OSのダウンロードURL
We couldn’t find that file to show.
@tatsuro-ueda
tatsuro-ueda / 最近ハマっているGitHubとStackOverflow.md
Created August 6, 2012 18:18
最近ハマっているGitHubとStackOverflow

寝付けないので文章を書いてみることにする。普段はブログに記事を書くのだが、最近GitHubに移住することを検討しているので、試しにGitHubのGistに書いてみることにした。どうせ同じMarkdown記法だし。

GitHub

面白い。他人のコードをダウンロードできるのもいいが、幾多のグループが世界中でプロジェクトを作っている様子が見えるのが、とても未来的。

これからのプログラマーは、GitHubに自分のプロジェクトを積極的に乗せていったほうが良い気がする。良いものがあれば使ってもらえるし、改善提案を受けることもできる。

私はStackOverflowで出てきた質問に対する回答が動くかどうかを確かめるためにレポジトリを作ることが多い。

@tatsuro-ueda
tatsuro-ueda / ImageLoading.m
Created July 23, 2012 03:33
パスを指定して画像を読み出す
[[UIImage alloc] initWithContentsOfFile:self.filePath]
@tatsuro-ueda
tatsuro-ueda / FileUpload.m
Created July 23, 2012 03:26
Objectice-Cでファイルをアップロードする
- (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) {
//
// JDMasterViewController.m
// JpegDisplayTestByTatsuroUeda
//
// Created by on 12/07/03.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "JDMasterViewController.h"
#import "JDDetailViewController.h"
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
CLLocationManager *locationManager;
}
@end
@implementation AppDelegate
@tatsuro-ueda
tatsuro-ueda / _120219_FallingAndUser.pde
Created February 19, 2012 07:12
_120219_FallingAndUser.pde
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;
@tatsuro-ueda
tatsuro-ueda / _120219_FallingAndUser.pde
Created February 19, 2012 07:08
_120219_FallingAndUser.pde
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;
// -----
@tatsuro-ueda
tatsuro-ueda / 2D-3D-Error.pde
Created February 10, 2012 12:40
2D-3D-Error.pde
import processing.video.*;
import jp.nyatla.nyar4psg.*;
MultiMarker nya;
import SimpleOpenNI.*;
SimpleOpenNI context;
void setup()
{
context = new SimpleOpenNI(this);
@tatsuro-ueda
tatsuro-ueda / 001.js
Created February 8, 2012 02:41
120208-Google Mapで複数のマーカーの情報ウィンドウを切り替える(1つだけ表示する)3
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]);
});