git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |
const functions = require('firebase-functions'); | |
const TelegramBot = require('node-telegram-bot-api'); | |
const token = "***" | |
const chatID = 1024 // your telegram id, you must first send a message to your bot | |
exports.notifyIAP = functions.analytics.event('in_app_purchase').onLog((event) => { | |
const purchaseValue = event.valueInUSD; | |
if (purchaseValue > 0) { | |
const bot = new TelegramBot(token, {polling: false}); |
// Created by Baye Wayly on 2020/3/13. | |
// Copyright © 2020 Baye. All rights reserved. | |
import SwiftUI | |
struct Measure<Content: View>: View { | |
@State var cost: TimeInterval = 0 | |
var content: Content | |
init(@ViewBuilder builder: () -> Content) { |
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
extension Notification { | |
struct UserInfoKey<ValueType>: Hashable { | |
let key: String | |
} | |
struct Rule { | |
let index1: Int | |
let index2: Int | |
let index3: Int | |
let result: (_ value1: Int, _ value2: Int, _ value3: Int) -> Int | |
} | |
let rules: [Rule] = { | |
var rules: [Rule] = [] |
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | |
let text = collections[indexPath.row].name | |
let width = UILabel.textWidth(font: titleFont, text: text) | |
return CGSize(width: width + left + right, height: height) | |
} |