A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.
Both UITableView and UICollectionView offer a similar API to register custom cell classes:
public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.
The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.
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
| /** | |
| * Perform a throwing expression, and throw a custom error in case the expression threw | |
| * | |
| * - parameter expression: The expression to execute | |
| * - parameter error: The custom error to throw instead of the expression's error | |
| * - throws: The given error | |
| * - returns: The return value of the given expression | |
| */ | |
| func perform<T>(_ expression: @autoclosure () throws -> T, orThrow errorExpression: @autoclosure () -> Error) throws -> T { | |
| do { |
Get cat.bin
import CoreML
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 coremltools | |
| from coremltools.proto import NeuralNetwork_pb2 | |
| from coremltools.models.neural_network.quantization_utils import * | |
| import numpy | |
| from keras.models import Sequential | |
| from keras.layers import Dense | |
| from keras.layers import Dropout | |
| from keras.utils import np_utils | |
| from keras.models import load_model | |
| import os.path |
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
| // | |
| // ContentView.swift | |
| // TryGeometryReader | |
| // | |
| // Created by satoutakeshi on 2019/12/07. | |
| // Copyright © 2019 satoutakeshi. Licensed under MIT. | |
| // | |
| import SwiftUI |
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 SwiftUI | |
| struct EnumPicker<T: Hashable & CaseIterable, V: View>: View { | |
| @Binding var selected: T | |
| var title: String? = nil | |
| let mapping: (T) -> V | |
| var body: some View { |
