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 SwiftUI | |
struct RichTextEditor: NSViewRepresentable { | |
@Binding var attributedText: NSAttributedString | |
@Binding var showInspector: Bool | |
var activity: PassthroughSubject<Date, Never> |
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
@main | |
struct TestApp: App { | |
@State var toggle = false | |
@State var other = true | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
.frame(minWidth: 1000, minHeight: 600) |
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
// | |
// DateView.swift | |
// | |
import SwiftUI | |
struct DateView: View { | |
enum Format: String { | |
/// "MM-dd-yyyy hh:mm a" |
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
// | |
// ContentView.swift | |
// Test5 | |
// | |
//import SwiftUI | |
// | |
//struct ContentView: View { | |
// var body: some View { | |
// Text("Hello, world!") |
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 | |
// Can be in another file | |
struct DataManager { | |
static let shared = DataManager() | |
static let defaultRegionCode = "US" |
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 | |
struct ContentView: View { | |
var body: some View { | |
ContactEditor() | |
.frame(width: 500) | |
} | |
} | |
struct ContactEditor: View { |
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
// | |
// ContentView.swift | |
// TestApp2 | |
// | |
import SwiftUI | |
struct ContentView: View { | |
let author = "Moderator" | |
let title = "Daily Tech Support Thread" |
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 usersFetchController() -> NSFetchedResultsController<FKUser> { | |
let fetcher: NSFetchRequest = FKUser.fetchRequest() | |
fetcher.sortDescriptors = [ NSSortDescriptor(key: "id", ascending: false) ] | |
return NSFetchedResultsController(fetchRequest: fetcher, managedObjectContext: viewContext, sectionNameKeyPath: nil, cacheName: nil) | |
} |
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
// | |
// UserData.swift | |
// | |
import Cocoa | |
import Combine | |
import ForumsKit | |
class UserData: NSObject, ObservableObject, NSFetchedResultsControllerDelegate { |
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
#lang racket | |
(require db) | |
(require web-server/servlet) | |
(require web-server/servlet-env) | |
(require web-server/managers/none) | |
(define auth-token "3d99fd86-f62b-4583-a14c-e1151b093569") | |
(define db-name "register.sqlite") |
NewerOlder