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
@property CGFloat currentKeyboardHeight; | |
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *btnBottomConstraint; |
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
package com.dotincorp.android.util; | |
import android.graphics.Bitmap; | |
import android.graphics.Color; | |
import android.os.AsyncTask; | |
import android.util.Log; | |
import com.google.zxing.BarcodeFormat; | |
import com.google.zxing.MultiFormatWriter; | |
import com.google.zxing.common.BitMatrix; |
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
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { | |
// push received | |
} |
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
git init | |
git add . | |
git commit -m "First commit" | |
git remote add origin 원격_저장소_URL | |
git remote -v | |
git push -u origin master |
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://teamtreehouse.com/community/i-dont-understand-get-and-get-set | |
protocol TestProtocol { | |
var testVar: Int { get } | |
} | |
class TestClass: TestProtocol { | |
var testVar: Int = 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
extension DispatchQueue { | |
public func async(execute work: @escaping () -> Void, complete: @escaping () -> Void) { | |
async(execute: [work], complete: complete) | |
} | |
public func async(execute works: [() -> Void], complete: @escaping () -> Void) { | |
let dispatchGroup = DispatchGroup() | |
works.forEach { work in | |
async(group: dispatchGroup) { | |
work() |
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 |
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
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
func formatByteCount(bytes: Int64) -> String { | |
let byteCountFormatter = ByteCountFormatter() | |
return byteCountFormatter.string(fromByteCount: bytes) | |
} |
OlderNewer