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
### Keybase proof | |
I hereby claim: | |
* I am tonymillion on github. | |
* I am tonymillion (https://keybase.io/tonymillion) on keybase. | |
* I have a public key whose fingerprint is 26F7 ED28 40B6 F654 F11D 0717 CE83 A8C8 2FB8 1A4B | |
To claim this, I am signing this object: |
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
CGImageRef imgRef = [self.liveImageContext createCGImage:ciimg | |
fromRect:ciimg.extent]; | |
UIImage *newimg = [UIImage imageWithCGImage:imgRef]; | |
CGImageRelease(imgRef); | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
self.liveImageView.image = newimg; | |
}); |
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 *) MR_importFromArray:(NSArray *)listOfObjectData inContext:(NSManagedObjectContext *)context | |
{ | |
NSMutableArray *objects = [NSMutableArray array]; | |
[listOfObjectData enumerateObjectsWithOptions:0 | |
usingBlock:^(id obj, NSUInteger idx, BOOL *stop) | |
{ | |
NSDictionary * dict = obj; | |
if([dict isKindOfClass:[NSDictionary class]]) |
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
queryStepCountStartingFrom: 2938, (null) | |
CMMotionActivity @ 16938.044398,<startDate,2013-09-26 23:26:23 +0000,confidence,2,unknown,0,stationary,1,walking,0,running,0,automotive,0> | |
CMMotionActivity @ 21445.548551,<startDate,2013-09-26 23:26:27 +0000,confidence,2,unknown,0,stationary,0,walking,0,running,0,automotive,0> | |
CMMotionActivity @ 21451.551333,<startDate,2013-09-26 23:26:33 +0000,confidence,2,unknown,0,stationary,1,walking,0,running,0,automotive,0> | |
CMMotionActivity @ 21451.551333,<startDate,2013-09-27 00:32:59 +0000,confidence,2,unknown,0,stationary,1,walking,0,running,0,automotive,0> | |
CMMotionActivity @ 25442.301711,<startDate,2013-09-27 00:33:03 +0000,confidence,2,unknown,0,stationary,0,walking,0,running,0,automotive,0> | |
CMMotionActivity @ 25449.247537,<startDate,2013-09-27 00:33:10 +0000,confidence,2,unknown,0,stationary,1,walking,0,running,0,automotive,0> | |
CMMotionActivity @ 25449.247537,<startDate,2013-09-27 03:50:34 +0000,confidence,2,unknown,0,stationary,1,walking,0,running,0,automotive,0> | |
CMMotionA |
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*)immediateImageWithData:(NSData*)data | |
{ | |
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); | |
CGImageRef cgImage = CGImageSourceCreateImageAtIndex(source, 0, (__bridge CFDictionaryRef)@{(id)kCGImageSourceShouldCacheImmediately: (id)kCFBooleanTrue}); | |
UIImage *temp = [UIImage imageWithCGImage:cgImage]; | |
CGImageRelease(cgImage); | |
CFRelease(source); | |