-
Что такое
полиморфизм? -
Что такое *инкапсуляция? Что такое *нарушение инкапсуляции? -
Чем
абстрактныйкласс отличается отинтерфейса? -
Расскажите о
паттерне MVC. Чем отличаетсяпассивнаямодель отактивной?
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 | |
| infix operator +=! { associativity right precedence 90 } // Int32 or Int64 | |
| infix operator -=! { associativity right precedence 90 } // Int32 or Int64 | |
| postfix operator ++! {} // Int32 or Int64 | |
| postfix operator --! {} // Int32 or Int64 | |
| infix operator |=! { associativity right precedence 90 } // UInt32 | |
| infix operator &=! { associativity right precedence 90 } // UInt32 |
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
| void foo() | |
| { | |
| // __strong guarantees that the object is "alive" until the end of foo() stack frame. The __strong keyword is used implicitly and may be omitted. | |
| // Unless it's retained by other objects | |
| __strong SomeObjectClass *someObject = ... | |
| // __weak does not let the block increase the retain count of "someObject" | |
| // | |
| __weak SomeObjectClass *weakSomeObject = someObject; | |
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 Cocoa | |
| class ViewController: NSViewController { | |
| var queue = DispatchQueue(label: "Queue", qos: .background, attributes: .concurrent) | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| (0..<1000).forEach { i in self.queue.async { Thread.sleep(forTimeInterval: 30.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
| // | |
| // SpinlockTestTests.swift | |
| // SpinlockTestTests | |
| // | |
| // Created by Peter Steinberger on 04/10/2016. | |
| // Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
| // | |
| import XCTest |
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
| @interface Item : NSObject @end | |
| @implementation Item @end | |
| typedef NSArray<Item *> Items; | |
| @interface Cooler : NSObject | |
| - (id)updateItems:(Items *)items; | |
| - (id)updateItems2:(NSArray<Item *> *)items; | |
| @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
| import CoreData | |
| public class CoreDataStack { | |
| // 2 | |
| public let model:NSManagedObjectModel | |
| public let persistentStoreCoordinator:NSPersistentStoreCoordinator | |
| public let context:NSManagedObjectContext | |
| public init() { | |
| // 3.1 |
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 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
| 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) |