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.IO; | |
using Windows.UI.Xaml; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Media; | |
using Windows.UI.Xaml.Media.Imaging; | |
using SkiaSharp; | |
namespace Microcharts.Uwp | |
{ |
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 SocketExtensions | |
{ | |
public static Task ConnectExAsync(this Socket socket, string host, int port, CancellationToken cancellationToken = default) | |
{ | |
var xCompletion = new TaskCompletionSource<bool>(); | |
socket.BeginConnect(host, | |
port, | |
r => | |
{ | |
try |
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
<Styles xmlns="https://github.com/avaloniaui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:sys="clr-namespace:System;assembly=mscorlib"> | |
<Style Selector="Button.Round"> | |
<Setter Property="Template"> | |
<ControlTemplate> | |
<Border CornerRadius="8" Background="{TemplateBinding Background}"> | |
<ContentPresenter Content="{TemplateBinding Content}"/> |
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; | |
using System.Text; | |
using System.Threading.Tasks; | |
using TerWoord.Framework.Contracts.JetBrains.Annotations; | |
namespace TerWoord.Framework | |
{ |
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-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
cinst fiddler4 | |
cinst git-credential-winstore | |
cinst console-devel | |
cinst sublimetext2 | |
cinst poshgit | |
cinst dotpeek |
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
int i = 1; | |
Action<string> x = s => Console.WriteLine("i = {0}, s = '{1}'", i, s); | |
x("Hello, World"); | |
i = 2; | |
x("Hello, World"); | |
IL: | |
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
System.Reflection.TargetInvocationException was unhandled | |
HResult=-2146232828 | |
Message=Exception has been thrown by the target of an invocation. | |
Source=mscorlib | |
StackTrace: | |
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) | |
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) | |
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) | |
at System.Activator.CreateInstance[T]() | |
at Avalonia.Controls.AppBuilder.Start[TMainWindow]() |
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
IL_0000: nop | |
IL_0001: ldarg.0 | |
IL_0002: call UserQuery.DoIt | |
IL_0007: pop | |
IL_0008: ret | |
DoIt: | |
IL_0000: nop | |
IL_0001: ldc.i4.0 | |
IL_0002: stloc.0 // result |
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 (var xTarget = DataTarget.LoadCrashDump(@"e:\email.dmp")) | |
{ | |
Console.WriteLine("Available clr versions:"); | |
foreach (var xClrVersion in xTarget.ClrVersions) | |
{ | |
Console.WriteLine(" - {0}", xClrVersion.Version); | |
} | |
if (xTarget.PointerSize != IntPtr.Size) | |
{ |
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
//Go through all the arguments | |
foreach (var argument in tmpStringArray) | |
{ | |
//If the argument starts with the variable tag then.... | |
if (argument.StartsWith(variableTag)) | |
{ | |
//Go through all the variables | |
foreach (var variable in variables) | |
{ | |
//Check if the variable is valid |
NewerOlder