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 | |
| class NetworkService | |
| { | |
| lazy var configuration: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration() | |
| lazy var session: NSURLSession = NSURLSession(configuration: self.configuration) | |
| let url: NSURL | |
| init(url: NSURL) { |
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 UIKit | |
| extension UIView | |
| { | |
| @IBInspectable var cornerRadius: CGFloat { | |
| get { | |
| return self.layer.cornerRadius | |
| } | |
| set { | |
| self.layer.cornerRadius = newValue |
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
| Sorting: | |
| No comparison sort can have better worst-case performance than O(nlog(n)) | |
| You can make any sorting algorithm stable by assigning a sequence number to each element and using the sequence number as the | |
| tie-breaker in the multikey sort | |
| Selection Sort: | |
| O(n^2) in all cases. It requires only O(n) swaps, however, it is suitable for data sets where copying is very expensive. | |
| Insertion Sort: | |
| Efficient when dealing with mostly sorted data sets, where it can have O(n) performance, but average and worst cases are O(n^2). |
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
| link to codeacademy tutorial | |
| https://www.codecademy.com/articles/react-setup-v | |
| npm init | |
| npm install --save react | |
| npm install --save react-dom (npm i -S {react,react-dom}) | |
| npm install --save-dev babel-core babel-loader babel-preset-env babel-preset-react (npm i -D babel-{core,loader} babel-preset-env babel-preset-react) | |
| In root dir, create a file '.babelrc' | |
| {"presets": ["env", "react"]} |
OlderNewer