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
test |
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
(60*30).downto(0){|i|puts sprintf("%02d:%02d", i/60, i%60);sleep 1} |
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
NSMutableIndexSet* targetIndexes = [NSMutableIndexSet indexSet]; | |
NSUInteger index = 0; | |
for(HogeView* aHogeView in aHogeViews) { | |
CGPoint center = aHogeView.center; | |
if(center.x < MIN){ | |
[targetIndexes addIndex:index]; | |
[aHogeView removeFromSuperview]; | |
} | |
index++; | |
} |
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
#!perl | |
use strict; | |
use warnings; | |
use utf8; | |
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
NSLog(@"max = %f", [[arrayDistance valueForKeyPath:@"@max.floatValue"] floatValue]); |
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 <Cocoa/Cocoa.h> | |
int main(){ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSArray * array = [NSArray arrayWithObjects: | |
[NSNumber numberWithInt:333], | |
[NSNumber numberWithInt:555], | |
[NSNumber numberWithInt:444], | |
[NSNumber numberWithInt:222], | |
[NSNumber numberWithInt:111], |
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
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
const CGFloat NEAR = 0.1f; | |
const CGFloat FAR = 10.0f; | |
const CGFloat FOVY = 90.0f; | |
const CGFloat ASPECT = backingWidth / backingHeight; | |
CGFloat scale = NEAR * tan(FOVY * 0.5f * M_PI / 180.0f); | |
CGFloat x = scale * ASPECT; | |
CGFloat y = scale; |
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 <Cocoa/Cocoa.h> | |
int main(){ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSLog(@"Hello"); | |
[pool release]; | |
return 0; | |
} |
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 <Cocoa/Cocoa.h> | |
int main(){ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSLog(@"Hello"); | |
NSDate *now = [[NSDate date] retain]; | |
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
//ロケールを設定 |
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
#ifdef DEBUG | |
# define TRACE(fmt, ...) NSLog((@"%s(%d) " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#else | |
# define TRACE(...) | |
#endif |
OlderNewer