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
public partial class App : YourApp | |
{ | |
private static SettingsManager Manager = new SettingsManager("./settings.json"); | |
public static Settings Settings { get { return Manager.Settings; } } | |
... | |
} |
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 Combine | |
protocol JsonServiceProtocol { | |
var decoder: JSONDecoder { get } | |
var errorPublisher: PassthroughSubject<Error, Never> { get } | |
func publish(err: Error) | |
} | |
class BaseService: NSObject, JsonServiceProtocol { |
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 | |
extension Array where Element: Hashable { | |
var uniques: Array { | |
return Array(Set<Element>(self)) | |
} | |
} |
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
<# | |
The sample scripts are not supported under any Microsoft standard support | |
program or service. The sample scripts are provided AS IS without warranty | |
of any kind. Microsoft further disclaims all implied warranties including, | |
without limitation, any implied warranties of merchantability or of fitness for | |
a particular purpose. The entire risk arising out of the use or performance of | |
the sample scripts and documentation remains with you. In no event shall | |
Microsoft, its authors, or anyone else involved in the creation, production, or | |
delivery of the scripts be liable for any damages whatsoever (including, | |
without limitation, damages for loss of business profits, business interruption, |
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
dotnet new web -o Service1 | |
dotnet new web -o Service2 | |
dotnet new sln | |
dotnet sln add Service1 | |
dotnet sln add Service2 |
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
.post-body img { | |
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%); | |
} | |
img { | |
border: 0; | |
max-width: 100%; | |
height: auto; | |
vertical-align: middle; | |
} |
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
public class CustomLoggingScopeHttpMessageHandler : DelegatingHandler | |
{ | |
private readonly ILogger _logger; | |
public CustomLoggingScopeHttpMessageHandler(ILogger logger) | |
{ | |
_logger = logger ?? throw new ArgumentNullException(nameof(logger)); | |
} | |
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, |
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 MapKit | |
import PlaygroundSupport | |
struct FontContantsListView: View { | |
var body: some View { | |
VStack { | |
Section(header: Text("Font weights").font(.headline).padding()) { | |
List { | |
Text("\(String(describing: Font.Weight.black))").fontWeight(Font.Weight.black) |
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
// | |
// URLResponse+Extensions.swift | |
// | |
import Foundation | |
extension URLResponse { | |
var lastModifiedHeader: String? { | |
get { | |
if let httpResp = self as? HTTPURLResponse, let lastMod = httpResp.allHeaderFields["Last-Modified"] as? String { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder