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
module division | |
go 1.18 |
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
// ネットワークアダプタの設定で | |
// DNSのIPを127.7.7.7に設定してPC内からのDNSクエリを盗み見る | |
// nslookup example.com 127.7.7.7 とかで動くかテストしながら開発 | |
fn main() -> std::io::Result<()> { | |
eprintln!("START"); | |
let mut bufs = Bufs::new(); | |
let res = bufs.start(); |
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
// CodeMirror mode CASL2 | |
// author: Leonardone @ NEETSDKASU | |
CodeMirror.defineMode("casl2", function(conf, parserConf) { | |
"use strict"; | |
const COMET2CMD = "keyword"; | |
const CASL2CMD = "builtin"; | |
const LABEL = "variable"; | |
const REGISTER = "atom"; |
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
-- author: Leonardone @ NEETSDKASU | |
isPrime :: Int -> Bool; primes :: [Int] | |
isPrime n = all (\e -> mod n e /= 0) $ takeWhile ((<=n).(^2)) primes | |
primes = 2 : 3 : filter isPrime os | |
where | |
os = zipWith (+) vs es | |
vs = 6 : 6 : map (+6) vs |
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
-- author: Leonardone @ NEETSDKASU | |
-- modvalue MUST BE PRIME! | |
modvalue :: Integral a => a | |
modvalue = 10^9 + 7 | |
(+%),(-%),(*%),(/%) :: Integral a => a -> a -> a | |
a +% b = (a+b) `mod` modvalue | |
a -% b = a +% (modvalue - b) | |
a *% b = (a*b) `mod` modvalue |
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
mod modular { | |
// author: Leonardone @ NEETSDKASU | |
// modulo for ModValue | |
pub const MODULO: i64 = 1_000_000_007; | |
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)] | |
pub struct ModValue { | |
value: i64, | |
} |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
func usage() { | |
fmt.Println(os.Args[0], "[-s] <filename>") |
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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" | |
"unicode/utf16" |
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
// | |
// JsonAnalyzer | |
// - Flag module | |
// | |
// parse Command-line Arguments | |
// | |
module Flag | |
let showUsage() = |
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
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
game := NewGame() | |
for { |
NewerOlder