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
# Suggested regular expression (RegEx) to check a SemVer string for BASH | |
# as described in https://semver.org/ | |
# Test here: https://regex101.com/r/qfrSak/1 | |
^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ |
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
{ | |
//... | |
"WeatherWidgetSettings": { | |
"OpenWeatherApiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXX" | |
}, | |
//... | |
} |
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 PriceSet | |
{ | |
[BsonId] | |
public Guid Id { get; init set; } | |
public decimal Price { get; init set; } | |
//... | |
} | |
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
[Obsolete($"Call {nameof(Discard)} instead")] |
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 Startup | |
{ | |
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
} | |
//... | |
public void ConfigureServices(IServiceCollection services) |
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 EarlyBindingSample | |
{ | |
public void RandomMethod() | |
{ | |
//... | |
} | |
} | |
var earlyBinding = new EarlyBindingSample(); |
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
var trainer = mlContext.BinaryClassification.Trainers | |
.AveragedPerceptron(labelColumnName: "Sentiment", featureColumnName: "Features")); | |
var trainingPipeline = dataTransformPipeline.Append(trainer); |
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 MariaDbContext : Microsoft.EntityFrameworkCore.DbContext | |
{ | |
public MariaDbContext(DbContextOptions<MariaDbContext> options) | |
: base(options) | |
{ | |
} | |
public virtual DbSet<WeatherForecastDataModel> WeatherForecasts { get; set; } | |
} |
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 void ConfigureServices(IServiceCollection services) | |
{ | |
//... | |
// Register the Swagger generator, defining 1 or more Swagger documents | |
services.AddSwaggerGen(); | |
//... | |
} |
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
# This is a sample Dockerfile for building and running ASP.NET Core applications | |
# This is part of the cheat sheet at https://blog.georgekosmidis.net/2020/06/12/docker-cheat-sheet-for-dotnet-core/ | |
# Pull ASP.NET Core 3.1 runtime and give the name 'base' | |
# More info on 'FROM' instruction here: https://docs.docker.com/engine/reference/builder/#from | |
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base | |
# Set the ports where the container listens at runtime | |
# More on the 'EXPOSE' instruction here: https://docs.docker.com/engine/reference/builder/#workdir | |
EXPOSE 80 |
NewerOlder