Skip to content

Instantly share code, notes, and snippets.

View ivangodfather's full-sized avatar
🍂

Ivan Ruiz ivangodfather

🍂
View GitHub Profile
2014-05-29 11:14:04.844 FlyingFish[6779:60b] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): Symbol not found: __dealloc
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libobjc.A.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
2014-05-29 11:14:04.844 FlyingFish[6779:60b] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0xae81740 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2014-05-29 11:14:04.871 FlyingFish[6779:60b] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/Plu
@property Person *person; //This is a coredata entity that is already set.
NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:@"Comment"];
request.predicate = [NSPredicate predicateWithFormat:@"Comment.person == %@",self.person];
[~/desktop/test] $ echo "hi" > file
[~/desktop/test] $ git init
Reinitialized existing Git repository in /Users/ivanruizmonjo/Desktop/test/.git/
[~/desktop/test] $ git add file
[~/desktop/test] $ git commit -am "Initial commit"
[master (root-commit) bd5201b] Initial commit
1 file changed, 1 insertion(+)
create mode 100644 file
[~/desktop/test] git:master $ git branch -a
* master
~/desktop/test] git:master $ ls
file
[~/desktop/test] git:master $ git checkout newBranch
M file
Switched to branch 'newBranch'
[~/desktop/test] git:newBranch $ ls
file
[~/desktop/test] git:newBranch $ echo "test" > anotherFile
[~/desktop/test] git:newBranch $ git add anotherFile
[~/desktop/test] git:newBranch $ git checkout master
[~/desktop/test] git:master $ cat file
modified by newBranch
[~/desktop/test] git:master $ ls
file
[~/desktop/test] git:master $ git checkout newBranch
M file
Switched to branch 'newBranch'
[~/desktop/test] git:newBranch $ ls
file
[~/desktop/test] git:newBranch $ echo "test" > anotherFile
NSDate *date = [NSDate date];
NSCalendar *calendar = [NSCalendar currentCalendar];
NSInteger comps = (NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit);
NSDateComponents *dateComponents = [calendar components:comps
fromDate: date];
NSDate *finalDate = [calendar dateFromComponents:dateComponents];
NSLog(@"FINAL DATE %@",finalDate);
NSInteger item = [self.collectionView numberOfItemsInSection:0] - 1;
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:item inSection:0];
[self.collectionView reloadItemsAtIndexPaths:@[indexPath]];
NSMutableArray *CustomClassArray = //Objects of type array
class CustomClass : Object
{
@property NSString *objectID;
}
NSMutableArray *filteredArray = [NSMutableArray new];
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
//some code
[message.image getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
image = [UIImage imageWithData:data];
cell.photoImageView.image = image; //This doesnt get update. but i cant reload this indexPath cause i will create a infinite loop;
self.testImageView.image = image; //This get update.
}];
//other code
[message.image getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
image = [UIImage imageWithData:data];
dispatch_async(dispatch_get_main_queue(), ^{
cell.photoImageView.image = image; //this not
[self.cameraButton setBackgroundImage:image forState:UIControlStateNormal]; //this changes
});
}];