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
| //: Playground - noun: a place where people can play | |
| // nhathm01247@gmail.com | |
| import Foundation | |
| import UIKit | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| class ServerConnection: NSObject { |
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 getDataFromServer(url: String, completion: @escaping (String?) -> ()) { | |
| // | |
| } | |
| getDataFromServer(url: "http://0.0.0.0:8888/test") { (response) in | |
| // | |
| } |
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
| //: Playground - noun: a place where people can play | |
| // nhathm01247@gmail.com | |
| import Foundation | |
| import UIKit | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| class Worker: NSObject { |
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
| version: '2' | |
| services: | |
| gitlab: | |
| container_name: gitlab | |
| image: gitlab/gitlab-ce:latest | |
| restart: always | |
| environment: | |
| GITLAB_OMNIBUS_CONFIG: | | |
| ## GitLab configuration settings | |
| ##! Check out the latest version of this file to know about the different |
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 | |
| import UIKit | |
| // Arrays are ordered collections of values. | |
| // Sets are unordered collections of unique values. | |
| // Dictionaries are unordered collections of key-value associations. | |
| (print("\n=== ARRAY SECTION ===\n")) | |
| // Create empty array of strings | |
| var stringArray = [String]() |
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 | |
| struct Student { | |
| let firstName : String | |
| let lastName : String | |
| } | |
| extension Student : Hashable { | |
| static func == (lhs: Student, rhs: Student) -> Bool { | |
| return lhs.firstName == rhs.firstName && lhs.lastName == rhs.lastName |
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 backslashString = "Hello, backslash \\" | |
| // output: Hello, backslash \ | |
| let quotemarkString = "Hello, quote mark \"" | |
| // output: Hello, quote mark " |
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 rawStringInSwift5 = #"This is a sample about backslash \ and quote mark " in Swift 5"# | |
| // output: This is a sample about backslash \ and quote mark " in Swift 5 |
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 age = 18 | |
| let ageDescription = #"My age = \#(age)"# // Swift 4.2: \(age) => Swift 5: \#(age) | |
| // output: My age = 18 |
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 rawStringWithHashSymbol = ##"Sample raw string with # symbol"## | |
| // output: Sample raw string with # symbol |