just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
| import SwiftUI | |
| import Charts | |
| import Combine | |
| import Foundation | |
| final class GameState: ObservableObject { | |
| struct Player { | |
| var position: Int | |
| var halfSize: Int = 150 |
| # Change the variables MY_ID and SERVER_FILE_PATH, and run this file | |
| # The summary will be generated as soon as a game starts | |
| import sys | |
| import time | |
| import os | |
| import re | |
| import requests | |
| from multiprocessing import Pool | |
| from watchdog.observers import Observer | |
| from watchdog.events import FileSystemEventHandler |
just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
| // This file is an abstract representation of code that I use extensively in my apps | |
| // for constructing and maintaining views. The reason the `private` keyword is used here | |
| // is to control the interface between two entities (a function and a class) which typically | |
| // reside in the same file. | |
| // | |
| // The function and the class implement a View-Binding and a View-Model. The two are largely | |
| // representations of the *same* concepts – the latter from data perspective and the former | |
| // from a view-infrastructure perspective. Their inter-relatedness makes it highly desirable to | |
| // place them both in the same file – they may share many small types between them and they | |
| // are perpetually co-evolving. |
| AddressBookUI.framework | |
| ( | |
| "com.apple.people-picker" | |
| ) | |
| AudioToolbox.framework | |
| ( | |
| "com.apple.AudioUnit", | |
| "com.apple.AudioUnit-UI" |
| # coding: utf-8 | |
| from UIKit import * | |
| from Foundation import * | |
| from ctypes import * | |
| libobjc = CDLL('/usr/lib/libobjc.dylib') | |
| QLPreviewController = ObjCClass('QLPreviewController') |
| // Copyright © 2015 Indragie Karunaratne. All rights reserved. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // | |
| // The above copyright notice and this permission notice shall be included in |
| // uses PriorityQueue from https://github.com/mauriciosantos/Buckets-Swift | |
| protocol Pathfinding { | |
| typealias Node: Hashable | |
| func neighborsFor(node: Node) -> [Node] | |
| func costFrom(from: Node, to: Node) -> Int | |
| func heuristicFrom(from: Node, to: Node) -> Int | |
| } |
| /* How to Hook with Logos | |
| Hooks are written with syntax similar to that of an Objective-C @implementation. | |
| You don't need to #include <substrate.h>, it will be done automatically, as will | |
| the generation of a class list and an automatic constructor. | |
| %hook ClassName | |
| // Hooking a class method | |
| + (id)sharedInstance { |
LLDB comes with a great set of commands for powerful debugging.
Your starting point for anything. Type help to get a list of all commands, plus any user installed ones. Type 'help for more information on a command. Type help to get help for a specific option in a command too.