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 <cstddef> | |
#include <iostream> | |
#include <type_traits> | |
// 型に結び付いた連番を生成するクラステンプレート | |
template <class... T> | |
class identify_number_traits { | |
private: | |
template <class U> | |
struct foo { |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <string_view> | |
#include <type_traits> | |
#include <utility> | |
template <class T, class = void> | |
class is_string : public std::false_type {}; |
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 <cassert> | |
#include <iterator> | |
#include <type_traits> | |
template <class T, int base, typename std::enable_if<std::is_unsigned<T>::value, void*>::type = nullptr> | |
class column_splitted_iterator { | |
private: | |
T data; | |
bool endflag; |
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
#!r6rs | |
(library (geo3x3) | |
(export encode decode) | |
(import (rnrs)) | |
(define (encode lat lng level) | |
(assert (real? lat)) | |
(assert (real? lng)) | |
(assert (integer? level)) | |
(assert (> level 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
# Qiita で見た題材を Rust らしく整理 | |
# 元ネタ → https://qiita.com/fltwtn/items/7ca55afd3f648ca63281 | |
[package] | |
name = "geodetic" | |
version = "0.1.0" | |
authors = ["SAITO Atsushi <[email protected]>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
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
All AES tests passed | |
All MD5 tests passed | |
All SHA1 tests passed | |
All SHA256 tests passed | |
All SHA384 tests passed | |
All SHA512 tests passed | |
All HMAC tests passed | |
All BIGINT tests passed | |
All RSA tests passed | |
invalid digest: 2a 86 48 ce 38 04 03 |
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
(library (huga) | |
(export foo) | |
(import (rnrs)) | |
(define foo 'bar) | |
) | |
(library (hoge) | |
(export foo) | |
(import (huga)) | |
) |
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 user-name "user-name") ;; PIXIV のユーザー名 | |
(define user-password "password") ;; PIXIV のパスワード | |
(use rfc.http) | |
(use rfc.822) | |
(use rfc.cookie) | |
(use rfc.json) | |
(use rfc.uri) | |
(use rfc.md5) |
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 <functional> | |
class defer_t { | |
private: | |
std::function<void(void)> f; | |
public: | |
defer_t(std::function<void(void)> f); | |
~defer_t(void); | |
}; |
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
#!r6rs | |
(library (average) | |
(export average) | |
(import (rnrs)) | |
(define (%average . args) | |
(/ (apply + args) | |
(length args))) | |
(define-syntax average |
NewerOlder