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
@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
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
import CommonCrypto | |
import CryptoKit | |
import Foundation | |
protocol PinCodeFactory { | |
mutating func update(by timeStep: Int32) | |
mutating func update(by timeStep: Int32, at baseTime: Int32) | |
mutating func update(using counter: Int64) | |
mutating func getPincode(to digits: Int) -> Int32 |
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
typedef __m128i uint16x8_t; | |
template<> inline uint16x8_t uint16x8_swizzle<0, 1, 2, 3, 4, 5, 6, 7>(uint16x8_t a) { return a; } | |
static inline uint16x8_t _mm_alignr_epi8_sse2(uint16x8_t a, uint16x8_t b, int align) { | |
return _mm_or_si128(_mm_slli_si128(a, 16 - 2 * align), _mm_srli_si128(b, 2 * align)); | |
} | |
#if defined(_SIMD_X86_SSSE3) | |
template<> inline uint16x8_t uint16x8_swizzle<7, 0, 1, 2, 3, 4, 5, 6>(uint16x8_t a) { return _mm_alignr_epi8(a, a, 2); } |
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
#ifndef _SIMD_UINT16X4_H | |
#define _SIMD_UINT16X4_H | |
#include "simd_base.h" | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
// --- |
NewerOlder