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
| public string IdToString(string id) | |
| { | |
| switch(id) | |
| { | |
| case "A": | |
| return "Agriculture, Forestry and Fishing (A)"; | |
| break; | |
| case "B": | |
| return "Mining (B)"; | |
| break; |
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
| What new feature of swift2 excites you the most? | |
| How to implement DSD menubar icon slide highlight the phase name? | |
| How to implement download progress bar of multiple concurrent files download? | |
| How do you get a json data from a web service and how do you parse it? | |
| Could you run us through protocol oriented programming? |
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
| --- | |
| swagger: '2.0' | |
| info: | |
| version: 0.0.0 | |
| title: Simple API | |
| host: localhost:4567 | |
| paths: | |
| /hello/{name}: | |
| get: | |
| description: greets the lucky user |
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
| require 'json' | |
| MyApp.add_route('GET', '/hello/{name}', { | |
| "resourcePath" => "/Default", | |
| "summary" => "", | |
| "nickname" => "greet_user", | |
| "responseClass" => "inline_response_200", | |
| "endpoint" => "/hello/{name}", | |
| "notes" => "greets the lucky user", |
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
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| SwaggerClientAPI.basePath = "http://localhost:4567" | |
| } |
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
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| SwaggerClientAPI.basePath = "http://localhost:4567" | |
| SwaggerClientAPI.DefaultAPI.greetUser(name: "Melbourne").execute { (response, error) -> Void in | |
| print(response!.body.message!) | |
| } | |
| } |
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
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| SwaggerClientAPI.basePath = "http://localhost:4567" | |
| SwaggerClientAPI.DefaultAPI.greetUser(name: "Melbourne").execute { (response, error) -> Void in | |
| print(response!.body.message!) | |
| } | |
| SwaggerClientAPI.DefaultAPI.sumTwo(first: 2, second: 4).execute { (response, error) -> Void in | |
| print(response!.body.message!) | |
| } | |
| } |
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
| let blacklists = ["*://mail.google.com/*","*://outlook.office.com/*","*://gist.github.com/*"] |
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
| // | |
| // ViewController.swift | |
| // spreoSDKTest | |
| // | |
| // Created by Victor Augusteo on 26/9/16. | |
| // Copyright © 2016 Victor Augusteo. All rights reserved. | |
| // | |
| import UIKit | |
| import ReactiveCocoa |
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 ParentVC: UIViewController { | |
| override func viewDidLoad() { | |
| NotificationCenter.default.addObserver(self, | |
| selector: #selector(ParentVC.handleModalDismissed), | |
| name: NSNotification.Name(rawValue: "modalIsDimissed"), | |
| object: nil) | |
| } | |
| func handleModalDismissed() { | |
| // Do something |