Skip to content

Instantly share code, notes, and snippets.

View KimiyukiYamauchi's full-sized avatar

Kimiyuki Yamauchi KimiyukiYamauchi

View GitHub Profile
@KimiyukiYamauchi
KimiyukiYamauchi / python_basic_1.ipynb
Last active February 5, 2025 23:21
python_basic_1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script>
public int [] ex4_8(int [] a, int idx, int n){
int num[] = new int[idx];
ArrayList<Integer> hoge = new ArrayList<Integer>();
for(int i=0;i<= a.length-1;i++){
hoge.add(a[i]);
}
//
for(int j= idx;j< n+idx;j++){
if (idx != n) {
/**
*
* @param a - 整数型の配列
* @param idx - 削除の開始の添字
* @param n - 削除する要素数
* @return
* 配列aのidxの位置からn個の要素を削除した配列を
* 返す
* 但し、削除できない場合は元の配列を返す
*/
@KimiyukiYamauchi
KimiyukiYamauchi / 191204.md
Last active December 3, 2019 14:08
19/12/04 - IT College Okinawa Advent Calendar 2019

手続き型プログラマが関数型言語を触ってみて

なぜこれを書こうと思ったか

  • 30年間でいろいろな言語でソフトウェアの開発を行った。
    • アセンブラ(オフプロドライバ)
    • C言語(PC&ガラケーのフロント/エンド)
    • VisualBasic(WindowsPCのアプリ)
    • PHP(社内イントラネット)
  • SQL, PL/SQL(社内イントラネット)
sudo find /var/ -type f -exec du \{\} \; | sort -nr | head -n 5
#!/bin/bash
thisyear=$(date '+%Y') # 今年の年
birthday=$(date -d "${thisyear}${1}" '+%s') # 今年の誕生日のエポック
today=$(date '+%s') # 本日のエポック
if [ "$birthday" -gt "$today" ]; then
echo $(((birthday - today) / (60*60*24) + 1))
elif [ $(date '+%m%d') = "${1}" ]; then
@KimiyukiYamauchi
KimiyukiYamauchi / test.sql
Last active November 5, 2015 08:42
引数で指定した名前でtb1テーブルのコピーを作成するストアードプロシージャ
drop procedure if exists tb1X;
delimiter //
create procedure tb1X(in x varchar(100))
begin
set @s = concat('drop table if exists `', x ,'`');
prepare stmt from @s;
execute stmt;
deallocate prepare stmt;
@KimiyukiYamauchi
KimiyukiYamauchi / markdown.md
Last active August 29, 2015 14:22
マークダウンの練習

見出しレベル1

見出しレベル2

見出しレベル3

見出しレベル4

見出しレベル5

パラグラフはブランク行で区切る.

2つ目のパラグラフ.

;
; Android WinUsb driver installation.
;
[Version]
Signature = "$Windows NT$"
Class = AndroidUsbDeviceClass
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider = %ProviderName%
DriverVer = 08/28/2014,11.0.0000.00000
CatalogFile.NTx86 = androidwinusb86.cat