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
AssemblyInfo, TypeParameters, Base, MemberType, Parameters, ReturnValue | |
{ | |
display: none; | |
} | |
TypeSignature { | |
display: block; | |
padding: 1em; | |
margin: 1em; | |
content: attr(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
create table Foo (data1 bit, data2 bit, data3 bit, seq int not null) | |
go | |
insert into Foo (data1, data2, data3, seq) | |
values (NULL, 0, 1, 1), (1, NULL, 0, 2), (0, 1, NULL, 3) | |
go | |
with unpivoted as ( | |
select seq, value, col | |
from (select seq, data1, data2, data3 from Foo) a |
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
void Main() | |
{ | |
int x = System.Net.IPAddress.HostToNetworkOrder((127 << 24) | 1); | |
var y = new System.Net.IPAddress(x); | |
Console.WriteLine(x); | |
Console.WriteLine(y); | |
} |
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
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" auto-import="true" default-cascade="none" default-lazy="true"> | |
<class xmlns="urn:nhibernate-mapping-2.2" name="ValueMapping.Fob, ValueMapping, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" table="`Fob`"> | |
<id type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |
<column name="id" /> | |
<generator class="native" /> | |
</id> | |
<property name="Something" type="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |
<column name="Something" /> | |
</property> | |
</class> |
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
-- statement #1 | |
begin transaction with isolation level: Unspecified | |
-- statement #2 | |
SELECT bar_.Foo, | |
bar_.Rate as Rate1_, | |
bar_.Value as Value1_ | |
FROM [Bar] bar_ | |
WHERE bar_.Foo = '2b76e14d-c48e-490d-9d1c-9d0900ee14ec' /* @p0 */ |
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.IO; | |
using System.Net; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Security.Principal; | |
namespace SslTest | |
{ | |
internal class Program |
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
Range: | |
Min/Max rather than Start/End, better naming when dealing with non-contiguous ranges. | |
Start and end values are inclusive. | |
How enumeration works for stepping, etc is left to the class to decide, provide a static class with some standard implementations that use Math<T>. | |
Assumption is the main IRange<T> can be either contiguous or non-contiguous | |
Assumptions for SubRanges(): | |
No two sub-ranges overlap. | |
Each sub-range is atomic (ie contiguous). |
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
Sub Main | |
Dim type = GetType(List(Of String)) | |
FindExplicitListType(type).Dump() | |
End Sub | |
Function FindExplicitListType(type As Type) As Type | |
If type.IsClass Then | |
'TODO: Should check if type implements IList or IList(Of) | |
Return type | |
ElseIf IsGenericList(type) |
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
void Main() | |
{ | |
var f = new Foo (); | |
f.Inc (); | |
f.Inc (); | |
f.X.Dump (); | |
} | |
struct Foo { | |
public readonly int X; |
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
param ( | |
[Parameter()] $foo, | |
[Parameter()] $bar | |
) | |
$foo | |
$bar | |
#output: | |
#> .\test1.ps1 0 1 |
OlderNewer