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
did:3:kjzl6cwe1jw146hn0jnkn20715xvrobe3wnl9sesq0hf8yntzd4j05g66gl3yz7 |
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::collections::HashMap; | |
fn validate( | |
base: &Vec<Option<usize>>, | |
check: &Vec<Option<usize>>, | |
wdict: &HashMap<char, usize>, | |
s: &String, | |
) -> bool { | |
let ci = s.chars(); | |
// initial offset is 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
// ==UserScript== | |
// @name Mute user はてブ | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description mute user | |
// @author Windymelt | |
// @match https://b.hatena.ne.jp/* | |
// @grant none | |
// ==/UserScript== |
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 | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
(progn ;;init forms | |
(ros:ensure-asdf) | |
#+quicklisp(ql:quickload '(:iterate) :silent 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
(defmacro left (x) | |
`(multiple-value-bind (left) ,x left)) | |
(defmacro right (x) | |
`(multiple-value-bind (_ right) ,x _ right)) | |
(defmacro return-left (x) | |
`(values ,x nil)) | |
(defmacro return-right (x) |
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
;;; inside your ASD file | |
(in-package :cl-user) | |
(defpackage foo-asd | |
(:use :cl :asdf) | |
(:export :define-dependency-aggregator-package)) | |
(in-package :foo-asd) | |
(ql:quickload :alexandria) | |
(defparameter *dependency-source-dir* (merge-pathnames #P"src/" (uiop:getcwd))) | |
(defun define-dependency-aggregator-package (name) |
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
{ | |
"comment": "ips stands for items per second. spi stands for seconds per item (reciprocal for ips).", | |
"belt": { | |
"ultra_high_speed": { "ips": 45 }, | |
"high_speed": { "ips": 30}, | |
"normal": { "ips": 15 } | |
}, | |
"item": { | |
"intermediate_product": { | |
"copper_cable": { "psi": 0.5, "recipe": [{ "name": "copper_plate", "amount": 1}], "yield": 2 }, |
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
sealed trait Nat | |
final object One extends Nat | |
final case class Succ(val nat: Nat) extends Nat | |
final case class Odd(val nat: Nat) | |
final case class Even(val nat: Nat) | |
object Main extends App{ | |
// 自然数の足し算を考えることができる |
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「俺が女騎士に媚薬を飲ませた」 | |
オークB「オークA、Cは二人とも嘘つきだ」 | |
オークC「女騎士に媚薬を飲ませたのは嘘つきだ」 | |
オークD「オークB、Eの内片方は嘘つきだ」 | |
オークE「俺は媚薬を飲ませてない」 | |
女騎士「オークの内正直なのは二人だけだと分かっている時、私に媚薬を持ったオークとして適当なのは誰だ!?」 |
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 | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
(progn ;;init forms | |
(ros:ensure-asdf) | |
#+quicklisp(ql:quickload '(:prove) :silent t) | |
) |