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
------------------------------------- | |
Translated Report (Full Report Below) | |
------------------------------------- | |
Incident Identifier: DBCFED02-37DF-4767-8900-50281E1B16B7 | |
CrashReporter Key: 9C79CDBA-3A30-E13D-6B64-B7BA4A49D46E | |
Hardware Model: MacBookPro18,4 | |
Process: AccessibilityUIServer [31288] | |
Path: /Applications/Xcode-14.1.0-Beta.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/AccessibilityUIServer.app/AccessibilityUIServer | |
Identifier: com.apple.AccessibilityUIServer |
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 SwiftUI | |
public struct RefreshableScrollView<Content, Value>: View where Content: View { | |
private let content: () -> Content | |
private let action: () async -> Value | |
init(@ViewBuilder content: @escaping () -> Content, action: @escaping () async -> Value) { | |
self.content = content | |
self.action = action | |
} |
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 Foundation | |
@propertyWrapper | |
struct IgnoreEquatable<Wrapped>: Equatable { | |
var wrappedValue: Wrapped | |
static func == (lhs: IgnoreEquatable<Wrapped>, rhs: IgnoreEquatable<Wrapped>) -> Bool { | |
true | |
} | |
} |
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
// Instantiating view controllers from a storybaord | |
let myStoryboard: UIStoryboard = ... | |
let myCustomViewController: MyCustomViewController = myStoryboard.instantiateViewControllerOfType(MyCustomViewController.self) | |
// Registration of a UITableViewCell | |
tableView.register(MyCustomCellType.self) | |
// Dequeueing of a UITableViewCell | |
let cell = tableView.dequeueReusableCell(for: indexPath) as MyCustomCellType | |
// Registration of a UICollectionViewCell |
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
opt_in_rules: | |
- empty_count | |
- missing_docs | |
- redundant_nil_coalescing | |
- switch_case_on_newline | |
- nimble_operator | |
- force_unwrapping | |
- conditional_returns_on_newline | |
- closure_spacing | |
included: |
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
# schedule = mapping function from time to temperature | |
func SIMULATED_ANNEALING(problem, schedule) | |
current <- MAKE_NODE(problem.INITIAL_STATE) | |
for t = 1 to INF do | |
T <- schedule(t) | |
if T = 0 then return current | |
next <- randomly selected successor of current | |
deltaE <- next.VALUE - current.VALUE | |
if deltaE > 0 then current <- next |
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
func HILL_CLIMBING(problem): | |
current <- MAKE_NODE(problem.INITIAL_STATE) | |
loop do: | |
neighbor <- highest valued successor of current | |
if neighbor.VALUE <= current.VALUE then return current.STATE | |
current <- neighbor |
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
ways to arrange 8 queens on an 8x8 board = | |
ways to arrange 8 queens on an 8x8 board with queen at (7,0) | |
ways to arrange 8 queens on an 8x8 board with queen at (7, 1) | |
ways to ... with queen at (7, 2) | |
ways to ... with queen at (7, 3) | |
ways to ... with queen at (7, 4) | |
ways to ... with queen at (7, 5) | |
ways to ... with queen at (7, 6) | |
ways to ... with queen at (7, 7) | |
= 8 branches |