Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
SET NOCOUNT ON | |
CREATE TABLE #SparseTypes ( | |
[DataType] nvarchar(20), | |
[Percentage] int | |
) | |
-- Values from https://learn.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns | |
INSERT INTO #SparseTypes VALUES('bit', 98) | |
INSERT INTO #SparseTypes VALUES('tinyint', 86) | |
INSERT INTO #SparseTypes VALUES('smallint', 76) |
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
------------------------------------------------------------------------------- | |
-- Using linked IDs | |
------------------------------------------------------------------------------- | |
-- Create table | |
CREATE TABLE Categories ( | |
[Id] int IDENTITY NOT NULL, | |
[ParentId] int NULL, | |
[Name] nvarchar(100) NOT NULL, |
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
// Video: https://youtu.be/cdTu27j6dn8 | |
using System.Diagnostics; | |
using System.Text; | |
// Verify there are exactly 2 arguments and get source and destination folders | |
if (args.Length != 2) { | |
Console.WriteLine("Usage: mirror <source folder> <destination folder>"); | |
return; | |
} |
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
#include "M5CoreS3.h" | |
#include "M5UnitENV.h" | |
SHT3X sht3x; | |
QMP6988 qmp; | |
void setup() | |
{ | |
auto cfg = M5.config(); | |
CoreS3.begin(cfg); |
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 RoundedTimeProvider : TimeProvider { | |
// Private constructor to prevent direct instantiation | |
private RoundedTimeProvider() { } | |
// Factory methods for different precisions | |
public static RoundedTimeProvider NativePrecision(string? localTimeZoneName = null) => new() { | |
LocalTimeZoneInternal = localTimeZoneName == null ? TimeZoneInfo.Local : TimeZoneInfo.FindSystemTimeZoneById(localTimeZoneName), | |
RoundingFunction = x => x, |
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 sample code for the following video: https://youtu.be/36p2-gr_iYk | |
* The following NuGet packages are needed: | |
* Hangfire | |
* Hangfire.AspNetCore | |
* Hangfire.SqlServer | |
*/ | |
using Hangfire; | |
var builder = WebApplication.CreateBuilder(args); |
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
/* [Preview] */ | |
base_color = "#333"; | |
text_color = "#ddd"; | |
/* [Text] */ | |
// Displayed text | |
text = "ALTAIR"; | |
// Displayed text font | |
text_font = "Arial Rounded MT Bold"; | |
// Nominal font size |
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
/* [Tag options] */ | |
diameter = 30; | |
thickness = 2; | |
extrusion = 1; | |
rim_width = 1.67; | |
hole_diameter = 4; | |
/* [Plater options] */ | |
tag_start_number = 1; | |
tag_rows = 6; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Insert input model subclass</Title> | |
<Author>Michal A. Valasek</Author> | |
<Shortcut>imodel</Shortcut> | |
</Header> | |
<Snippet> | |
<Code Language="csharp" Delimiter="$"><![CDATA[[BindProperty] |
NewerOlder