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; | |
namespace adventofcode | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
var input = System.IO.File.ReadAllLines("input.txt"); |
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>cws</Title> | |
<Shortcut>cws</Shortcut> | |
<Description>Code snippet for Console.WriteLine with String interpolation</Description> | |
<Author>Microsoft Corporation/lennartb</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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>cws</Title> | |
<Shortcut>cws</Shortcut> | |
<Description>Code snippet for Console.WriteLine with String Interpolation</Description> | |
<Author>Microsoft Corporation/lennartb</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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 SwitchActiveInactive() { | |
GetDisplayInfo(); | |
// Negative x numbers = left | |
ddInactive.dmPosition.x = -1920; | |
ddInactive.dmPosition.y = 0; | |
ddInactive.dmFields = DM.Position; | |
var res = ChangeDisplaySettingsEx( | |
szInactiveDeviceName, | |
ref ddInactive, | |
IntPtr.Zero, |
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; | |
namespace GameOfLife { | |
public class LifeSimulation { | |
private int Heigth; | |
private int Width; | |
private bool[,] cells; | |
/// <summary> |