I was referred to (https://medium.com/@wendyabrantes/swift-ui-square-image-modifier-3a4370ca561f). But this code only shows the left side, so I added a sentence to the author's code.
.frame(width: geometry.size.width, height: geometry.size.height)
| @startuml | |
| class User { | |
| id: String | |
| } | |
| class Shop { | |
| name: String | |
| imageID: String | |
| bussinessHours: BussinessHours | |
| owner: User | |
| products: <String: [Product]> |
| import UIKit | |
| class HomeViewController: UIViewController { | |
| private let uniqueKey: String = "hkjladjgaldkjakjl" | |
| ... | |
| override func viewWillAppear(_ animated: Bool) { | |
| super.viewDidLoad() | |
| Scheduler.shared.monitors.updateValue( self, forKey: uniqueKey) | |
| } |
| @startuml models | |
| class Article { | |
| title: string | |
| author: string | |
| text: string | |
| description: string | |
| publishedAt: Date | |
| imageURL: string | |
| } |
| import Foundation | |
| import FirebaseFirestoreSwift | |
| import FirebaseFirestore | |
| import Combine | |
| struct Document<Model: Codable> { | |
| let ref: DocumentReference | |
| let data: Model | |
| static func get(collectionPath: String, id: String) -> Deferred<Future<Document<Model>, Error>> { | |
| .init { () -> Future<Document<Model>, Error> in |
| import SwiftUI | |
| struct ContentView: View { | |
| var body: some View { | |
| GeometryReader { proxy in | |
| ScrollView(content: { | |
| VStack { | |
| Text("lorem ipsum").bold().font(.title2) | |
| TextView(text: """ | |
| https://ja.wikipedia.org/wiki/Lorem_ipsum |
I was referred to (https://medium.com/@wendyabrantes/swift-ui-square-image-modifier-3a4370ca561f). But this code only shows the left side, so I added a sentence to the author's code.
.frame(width: geometry.size.width, height: geometry.size.height)
| // | |
| // Ex+View.swift | |
| // OrangeJuice | |
| // | |
| // Created by tera_ny on 2021/05/09. | |
| // | |
| import SwiftUI | |
| extension View { |
| #include <stdio.h> | |
| int my_strlen(char* s) { | |
| int count = 0; | |
| while (s[count] != '\0') | |
| { | |
| count++; | |
| } | |
| return count; | |
| } |
| #include <stdio.h> | |
| char* my_strcpy(char* to, const char* from) { | |
| size_t i; | |
| for (i = 0; from[i] != '\0'; i++) { | |
| to[i] = from[i]; | |
| } | |
| to[i] = '\0'; | |
| return to; | |
| } |
| def simulate(csv, c): | |
| d_prev = 0 | |
| result_t = [] | |
| result_a = [] | |
| for row in csv: | |
| a_i = float(row[0]) | |
| l_i = float(row[1]) | |
| s_i = l_i*8/c | |
| d_i = max(d_prev, a_i) + s_i | |
| t_i = d_i - a_i |