The Composable Architecture (w skrócie TCA) to biblioteka do budowania aplikacji w sposób spójny i zrozumiały, z myślą o kompozycji, testach i ergonomii. Może być używana w SwiftUI, UIKit
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
| #ifndef MarchingCubesColorBlobParams_h | |
| #define MarchingCubesColorBlobParams_h | |
| #include <simd/simd.h> | |
| typedef struct { | |
| simd_float3 center; | |
| float radius; | |
| simd_float3 color; | |
| float _pad; | |
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
| @IBSegueAction private func showPerson(coder: NSCoder, sender: Any?, segueIdentifier: String?) | |
| working variants: | |
| @IBSegueAction private func showPerson(coder: NSCoder) | |
| @IBSegueAction private func showPerson(_ coder: NSCoder, sender: Any?, segueIdentifier: String?) | |
| @IBSegueAction private func showPerson(_ coder: NSCoder) | |
| @IBSegueAction private func showPerson(coder: NSCoder) |
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
| extension Task where Success == Never, Failure == Never { | |
| /// Suspends the current task for at least the given duration in seconds. | |
| /// Throws if the task is cancelled while suspended. | |
| /// - Parameter seconds: The sleep duration in seconds. | |
| static func sleep(seconds: TimeInterval) async throws { | |
| try await Task.sleep(nanoseconds: UInt64(seconds * 1_000_000_000)) | |
| } | |
| } |
A dump of the SwiftUI.framework binary for the iOS simulator (as of Xcode 12.0 beta 2) using the swift-reflection-dump tool.
Note: I used a Swift 5.3 compiler build from a few weeks ago that I had laying around. Because of ABI stability, I don't think the swift-reflection-dump version has to match the compiler version that was used to build the binary, but I'm not 100% sure.
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
| // | |
| // AddRef.swift | |
| // RxSwift | |
| // | |
| // Created by Junior B. on 30/10/15. | |
| // Copyright © 2015 Krunoslav Zaher. All rights reserved. | |
| // | |
| final class AddRefSink<Observer: ObserverType> : Sink<Observer>, ObserverType { |
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 subprocess | |
| def looksLikeBeginning(doc,seg,adr): | |
| if isinstance(seg.getNameAtAddress(adr), str): | |
| label = seg.getNameAtAddress(adr) | |
| pos = label.find("_T") | |
| if pos != -1: | |
| return label[pos:] | |
| return None |
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
| protocol ScopeFunc {} | |
| extension ScopeFunc { | |
| @inline(__always) func apply(block: (Self) -> ()) -> Self { | |
| block(self) | |
| return self | |
| } | |
| @inline(__always) func letIt<R>(block: (Self) -> R) -> R { | |
| return block(self) | |
| } | |
| } |
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
| #!/bin/bash | |
| # | |
| # Combines *.swift files into a single file. Used in Xcode to build a single swift distributive file. | |
| # | |
| # Here is how to use it in Xcode: | |
| # | |
| # 1. Create an "External build system" target. | |
| # 2. Click "Info" tab in target settings. | |
| # 3. In "Build Tool" field specify the path to this script file, for example: $PROJECT_DIR/scripts/concatenate_swift_files.sh |
NewerOlder