Skip to content

Instantly share code, notes, and snippets.

View incheon's full-sized avatar

Tomohiro Imaizumi incheon

View GitHub Profile
// Q1
public class Main {
public static void main(String[] args) {
for(int i=0;i<100;i=i+2){
System.out.println(i);
}
public static showEvens {
for(int i=0;i<100;i=i+2){
System.out.println(i);
@incheon
incheon / Task11.java
Created November 24, 2015 04:25
移動ロボット1週目の課題の解答です。
package client;
public class Task11 extends NeoControlNomad2 {
public static void main(String args[]) {
new Task11();
}
public Task11() {
doProgramming();
}
@incheon
incheon / vichromerc.txt
Created September 24, 2015 07:36
vichromeの設定
# EscapeをC-gで
nmap <C-g> : Escape
imap <C-g> : Escape
cmap <C-g> : Escape
emap <C-g> : Escape
<C-g> : Escape
# フォーカス移動のキーバインドを追加
cmap <C-n> :FocusNextCandidate
cmap <C-j> :FocusNextCandidate
@incheon
incheon / switch.vim
Last active September 5, 2015 15:12 — forked from alpaca-tc/gist:6696152
function! s:separate_defenition_to_each_filetypes(ft_dictionary) "{{{
let result = {}
for [filetypes, value] in items(a:ft_dictionary)
for ft in split(filetypes, ",")
if !has_key(result, ft)
let result[ft] = []
endif
call extend(result[ft], copy(value))
@incheon
incheon / Vagrantfile
Created May 18, 2015 09:16
vagrantでtex環境をセットアップするときのVagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@incheon
incheon / Boxstarter.md
Last active August 29, 2015 14:19 — forked from ikkou/Boxstarter.md

Windowsでも開発環境を一瞬で構築したい!

未開封のWindows PCと一緒に手渡された環境構築マニュアル、1つ1つ手作業で進めるだけで初日が終わってしまった、そんな時間の無駄を省く為のドキュメント。

コマンドプロンプトを起動

WindowsRを同時に押して、cmdと入力、Enterを押下

chocolateyのインストール

@incheon
incheon / math.scss
Created August 3, 2014 09:11
テイラー展開でsin, cos, tanを近似的に算出するscssの関数です。その過程で冪乗計算と階乗計算も行っています。
@charset "utf-8";
$pi: 3.14159265359; // 円周率
$iter: 10; // テイラー展開時の項数(多いほど近似精度が高い)
/* 冪乗計算(乗数は整数のみ)
*
* $base: 冪乗される数
* $exp : 冪乗する回数
*
@incheon
incheon / BubbleSort.java
Last active August 29, 2015 14:00
情報論理及び演習サンプルプログラム 2012年度後期第9回
// コマンドラインに引数として与えた整数(文字列を入力)を
// 昇順にソート
public class BubbleSort {
public static void main(String[] args) {
int[] ary = new int[args.length];
convert(args, ary);
printAry(ary);
bubbleSort(ary);
@incheon
incheon / Existence.java
Last active August 29, 2015 13:57
情報論理及び演習サンプルプログラム 2012年度後期第1回
public class Existence {
public static void main(String[] args) {
String flag; // 検索結果
long startTime, endTime; // 検索の開始時間、終了時間
int size; // 配列のサイズ
int d; // 検索データ
int[] array; // 配列
CheckExist exist;
@incheon
incheon / display-table.html
Last active January 3, 2016 17:59
table要素はレイアウトなどの本来の『表』以外の目的に使用することが望ましくありません。そこでレイアウト目的には他のブロック要素やリスト要素をdisplay属性と一緒に使うことでこの問題を回避できます。しかしいちいちCSSのクラスにこの属性を定義するのは面倒なので、mixinにまとめてみました。ついでにZen-CodingやEmmetのコマンドも書いておきます。
<!-- 1*3テーブル Zen-Coding: div.tabel>ul.tr>li.td{foo-$}*3 -->
<div class="tabel">
<ul class="tr">
<li class="td">foo-1</li>
<li class="td">foo-2</li>
<li class="td">foo-3</li>
</ul>
</div>
<!-- 3*2テーブル Zen-Coding: ul.tabel>(li.tr>ul>(li.td>lorem3)*2)*3 -->