Use Python to:
- send a plain text email
- send an email with attachment
- receive and filter emails according to some criteria
| import UIKit | |
| /// A validation rule for text input. | |
| public enum TextValidationRule { | |
| /// Any input is valid, including an empty string. | |
| case noRestriction | |
| /// The input must not be empty. | |
| case nonEmpty | |
| /// The enitre input must match a regular expression. A matching substring is not enough. | |
| case regularExpression(NSRegularExpression) |
Use Python to:
| /* | |
| var t = Timer() | |
| t.start() | |
| // do something | |
| t.stop() | |
| print("took \(t.seconds)") | |
| */ |
| #!/usr/bin/env python | |
| # | |
| # Very basic example of using Python and IMAP to iterate over emails in a | |
| # gmail folder/label. This code is released into the public domain. | |
| # | |
| # RKI July 2013 | |
| # http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ | |
| # | |
| import sys | |
| import imaplib |
| // http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html has a nice breakdown of the syntax--it helps to think of the ^ as similar to a pointer dereference symbol * | |
| // block typedef: | |
| typedef void(^Block)(); | |
| typedef void(^ConditionalBlock)(BOOL); | |
| typedef NSString*(^BlockThatReturnsString)(); | |
| typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL); | |
| // block property with typedef: |
| // | |
| // TransitionController.h | |
| // | |
| // Created by XJones on 11/25/11. | |
| // | |
| #import <UIKit/UIKit.h> | |
| @interface TransitionController : UIViewController |