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
let id = thought.valueForKey("id") as! String | |
if let cachedImage = ImageCache.sharedCache.imageForKey("image-\(id)") { | |
cell.picture.image = cachedImage | |
} else { | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { | |
let scaledImage = Helper.scaleUIImageToSize(image!, size: size) | |
ImageCache.sharedCache.setImage(scaledImage, forKey: "image-\(id)") | |
dispatch_async(dispatch_get_main_queue(), { |
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
let userInfoCurrent = notification.userInfo! as! [String:AnyObject] | |
let uid = userInfoCurrent["notificationId"]! as! String | |
if uid == targetNotificationId { | |
// aplicamos alguna acción aquí | |
} |
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
notification.userInfo = [ "notificationId": myNotificationId ] |
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
try coordinator.migratePersistentStore(store, toURL: groupURL, options: options, withType:NSSQLiteStoreType) |
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
let store = try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: groupURL, options: options) |
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
lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = { | |
// .. | |
let containerURL = fileManager.containerURLForSecurityApplicationGroupIdentifier("group.com.myapp.MyApp") | |
let groupURL = containerURL!.URLByAppendingPathComponent(databaseName) | |
// .. | |
} |
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
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
# Change http://example.com (at the end of the last RewriteRule) to your website url | |
<IfModule mod_headers.c> | |
#RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
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
{ | |
"count": "6", | |
"results": { | |
"0": { | |
"(Data about Shop)" | |
}, | |
"1": { | |
"(Error messages)" | |
}, | |
"2": { |
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
... | |
resources :weeks | |
... |
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
<tr> | |
<td><%= week.firstDay %></td> | |
<td><%= week.comment %></td> | |
<td><%= week.another_property %></td> | |
</tr> |