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
javarun() { | |
if [ -z "$1" ]; then | |
echo "usage: javarun Triangle" | |
return | |
fi | |
local bar="\n------------------------------------\n" | |
echo -e $bar | |
mkdir -p output | |
local c="javac -d output $1.java $HOME/Turtle.java" | |
echo -e "$c:\n" |
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
mkws() { | |
local dhome="$HOME" | |
local droot="workspace" | |
local ddate="$(date '+%Y/%m-%d')" | |
local dname="${1:-space}" | |
local dseparator="." | |
local dsalt="$(cat /dev/urandom | tr -dc 'a-z' | head -c 4)" | |
local d="$dhome/$droot/$ddate/$dname$dseparator$dsalt" | |
mkdir -p -v "$d" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import Data.List | |
-- 行列式 | |
det :: [[Rational]] -> Rational | |
det [[a]] = a | |
det (a:b) | sum (map abs a) == 0 = 0 | |
| head a == 0 = negate $ det (map (\ (a:b) -> b ++ [a]) (a:b)) | |
| otherwise = (head a) * (det $ sub a b) | |
where sub a bs = map (\b -> tail(zipWith (\x y -> y - x * ((head b) / (head a))) a b)) bs |
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
// (a & b) + (¬a & c) → [[T,T,X],[N,X,T]] | |
enum Literal | |
{ | |
T, // Term | |
N, // ¬Term | |
X // Null | |
} | |
alias Conjunction = Literal[]; | |
alias DNF = Conjunction[]; // Disjunctive normal form |
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
mixin template binary(T) | |
{ | |
mixin(() { | |
import std.conv : to; | |
import std.range : chain, only, iota; | |
import std.string : rightJustify, format; | |
string result = ""; | |
foreach (n; iota(0, T.max).chain(T.max.only)) |
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
json=$(curl -s --header "PRIVATE-TOKEN: $REPORT_GENERATOR_TOKEN" https://gitlab.com/api/v4/projects/$PROJECT_ID/issues?state=opened) | |
len=$(echo $json | jq length) | |
echo '<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>' | |
echo "<h1>" $(date) "</h1>" | |
for i in $( seq 0 $(($len - 1)) ); do | |
item=$(echo $json | jq ".[$i]") |
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
この 作品 は クリエイティブ・コモンズ 表示 4.0 国際 ライセンスの下に提供されています。 | |
http://creativecommons.org/licenses/by/4.0/ |
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
この 作品 は クリエイティブ・コモンズ 表示 4.0 国際 ライセンスの下に提供されています。 | |
http://creativecommons.org/licenses/by/4.0/ |
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
____ | |
L__L| | |
/ \ | |
/ \ | |
/ _______ \ | |
\ \#/ \/ \ / | |
\|#| O| O|#\ | |
|#L _L__ #| | |
|###| |##| | |
/###/ /##| |