Warning
The following guide need to disable SIP to work.
Please confirm the risk of disabling the SIP by yourself.
Another solution which does not require disabling SIP is currently under investigation.
Reboot into Recovery OS + Disable SIP
template<auto... Val> | |
struct List; | |
template<> | |
struct List<> { | |
template<auto Elem> | |
using Append = List<Elem>; | |
}; | |
template<auto Head, auto... _Rest> |
import Foundation | |
class Throttle { | |
private let queue: DispatchQueue | |
private let delay: Double | |
private var delayedBlock: (() -> Void)? | |
private var cancelBlock: (() -> Void)? | |
private var timer: DispatchSourceTimer? | |
private var isReady = true | |
private var hasDelayedBlock: Bool { delayedBlock != nil } |
/* | |
* A simple libpng example program | |
* http://zarb.org/~gc/html/libpng.html | |
* | |
* Modified by Yoshimasa Niwa to make it much simpler | |
* and support all defined color_type. | |
* | |
* To build, use the next instruction on OS X. | |
* $ brew install libpng | |
* $ clang -lz -lpng16 libpng_test.c |
// | |
// Created by rainyx on 2022/4/16. | |
// | |
#include "IRMaker.h" | |
using namespace llvm; | |
using namespace std; | |
static bool hasTerminator(BasicBlock *BB) { |
// A view that can flip between its "front" and "back" side. | |
// | |
// Animation implementation based on: | |
// Chris Eidhof, Keyframe animations <https://gist.github.com/chriseidhof/ea0e435197f550b195bb749f4777bbf7> | |
import SwiftUI | |
// MARK: - Chris's keyframe animation design | |
struct Keyframe<Data: Animatable> { |
import UIKit | |
protocol DefaultValue { | |
associatedtype Value: Decodable | |
static var defaultValue: Value { get } | |
} | |
@propertyWrapper | |
struct Default<T: DefaultValue> { | |
var wrappedValue: T.Value |
import UIKit | |
class CodeTextField: UITextField, UITextFieldDelegate { | |
let codeLength: Int | |
var characterSize: CGSize | |
var characterSpacing: CGFloat | |
let textPreprocess: (String) -> String | |
let validCharacterSet: CharacterSet |