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
Build Type: ret | |
Tool chain: | |
ilc.exe : 2.2.31116.00 built by: PROJECTNREL | |
nutc_driver.exe : 2.2.31116.00 built by: PROJECTNREL | |
rhbind.exe : 2.2.31116.0 built by: PROJECTNREL | |
sg.exe : 2.2.31116.00 built by: PROJECTNREL | |
Framework: | |
Activators.Implementation.dll : 11.2406.13.0 |
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
# Main | |
L0000 push rdi | |
L0001 push rsi | |
L0002 push rbp | |
L0003 push rbx | |
L0004 sub rsp, 0x58 | |
L0008 vzeroupper | |
L000b xor eax, eax | |
L000d mov [rsp+0x50], rax |
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
// https://stackoverflow.com/questions/76178746/finding-compound-words-in-a-text-file-of-150-000-words | |
Trie trie = new Trie(); // From NuGet `rm.Trie`: https://www.nuget.org/packages/rm.Trie | |
Stopwatch sw = Stopwatch.StartNew(); | |
// From https://github.com/dwyl/english-words/blob/master/words.txt | |
const String PATH = @".\english-words-400k.txt"; | |
// Pass 1: Population. |
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 System; | |
using System.Globalization; | |
public static class Program | |
{ | |
public static void Main() | |
{ | |
AReddishColor pink = new AReddishColor( r: 244, g: 189, b: 224 ); | |
Console.WriteLine( "pink: {0}", pink ); |
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 AddressDatabase | |
{ | |
public static AddressDatabase Instance { get; } = new AddressDatabase(); | |
private AddressDatabase() | |
{ | |
this.CountriesByAllNames = Country.Countries.SelectMany( c => c.AllNames.Select( n => ( country: c, name: n ) ) ).ToDictionary( t => t.name, t => t.country, StringComparer.OrdinalIgnoreCase ); | |
this.CountriesByIso31661Alpha2 = Country.Countries.ToDictionary( c => c.Iso31661Alpha2, StringComparer.OrdinalIgnoreCase ); | |
this.CountriesByIso31661Alpha3 = Country.Countries.ToDictionary( c => c.Iso31661Alpha3, StringComparer.OrdinalIgnoreCase ); |
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
CREATE VIEW dbadmin.Collations2 AS | |
-- https://learn.microsoft.com/en-us/sql/t-sql/statements/windows-collation-name-transact-sql?view=sql-server-ver16 | |
WITH withSubstrings AS ( | |
SELECT | |
c."name" AS "Name", | |
c."description" AS "Description", |
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
// Instructions: copy-and-paste this into Linqpad 6 or later (I used Linqpad 7). | |
void Main() | |
{ | |
List<TestResult> results = Run( includeArithmeticResults: false ).ToList().Dump(); | |
String markdownTable = GenerateMarkdownTable( results ); | |
Util.WithStyle( data: markdownTable, htmlStyle: "font-family: monospace;" ).Dump(); | |
} |
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"> | |
<!-- | |
Usage/installation instructions: | |
1. Save to a file `refine.snippet` somewhere (e.g. in `C:\Users\You\Documents\Visual Studio {year}\Code Snippets\Visual C#\My Code Snippets`). | |
* If saved outside your `Visual Studio {year}` folder, or if it isn't detected, add it manually via <kbd>Tools > Code Snippets Manager...</kbd> (Tip: ensure the top "Language" drop-down says "CSharp" as it defaults to ASP.NET for some reason). | |
2. To try it out, open a .cs file and move your cursor/caret to inside a `namespace`, then type the word "`refine`" and IntelliSense should list it as a snippet in the completion-list popup. | |
* If it doesn't appear despite being recognized by Code Snippets Manager ensure VS is configured to list Snippets in the code completion list (Tools > Options > Text Editor > C# > IntelliSense > Snippets behavior > "Always include snippets"). | |
3. Press <kbd>Tab</kbd> once or twice |
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
GO | |
CREATE TABLE dbo.ReservedWords ( | |
Word sysname NOT NULL | |
CONSTRAINT PK_ReservedWords PRIMARY KEY ( Word ) | |
); | |
GO |
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 LinqPad 6 script is for https://stackoverflow.com/a/70111165/159145 | |
<Query Kind="Program"> | |
<IncludePredicateBuilder>false</IncludePredicateBuilder> | |
<UseNoncollectibleLoadContext>true</UseNoncollectibleLoadContext> | |
</Query> | |
class NormalClass { } | |
class Generic<T> { } |
NewerOlder