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
let sun; | |
let planets = []; | |
let G; // 万有引力定数 | |
function setup() { | |
createCanvas(400, 400); |
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 | |
if [ $# -eq 3 ]; then | |
arg=($1 $2 $3) | |
ows=0 | |
elif [ $# -eq 4 ]; then | |
arg=($1 $2 $3 $4) | |
ows=1 | |
else | |
ows=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
public String openFile() { | |
String fn = ""; | |
String all = ""; | |
try { | |
FileReader fr = new FileReader(fn); | |
BufferedReader br = new BufferedReader(fr); | |
String buf; | |
while ((buf = br.readLine()) != null) { | |
all += buf; | |
all += System.getProperty("line.separator"); |
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
# short | |
alias c='clear' | |
alias ll='ls -l' | |
alias la="ls -a" | |
# editor | |
alias vi='vim' | |
alias nano='nano -k -w -i -S' | |
alias emacs='emacs -nw' | |
vim_version=`vim --version | head -1 | sed 's/^.*\ \([0-9]\)\.\([0-9]\)\ .*$/\1\2/'` | |
alias vless='/usr/share/vim/vim${vim_version}/macros/less.sh' |
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 | |
function input() { | |
local dir | |
read -p " ->" dir | |
echo $dir | |
} | |
function checkDir() { |
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
//2進数を10進数タイムアタック | |
//ToDo: スキャンで答えを書く、合否の判定をする、ブレイクで次の問題かもう一度答えさせる。 | |
/*課題: startとかfirstとかに目的(EやS)以外の文字が入力されたときのエラー処理 | |
説明文見づらい*/ | |
#define _CRT_SECURE_NO_WARNINGS // CounterPlan: warning C4996: 'scanf': This function or variable may be unsafe. | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |