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
| final class DidomiServiceProxy { | |
| static let shared = DidomiServiceProxy() | |
| private static let apiKey = "xxxxxxxxx" | |
| private let service = Didomi.shared | |
| init() { | |
| service.onReady { [weak self] in | |
| print("DIDOMI READY") |
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
| // 1. We need to define the screen "global" state | |
| struct ParentState: Equatable { | |
| var view1State: [String] | |
| var view2State: Int | |
| } | |
| enum ParentActions { | |
| case view1(View1Actions) | |
| case view2(View2Actions) |
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
| public final class Store<Value: Equatable, Action> { | |
| private let reducer: (inout Value, Action) -> Void | |
| private var _observable: BehaviorSubject<Value> | |
| public var observable: Observable<Value> { | |
| get { | |
| return _observable.distinctUntilChanged() | |
| } | |
| } | |
| private var value: Value { | |
| didSet { |
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
| @propertyWrapper | |
| public struct Atomic<Value> { | |
| private var value: Value | |
| public init(wrappedValue: Value) { | |
| self.value = wrappedValue | |
| } | |
| public var wrappedValue: Value { | |
| _read { |
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
| final class ReplaySubscriber<Input, Failure: Error>: Subscription { | |
| private var subscriber: AnySubscriber<Input, Failure>? | |
| init(subscriber: AnySubscriber<Input, Failure>) { | |
| self.subscriber = subscriber | |
| } | |
| func request(_ demand: Subscribers.Demand) { | |
| // We do nothing here as we only want to send events when they occur. | |
| // See, for more info: https://developer.apple.com/documentation/combine/subscribers/demand |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am bitomule on github. | |
| * I am bitomule (https://keybase.io/bitomule) on keybase. | |
| * I have a public key ASAV0Ayu6kHVVmHJbtiLEnaqd0fnX7zVu92uC2Wk5umwZwo | |
| To claim this, I am signing this object: |
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
| extension NSDictionary{ | |
| func getDateFromKey(key:String) -> NSNumber?{ | |
| if let date = (self.objectForKey(key) as? NSDictionary)?["$date"] as? NSNumber{ | |
| return date | |
| } | |
| return nil | |
| } | |
| func getFromKeyPath(keyPath:String)->AnyObject?{ | |
| let keysArray = split(keyPath) {$0 == "."} |
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
| Router.route('/uploadFile', {name:'uploadFile', where: 'server' }) | |
| .post(function(){ | |
| var request = this.request; | |
| var response = this.response; | |
| var buffers = []; | |
| var totalLength = 0; | |
| var fileUpload = Meteor.bindEnvironment(function(file){ | |
| Files.insert(file); | |
| }, function(e) { |
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 UploadViewController: BaseViewController,NSURLSessionDelegate,NSURLSessionTaskDelegate,NSURLSessionDataDelegate { | |
| var file:File? | |
| var type:String = "" | |
| var responseData = NSMutableData() | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| let path = file!.getDownloadedPath() | |
| var data: NSData = NSData(contentsOfURL: path)! |
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
| vats = { | |
| ES:{ | |
| name:"España", | |
| vat: 21 | |
| }, | |
| DE:{ | |
| name:"Germany", | |
| vat: 19 | |
| }, | |
| AT:{ |
NewerOlder