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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:zones="clr-namespace:LostTech.Stack.Zones;assembly=Stack" | |
xmlns:system="clr-namespace:System;assembly=mscorlib" | |
mc:Ignorable="d" | |
zones:Layout.Version="2" | |
Width="1024" Height="576" |
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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:zones="clr-namespace:LostTech.Stack.Zones;assembly=Stack" | |
mc:Ignorable="d" | |
Width="1024" Height="576" | |
d:DesignWidth="1024" | |
d:DesignHeight="576" |
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
<zones:Zone.Style> | |
<Style> | |
<Style.Triggers> | |
<DataTrigger Binding="{Binding IsChecked, ElementName=StackLeftSide}" Value="True"> | |
<Setter Property="zones:Zone.Layout"> | |
<Setter.Value> | |
<ItemsPanelTemplate> | |
<UniformGrid Columns="1" /> | |
</ItemsPanelTemplate> | |
</Setter.Value> |
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
<zones:Zone.Style> | |
<Style> | |
<Style.Triggers> | |
<DataTrigger Binding="{Binding IsChecked, ElementName=StackLeftSide}" Value="True"> | |
<Setter Property="zones:Zone.Layout"> | |
<Setter.Value> | |
<ItemsPanelTemplate> | |
<UniformGrid Columns="1" /> | |
</ItemsPanelTemplate> | |
</Setter.Value> |
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
>>> class MyList(list): | |
... def __getitem__(self, idx): | |
... print('hello') | |
... return super().__getitem__(idx) | |
... | |
>>> l = MyList() | |
>>> l.append(42) | |
>>> l[0] | |
hello | |
42 |
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
class List: | |
def add(self, item): ... | |
class ListMixin: | |
def append(self, item): return self.add(item) | |
def mix_in(target_type, mixin): | |
??? | |
mix_in(List, ListMixin) |
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
namespace Inline_vs_Static_Readonly | |
{ | |
using System; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Jobs; | |
using BenchmarkDotNet.Running; | |
[SimpleJob(RuntimeMoniker.Net48)] | |
[SimpleJob(RuntimeMoniker.Mono)] | |
[SimpleJob(RuntimeMoniker.NetCoreApp31)] | |
public class InlineOrStaticReadonly |
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 Python.Runtime; | |
class MyNonGenericTree | |
{ | |
} | |
PyTypeConversion<MyNonGenericTree>.Converter = tree => ...; | |
class MyTree<T> | |
{ |
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
namespace FormattingTest | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.Formatting; |
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
// License: MIT | |
using System; | |
using System.Collections.Concurrent; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
public class LifeSpanTreadmill: IDisposable | |
{ |