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 std.stdio; | |
import std.range; | |
import std.algorithm; | |
void main() | |
{ | |
writeln([3, 1, 6, 2].exists(6)); // true | |
writeln([2, 3, 4, 5, 3].exists(6)); // false | |
} |
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 std.stdio; | |
import std.algorithm; | |
import std.range; | |
void main() | |
{ | |
auto first = ["fishing", "gardening", "swimming", "fishing"]; | |
auto second = ["hunting", "fishing", "fishing", "biting"]; | |
writeln((new InterestingParty()).bestInvitation(first, second)); | |
} |
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 std.stdio; | |
import std.algorithm; | |
import std.range; | |
void main() | |
{ | |
auto capacities = [20, 30]; | |
auto bottles = [5, 8]; | |
auto fromId = [0]; | |
auto toId = [1]; |
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
" 効果音ディレクトリと拡張子の指定。効果音名を元にフルパスに変換出来るように。 | |
let s:se_path = "~/Dropbox/Vim/MinecraftSound/" | |
let s:se_ext = ".wav" | |
function! s:change_sound_name(base_name) | |
return expand(s:se_path . a:base_name . s:se_ext) | |
endfunction | |
" テスト用。効果音名の上で<Leader><Leader>を押すと再生出来るように | |
" command! -nargs=1 Play :call PlaySE("<args>") | |
" nnoremap <Leader><Leader> :<C-u>Play <C-r><C-w><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
function! InitPython() | |
" jedi.vimとpyhoncompleteがバッティングし得るらしいので | |
" http://mattn.kaoriya.net/software/vim/20121018212621.htm | |
let b:did_ftplugin = 1 | |
setlocal commentstring=#%s | |
" rename用のマッピングを無効にしたため、代わりにコマンドを定義 | |
command! -nargs=0 JediRename :call jedi#rename() |
NewerOlder