本教程不保证它的权威性和正确性,也不对任何实践中的错误、数据丢失等问题负责!
本教程平台为 macOS, 其他系统请酌情参考
@ 2020/8/29
- 添加"介绍"
- 更新 TWRP 信息
| /** | |
| * MacEditorTextView | |
| * Copyright (c) Thiago Holanda 2020-2025 | |
| * https://bsky.app/profile/tholanda.com | |
| * | |
| * (the twitter account is now deleted, please, do not try to reach me there) | |
| * https://twitter.com/tholanda | |
| * | |
| * MIT license |
| protocol UIViewArrayConvertible { | |
| func items() -> [UIView] | |
| } | |
| extension UIView: UIViewArrayConvertible { | |
| func items() -> [UIView] { [self] } | |
| } | |
| extension Array: UIViewArrayConvertible where Element: UIView { | |
| func items() -> [UIView] { self } | |
| } |
| func zalgo(_ string: String, intensity: Int = 5) -> String { | |
| let combiningDiacriticMarks = 0x0300...0x036f | |
| let latinAlphabetUppercase = 0x0041...0x005a | |
| let latinAlphabetLowercase = 0x0061...0x007a | |
| var output: [UnicodeScalar] = [] | |
| for scalar in string.unicodeScalars { | |
| output.append(scalar) | |
| guard (latinAlphabetUppercase).contains(numericCast(scalar.value)) || | |
| (latinAlphabetLowercase).contains(numericCast(scalar.value)) |
| #import <Foundation/Foundation.h> | |
| #import "ffi.h" | |
| NSMutableArray *g_allocations; | |
| ffi_cif g_cif; | |
| ffi_closure *g_closure; | |
| void *g_replacement_invoke; | |
| void *g_origin_invoke; |
| #import <Foundation/Foundation.h> | |
| typedef struct __block_impl { | |
| void *isa; | |
| int Flags; | |
| int Reserved; | |
| void *FuncPtr; | |
| }__block_impl; | |
| typedef void(^GlobalBlock)(void); |
| public enum Direction { | |
| case forward | |
| case backward | |
| } | |
| internal var player: AVPlayer? | |
| private var isSeekInProgress = false | |
| private var chaseTime = kCMTimeZero | |
| private var preferredFrameRate: Float = 23.98 |
| import Foundation | |
| func machToNanoseconds(_ mach: UInt64) -> Double { | |
| struct Static { | |
| static var info: mach_timebase_info = { | |
| var info = mach_timebase_info() | |
| mach_timebase_info(&info) | |
| return info | |
| }() | |
| } |
| #import <AVFoundation/AVFoundation.h> | |
| @interface MLWAsyncAVPlayer : AVPlayer | |
| @end |
| #import <Foundation/Foundation.h> | |
| #import <pthread.h> | |
| #import <stdatomic.h> | |
| @interface AHDeadlockDetector () | |
| /** | |
| * The current detection thread, if one is running. We store this weakly because | |
| * if the thread has exited, why keep it around? In practice however, we nil |