桜花あどべんとかれんだぁ19日目のエントリです。
おーかたんと初めて会ったのは、高専の演習室でした。 おーかたんは幼女なのにすでに高専の2年生をやっていたようです。
_require "basis.smi" |
sig System { | |
slist: some SSeat, | |
alist: some ASeat, | |
reserved: set slist + alist | |
} | |
abstract sig Seat {} | |
sig ASeat extends Seat {} | |
sig SSeat extends Seat {} | |
enum SeatType { A, S } |
using NUnit.Framework; | |
[TestFixture] | |
public class Sample : TestUtil | |
{ | |
[TestCaseSource("TestCases")] | |
public void Test(int i, string expected) | |
{ | |
Assert.That(i.ToString(), Is.EqualTo(expected)); | |
} |
#!/bin/sh | |
msg=${1:-"first commit"} | |
git init | |
tree_hash=$(git write-tree) | |
commit_hash=$(echo -n "$msg" | git commit-tree $tree_hash) | |
echo $commit_hash > .git/refs/heads/master |
module Patterns | |
open Microsoft.FSharp.Reflection | |
let (|PrimitiveType|ListType|RecordType|) t = | |
if t = typeof<int> || t = typeof<string> then | |
PrimitiveType | |
else if FSharpType.IsRecord t then | |
RecordType t | |
else if t.GetGenericTypeDefinition() = typedefof<list<_>> then |
open Microsoft.FSharp.Reflection | |
let listType = typedefof<list<_>>.MakeGenericType([| t |]) | |
let cases = FSharpType.GetUnionCases(listType) | |
let nil, cons = cases.[0], cases.[1] | |
let lst = FSharpValue.MakeUnion(nil, [||]) | |
let consR x xs = | |
ref (FSharpValue.MakeUnion(cons, [| x; !xs |])) | |
!(List.foldBack consR xs (ref lst)) |> unbox |
#!/bin/sh | |
PREFIX="from now" | |
MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`" | |
get_amend() { | |
if [ -z `git log --pretty=oneline -1 | cut -d " " -f 2- | grep "^\[${PREFIX}]"` ] | |
then | |
return 1 | |
fi |
Public carry As Boolean | |
Function AnsCount(range, trg) | |
Dim res() | |
res = EnumCombi(range, trg) | |
AnsCount = UBound(res) | |
End Function | |
Function NextCells(range, crnt) | |
Dim min |