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; | |
static void Test(string columnName) => Console.WriteLine("{0,-3} => {1,4} => {2,-3}", columnName, columnName.ToColumnNumber(), columnName.ToColumnNumber().ToColumnName()); | |
Test("A"); | |
Test("Z"); | |
Test("AA"); | |
Test("ZZ"); | |
Test("AAA"); | |
Test("BBB"); |
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
ARG centos=latest | |
FROM centos:$centos | |
RUN yum install -x openssl -x openssl-libs -y gcc libcap-devel perl \ | |
&& rm -rf /var/cache/yum/* \ | |
&& useradd -m guest \ | |
&& echo 'guest:guest' | chpasswd | |
WORKDIR /root/openssl | |
ARG openssl=https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz | |
RUN curl $openssl | tar xfz - --strip=1 \ | |
&& ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl \ |
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 Sayuri.IO.Compression | |
open System.IO | |
open System.IO.Compression | |
module ZLib = | |
[<Literal>] | |
let private ModuloAdler = 65521u | |
let private adler32 (buffer : byte[]) = | |
let mutable a = 1u | |
let mutable b = 0u |
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
#include <locale> | |
#include <cpprest/http_client.h> | |
#include <cpprest/oauth1.h> | |
static constexpr auto | |
apikey = U(""), | |
apisecretkey = U(""), | |
accesstoken = U(""), | |
accesstokensecret = U(""); |
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
#include <charconv> | |
#include <fstream> | |
#include <iostream> | |
#include <map> | |
#include <regex> | |
#include <set> | |
#include <string> | |
#include <string_view> | |
#include <cassert> | |
using namespace std::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
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
#define SECURITY_WIN32 | |
#include <iostream> | |
#include <tuple> | |
#include <Windows.h> | |
#include <security.h> | |
#include <schannel.h> | |
#pragma comment(lib, "Secur32.lib") | |
static std::tuple<int, const char*> protocols[] = { | |
{ SP_PROT_PCT1_CLIENT, "PCT 1.0" }, |
NewerOlder