This file contains hidden or 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
WORK=/tmp/go-build685671399 | |
mkdir -p $WORK/net/rpc/_obj/ | |
mkdir -p $WORK/net/ | |
cd /usr/lib/go/src/net/rpc | |
/usr/lib/go/pkg/tool/linux_amd64/6g -o $WORK/net/rpc.a -trimpath $WORK -p net/rpc -complete -D _/usr/lib/go/src/net/rpc -I $WORK -pack ./client.go ./debug.go ./server.go | |
mkdir -p /usr/lib/go/pkg/linux_amd64/net/ | |
cp $WORK/net/rpc.a /usr/lib/go/pkg/linux_amd64/net/rpc.a | |
go install net/rpc: open /usr/lib/go/pkg/linux_amd64/net/rpc.a: permission denied |
This file contains hidden or 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
package main | |
/* | |
git clone して | |
go build webapp.go | |
./webapp | |
としたあと | |
http://localhost:8080 | |
にアクセス | |
*/ |
This file contains hidden or 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
import Control.Monad.Writer | |
sayHello :: Writer (Sum Int, Sum Int) String | |
sayHello = do | |
tell (0,1) | |
return "hello" | |
sayGoodbye :: Writer (Sum Int, Sum Int) String | |
sayGoodbye = do |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"os/exec" | |
) | |
func main() { |
This file contains hidden or 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
# encoding : utf-8 | |
module Kankore | |
attr_accessor :長門, :陸奥, :伊勢, :日向, :雪風, :赤城, :加賀, :蒼龍, :飛龍, :島風, | |
:吹雪, :白雪, :初雪, :深雪, :叢雲, :磯波, :綾波, :敷波, | |
:大井, :北上, | |
:金剛, :比叡, :榛名, :霧島, | |
:鳳翔, | |
:扶桑, :山城, :天龍, :龍田, :龍驤, | |
:睦月, :如月, :皐月, :文月, :長月, :菊月, :三日月, :望月, | |
:球磨, :多摩, :木曽, |
This file contains hidden or 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
"keizo'vimrc | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
filetype indent off | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
" Let NeoBundle manage NeoBundle |
This file contains hidden or 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
#include<stdio.h> | |
#include<stdlib.h> | |
double newton(double c) | |
{ | |
double x; | |
int i; | |
x = ( c + c / c ) / 2; |
This file contains hidden or 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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
#define LEN 1000 | |
#define PRIME int | |
struct list{ | |
struct list *next; |
This file contains hidden or 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
import scala.io._ | |
object FileUtils { | |
def main( args: Array[String] ) : Unit = { | |
Source.fromFile(args(0) ).foreach{ | |
This file contains hidden or 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
--zipTwo :: ( a -> b -> c ) -> [a] -> [b] -> [c] | |
--zipTwo _ [] _ = [] | |
--zipTwo _ _ [] = [] | |
--zipTwo f (x:xs) (y:ys) = f x y : f xs ys | |
--分かった 再帰を使っているのに引数にとった関数を使おうとしているから | |
-- 上手くいかなかった | |
zipTwo :: (a -> b -> c) -> [a] -> [b] -> [c] | |
zipTwo f [] _ = [] | |
zipTwo f _ [] = [] |