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 | |
| set -euo pipefail | |
| # Benchmark the full `make build-app` and `make test-app` pipelines, | |
| # with per-phase timing for deps vs xcodebuild. | |
| # | |
| # Usage: | |
| # ./scripts/benchmark-build.sh <label> | |
| # | |
| # Examples: |
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
| ➜ argue git:(master) npx argue run --task "研究这个 issue 的解法:https://github.com/onevcat/argue/issues/22" --action "根据讨论结 果,实际解决这个issue,开PR" --verbose | |
| [argue] run started | |
| config: /Users/onevcat/.config/argue/config.json | |
| requestId: argue_1775868590900 | |
| task: 研究这个 issue 的解法:https://github.com/onevcat/argue/issues/22 | |
| agents: claude-agent, codex-agent | |
| rounds: 2..3 | composer: representative | |
| events: /Users/onevcat/.argue/output/argue_1775868590900/events.jsonl | |
| [argue] initial#0 dispatched -> claude-agent, codex-agent | |
| [argue] initial#0 codex-agent responded (claims+6, judgements=0, votes=0) |
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
| {"label":"Coverage","message":"61.4%","schemaVersion":1,"color":"yellow"} |
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 ContentView: View { | |
| @State var offset: CGFloat = 0.0 | |
| @State var previousOffset: CGFloat = 0.0 | |
| init() { | |
| let appearance = UINavigationBarAppearance() |
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
| ```swift | |
| actor GiftCache { | |
| private(set) var cachedGifts: [GiftId: CachedGift] = [:] | |
| // this method would be caller by other parts | |
| func add(gift: CachedGift) { | |
| cachedGifts[gift.giftId] = gift | |
| //... | |
| } | |
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/pointfreeco/swift-composable-architecture/discussions/488#discussioncomment-591715 | |
| @propertyWrapper | |
| public struct CoW<T> { | |
| private final class Ref { | |
| var val: T | |
| init(_ v: T) { val = v } | |
| } | |
| private var ref: Ref |
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 P: AnyObject { } | |
| class A: P {} | |
| Runtime.classes(conformTo: P.Type.self) // [MyApp.A] | |
| class Runtime { | |
| public static func allClasses() -> [AnyClass] { | |
| let numberOfClasses = Int(objc_getClassList(nil, 0)) | |
| if numberOfClasses > 0 { |
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 UIKit | |
| protocol DefaultValue { | |
| associatedtype Value: Decodable | |
| static var defaultValue: Value { get } | |
| } | |
| @propertyWrapper | |
| struct Default<T: DefaultValue> { | |
| var wrappedValue: T.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
| //: A UIKit based Playground for presenting user interface | |
| import UIKit | |
| import PlaygroundSupport | |
| public protocol TrafficLightOption { | |
| associatedtype Value | |
| /// 默认的选项值 | |
| static var defaultValue: Value { get } |
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 Combine | |
| import Foundation | |
| extension Publishers { | |
| struct ZipAll<Collection: Swift.Collection>: Publisher | |
| where Collection.Element: Publisher | |
| { | |
| typealias Output = [Collection.Element.Output] | |
| typealias Failure = Collection.Element.Failure |
NewerOlder