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
// | |
// 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
//: 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
class CachedClassifier { | |
private var sumCache = [Int: Int]() | |
func sumOfFactors(_ number: Int) -> Int { | |
if let cachedValue = sumCache[number] { | |
return cachedValue | |
} | |
let sum = aliquotSum(factors(number)) |
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 rm -r --cached . | |
git add . | |
git commit -am 'refresh git tracking' | |
git push |
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
public final class UserAgentFetcher: NSObject { | |
private let webView: WKWebView = WKWebView(frame: .zero) | |
@objc | |
public func fetch() -> String { | |
dispatchPrecondition(condition: .onQueue(.main)) | |
var result: 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 java.util.Iterator; | |
public class IteratorExample { | |
public static void main(String[] args) { | |
Iterable<Integer> iterable = () -> new Iterator() { | |
int i = 0; | |
final static int MAX = 10; | |
public boolean hasNext() { | |
return i < MAX; |