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
protocol LempelZivMarkovUnarchiver { | |
func unarchive(url: URL) throws -> URL | |
} | |
class StandartLZMUnarchiver: LempelZivMarkovUnarchiver { | |
func unarchive(url: URL) throws -> URL { | |
let algorithm: Algorithm = .lzma | |
let fileManager = FileManager.default |
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
protocol ObjectMerger { | |
func merge<T>(_ source: T, into dest: T, overwrites: Bool) | |
} | |
struct StandartObjectMerger: ObjectMerger { | |
func merge<T>(_ source: T, into dest: T, overwrites: Bool) { | |
guard let src = source as? NSObject else { | |
return |
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 Foundation | |
protocol CountryEmojiResolver { | |
func emoji(for country: String) -> String | |
} | |
class StandartCoutryEmojiResolver: CountryEmojiResolver { | |
func emoji(for country: String) -> String { | |
let languageToFlag: [String: 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
import Foundation | |
import SwiftUI | |
extension View { | |
func marque() -> some View { | |
modifier(HorizontalMarqueModifier()) | |
} | |
} |
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 Foundation | |
import Combine | |
import PassKit | |
enum Request { | |
static var applePay: PaymentRequestBuilder { | |
return PaymentRequestBuilder() | |
} | |
} |
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
// | |
// File.swift | |
// | |
// | |
// Created by Alexey Averkin on 28.10.2020. | |
// | |
import Foundation | |
func main() { |
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
# Uncomment the next line to define a global platform for your project | |
require 'find' | |
platform :ios, '13.0' | |
install! 'cocoapods', :integrate_targets => false | |
use_frameworks! | |
target 'StockQuotes' do | |
# Pods for StockQuotes |
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 Foundation | |
import SwiftUI | |
struct FocusView: View { | |
let path: Path | |
let backgroundColor: Color | |
init(path: Path, backgroundColor: Color = Color.black.opacity(0.3)) { | |
self.path = path |
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 SwiftUI | |
import Combine | |
struct ContentView: View { | |
struct _State { | |
var source: CGRect? | |
var content: CGRect? | |
var isArrow: Bool { | |
return source != nil |
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 SwiftUI | |
import Combine | |
struct ContentView: View { | |
struct _State { | |
var text = "" | |
} | |
@State var state = _State() |
NewerOlder