slidenumber: true autoscale: true
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
| // | |
| // CallStackReporter.swift | |
| // DramaticCrash | |
| // | |
| // Copyright (c) 2018 Hironori Ichimiya <[email protected]> | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| %{ | |
| number_of_generated = 5 | |
| }% | |
| public struct PrefixedArray<Element, RestElements> { | |
| public let prefix: Element | |
| public let rest: RestElements | |
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
| // https://github.com/apple/swift/blob/b0f5815d2b003df628b1bcfe94681fec489c9492/stdlib/public/Darwin/Foundation/JSONEncoder.swift#L153 | |
| func _convertToSnakeCase(_ stringKey: String) -> String { | |
| guard !stringKey.isEmpty else { return stringKey } | |
| var words : [Range<String.Index>] = [] | |
| // The general idea of this algorithm is to split words on transition from lower to upper case, then on transition of >1 upper case characters to lowercase | |
| // | |
| // myProperty -> my_property | |
| // myURLProperty -> my_url_property | |
| // |
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 | |
| public struct BSONError : LocalizedError, CustomStringConvertible { | |
| public var message: String | |
| public init(_ message: String) { self.message = message } | |
| public var description: String { return message } | |
| public var errorDescription: String? { description } | |
| } | |
| public enum BSONBinarySubtypes : UInt8 { |
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
| { | |
| "PFToFontStyle": { | |
| "0": { "value": "UICTFontTextStyleCaption1" }, | |
| "1": { "value": "UICTFontTextStyleSubhead" }, | |
| "2": { "value": "UICTFontTextStyleBody" }, | |
| "3": { "value": "UICTFontTextStyleTitle3" }, | |
| "4": { "value": "UICTFontTextStyleTitle2" }, | |
| "5": { "value": "UICTFontTextStyleTitle1" }, | |
| "6": { "value": "UICTFontTextStyleTitle0" } | |
| }, |
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 | |
| import PlaygroundSupport | |
| struct iPod: View { | |
| var body: some View { | |
| VStack(spacing: 40) { | |
| Screen() | |
| ClickWheel() | |
| Spacer() | |
| } |
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
| Remove @main or @UIApplicationMain |
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 'package:flutter/material.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: 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
| #!/usr/bin/env sh | |
| # usage: sh ./generate-target-dependencies.sh | dot -Tsvg -o target-graph.svg | |
| packages=`swift package describe --type json` | |
| targets=`echo $packages | jq '.targets'` | |
| target_names=`echo $targets | jq -r '.[] | .name'` | |
| body="" | |
| template=`cat <<EOF | |
| digraph DependenciesGraph { |