π―
This file contains 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
public class Stack { | |
private Object[] elements; | |
private int size = 0; | |
private static final int DEFAULT_INITIAL_CAPACITY = 16; | |
public Stack() { | |
elements = new Object[DEFAULT_INITIAL_CAPACITY]; | |
} | |
public void push(Object e) { |
This file contains 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
function() { | |
HRESULT error = S_OK; | |
if (SUCCEEDED(Operation1()) && SUCCEEDED(Operation2()) && SUCCEEDED(Operation3()) && SUCCEEDED(Operation4())) { | |
return S_OK; | |
} else { | |
return OPERATIONFAILED; | |
} | |
} |
This file contains 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
#Β Convert the .cer file into a .pem file: | |
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem | |
# Convert the private keyβs .p12 file into a .pem file: | |
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem | |
# Finally, combine the certificate and key into a single .pem file | |
$ cat PushChatCert.pem PushChatKey.pem > ck.pem | |
# At this point itβs a good idea to test whether the certificate works. |
This file contains 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 Common | |
import RxSwift | |
typealias AboutCellConfigured = CellConfigurator<AboutCell, AboutCell.Input> | |
class AboutCell: UITableViewCell { | |
@IBOutlet weak var textView: UITextView! | |
This file contains 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 CreateOrderRequest { | |
// MARK: | |
// Interactor | |
// Get or fetch Model Response From API | |
struct CreateOrderResponse { | |
// MARK: | |
// ViewModel ~> Responsibility to parse Interactor response to Model View | |
struct CreateOrderViewModel { | |
let orderNumber: Int | |
let orderName: String |
This file contains 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
extension Reactive where Base: UserDefaults { | |
public func `default`<E: Equatable>(_ type: E.Type, _ keyPath: String) -> Observable<E?> { | |
let center = NotificationCenter.default | |
let initial = base.object(forKey: keyPath) as? E | |
let changes = center.rx.notification(UserDefaults.didChangeNotification) | |
.map { _ in | |
self.base.object(forKey: keyPath) as? E | |
} |
This file contains 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
extension UIApplication { | |
var statusBarView: UIView? { | |
return value(forKey: "statusBar") as? UIView | |
} | |
} |
This file contains 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
final class ViewController: UITableViewController { | |
var viewModel: ViewModel! | |
let disposeBag = DisposeBag() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let input = viewModel.Input() |
This file contains 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
final class ViewModel: ViewModelType { | |
var input: Input | |
var output: Output! | |
struct Input {} | |
struct Output {} | |
static var shared: ViewModel { |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains 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
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |