https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

import AWSS3 | |
class AWSS3Uploader { | |
/// Creates a upload request for uploading the specified file to a presigned remote URL | |
/// | |
/// - Parameters: | |
/// - fileURL: The URL of the file to upload. | |
/// - remoteURL: The presigned URL | |
/// - completion: The completion handler to call when the upload request is complete. |
import UIKit | |
import WebKit | |
final class ReCAPTCHAViewController: UIViewController { | |
private var webView: WKWebView! | |
private let viewModel: ReCAPTCHAViewModel | |
init(viewModel: ReCAPTCHAViewModel) { | |
self.viewModel = viewModel |
import Foundation | |
extension Date { | |
func toString(format: String = "yyyy-MM-dd") -> String { | |
let formatter = DateFormatter() | |
formatter.dateStyle = .short | |
formatter.dateFormat = format | |
return formatter.string(from: self) | |
} |
// Numerical matrix examples | |
let x: Matrix = [[10, 9, 8], [3, 2, 1]] | |
let y: Matrix = [[1, 2, 3], [4, 5, 6]] | |
let z: Matrix = [[1, 2], [3, 4], [5, 6]] | |
x + y // [[11, 11, 11], [7, 7, 7]] | |
x * y // [[10, 18, 24], [12, 10, 6]] | |
2 * x // [[20, 18, 16], [6, 4, 2]] | |
y ** z // [[22, 28], [49, 64]] |
/** | |
Usage: | |
let originalImage = UIImage(named: "cat") | |
let tintedImage = originalImage.tintWithColor(UIColor(red: 0.9, green: 0.7, blue: 0.4, alpha: 1.0)) | |
*/ | |
extension UIImage { | |
func tintWithColor(color:UIColor)->UIImage { |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\