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
//: Playground - noun: a place where people can play | |
import UIKit | |
class TestClass { | |
deinit { | |
print("deinit \(self)") | |
} | |
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
// | |
// Emptiable+Extension.swift | |
// sieum | |
// | |
// Created by 홍성호 on 2018. 8. 8.. | |
// Copyright © 2018년 홍성호. All rights reserved. | |
// | |
// https://github.com/artsy/Emergence/blob/master/Emergence/Extensions/Apple/Occupyable%2BisNotEmpty.swift | |
// |
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
@objc protocol AAA { | |
} | |
extension AAA { | |
var aa: Int { | |
return 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
func formatByteCount(bytes: Int64) -> String { | |
let byteCountFormatter = ByteCountFormatter() | |
return byteCountFormatter.string(fromByteCount: bytes) | |
} |
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
class ViewController: UIViewController { | |
private var cellHeightsDictionary: [String: CGFloat] = [:] | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// set table view ... | |
tableView.rx.setDelegate(self).disposed(by: disposeBag) | |
} |
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 UITableView { | |
func reloadDataAndKeepOffset() { | |
let offset = contentOffset | |
reloadData() | |
layoutIfNeeded() | |
setContentOffset(offset, animated: false) | |
} | |
} |
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
# https://janikarhunen.fi/how-to-install-python-3-6-1-on-centos-7.html | |
# Install the necessary utilities | |
sudo yum update | |
sudo yum install yum-utils | |
sudo yum groupinstall development | |
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm | |
sudo yum install python36u | |
sudo yum install python36u-pip |