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
protocol RandomNumberGeneratorViewControllerProtocol: AnyObject { | |
// A protocol for creating view controllers that can show an array of numbers | |
func showNumbers(_ numbers: [Int]) | |
// A protocol for creating view controllers that can show an error message | |
func showError(_ error: Error) | |
} | |
class RandomNumberGeneratorViewController: UIViewController, RandomNumberGeneratorViewControllerProtocol { | |
private let presenter: RandomNumberGeneratorPresenterProtocol | |
private let debouncer: DebouncerProtocol |
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 XCTest | |
import CoreLocation | |
class RBLocationManagerTests: XCTestCase { | |
var locationManager: RBLocationManager! | |
override func setUp() { | |
super.setUp() | |
locationManager = RBLocationManager.shared |
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
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' | |
config.build_settings['OTHER_CFLAGS'] = "$(inherited) -Qunused-arguments -Xanalyzer -analyzer-disable-all-checks" | |
config.build_settings['CLANG_ENABLE_CODE_COVERAGE'] = 'NO' | |
end | |
end | |
end |
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
// | |
// Calendar+Extension.swift | |
// Align-iOS | |
// | |
// Created by Basel Farag on 12/6/20. | |
// | |
import Foundation | |
extension Calendar { |
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 MyViewModel { | |
let title: String | |
init(title: String) { | |
self.title = title | |
} | |
func printAction() { | |
print("executing business logic") |
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 | |
class TestView: UIView { | |
@IBOutlet var contentView: UIView! | |
@IBOutlet weak var mainLabel: UILabel! | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
commonInit() |
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
struct RegExp { | |
/** | |
Check password complexity | |
- parameter password: password to test | |
- parameter length: password min length | |
- parameter patternsToEscape: patterns that password must not contains | |
- parameter caseSensitivty: specify if password must conforms case sensitivity or not | |
- parameter numericDigits: specify if password must conforms contains numeric digits or not |
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
// | |
// StockQuoteItem.swift | |
// testProject | |
// | |
// Created by Basel Farag on 7/15/16. | |
// Copyright © 2016 Basel Farag. All rights reserved. | |
import Foundation |
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
//beginning fuction | |
function countScores(Array) { | |
array = Array; | |
x = 0; | |
//creating a variable that iterates the array and houses the new info. | |
//for (var x = 0; x < array.length; x++){ | |
for (var y in array) { | |
//define segregation criteria | |
if (array[y] > 50){ | |
x++; |
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
#!/bin/sh | |
# Simple iOS build script | |
# Written by Aron Bury, 29/11/2011 | |
appname="AwesomeApp" | |
target_name="$appname" | |
sdk="iphoneos" | |
certificate="iPhone Developer: Joe Blogs" |
NewerOlder