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 Combine | |
import CoreFoundation | |
import CoreGraphics | |
import CoreText | |
import Darwin | |
import Foundation | |
import SwiftUI | |
import UIKit | |
import os.log | |
import os |
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
/// Similar to a `Binding`, but this is also observable/dynamic. | |
@propertyDelegate | |
@dynamicMemberLookup | |
final class Derived<A>: BindableObject { | |
let didChange = PassthroughSubject<A, Never>() | |
fileprivate var cancellables: [AnyCancellable] = [] | |
private let get: () -> (A) | |
private let mutate: ((inout A) -> ()) -> () | |
init(get: @escaping () -> A, mutate: @escaping ((inout A) -> ()) -> ()) { | |
self.get = get |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Use an AMD package here to gain access to nested internal modules. | |
require.config({ | |
packages: [{ | |
name: "jquery", | |
location: "vendor/jquery/src", | |
main: "index.js" | |
}] | |
}); | |
// If we are using AMD, we don't care about core. |
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
define([ | |
// jquery core is always required | |
'jquery/core', | |
// jquery utilities | |
'jquery/ajax', | |
'jquery/data' | |
], function(jq, ajax, data) { |
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
if (!HTMLVideoElement.prototype.canPlayType) { | |
HTMLVideoElement.prototype.canPlayType = function(type) { | |
return [ | |
"It is certain", | |
"It is decidedly so", | |
"Without a doubt", | |
"Yes definitely", | |
"You may rely on it", | |
"As I see it, yes", | |
"Most likely", |
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
// Basic Usage: | |
// | |
// var main = new Canvas({ elem: "canvas" }, function(options) { | |
// // Instantiate anything specific here... | |
// // Main draw loop | |
// this.draw = function() { | |
// | |
// }; | |
// }); | |
// |