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 | |
import WebKit | |
struct ContentView: View { | |
var body: some View { | |
Webview(url: URL(string: "https://google.com")!) | |
} | |
} | |
struct Webview: UIViewRepresentable { |
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 | |
import CollectionConcurrencyKit | |
enum FuzzySearch { | |
/// Searches an array of view models for occurrences of a fuzzy search query. | |
/// | |
/// This function takes a fuzzy search `query` and an array of `URL`s, and returns a new array that contains only | |
/// those url's that match the query. | |
/// The function uses the `score` function to calculate a score for each url and | |
/// includes only those url's whose scores are greater than 0.0. |
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 | |
/// FuzzySearchCharacters is used to normalise strings | |
struct FuzzySearchCharacter { | |
let content: String | |
// normalised content is referring to a string that is case- and accent-insensitive | |
let normalisedContent: String | |
} | |
/// FuzzySearchString is just made up by multiple characters, similar to a string, but also with normalised characters |
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
#![allow(unused)] // silence unused warnings while exploring (to comment out) | |
use std::{error::Error, str}; | |
use s3::bucket::Bucket; | |
use s3::creds::Credentials; | |
use s3::region::Region; | |
use s3::BucketConfiguration; | |
// Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8 |