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 | |
| public extension View { | |
| @available(iOS, obsoleted: 15.0, message: "SwiftUI.View.task is available on iOS 15.") | |
| @_disfavoredOverload | |
| @inlinable func task( | |
| priority: _Concurrency.TaskPriority = .userInitiated, | |
| @_inheritActorContext _ action: @escaping @Sendable () async -> Swift.Void | |
| ) -> some SwiftUI.View { |
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
| // | |
| // LikeView.swift | |
| // lottie-first | |
| // | |
| // Created by Matthew Young on 12/31/22. | |
| // | |
| import SwiftUI | |
| import Lottie |
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
| #!/usr/bin/swift | |
| // Swift script to search for Bonjour services on the local network. | |
| // Found services are printed to the console. | |
| import Foundation | |
| import CoreFoundation | |
| // Inner search, finds services of a particular type |
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
| // | |
| // PlainHorizontalProgressBar.swift | |
| // | |
| // Created by Julia Nikitina on 23.05.2020. | |
| // Copyright © 2020 Julia Nikitina. All rights reserved. | |
| // | |
| import UIKit | |
| @IBDesignable | |
| final class PlainHorizontalProgressBar: UIView { |
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
| * Correct localization on Android 7 | |
| Prior to Android 7, the system had a single preferred locale, and fallback | |
| behavior was quite rudimentary. Starting with Android 7, the user can now | |
| specify a priority list of locales, and [[https://developer.android.com/guide/topics/resources/multilingual-support.html][fallback behavior is improved]]. | |
| However, in many cases it is still surprisingly difficult to make full use of | |
| locale fallback, and there are some hidden gotchas when trying to fully support | |
| both Android 7 and earlier versions. |
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
| public class SpaceItemDecoration : RecyclerView.ItemDecoration | |
| { | |
| private readonly bool _addSpaceFirstItem; | |
| private readonly bool _addSpaceLastItem; | |
| private readonly int _space; | |
| public SpaceItemDecoration(int space, bool addSpaceFirstItem, bool addSpaceLastItem) | |
| { | |
| _space = space; | |
| _addSpaceFirstItem = addSpaceFirstItem; |
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
| body{ | |
| background: #B3E5FC; | |
| } | |
| #wrapper{ | |
| height: 615px; | |
| width: 800px; | |
| background: #B3E5FC; | |
| margin: 0 auto; | |
| } |
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
| // Code should be so expressive that comment should not be needed to understand the code | |
| //task 1 | |
| function calculateAge(birthYear, currentYear){ | |
| var currentYear = currentYear; | |
| var birthYear = birthYear; | |
| var age = currentYear - birthYear; | |
| alert("You are either " + age + " or " + age); | |
| } |
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
| <!DOCTYPE HTML> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>JavaScript exercises</title> | |
| <script type="text/javascript" src="script.js"></script> | |
| <link rel="stylesheet" type="text/css" href="style.css" media="all" /> | |
| </head> | |
| <body> | |
| <div id="wrapper"> |