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
for i in {1..60}; do pod update; date ; sleep 60; done |
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
OutputStream outputStream = null; | |
try { | |
outputStream = exchange.getResponseBody(); | |
outputStream.write(content.getBytes()); | |
outputStream.flush(); | |
} finally { | |
if (outputStream != null) { | |
outputStream.close(); | |
} | |
} |
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
OutputStream outputStream = exchange.getResponseBody(); | |
outputStream.write(content.getBytes()); | |
outputStream.flush(); | |
outputStream.close(); |
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
name: Pull request comment | |
on: | |
issue_comment: | |
types: [created, edited, deleted] | |
jobs: | |
pull_request_comment: | |
if: contains(github.event.comment.html_url, '/pull/') # check if the comments come from pull request, exclude those from issue. | |
runs-on: [macos-latest] | |
steps: |
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
@available(iOS 13.0, *) | |
final class FixedSafeAreaInsetsHostingViewController<Content: SwiftUI.View>: UIHostingController<Content> { | |
override var prefersStatusBarHidden: Bool { | |
return false | |
} | |
override init(rootView: Content) { | |
super.init(rootView: rootView) | |
UIView.classInit |
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
protocol Builder { | |
func make(title: String) | |
func make(string: String) | |
func make(items: [String]) | |
func close() | |
} |
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; |
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
class CachedClassifier { | |
private var sumCache = [Int: Int]() | |
func sumOfFactors(_ number: Int) -> Int { | |
if let cachedValue = sumCache[number] { | |
return cachedValue | |
} | |
let sum = aliquotSum(factors(number)) |
NewerOlder