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
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| namespace Algo | |
| { | |
| internal class Program | |
| { | |
| public static void Main() |
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
| SET NOCOUNT ON | |
| CREATE TABLE [Users] | |
| ( | |
| [Id] INT PRIMARY KEY IDENTITY(1,1) | |
| , [Name] VARCHAR(50) NOT NULL | |
| ) | |
| GO |
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
| IF (object_id('Matrix') is not null) | |
| DROP TABLE Matrix; | |
| GO | |
| CREATE TABLE Matrix | |
| ( | |
| SOURCE VARCHAR(50) | |
| , DEST VARCHAR(50) | |
| , COST MONEY |
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
| // netcoreapp3.1 | |
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| namespace Jerry | |
| { | |
| class Program |
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
| @using Microsoft.AspNetCore.Components.Rendering | |
| <EditForm Model="@Model"> | |
| <InputSelect class="form-control" @bind-Value="Model.Selection"> | |
| @{ MakeOption(__builder, "John"); } | |
| @{ MakeOption(__builder, "Jack"); } | |
| @{ MakeOption(__builder, "Mark"); } | |
| </InputSelect> |
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
| @page "/" | |
| <EditForm Model="@Model"> | |
| First | |
| <InputSelect @bind-Value="Model.First" class="form-control" @oninput="FirstChanged"> | |
| @foreach (var item in FirstList) | |
| { | |
| <option value="@item">@item</option> | |
| } |
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
| drop table if exists parent | |
| create table parent | |
| ( | |
| id int primary key identity(1,1), | |
| name varchar(50) | |
| ) | |
| insert into parent (name) values ('sue'), ('michael'), ('sandy'), ('doug') | |
| drop table if exists child | |
| create table child |
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
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Xunit; | |
| namespace PlaygroundXunit | |
| { | |
| public class UnitTest1 | |
| { | |
| [Theory] |
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
| declare @ms bigint = 123456789; | |
| declare @start datetime = '1/1/2000'; | |
| declare @date datetime = dateadd(millisecond, @ms, @start); | |
| declare @day_diff int = datediff(day, @start, @date); | |
| declare @time time = cast(@date as time); | |
| declare @value varchar(max) = concat( | |
| @day_diff, ' Day(s) ', | |
| format(@time, 'hh'), ' Hour(s) ', |
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
| [*.cs] | |
| # Indentation and spacing | |
| indent_size = 4 | |
| indent_style = space | |
| # New line preferences | |
| end_of_line = crlf | |
| insert_final_newline = false |