This file contains hidden or 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
| # カーソルを矢印にする | |
| xsetroot -cursor_name lft_ptr | |
| # キーボードマップをjpにする | |
| setxkbmap -layout jp | |
| # capslockをctrlに変更する | |
| setxkbmap -option ctrl:nocaps | |
| # mozc用 | |
| ibus-daemon & | |
| # xinput --list |
This file contains hidden or 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 XMonad | |
| main = do | |
| xmonad $ defaultConfig { terminal = "gnome-terminal --hide-menubar" } |
This file contains hidden or 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
| S = {a,b,c} | |
| P(S) = {∅, {a}, {b}, {c}, {a,b}, {b,c}, {c,a}, S} | |
| T(S) = { | |
| 要素数: 2 | |
| {∅, S}, | |
| 要素数: 3 | |
| {∅, S, {a}}, {∅, S, {b}}, {∅, S, {c}}, | |
| {∅, S, {a, b}}, {∅, S, {b, c}}, {∅, S, {c, a}}, |
This file contains hidden or 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
| Inductive list (X:Type) := nil:list X | cons:X -> list X -> list X. | |
| Implicit Arguments nil [[X]]. | |
| Implicit Arguments cons [[X]]. | |
| Notation "[ ]" := nil. | |
| Notation "[ x , .. , y ]" := (cons x .. (cons y nil) ..). | |
| Notation "x :: xs" := (cons x xs). | |
| Fixpoint append {X:Type} (xs:list X) (ys:list X) :list X := | |
| match xs with | |
| | nil => ys |
This file contains hidden or 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
| subseq :: (Eq a) => [a] -> [a] -> Bool | |
| subseq seq sseq = subseq' seq sseq == seq | |
| subseq' :: (Eq a) => [a] -> [a] -> [a] | |
| subseq' seq sseq = foldr unifier [] sseq | |
| where | |
| unifier x [] | elem x seq = [x] | |
| | otherwise = [] | |
| unifier x sseq'@(s:_) | |
| | elem x seq && s /= x = (x:sseq') |
This file contains hidden or 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
| TARGET := ltest | |
| SRCS := ltest.c | |
| OBJS := $(SRCS:.c=.o) | |
| CFLAGS := -Wall -pedantic -std=c11 | |
| CC := gcc | |
| all: $(TARGET) | |
| $(TARGET): $(OBJS) | |
| $(CC) $< -o $@ |
This file contains hidden or 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 (rember x xs) | |
| (cond | |
| ((null? xs) '()) | |
| ((eq? x (car xs)) (rember x (cdr xs))) | |
| (else (cons (car xs) (rember x (cdr xs)))))) | |
| (define (multirember&co a lat col) | |
| (cond | |
| ((null? lat) (col '() '())) | |
| ((eq? a (car lat)) |
This file contains hidden or 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 (plus3 x y) | |
| (+ (+ x y) 3)) | |
| (define (plus3&co x y co) | |
| (let ((plus&co (lambda (x y co) | |
| (co (+ x y))))) | |
| (plus&co x y (lambda (z) | |
| (co (+ z 3)))))) | |
| (plus3&co 1 2 (lambda (x) x)) |
This file contains hidden or 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 <stdio.h> | |
| int byte_size(const unsigned char c) { | |
| if(c <= 0x7f) { | |
| return 1; | |
| } else if(0xc2 <= c && c <= 0xdf) { | |
| return 2; | |
| } else if(0xe0 <= c && c <= 0xef) { | |
| return 3; | |
| } else if(0xf0 <= c && c <= 0xff) { |
This file contains hidden or 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
| #!/bin/bash | |
| set -eu | |
| if [ $# -ne 2 ]; then | |
| echo "invalid arg" >&2 | |
| exit 1 | |
| fi | |
| for file in $2/* |