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
!**************************************************** | |
! 線形計画法(シンプレックス法) | |
! | |
! * 入力はテキストファイルをパイプ処理 | |
! 1行目: 行数 列数 変数の数 | |
! 2行目以降: 1行に列数分の係数 * 行数 | |
! | |
! date name version | |
! 2018.12.05 mk-mode.com 1.00 新規作成 | |
! |
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
/* | |
* Example to connect to MariaDB(MySQL) | |
*/ | |
#include <iostream> | |
#include <mysql/mysql.h> // require libmysqlclient-dev | |
#include <string> | |
using namespace std; | |
/* |
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
#********************************************* | |
# 二項係数計算モジュール | |
# | |
# DATE AUTHOR VERSION | |
# 2019.10.19 mk-mode.com 1.00 新規作成 | |
# | |
# Copyright(C) 2019 mk-mode.com All Rights Reserved. | |
#********************************************* | |
module BinomCoeff | |
# 二項係数の計算(1) |
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
!**************************************************** | |
! ケンドールの順位相関係数の計算 | |
! | |
! DATE AUTHOR VERSION | |
! 2019.12.13 mk-mode.com 1.00 新規作成 | |
! | |
! Copyright(C) 2019 mk-mode.com All Rights Reserved. | |
!**************************************************** | |
! | |
module cst |
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
#! /usr/local/bin/ruby | |
class Array | |
def rcc_kendall(y) | |
# 以下の場合は例外スロー | |
# - 引数の配列が Array クラスでない | |
# - 自身配列が空 | |
# - 配列サイズが異なる | |
# - 数値以外のデータが存在する | |
raise "Argument is not a Array class!" unless y.class == Array |
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 "calc.hpp" | |
#include <algorithm> // for std::count | |
#include <cmath> // for std::sqrt | |
#include <iostream> | |
#include <unordered_map> | |
#include <vector> | |
Calc::Calc(std::vector<std::vector<double>>& data) { | |
try { |
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
!**************************************************** | |
! 素数一覧 | |
! : 入力値以下の素数を全て出力する | |
! | |
! date name version | |
! 2017.04.20 mk-mode.com 1.00 新規作成 | |
! | |
! Copyright(C) 2017 mk-mode.com All Rights Reserved. | |
!**************************************************** | |
! |
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
/*************************************************************** | |
* Computing pi by Binary Splitting Algorithm with GMP libarary. | |
**************************************************************/ | |
#include <cmath> | |
#include <iostream> | |
#include <fstream> | |
#include <gmpxx.h> | |
using namespace std; |
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 | |
# 1. 指定文字数左へ移動後に echo | |
# ( 最後の echo 以外は改行しない ) | |
# | |
echo -n `date +"%Y-%m-%d %H:%M:%S"` | |
for i in {0..4}; | |
do | |
sleep 1 | |
tput cub 19 |
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
#! /usr/local/bin/ruby | |
#********************************************* | |
# Ruby script to calculate a simple regression curve. | |
# : y = a + b * ln(x) | |
# : 連立方程式を ガウスの消去法で解く方法 | |
#********************************************* | |
# | |
class Array | |
def reg_curve_ln(y) | |
# 以下の場合は例外スロー |
NewerOlder