プロジェクト実習2で作成したCPUシミュレータを置いてます.
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 shouth | |
{ | |
struct Bool { }; | |
struct True : public Bool { }; | |
struct False : public Bool { }; | |
namespace detail | |
{ |
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 <iostream> | |
#include <optional> | |
#include <tuple> | |
#include <type_traits> | |
#include <utility> | |
namespace shouth | |
{ | |
namespace detail | |
{ |
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
#pragma once | |
#include <algorithm> | |
#include <initializer_list> | |
#include <numeric> | |
#include <memory> | |
#include <new> | |
#include <stdexcept> | |
#include <cstdint> | |
#include <cstddef> |
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
use std::marker::PhantomData; | |
trait Nat { } | |
struct _0 { } | |
impl Nat for _0 { } | |
struct Suc<T: Nat> { | |
n: PhantomData<T>, | |
} |
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 <array> | |
#include <cstddef> | |
#include <variant> | |
#include <utility> | |
#include <iostream> | |
namespace brainfuck { | |
enum class error_reason { | |
MISMATCHING_SQUARE_PARENTHESIS, |
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
// ==UserScript== | |
// @name AtCoder Better Highlighter | |
// @name:en AtCoder Better Highlighter | |
// @namespace https://shouth.net/ | |
// @version 0.5.4 | |
// @description highlight.jsを使用してAtCoderの提出コードの表示を置き換えるUserScriptです. | |
// @description:en Better syntax highlighting for AtCoder using highlight.js. | |
// @author shouth | |
// @resource css https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/default.min.css | |
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js |
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
/** | |
* @file sudoku_solver.h | |
* @brief Dancing Linksで数独をExact Cover ProblemとしてKnuth's Algorithm Xで解くプログラムです. | |
* @note 課題の提出からしばらく経ってポインタの理解が深まってから書き直したバージョンです. | |
* @author Shota Minami | |
*/ | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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/bash | |
user=$(users | cut -d ' ' -f1) | |
user_gnome_pid=$(pgrep -U $user gnome-session | head -n 1) | |
user_gnome_dbus_session=$(strings "/proc/$user_gnome_pid/environ" | grep DBUS_SESSION_BUS_ADDRESS) | |
export $user_gnome_dbus_session | |
host='proxy.cis.kit.ac.jp' | |
port='8080' |
NewerOlder