This file contains hidden or 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.bulwinkel.android | |
| import android.os.Bundle | |
| import android.os.IBinder | |
| import android.os.Parcelable | |
| import java.io.Serializable | |
| fun <V> Map<String, V>.toBundle(bundle: Bundle = Bundle()): Bundle = bundle.apply { | |
| forEach { | |
| val k = it.key |
This file contains hidden or 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 details, see | |
| // http://stackoverflow.com/questions/40261857/remove-nested-key-from-dictionary | |
| import Foundation | |
| extension Dictionary { | |
| subscript(keyPath keyPath: String) -> Any? { | |
| get { | |
| guard let keyPath = Dictionary.keyPathKeys(forKeyPath: keyPath) | |
| else { return nil } | |
| return getValue(forKeyPath: keyPath) |
This file contains hidden or 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 Foundation | |
| import PlaygroundSupport | |
| /// A thread-safe array. | |
| public class SynchronizedArray<Element> { | |
| private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent) | |
| private var array = [Element]() | |
| public init() { } | |
This file contains hidden or 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
| // | |
| // String+HTML.swift | |
| // AttributedString | |
| // | |
| // Created by Costantino Pistagna on 08/11/2017. | |
| // Copyright © 2017 sofapps.it All rights reserved. | |
| // | |
| import UIKit | |
| import Foundation |
This file contains hidden or 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 your.name; | |
| import android.annotation.TargetApi; | |
| import android.app.Activity; | |
| import android.app.Application; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.res.Resources; | |
| import android.os.Build; | |
| import android.os.Bundle; |
This file contains hidden or 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
| precedencegroup ForwardPipe { | |
| associativity: left | |
| } | |
| infix operator |> : ForwardPipe | |
| func |> <T, U>(value: T, function: ((T) -> U)) -> U { | |
| return function(value) | |
| } |
This file contains hidden or 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
| /* | |
| * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. | |
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
| * | |
| * This code is free software; you can redistribute it and/or modify it | |
| * under the terms of the GNU General Public License version 2 only, as | |
| * published by the Free Software Foundation. Oracle designates this | |
| * particular file as subject to the "Classpath" exception as provided | |
| * by Oracle in the LICENSE file that accompanied this code. | |
| * |
OlderNewer