Skip to content

Instantly share code, notes, and snippets.

" C
autocmd FileType c nnoremap <buffer> <F5> :call <SID>execGcc()<CR>
autocmd FileType c nnoremap <buffer> <F6> :call <SID>runC()<CR>
autocmd FileType c nnoremap <buffer> <F7> :call <SID>runCToFile()<CR>
function! s:execGcc()
:w
exe ":!gcc % -lm -O2 -o %.out"
endfunction
function! s:runC()
main = mapM_ print $ iterate f 1
f x = x / 2.0 + 1.0 / x
# -*- coding: utf-8 -*-
Plugin.create :jis_empty_reply do
on_appear do |ms|
ms.each do |m|
if m.message.to_s =~ /アルパカ/
Service.primary.post(:message => "#{"@" + m.user.idname + "(・´ェ`・)三 (・´ェ`・)", :replyto => m)
end
end
end
end

date: 2013-04-02 17:58


#応理の大学院講義履修について 先輩から聞いた話まとめ。間違ってたらコメントなりしてくれ・ω・

##利点 B4の春学期はぬるい。M1の春学期は忙しい。
マスターで卒業するときは、M1の冬から就職活動をしなければならないのでマスター生活は案外忙しい。
よって、B4の間に授業をとって単位をとっておくと、幸せになれることが多い。

autocmd!
" neovundle
set nocompatible
filetype off
if has('vim_starting')
:set runtimepath+=~/.vim/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle/'))
endif
NeoBundle 'Shougo/neobundle-vim-scripts'
" Completion
main :: IO ()
main = mapM_ (print . abs . ((cos x) -) . (myCosTaylor x)) [1 .. 100]
where x = 30
fac :: Integral a => a -> a
fac 0 = 1
fac n = fac (n-1) * n
a :: Integral a => Double -> a -> Double
a x i = if odd i
#theta open nicol cross nicol
0 0.001640 0.000836
10 0.001300 0.001170
20 0.001210 0.001250
30 0.001410 0.001040
40 0.001820 0.000644
50 0.002220 0.000251
60 0.002450 0.000040
70 0.002390 0.000105
80 0.002080 0.000404
main = f xs
f xs = do
print (sin (head xs), (head xs) / pi * 180)
f $ tail xs
xs = [1,1.01..1.57]
-- 演算子Tと演算子Jの不可換性
main = print ((t a (j x)), j (t a x))
t a = (+a) --T(a)
j x = -x --J
a = 3 -- 今回T(3)
x = 1 --初期値3
{-http://www.haskell.org/haskellwiki/Haskell%E5%85%A5%E9%96%80_5%E3%82%B9%E3%83%86%E3%83%83%E3%83%97-}
import Control.Parallel
main = a `par` b `par` c `pseq` print (a + b + c)
where
a = ack 3 10
b = fac 10
c = fib 6
fac 0 = 1