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 | |
import UserNotifications | |
import CoreLocation | |
enum NotificationTriggerOption { | |
case date(date: Date, repeats: Bool) | |
case time(timeInterval: TimeInterval, repeats: Bool) | |
case location(coordinates: CLLocationCoordinate2D, radius: CLLocationDistance, notifyOnEntry: Bool, notifyOnExit: Bool, repeats: Bool) |
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 CryptoKit | |
import AuthenticationServices | |
import UIKit | |
struct SignInWithAppleResult { | |
let token: String | |
let nonce: 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 SwiftUI | |
import GoogleSignIn | |
import GoogleSignInSwift | |
struct GoogleSignInResult { | |
let idToken: String | |
let accessToken: String | |
} | |
final class SignInWithGoogleHelper { |
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 SwiftUI | |
import GoogleSignIn | |
import GoogleSignInSwift | |
struct GoogleSignInResult { | |
let idToken: String | |
let accessToken: String | |
} | |
final class SignInWithGoogleHelper { |
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
//Given an array, rotate the array to the right by k steps, where k is non-negative. | |
// Input: nums = [1,2,3,4,5,6,7], k = 3 | |
// Output: [5,6,7,1,2,3,4] | |
// Explanation: | |
// rotate 1 steps to the right: [7,1,2,3,4,5,6] | |
// rotate 2 steps to the right: [6,7,1,2,3,4,5] | |
// rotate 3 steps to the right: [5,6,7,1,2,3,4] | |
//SOLUTION: |
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 | |
enum NetworkingError: Int, Error, LocalizedError { | |
// 100 Informational | |
case `continue` = 100 | |
case switchingProtocols = 101 | |
case processing = 102 | |
case earlyHints = 103 | |
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 | |
func binarySearch(searchArray: [Int],target: Int, lower: Int, upper: Int) -> Int? { | |
if lower > upper { | |
return nil | |
} else { | |
var middle = (lower + upper) / 2 | |
print(middle) | |
if searchArray[middle] == target { |
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 | |
import Combine | |
class SignupViewController: UIViewController { | |
@IBOutlet weak var signupLabel: UILabel! | |
@IBOutlet weak var errorLabel: UILabel! | |
@IBOutlet weak var usernameTextField: UITextField! | |
@IBOutlet weak var passwordTextField: UITextField! | |
private var cancellables = Set<AnyCancellable>() |
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 | |
import Combine | |
class SplashViewController: UIViewController { | |
@IBOutlet weak var activityIndicator: UIActivityIndicatorView! | |
private var cancellables = Set<AnyCancellable>() | |
var launchDataDispatchGroup: DispatchGroup = DispatchGroup() | |
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
disabled_rules: # rule identifiers to exclude from running | |
- variable_name | |
- nesting | |
- function_parameter_count | |
opt_in_rules: # some rules are only opt-in | |
- control_statement | |
- empty_count | |
- trailing_newline | |
- colon | |
- comma |
NewerOlder