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
PARSER_BEGIN (Parser) | |
public class Parser { | |
} | |
PARSER_END (Parser) | |
SKIP: { | |
" " | |
} | |
TOKEN: { | |
<INTEGER: (["0"-"9"])+> |
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
PARSER_BEGIN (Parser) | |
public class Parser { | |
} | |
PARSER_END (Parser) | |
SKIP: { | |
" " | |
} | |
TOKEN: { | |
<INTEGER: (["0"-"9"])+> |
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
PARSER_BEGIN (Parser) | |
public class Parser { | |
} | |
PARSER_END (Parser) | |
SKIP: { | |
" " | |
} | |
TOKEN: { | |
<INTEGER: (["0"-"9"])+> |
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
PARSER_BEGIN (Parser) | |
public class Parser { | |
} | |
PARSER_END (Parser) | |
SKIP: { | |
" " | |
} | |
TOKEN: { | |
<INTEGER: (["0"-"9"])+> |
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
-- Scheme 手習い 5章 p.83 | |
-- The Little Schemer Section 5 | |
rember_star :: (Eq a, Eq b) => a -> [b] -> [b] | |
rember_star _ [] = [] | |
rember_star e (x:xs) = | |
case x of | |
ys@(_:_) -> (rember_star e ys) : (rember_star e xs) | |
z | e == z -> rember_star e xs | |
_ -> x : rember_star e xs |
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
main = do | |
cs <- getContents | |
putStrLn $ leapYear $ read cs | |
where | |
leapYear :: Int -> String | |
leapYear year | year `mod` 400 == 0 = "YES" | |
| year `mod` 100 == 0 = "NO" | |
| year `mod` 4 == 0 = "YES" | |
| otherwise = "NO" |
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
main = readLn >>= putStrLn . leapYear | |
where | |
leapYear :: Int -> String | |
leapYear year | year `mod` 400 == 0 = "YES" | |
| year `mod` 100 == 0 = "NO" | |
| year `mod` 4 == 0 = "YES" | |
| otherwise = "NO" |
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
! ~/.Xmodmap | |
keysym Muhenkan = Shift_L | |
add shift = Shift_L | |
keysym Henkan = Shift_R | |
add shift = Shift_R |
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
#include<iostream> | |
#include<functional> | |
#include<cmath> | |
using namespace std; | |
using namespace std::tr1; | |
template<typename Param, typename Middle, typename Result> | |
function<Result(Param)> compose(const function<Result(Middle)>& f, const function<Middle(Param)>& g) { | |
return [f, g](Param x){return f(g(x));}; |
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/sh | |
b=`git branch | grep '*' | awk '{print $2}'` | |
git checkout master && git merge $b && git checkout $b |