Skip to content

Instantly share code, notes, and snippets.

Ysnr Kdm ysnrkdm

Block or report user

Report or block ysnrkdm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ysnrkdm
ysnrkdm / try_split_address.rb
Created Apr 12, 2019 — forked from zakuroishikuro/try_split_address.rb
住所を分ける正規表現をチェックするやつ
View try_split_address.rb
require 'csv'
require 'optparse'
#
# なるべく短い正規表現で住所を「都道府県/市区町村/それ以降」に分けるエクストリームスポーツ
# http://qiita.com/zakuroishikuro/items/066421bce820e3c73ce9
#
# 正規表現で住所の「都道府県/市区町村/それ以降」をキャプチャできるか試すスクリプト
# 使い方はとりあえず実行すれば分かると思います
#
@ysnrkdm
ysnrkdm / vector.rs
Created Jan 14, 2019
vector.rs - レンダリングエンジン用のベクトルデータ構造
View vector.rs
#![feature(trace_macros)]
use std::ops::{Add, Sub, Mul, Div, Neg, AddAssign, MulAssign};
#[derive(Copy, Clone, Debug)]
#[repr(C)]
pub struct Vector3 {
pub x: f64,
pub y: f64,
pub z: f64,
View Makefile
.PHONY: build
build: update
TOOLCHAINS=swift swift build -c release -Xswiftc -Ounchecked
.PHONY: update
update: Package.swift
swift package update
.PHONY: run
run: build
View main.swift
import Foundation
import RandomGenerator
let seed = Date().hashValue
RandomGeneratorXor128.seed = seed
print("Seed set: \(seed)")
var randHelper = RandomGeneratorXor128.generator()
_ = randHelper.getNextRandomUInt()
_ = randHelper.getNextRandomUInt()
View Package.swift
import PackageDescription
let package = Package(
name: "EFTest_CommandLineApp",
dependencies: [
.Package(url: "https://github.com/ysnrkdm/EFTest_RandomGenerator.git", majorVersion: 1, minor: 2)
]
)
@ysnrkdm
ysnrkdm / RandomGeneratorXor128.swift
Created Oct 24, 2016
Original iOS application before separating library
View RandomGeneratorXor128.swift
//
// RandomGeneratorXor128.swift
// EFTest
//
// Created by KodamaYoshinori on 2016/10/22.
// Copyright © 2016 Yoshinori Kodama. All rights reserved.
//
class RandomGeneratorXor128 {
static var seed: Int = 19937
View binomialHeap.ml
(* Binomial Heap *)
module type ORDERED =
sig
type t
val eq : t -> t -> bool
val lt : t -> t -> bool
val leq : t -> t -> bool
end
@ysnrkdm
ysnrkdm / GameViewController.m
Created Mar 8, 2015
Original version of GameViewController.m in OpenGL project made by Xcode template
View GameViewController.m
//
// GameViewController.m
// AIUEO
//
// Created by Kodama Yoshinori on 3/8/15.
// Copyright (c) 2015 EuphonicTeck. All rights reserved.
//
#import "GameViewController.h"
#import <OpenGLES/ES2/glext.h>
@ysnrkdm
ysnrkdm / Main.hs
Created Dec 1, 2014
Test for move generation (very simple)
View Main.hs
module Main where
-- friends
import qualified Usi
import qualified Board
import qualified Move
import qualified MoveGenerator
-- GHC
-- libraries
import Text.Printf (printf)
View HaskellExternalAnnotator.kt
fun getResultFromScan(psiFile: PsiFile,
baseDir: VirtualFile,
file: VirtualFile): List<ErrorMessage> {
ApplicationManager.getApplication()!!.invokeAndWait(object : Runnable {
override fun run() {
FileDocumentManager.getInstance()!!.saveAllDocuments()
}
}, ModalityState.any())
val scan = psiFile.getProject().getComponent(javaClass<Scan>())!!
You can’t perform that action at this time.