I hereby claim:
- I am lucianboboc on github.
- I am lucianboboc (https://keybase.io/lucianboboc) on keybase.
- I have a public key ASDeoz3SvKNaOUzUThpZWs6B-11PsRXXePnxFjVN8KSYhQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class PersonCell: UICollectionViewCell { | |
| @IBOutlet weak var firstLabel: UILabel! | |
| @IBOutlet weak var secondLabel: UILabel! | |
| } | |
| struct Person { | |
| let firstName: String | |
| let lastName: String | |
| } |
| final class MessageFilterExtension: ILMessageFilterExtension { | |
| var words:[Item] = [] | |
| let stack = CoreDataStack() | |
| func loadItems() { | |
| let context = stack.persistentContainer.viewContext | |
| let itemDAO = ItemDAO(managedObjectContext: context) | |
| let allItems = itemDAO.fetchItmes() | |
| self.words = allItems.flatMap({ item in | |
| return item.value != nil ? item : nil |
| func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!) { | |
| if let error = error { | |
| print(error.localizedDescription) | |
| return | |
| } | |
| if !result.isCancelled { | |
| let credential = FIRFacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString) | |
| FIRAuth.auth()?.signIn(with: credential) { (user, error) in | |
| if let error = error { |
| let connectionProperties = ConnectionProperties(host: "localhost", port: 5984, secured: false) | |
| let client = CouchDBClient(connectionProperties: connectionProperties) | |
| let database = client.database("test") | |
| func test() { | |
| let dict = ["key":"value"] | |
| let json = JSON(dict) | |
| database.create(json) { id, revision, doc, error in | |
| if let id = id { | |
| database.retrieve(id) { doc, error in |
| func unregisterForNotificationsForApp(){ | |
| let application = UIApplication.sharedApplication() | |
| application.unregisterForRemoteNotifications() | |
| NSUserDefaults.standardUserDefaults().setBool(false, forKey: "pushPermissions") | |
| } | |
| func registerForNotificationsForApp(){ | |
| let userNotificationTypes = (UIUserNotificationType.Alert | | |
| UIUserNotificationType.Badge | | |
| UIUserNotificationType.Sound); |
| extension LBJSON: Printable { | |
| var description: String { | |
| return "description" | |
| } | |
| } |
| - (NSData *) getDataFromAssetRepresentation: (ALAssetRepresentation *) representation | |
| { | |
| if(!representation) | |
| { | |
| NSLog(@"asset representation is NIL!"); | |
| return nil; | |
| } | |
| uint8_t *buffer = malloc(representation.size); | |
| NSError *error = nil; |