-
git stash
保存当前的工作进度。会分别对暂存区和工作区的状态进行保存
-
git stash save "message..."
这条命令实际上是第一条 git stash
命令的完整版
- (UIImage *)rotateImage:(UIImage *)image ofAngle:(CGFloat)degrees { | |
CGImageRef imgRef = image.CGImage; | |
CGFloat angleInRadians = degrees * (M_PI / 180); | |
CGFloat width = CGImageGetWidth(imgRef); | |
CGFloat height = CGImageGetHeight(imgRef); | |
CGRect imgRect = CGRectMake(0, 0, width, height); | |
CGAffineTransform transform = CGAffineTransformMakeRotation(angleInRadians); | |
CGRect rotatedRect = CGRectApplyAffineTransform(imgRect, transform); | |
#import <objc/message.h> | |
#define DECORATE printf("\n\n+*%%$%%*+-+*%%$%%*+-+*%%$-+*%%$%%*+-+*%%$%%*+-+*%%$-+*%%$%%*+-+*%%$%%*+-\n\n") | |
@implementation NSObject (logProperties) - (void) logProperties { DECORATE; @autoreleasepool { unsigned int propCt = 0; | |
const char * myName = [self.description substringWithRange: | |
(NSRange){1,[self.description rangeOfString:@":"].location-1}].UTF8String; | |
objc_property_t *pA = class_copyPropertyList(self.class, &propCt); | |
for (int i = 0; i < propCt; i++) { NSString *name; printf("%s [%s] = %s\n", myName, | |
(name = [NSString.alloc initWithUTF8String:property_getName(pA[i])]).UTF8String, | |
[objc_msgSend(self,NSSelectorFromString(name)) description].UTF8String); | |
} free(pA); } DECORATE; } |
// Declare enums like so: | |
#define IMAGE_STATUS(XX) \ | |
XX(kDOImageStatusOK, = 0) \ | |
XX(kDOImageStatusCached, )\ | |
XX(kDOImageStatusRetry, ) | |
DECLARE_ENUM(DOImageStatus, IMAGE_STATUS) |
nline void pspdf_dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_block_t block) { | |
dispatch_get_current_queue() == queue ? block() : dispatch_sync(queue, block); | |
} |
/*----------------------------------------------------*/ | |
#pragma mark - XCTAsserts | |
/*----------------------------------------------------*/ | |
XCTAssert(expression, format...); | |
XCTAssertTrue(expression, format...); | |
XCTAssertFalse(expression, format...); | |
XCTAssertEqual(expression1, expression2, format...); | |
XCTAssertNotEqual(expression1, expression2, format...); | |
XCTAssertNil(expression, format...); |
Consumer ready 360° cameras are becoming ever more accessible and many people are experimenting with a variety of 360° content. Out of the many cameras on the market the Ricoh Theta S is one of the most user-friendly, turn-key solutions with lots of built-in features. However, the camera's videos are limited 1920x960 resolution and the Theta+ app only lets you create a timelapse with up to 300 or 400 images. The workaround is to use interval shooting to capture as many images as you'd like at the 5376x2688 to full resolution and then stitch them together manually into an HD video. There are few GUI solutions (especially open-source/free) which let you do this with ease. Here's how you do it:
// (c) 2016 Markakod | |
#include "HitMe.h" | |
#include "WebImageDownloader.h" | |
UWebImageDownloader* UWebImageDownloader::GetWebImageDownloader(FString WebImageName, FString URL, bool& IsValid) | |
{ | |
IsValid = false; | |
UWebImageDownloader *Object = NewObject<UWebImageDownloader>(); |
// | |
// ViewController.m | |
// AVPlayerCaching | |
// | |
// Created by Anurag Mishra on 5/19/14. | |
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer | |
// | |
#import "ViewController.h" | |
#import <AVFoundation/AVFoundation.h> |
// -*- SHARED -*- | |
SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator | |
COMBINE_HIDPI_IMAGES = YES | |
INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks | |
SKIP_INSTALL = YES | |
COPY_PHASE_STRIP = NO | |
IPHONEOS_DEPLOYMENT_TARGET = 14.0 | |
MACOSX_DEPLOYMENT_TARGET = 10.15 | |
TVOS_DEPLOYMENT_TARGET = 14.0 |