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 static class DateTimeHelpers | |
{ | |
/// <summary> | |
/// Generates a list of dates representing the next week's dates starting from the upcoming Sunday. | |
/// </summary> | |
/// <returns>A list of <see cref="DateOnly"/> objects representing the dates of the next week.</returns> | |
public static List<DateOnly> NextWeeksDates() | |
{ | |
var start = DateTime.Now; | |
var nextSunday = DateOnly.FromDateTime(start).Next(DayOfWeek.Sunday); |
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 @TableName AS NVARCHAR(MAX) = 'Birthdays' | |
SELECT | |
X.COLUMN_NAME AS ColumnName, | |
X.ORDINAL_POSITION AS Position, | |
X.TABLE_CATALOG AS Catalog, | |
X.TABLE_SCHEMA AS TableSchema, | |
X.COLUMN_DEFAULT AS ColumnDefault, | |
X.DATA_TYPE AS DataType, | |
CASE | |
WHEN KCU.COLUMN_NAME IS NOT NULL THEN CAST(1 AS BIT) |
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
string firstLastName = "KarenPayne"; | |
var separated = firstLastName.SplitByCase(); |
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 static Version FrameworkRuntimeVersion() | |
{ | |
var assembly = typeof(System.Runtime.GCSettings).GetTypeInfo().Assembly; | |
var path = assembly.Location.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries); | |
var index = Array.IndexOf(path, "Microsoft.NETCore.App"); | |
return new Version((index > 0 && index < path.Length - 2 ? path[index + 1] : null)!); | |
} |
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
interface IInterface | |
{ | |
void DoSomething(); | |
} | |
class Implementation : IInterface | |
{ | |
public void DoSomething() | |
{ | |
// This method can't return a Task, |
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 NuGet.Common; | |
using NuGet.Configuration; | |
using NuGet.Frameworks; | |
using NuGet.Packaging; | |
using NuGet.Packaging.Core; | |
using NuGet.Packaging.Signing; | |
using NuGet.Protocol; | |
using NuGet.Protocol.Core.Types; | |
using NuGet.Resolver; | |
using NuGet.Versioning; |
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
<html> | |
<head> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
<script src="//ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script> | |
<!-- | |
TODO: |