This file contains 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
// This source is under MIT license. | |
import UIKit | |
extension UIAlertAction { | |
public var isEnabled: Bool { | |
get { return value(forKey: "enabled") as! Bool } | |
set { setValue(newValue, forKey: "enabled") } | |
} | |
public var isChecked: Bool { |
This file contains 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
obs = obslua | |
source_name = "" | |
tick = 1000 | |
last_text = "" | |
format = "" | |
activated = false | |
local s_unit = 1000 * 1000 * 1000 -- [ns] |
This file contains 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
// Copyright (C) 2023 mntone | |
// This source code is licensed under the MIT license. | |
// [Example] | |
// import { Localize } from './Localize' | |
// | |
// const message = Localize.required({ | |
// fieldName: this.#fieldName, | |
// }) | |
// |
This file contains 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
// MIT: Copyright (C) 2023 mntone. All rights reserved. | |
const fs = require('fs') | |
const path = require('path') | |
const http = require('http') | |
const port = 80 | |
const dirPublic = './' | |
const indexFile = 'index.html' | |
const service = (req, res) => { |
This file contains 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 runMP4box(files) { | |
const args = ['-dash', '2000', ...files, '-segment-name', 'seg', '-out', 'dash/test.mpd'] | |
console.log(args) | |
const mp4box = spawn('mp4box', args) | |
return mp4box | |
} | |
function runMP4boxAsPromise(files) { | |
return new Promise(resolve => { | |
const mp4box = runMP4box(files) |
This file contains 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
IID_IVirtualDesktopAccessibility: 9975B71D-0A84-4909-BDDE-B455BBFA55C6 | |
IID_IVirtualDesktopManager: A5CD92FF-29BE-454C-8D04-D82879FB3F1B | |
IID_IVirtualDesktopNotificationService: 0CD45E71-D927-4F15-8B0A-8FEF525337BF | |
IID_IVirtualDesktopManagerInternal: B2F925B9-5A0F-4D2E-9F4D-2B1507593C10 | |
IID_IVirtualDesktopPinnedApps: 4CE81583-1E4C-4632-A621-07A53543148F | |
IID_IVirtualDesktopSwitcherHost: 1BE71764-E771-4442-B78F-EDA2C7F067F3 | |
IID_IVirtualDesktopSwitcherInvoker: 7A25165A-86F1-4B4A-B1D2-E89650CD9589 | |
IID_IVirtualDesktopNotification: CD403E52-DEED-4C13-B437-B98380F2B1E8 | |
IID_IVirtualDesktopHotkeyHandler: 71DB071A-44AE-4271-B9F6-01CFB6A12DEE | |
IID_IVirtualDesktopTabletModePolicyService: 56B32065-0BB3-42E2-975D-A559DE1316E8 |
This file contains 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 | |
enum EmphasizableToken { | |
case plain(String) | |
case toggleEmphasize | |
} |
This file contains 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
@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *) | |
func coloredPrimaryColor(localized: String.LocalizationValue) -> AttributedString { | |
var attributedString: AttributedString = AttributedString(localized: localized) | |
guard let firstBoldRange = attributedString.range(of: "**") else { return attributedString } | |
let orig: AttributedString = attributedString | |
attributedString.removeSubrange(firstBoldRange) | |
guard let nextBoldRange = attributedString.range(of: "**") else { return orig } | |
attributedString.removeSubrange(nextBoldRange) |
This file contains 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
#pragma once | |
#pragma pack(push, 1) | |
using int24_t = struct _int24_t | |
{ | |
int32_t data : 24; | |
_int24_t(int8_t integer) | |
: data(integer) | |
{ } | |
_int24_t(uint8_t integer) |
NewerOlder