Skip to content

Instantly share code, notes, and snippets.

View nekolinuxblog's full-sized avatar

nekolinuxblog

View GitHub Profile
@nekolinuxblog
nekolinuxblog / blog014_001.hs
Created December 22, 2013 16:52
(その14)多重定義
data Human = Human {h_name :: String}
data Neko = Neko {n_name :: String}
hello :: Human -> String
hello h = "hello, " ++ h_name h
{-
hello :: Neko -> String
hello n = "hello, " ++ n_name n
-}
@nekolinuxblog
nekolinuxblog / blog014_002.hs
Created December 22, 2013 17:00
(その14)型クラス
data Human = Human {h_name :: String}
data Neko = Neko {n_name :: String}
class Hello a where
hello :: a -> String
instance Hello Human where
hello h = "hello, " ++ h_name h
instance Hello Neko where
@nekolinuxblog
nekolinuxblog / blog014_003.hs
Created December 23, 2013 05:27
(その14)拡張
data Human = Human {h_name :: String}
data Neko = Neko {n_name :: String}
data Inu = Inu {i_name :: String}
class Aisatu a where
hello :: a -> String
goodMorning :: a -> String
goodNight :: a -> String
instance Aisatu Human where
@nekolinuxblog
nekolinuxblog / vimrc001
Created December 30, 2013 03:15
その15 vimrc基本
set number
syntax on
set smartindent
set nobackup
set laststatus=2
set tabstop=4
@nekolinuxblog
nekolinuxblog / part_of_neobundle_config
Created December 30, 2013 03:56
vimrcにするneobundleようの設定部分
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
" 以下にインストールするプラグインを並べていく
@nekolinuxblog
nekolinuxblog / my_template.cpp
Last active August 29, 2015 14:07
greedのカスタマイズ
#include <bits/stdc++.h>
using namespace std;
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
//typedef
//------------------------------------------
pre.commandline {
/*fontの指定(google web font)*/
font-family: 'Source Code Pro' ;
/*境界との位置関係を調整*/
margin: 0px 0px 0px 0px;
padding: 5px 0px 5px 5px;
border: 1px solid #7a7a7a;
# color設定
export LSCOLORS=exfxcxdxbxegedabagacad
zstyle ':completion:*' list-colors di=34 ln=35 ex=31
zstyle ':completion:*:kill:*' list-colors \
'=(#b) #([0-9]#)*( *[a-z])*=34=31=33'
# 一覧表示の形式設定
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%BCompleting%b %U%d%u'
body {
font-family: Verdana "游ゴシック" YuGothic "ヒラギノ角ゴ ProN W3" "Hiragino Kaku Gothic ProN" "メイリオ" Meiryo sans-serif;
font-size: 14px;
line-height: 22px;
word-wrap: break-word;
}
.entry-content h4 {
font-size: 100%;
border-bottom: 1px solid #426579;
<?xml version="1.0" encoding="UTF-8" ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<b:skin></b:skin>
</head>
<body>
<b:section id='mainSection'>
<b:widget id="Blog1" type="Blog">
<b:includable id="main">