-
strong
it's default option implicitly applied if no any other option of the same group is specified
means you have a reference to an object and you will keep that object alive. As long as you hold that reference to the object in that property, that object will not be deallocated and released back into memory. -
weak
gives you a reference so you can still “talk” to that object, but you are not keeping it alive. If everyone else’s strong references go away, then that object is released.
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
a = 7.1 - 4 + 2 - 3 | b = a + 1 | c = a - b | |
---|---|---|---|
d = - c + 1 + 5 + a | x = a + b + c + d |
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
// | |
// Created by Vlad Zamskoi on 2019-08-20. | |
// Licenced under MIT | |
// | |
// This is an example of interacting with JS code rendered within a WebView | |
// See `private func buildWebView() -> WKWebView` at line 69 | |
import Foundation | |
import UIKit |
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
@CommandLine.Command(description = ["Prepend branch's name with `z_archive_`, " + | |
"push to remote and then delete it's local ref. Default: if no branch specified, " + | |
"current branch is targeted"]) | |
fun archiveBranches( | |
@CommandLine.Parameters( | |
description = ["branches to archive. Run `git branch -a` to list branches"], | |
index = "0..*" | |
) branchesToArchive: List<String>?, | |
@CommandLine.Option( |
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 SnapKit | |
class ScrollableViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.backgroundColor = UIColor.whiteColor() | |
let scrollView = UIScrollView() |
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
#!/usr/bin/env zsh | |
# | |
# This script generates and writes to file another bash-script (output_script) | |
# that implements "vscodeInstallExtensions" function which installs all | |
# Visual Studio Code extensions that were originally installed on your machine | |
# at the moment of generation output_script by running | |
# "vscodeUpdateExtensionsInstallationScript" function that is implemented here below. | |
# | |
# # How to use | |
# |
It is great to have another MacBook that you know about how it works (e. g. ask your friend who has MacBook to join you). It helps to avoid false-negative test-results.
E. g. if you hear something strange while testing the speakers, you can check the same audio track on your MacBook to understand if the problem is caused by laptop or by audio track itself.