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)setName:(NSString *)name { | |
NSString *primitiveName = [self primitiveValueForKey:NSStringFromSelector(@selector(name))]; | |
if ((!name && !primitiveName) || [name isEqualToString:primitiveName]) { | |
return; | |
} | |
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; | |
if (name) { | |
userInfo[@"object"] = name; |
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)didSave { | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"kPQSurveyDidSaveNotification" object:self userInfo:nil]; | |
[super didSave]; | |
} |
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
@interface MyObject : NSManagedObject | |
@property (nonatomic, strong, nullable) NSSet *changedKeys; | |
@end | |
... | |
@interface MyObject | |
- (void)willSave { | |
[super willSave]; |
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)setName:(NSString *)name { | |
if ((!name && !_name) || [name isEqualToString:_name]) { | |
return; | |
} | |
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; | |
if (name) { | |
userInfo[@"newValue"] = name; | |
} | |
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
var sheetName = "Sheet1"; // name of your sheet | |
var firstRowOfData = 2; // first row of data | |
var firstColumnOfData = 2; // first column of data where A = 1 | |
var lastColumnOfData = 3; // last column of data where A = 1 | |
function onEdit(e) { | |
Logger.log("[METHOD] onEdit(e)"); | |
if (e.source.getActiveSheet().getName() !== sheetName) { | |
return; // don't continue if a non-relevant sheet was edited |
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)updateFromArray:(nonnull NSArray *)array | |
toArray:(nonnull NSArray *)toArray | |
inSection:(NSUInteger)section | |
withInsertionAnimation:(UITableViewRowAnimation)insertionAnimation | |
deletionAnimation:(UITableViewRowAnimation)deletionAnimation | |
setter:(nonnull void (^)(NSArray * _Nonnull data))setterBlock | |
insertedCells:(nullable void (^)(NSArray <UITableViewCell *> * _Nonnull cells))insertionBlock | |
reorderedCells:(nullable void (^)(NSArray <UITableViewCell *> * _Nonnull cells))reorderingBlock | |
deletedCells:(nullable void (^)(NSArray <UITableViewCell *> * _Nonnull cells))deletionBlock | |
completion:(nullable void (^)(void))completionBlock |
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
{ | |
root: { | |
"objects" : { | |
"$object_id" : { | |
"permissions" : { | |
"isPublic" : BOOL, | |
"users" : { | |
"$user_id" : BOOL | |
} | |
}, |
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
{ | |
root: { | |
"objects" : { | |
"$object_id" : { | |
"permissions" : { | |
"isPublic" : BOOL, | |
"users" : { | |
"$user_id" : BOOL | |
} | |
}, |
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
{ | |
root: { | |
"objects" : { | |
"$object_id" : { | |
... | |
// data goes here | |
} | |
}, | |
"permissions" : { | |
"public" : { |
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
{ | |
"rules" : { | |
"objects" : { | |
"$object_id" : { | |
// OBJECT | |
".read" : "root.child('permissions/public/'+$object_id).val() == true || root.child('permissions/user/'+auth.uid+'/'+$object_id).val() == true", // can read if public or if permitted user | |
".write" : "root.child('permissions/user/'+auth.uid+'/'+$object_id).val() == true" // can write if permitted user or logged in and no existing object | |
} | |
}, | |
"permissions" : { |
OlderNewer