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
設定確認 | |
$ git config -l | |
リモート登録 | |
$ git remote add origin REMOTE_URL | |
リモート変更 | |
$ git remote set-url origin git@git.example.com:foo/bar.git | |
リモートのタグの削除 |
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
java -jar AndroidUnusedResources1.6.2.jar |
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
- (void)drawLine:(UIBezierPath*)path | |
{ | |
// 非表示の描画領域を生成 | |
UIGraphicsBeginImageContextWithOptions(self.canvas.frame.size, NO, 0.0); | |
// 描画領域に、前回までに描画した画像を、描画 | |
[lastDrawImage drawAtPoint:CGPointZero]; | |
// ブラシを指定して色をセット | |
UIColor *brushPattern = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"mask"]]; |
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> | |
@interface TrimmingSquareView : UIView | |
@property (nonatomic, readonly) CGRect trimmngRect; | |
- (void)resetPosition; | |
@end |
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 inline double radians (double degrees) {return degrees * M_PI/180;} | |
/** | |
* UIImageの向きを統一するために作り直す | |
* | |
*/ | |
+ (UIImage*)remakeImageForOrientation:(UIImage*)originalImage { | |
// 変換が不要なものはそのままリターン |
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
/** | |
* NSDataを指定サイズに分割する | |
* | |
*/ | |
+ (NSArray *)splitDataWithData:(NSData *)data splitSize:(int)size | |
{ | |
NSRange dataRange; | |
NSInteger dataSize = data.length; | |
NSInteger dataSplitCount = dataSize/size; | |
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をリサイズ | |
* | |
*/ | |
+ (UIImage *)resizeAspectFitWithSize:(UIImage *)srcImg size:(CGSize)size | |
{ | |
CGFloat widthRatio = size.width / srcImg.size.width; | |
CGFloat heightRatio = size.height / srcImg.size.height; | |
CGFloat ratio = (widthRatio < heightRatio) ? widthRatio : heightRatio; | |
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
NSArray *settings = @[ | |
[AVCaptureManualExposureBracketedStillImageSettings manualExposureSettingsWithExposureDuration:CMTimeMake(1, 100) ISO:100.0], | |
[AVCaptureManualExposureBracketedStillImageSettings manualExposureSettingsWithExposureDuration:CMTimeMake(1, 200) ISO:400.0], | |
[AVCaptureManualExposureBracketedStillImageSettings manualExposureSettingsWithExposureDuration:CMTimeMake(1, 300) ISO:800.0] | |
]; | |
[self.stillImageOutput | |
captureStillImageBracketAsynchronouslyFromConnection:videoConnection | |
withSettingsArray:settings | |
completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, AVCaptureBracketedStillImageSettings *stillImageSettings, NSError *error) { |
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
<AVCaptureDeviceFormat: 0x174005b30 'vide'/'420v' 192x 144, { 2- 30 fps}, HRSI:3264x2448, fov:58.040, max zoom:153.00 (upscales @17.00), AF System:2, ISO:29.0-1856.0, SS:0.000013-0.500000> | |
<AVCaptureDeviceFormat: 0x174005b40 'vide'/'420f' 192x 144, { 2- 30 fps}, HRSI:3264x2448, fov:58.040, max zoom:153.00 (upscales @17.00), AF System:2, ISO:29.0-1856.0, SS:0.000013-0.500000> | |
<AVCaptureDeviceFormat: 0x174005b50 'vide'/'420v' 352x 288, { 2- 30 fps}, HRSI:2992x2448, fov:53.203, max zoom:153.00 (upscales @8.50), AF System:2, ISO:29.0-1856.0, SS:0.000013-0.500000> | |
<AVCaptureDeviceFormat: 0x174005b60 'vide'/'420f' 352x 288, { 2- 30 fps}, HRSI:2992x2448, fov:53.203, max zoom:153.00 (upscales @8.50), AF System:2, ISO:29.0-1856.0, SS:0.000013-0.500000> | |
<AVCaptureDeviceFormat: 0x174005b70 'vide'/'420v' 480x 360, { 2- 30 fps}, HRSI:3264x2448, fov:58.040, max zoom:153.00 (upscales @6.80), AF System:2, ISO:29.0-1856.0, SS:0.000013-0.500000> | |
<AVCaptureDeviceFormat: 0x174005b80 'vide'/'420f' 480x 360, { 2- 30 fps}, HR |
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
/** | |
* 円グラフ描画 | |
* | |
*/ | |
- (void)drawGradCircle:(CGRect)dirtyRect context:(CGContextRef)context { | |
[[UIColor whiteColor] set]; | |
// 画面サイズの小さい方の長さ | |
float dim = MIN(self.bounds.size.width, self.bounds.size.height); |
OlderNewer