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
| // | |
| // Day15.swift | |
| // AdventOfCode2022 | |
| // | |
| // Created by carlynorama on 12/15/22. | |
| import Foundation | |
| let testData = "day15_testinput" |
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 UIKit | |
| let stringA = " 1 2 3 4 5 6 7 8 9" | |
| let stringB = "[F] [R] [C] [F] [L] [Q] [F] [D] [P]" | |
| let matches = stringA.matches(of: /\b[0-9]+\b/) | |
| for match in matches { |
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 Traveler: Codable, Identifiable { | |
| let firstName: String | |
| let middleName: String? | |
| let familyName: String | |
| var id:String { | |
| "\(familyName), \(firstName)" |
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
| # Simple workflow for deploying static content to GitHub Pages | |
| name: Deploy static content to Pages | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - 'Output/**' |
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
| name: Deploy Project | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| mytests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get code | |
| uses: actions/checkout@v3 | |
| - name: Install NodeJS | |
| uses: actions/setup-node@v3 |
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 whatDoIHave:String { | |
| let mirror = Mirror(reflecting: self) | |
| var itemsToDisplay:[String] = [] | |
| for child in mirror.children { | |
| //print("key: \(child.label), value: \(child.value)") | |
| if child.value is ExpressibleByNilLiteral { | |
| let typeDescription = object_getClass(child.value)?.description() ?? "" | |
| if !typeDescription.contains("Null") && !typeDescription.contains("Empty") { | |
| itemsToDisplay.append(child.label ?? "no_key") |
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
| // | |
| // ContentView.swift | |
| // HTMLTests | |
| // | |
| // Created by Carlyn Maw on 10/30/22. | |
| // | |
| //https://www.hackingwithswift.com/example-code/uikit/how-to-load-a-html-string-into-a-wkwebview-or-uiwebview-loadhtmlstring | |
| //https://developer.apple.com/forums/thread/682431 | |
| //https://developer.apple.com/documentation/foundation/attributedstring |
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
| // | |
| // ResponseService.swift | |
| // NetworkingExample | |
| // | |
| // Created by Carlyn Maw on 10/29/22. | |
| // | |
| import Foundation | |
| enum RequestServiceError:Error, CustomStringConvertible { |
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 Foundation | |
| import SwiftUI | |
| actor TestService { | |
| static let shared = TestService() | |
| @MainActor @Published var counter:Int = 0 { |