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
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 3 2012 20:47:17) | |
MacOS X (unix) version | |
Included patches: 1-673 | |
Compiled by username@hostname | |
Huge version without GUI. Features included (+) or not (-): | |
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent | |
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs | |
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path | |
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv |
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
l <Down> *@eskk#filter(eskk#util#key2char('<Down>')) | |
l <Up> *@eskk#filter(eskk#util#key2char('<Up>')) | |
l <PageDown> *@eskk#filter(eskk#util#key2char('<PageDown>')) | |
l <PageUp> *@eskk#filter(eskk#util#key2char('<PageUp>')) | |
l <BS> *@eskk#filter(eskk#util#key2char('<BS>')) | |
l <C-E> *@eskk#filter(eskk#util#key2char('<C-E>')) | |
l <C-G> *@eskk#filter(eskk#util#key2char('<C-G>')) | |
l <C-H> *@eskk#filter(eskk#util#key2char('<C-H>')) | |
l <Tab> *@eskk#filter(eskk#util#key2char('<Tab>')) | |
l <CR> *@eskk#filter(eskk#util#key2char('<CR>')) |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>hoge</groupId> | |
<artifactId>hoge</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<build> | |
<sourceDirectory>src</sourceDirectory> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> |
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
.gitignore export-ignore |
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
function cd() { | |
if [ $# -eq 0 ]; then | |
builtin pushd $HOME | |
else | |
builtin cd $@ | |
fi | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<classpath> | |
<classpathentry kind="src" path="src"/> | |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |
<classpathentry kind="lib" path="/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/jfxrt.jar"/> | |
<classpathentry kind="output" path="bin"/> | |
</classpath> |
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
# vim:set fileencoding=utf-8: | |
Point = 5 # 固定小数点の位置 | |
def convert_2_to_10 bit_array | |
# 2進数複素数列から10進数複素数へ変換。 | |
# bit_array は [String] を想定。Stringはsize1。 | |
real_sign, real = convert_sign_2(bit_array[0..15]) | |
imaginary_sign, imaginary = convert_sign_2(bit_array[16..32]) |
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
# vim:set fileencoding=utf-8: | |
string = "http://www.example.com/hoge/fuga" | |
/(?<protocol>[a-z]+):\/\/(?<server>[^\/]*)\/(?<path>.*)/ =~ string | |
p [protocol, server, path] # => ["http", "www.example.com", "hoge/fuga"] | |
m = /(?<protocol>[a-z]+):\/\/(?<server>[^\/]*)\/(?<path>.*)/.match(string) | |
p m | |
#=> #<MatchData "http://www.example.com/hoge/fuga" protocol:"http" server:"www.example.com" path:"hoge/fuga"> |
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
# after 1.9.2 | |
while n = gets.chomp | |
puts (0..9).to_a.repeated_permutation(4).to_a.map{|a| a.inject(:+)}.select{|b| b == n.to_i}.size | |
end |
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
(0..Float::INFINITY).lazy.select{|a| (a % 2 != 0) && (a % 3 != 0)}.take(1000).to_a.last |