xcrun simctl delete unavailablexcrun simctl --set previews delete unavailable| // | |
| // Localization.swift | |
| // | |
| // | |
| // Created by Fausto Ristagno on 11/02/24. | |
| // | |
| import SwiftUI | |
| public struct PhraseKey : Hashable, RawRepresentable, ExpressibleByStringLiteral { |
| extension OperationQueue { | |
| /// Creates a debounced function that delays invoking `action` until after `delay` seconds have elapsed since the last time the debounced function was invoked. | |
| /// | |
| /// - Parameters: | |
| /// - delay: The number of seconds to delay. | |
| /// - underlyingQueue: An optional background queue to run the function | |
| /// - action: The function to debounce. | |
| /// - Returns: Returns the new debounced function. | |
| open class func debounce(delay: TimeInterval, underlyingQueue: DispatchQueue? = nil, action: @escaping () -> Void) -> (() -> Void) { |
| self.tabBar.snp_makeConstraints { (make) -> () in | |
| make.width.equalTo(68.0) | |
| make.top.equalTo(s.snp_top) | |
| make.bottom.equalTo(s.snp_bottom) | |
| make.leading.equalTo(s.snp_leading) | |
| } | |
| self.tabView.snp_makeConstraints { (make) -> () in | |
| make.top.equalTo(s.snp_top) | |
| make.bottom.equalTo(s.snp_bottom) |
| <?php | |
| $file = '/path/to/file.png'; | |
| $filename = basename($file); | |
| $upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
| if (!$upload_file['error']) { | |
| $wp_filetype = wp_check_filetype($filename, null ); | |
| $attachment = array( | |
| 'post_mime_type' => $wp_filetype['type'], | |
| 'post_parent' => $parent_post_id, |