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
// NOTE: Though this works on my demo, be cautious when using this in production. | |
/// Provides a way to observe value changes in a closure using ``AsyncSequence``, | |
/// just like the [Observations](https://developer.apple.com/documentation/observation/observations) introduced in iOS 26 lineup. | |
/// | |
/// - Parameters: | |
/// - action: A closure that returns a value to observe. It must read one or more values in an object with `@Observable` macro. | |
/// - Returns: An `AsyncSequence` that yields the value returned by the action closure when it changes. | |
@available(iOS 17.0, macOS 14.0, *) | |
func observations<V>( |
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
// | |
// FloatingOverlayApp.swift | |
// FloatingOverlay | |
// | |
// Created by JuniperPhoton on 2025/3/12. | |
// | |
import SwiftUI | |
// Dependency: https://github.com/sindresorhus/KeyboardShortcuts |
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
/// Calculate the matrix for the linear RGB to CIE XYZ transformation. | |
/// | |
/// Example code to calcualte the matrix for sRGB: | |
/// | |
/// ```swift | |
/// let d65WhitePoint = [0.9505, 1.0, 1.0891] | |
/// | |
/// matrix = calculateLinearRGBToCIEXYZMatrix(xr: 0.64, yr: 0.33, | |
/// xg: 0.30, yg: 0.60, | |
/// xb: 0.1558, yb: 0.06, |
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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
namespace AdbTest { | |
class Program { | |
static void Main (string[] args) { | |
if (args.Length == 0) { | |
Console.WriteLine ("Please specified folder path"); | |
Environment.Exit (-1); |