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 these codes below after NSOpenGLView is prepared. | |
#include <OpenGL/gl.h> | |
- (void)doCheck | |
{ | |
NSLog(@"gl_version={%s}", glGetString(GL_VERSION)); | |
NSLog(@"gl_renderer={%s}", glGetString(GL_RENDERER)); | |
NSLog(@"gl_vendor={%s}", glGetString(GL_VENDOR)); |
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 "SZJsonParser.h" | |
NSString *str = @"[ 'Apple', 'Banana' ]"; | |
id obj = [str jsonObject]; // obj will be an array or a dictionary | |
NSLog(@"JSON Object: %@", obj); |
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
# ひとつ前のコミットを取り消す | |
git reset --soft HEAD^ | |
# 直前のコミットに新しい変更点を追加する。 | |
git commit --amend | |
git push --force | |
# タグを取り除く | |
git tag -d TAGNAME | |
git push origin :refs/tags/TAGNAME |
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
texturetool -e PVRTC --channel-weighting-linear --bits-per-pixel-2 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME> | |
texturetool -e PVRTC --channel-weighting-linear --bits-per-pixel-4 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME> | |
texturetool -e PVRTC --channel-weighting-perceptual --bits-per-pixel-2 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME> | |
texturetool -e PVRTC --channel-weighting-perceptual --bits-per-pixel-4 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME> |
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 QuartzCore; | |
@interface NSObject (CATransactionSupport) | |
- (NSTimer *)startTimerWithInterval:(NSTimeInterval)interval block:(void (^)(void))block; | |
- (void)startAnimationWithDuration:(NSTimeInterval)duration block:(void (^)(void))block; | |
- (void)startAnimationWithDuration:(NSTimeInterval)duration block:(void (^)(void))block completionHandler:(void (^)(void))completionHandler; |
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
// | |
// UIView+ConstraintsUtil.h | |
// | |
// Created by numata on 2014/01/02. | |
// Copyright (c) 2014 Sazameki and Satoshi Numata, Ph.D. All rights reserved. | |
// | |
@import UIKit; | |