This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) | |
| pragma solidity ^0.8.0; | |
| /** | |
| * @dev Contract module that helps prevent reentrant calls to a function. | |
| * | |
| * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier | |
| * available, which can be applied to functions to make sure there are no nested |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) | |
| pragma solidity ^0.8.0; | |
| /** | |
| * @dev Contract module that helps prevent reentrant calls to a function. | |
| * | |
| * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier | |
| * available, which can be applied to functions to make sure there are no nested |
This file contains hidden or 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
| const { join } = require('path'); | |
| const { readdirSync, renameSync } = require('fs'); | |
| const [dir, search, replace] = process.argv.slice(2); | |
| const match = RegExp(search, 'g'); | |
| const files = readdirSync(dir); | |
| files | |
| .filter(file => file.match(match)) | |
| .forEach(file => { | |
| const filePath = join(dir, file); |
This file contains hidden or 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 SwiftUI | |
| struct ContentView: View { | |
| @State private var bounds: Bounds = .zero | |
| var body: some View { | |
| VStack { | |
| controls | |
| scrollArea |
This file contains hidden or 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 SwiftUI | |
| struct ContentView: View { | |
| @State private var bounds: Bounds = .zero | |
| var body: some View { | |
| VStack { | |
| controls | |
| scrollArea |
This file contains hidden or 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
| Process: Telegram [1693] | |
| Path: /private/var/folders/*/Telegram.app/Contents/MacOS/Telegram | |
| Identifier: ru.keepcoder.Telegram | |
| Version: 5.7 (181147) | |
| Code Type: X86-64 (Native) | |
| Parent Process: ??? [1] | |
| Responsible: Telegram [1693] | |
| User ID: 501 | |
| Date/Time: 2019-09-15 13:55:35.657 +0300 |
This file contains hidden or 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
| Process: Telegram [1297] | |
| Path: /Applications/Telegram.app/Contents/MacOS/Telegram | |
| Identifier: ru.keepcoder.Telegram | |
| Version: 5.6.1 (179691) | |
| App Item ID: 747648890 | |
| App External ID: 832350520 | |
| Code Type: X86-64 (Native) | |
| Parent Process: ??? [1] | |
| Responsible: Telegram [1297] | |
| User ID: 501 |
This file contains hidden or 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
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains hidden or 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
| /// RepeatingTimer mimics the API of DispatchSourceTimer but in a way that prevents | |
| /// crashes that occur from calling resume multiple times on a timer that is | |
| /// already resumed (noted by https://github.com/SiftScience/sift-ios/issues/52 | |
| class RepeatingTimer { | |
| let timeInterval: TimeInterval | |
| init(timeInterval: TimeInterval) { | |
| self.timeInterval = timeInterval | |
| } |
This file contains hidden or 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
| extension UIView { | |
| func addConstaintsToPinHorizontalEdgesToSuperView(padding: CGFloat = 0) { | |
| prepareForConstraints() | |
| self.superview!.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-(padding)-[view]-(padding)-|", | |
| options: NSLayoutFormatOptions(0), | |
| metrics: ["padding":padding], | |
| views: ["view":self])) | |
| } | |
| func addConstaintsToPinVerticalEdgesToSuperView(padding: CGFloat = 0) { |