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
| // | |
| // Color+Hex.swift | |
| // | |
| import SwiftUI | |
| extension Color { | |
| // MARK: - Private Helpers | |
| /// Parses a sanitized 6-digit hex string (RRGGBB) into normalized RGB components. | |
| /// - Parameter hexSanitized: Hex string without leading '#', must be exactly 6 characters. |
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
| // | |
| // DotPatternView.swift | |
| // x.com/mickces | |
| // | |
| // Created by mick on 4/27/25. | |
| // | |
| import SwiftUI | |
| public struct DotPatternView: View { |
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
| struct ThirdPartyDemoView: View { | |
| @State private var shouldAdd = true | |
| @State private var currentValue = 0 | |
| var body: some View { | |
| ThirdPartyReader { proxy in | |
| Text("\(currentValue)") | |
| ThirdPartyView(shouldAdd: shouldAdd) | |
| .viewChangedValueTo { view, newValue in | |
| currentValue = newValue |
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
| "use strict"; | |
| const fns = { | |
| gt: (a, b) => a > b, | |
| lt: (a, b) => a < b, | |
| eq: (a, b) => a === b, | |
| add: (a, b) => a + b, | |
| sub: (a, b) => a - b, | |
| mul: (a, b) => a * b, | |
| div: (a, b) => a / b, | |
| if: (cond, a, b) => (cond ? a : b), |
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
| function interpret(pgm: any): any { | |
| let isArray = Array.isArray(pgm); | |
| if (isArray) { | |
| let program = pgm as any[]; | |
| switch (program[0]) { | |
| case 'if': { | |
| let condition: boolean = interpret(program[1]); | |
| let trueValue = interpret(program[2]); | |
| let falseValue = interpret(program[3]); |
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
| // | |
| // SDWebImageManager.swift | |
| // Backbone | |
| // | |
| // Created by Winston Du on 1/8/20. | |
| // | |
| import Foundation | |
| import SDWebImage |
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
| // | |
| // Observable+RepeatWhenFixed.swift | |
| // Backbone | |
| // | |
| // Created by Winston Du on 1/16/21. | |
| import Foundation | |
| import RxSwift | |
| import RxSwiftExt |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="style.css"> | |
| </head> | |
| <body> | |
| <script type="text/javascript" src="out/bundle.js"></script> | |
| <div class="demo" style="text-align: center;"> | |
| <p>Chart Demo</p> | |
| <div class="chartcontainer"> |