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
weakest(X, [X]). | |
weakest(X, [_ | Ys]) :- | |
weakest(X, Ys). | |
strongest(X, [X | _]). | |
% X が Y より弱い | |
weaker(X, Y, [Y | Ys]) :- | |
member(X, Ys). |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"zonesampleinternal": { | |
"Type": "AWS::Route53::HostedZone", | |
"Properties": { | |
"Name": { | |
"Fn::Join": [ | |
"", | |
[ |
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
# traceroute 192.30.252.122 | |
traceroute to 192.30.252.122 (192.30.252.122), 30 hops max, 60 byte packets | |
1 v157-7-204-2.z1d5.static.cnode.jp (157.7.204.2) 1.341 ms 1.306 ms 1.250 ms | |
2 157.7.42.33 (157.7.42.33) 5.847 ms 5.830 ms 5.783 ms | |
3 unused-133-130-013-017.interq.or.jp (133.130.13.17) 2.065 ms 2.025 ms 1.950 ms | |
4 133.130.12.42 (133.130.12.42) 2.478 ms 133.130.12.33 (133.130.12.33) 1.909 ms 133.130.12.42 (133.130.12.42) 2.429 ms | |
5 ae-25.r00.tokyjp05.jp.bb.gin.ntt.net (61.120.146.181) 2.406 ms xe-0-0-0-5.r00.tokyjp01.jp.bb.gin.ntt.net (61.120.146.77) 2.480 ms ae-25.r00.tokyjp05.jp.bb.gin.ntt.net (61.120.146.181) 2.305 ms | |
6 ae-8.r31.tokyjp05.jp.bb.gin.ntt.net (129.250.3.190) 2.209 ms ae-6.r31.tokyjp05.jp.bb.gin.ntt.net (129.250.7.86) 1.848 ms 1.821 ms | |
7 ae-4.r23.lsanca07.us.bb.gin.ntt.net (129.250.3.193) 109.785 ms 110.428 ms 110.297 ms | |
8 ae-6.r22.asbnva02.us.bb.gin.ntt.net (129.250.3.188) 177.816 ms 177.761 ms 178.234 ms |
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 ja-dvorakjp-rule-basic | |
'( | |
((("c" "a"). ())("か" "カ" "カ")) | |
((("c" "i"). ())("き" "キ" "キ")) | |
((("c" "u"). ())("く" "ク" "ク")) | |
((("c" "e"). ())("け" "ケ" "ケ")) | |
((("c" "o"). ())("こ" "コ" "コ")) | |
((("c" "y"). ("y" "k"))("" "" "")) | |
((("c" "n"). ("y" "k"))("" "" "")) |
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
$ g++ -Wall -std=c++11 sample.cpp -o sample1 # ← sample1 は -pthread 付けない | |
$ g++ -Wall -std=c++11 -pthread sample.cpp -o sample2 # ← sample2 は -pthread 付ける | |
$ ./sample1 | |
terminate called after throwing an instance of 'std::system_error' | |
what(): Enable multithreading to use std::thread: Operation not permitted | |
中止 | |
$ ./sample2 | |
Hello! |
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
#!/bin/sh | |
exec tail -n +3 $0 | |
# This file provides an easy way to add custom menu entries. Simply type the | |
# menu entries you want to add after this comment. Be careful not to change | |
# the 'exec tail' line above. | |
menuentry "Windows" --class windows --class os { | |
set root=(hd0,2) | |
chainloader '/EFI/Microsoft/Boot/bootmgfw.efi' | |
} |
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
service telnet | |
{ | |
socket_type = stream | |
protocol = tcp | |
wait = no | |
user = games | |
server = /usr/games/bin/nyancat | |
server_args = -t | |
only_from = 0.0.0.0/0 ::/0 | |
flags = IPv6 |
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
// 1桁〜18桁までの高橋の数を求める。 | |
// 高橋の数 : http://masami.d2.r-cms.jp/blog_detail/blog_id=3&id=6 | |
#include <stdio.h> | |
#include <stdbool.h> | |
// 高橋の数を格納する型。 | |
typedef long long num_t; | |
#define PRId_num_t "lld" | |
// 自然数から各桁を構成する数字を数える。 |
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 System.IO | |
import System.Environment | |
import Data.Word | |
import qualified Data.ByteString as B | |
-- Utilities | |
applyFst :: (a -> c) -> (a, b) -> (c, b) | |
applyFst f (x, y) = (f x, y) |