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
#nowarn "9" | |
namespace Sayuri.IO.Compression | |
open System.IO.Compression | |
open System.Reflection | |
type ZLibOption = { | |
CompressionLevel : int // -1, 0 .. 9 | |
WindowBits : int // (8), 9 .. 15 | |
MemLevel : int // 1 .. 9 | |
CompressionStrategy : int // 0, 1 .. 4 |
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 interface EntityBase { | |
string Name { get; } | |
} | |
public abstract class RepositoryBase<T> where T : EntityBase, new() { | |
private readonly string _name; | |
public RepositoryBase() { | |
_name = new T().Name; | |
} |
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
Windows PowerShell | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
PS C:\> Get-Date; -join (Get-Date); -join ,(Get-Date) | |
2018年9月27日 16:13:06 | |
09/27/2018 16:13:06 | |
2018/09/27 16:13:06 | |
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
struct Base { | |
virtual ~Base() = default; // ... A | |
~Base() = default; // ... B | |
}; | |
struct Derived : Base { | |
~Derived() = default; // ... a | |
virtual ~Derived() = default; // ... b | |
~Derived() override = default; // ... c | |
}; |
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
#pragma once | |
#include <array> | |
#include <type_traits> | |
#include <Windows.h> | |
#include <windowsx.h> | |
template<int... controls> | |
struct Controls; | |
template<class RightAnchoredControls, class BottomAnchoredControls, class StretchingControls> |
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
open System | |
open System.Collections.Generic | |
type State<'Key, 'Value when 'Key : equality> = | |
| Dict of Dictionary<'Key, 'Value> | |
| Item of 'Key * 'Value | |
| Empty | |
type DictBuilder<'Key, 'Value when 'Key : equality> (equalityComparer : _ IEqualityComparer) = | |
let create () = Dictionary<'Key, 'Value> equalityComparer |
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
module Program = | |
let rec Main args = | |
let numbers : obj[] = | |
[| 0b1; 0b10; ([| 0b100; 0b1000 |] : obj[]); // binary literals | |
0b10000; 0b100000 |] // digit separators: not supported | |
let sum, count = Tally(numbers) // deconstruction | |
printfn "Sum: %d, Count: %d" sum count | |
and Tally (values : obj[]) = // tuple types | |
let mutable r = 0, 0 // tuple literals |
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
#pragma once | |
#include <future> | |
#ifdef USE_AWAIT | |
#include <experimental/resumable> | |
#include <boost/asio/use_future.hpp> | |
#else | |
#include <exception> | |
#include <memory> | |
#include <type_traits> | |
#include <utility> |
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
module tinyBase64Decoder | |
open System | |
open System.Collections.Generic | |
// Declare fundamental functions | |
// Generate n length Integer List (0 upto n - 1) | |
let iota n = [0..n-1] | |
// Generate n length List of 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
using System.ComponentModel; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Media; | |
namespace Sayuri.Windows { | |
public static class GridViewSort { | |
class SortIcon : Adorner { |