This file contains hidden or 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
| #import <Foundation/Foundation.h> | |
| int main(int argc, const char * argv[]) { | |
| @autoreleasepool { | |
| int p, d; | |
| BOOL isPrime; | |
| for (p = 2; p <= 50; ++p) { | |
| isPrime = YES; |
This file contains hidden or 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
| {"bug_type":"109","os_version":"iPhone OS 8.3 (12F70)","build_version":"5.3.2.14","is_beta":true,"app_name":"Viber","app_cohort":"2|date=1429045200000&sf=143441&tid=3b86f5c36d1a7ce5745dcf755fae03cde3c25dc4fa19ab99ca21fdfffdd39cf6","bundleID":"com.viber","name":"Viber","is_first_party":false,"app_version":"5.3.2","share_with_app_devs":false,"slice_uuid":"0087630e-61ef-3086-b085-89601b56e036","adam_id":382617920} | |
| Incident Identifier: D1096BD3-35EF-41BC-80CF-BFF1F9DEA4F0 | |
| Beta Identifier: 321C7B2F-8FA5-4494-A2B5-DFE2FBB74CC7 | |
| Hardware Model: iPhone5,1 | |
| Process: Viber [1813] | |
| Path: /private/var/mobile/Containers/Bundle/Application/F00EBAAC-D1E6-4B5E-AFD8-EC78D4506FE5/Viber.app/Viber | |
| Identifier: com.viber | |
| Version: 5.3.2.14 (5.3.2) | |
| Beta: YES |
This file contains hidden or 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
| class func fetchFriends(cursor: String?) { | |
| if FBSDKAccessToken.current() != nil { | |
| var params = [String: String]() | |
| params["fields"] = "id,name,picture,first_name,last_name,middle_name" | |
| if let after = cursor { | |
| params["after"] = after | |
| } | |
| let request: FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me/taggable_friends", parameters: params, httpMethod: "GET") | |
This file contains hidden or 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
| class Coordinator: FirstControllerDelegate { | |
| let window: UIWindow | |
| var navigation: UINavigationController? | |
| lazy var firstViewController: FirstViewController = { | |
| let controller = FirstViewController() | |
| controller.delegate = self | |
| return controller | |
| }() | |
This file contains hidden or 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
| class Coordinator: FirstControllerDelegate { | |
| let window: UIWindow | |
| var navigation: UINavigationController? | |
| lazy var firstViewController: FirstViewController = { | |
| let controller = FirstViewController() | |
| controller.delegate = self | |
| return controller | |
| }() | |
This file contains hidden or 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
| func onAction() { | |
| let controller = SecondViewController() | |
| controller.delegate = self | |
| self.navigation?.pushViewController(controller, animated: true) | |
| } |
This file contains hidden or 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
| // In the second view-controller | |
| let downloader = ImageDownloader() | |
| func downloadImages() { | |
| let image = self.downloader.download(image: "avatar") | |
| self.imageView.image = image | |
| //Other code updating all images in the view-controller | |
| } |
This file contains hidden or 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
| func goodMorning(morning: Bool, whom: String) { | |
| if morning { | |
| print("Good morning, \(whom)") | |
| } | |
| } | |
| goodMorning(morning: true, whom: "Pavel") | |
| goodMorning(morning: false, whom: "John") |
This file contains hidden or 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
| func goodMorning(morning: Bool, whom: String) { | |
| if morning { | |
| print("Good morning, \(whom)") | |
| } | |
| } | |
| func giveAname() -> String { | |
| print("giveAname() is called") | |
| return "Robert" | |
| } |
This file contains hidden or 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
| func goodMorning(morning: Bool, whom: () -> String) { | |
| if morning { | |
| print("Good morning, \(whom())") | |
| } | |
| } | |
| func giveAname() -> String { | |
| print("giveAname() is called") | |
| return "Robert" | |
| } |