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
| python <<EOM | |
| # coding=utf-8 | |
| import vim | |
| vim.command(""" | |
| function! Hoge(str) | |
| return a:str . a:str | |
| endfunction | |
| """) |
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
| // [Reference] | |
| // Cのコールバック関数をC++のメンバ関数にバインディングする方法 - kazuhoのメモ置き場 | |
| // http://d.hatena.ne.jp/kazuhooku/20110126/1296031454 | |
| template <typename T, UINT (T::*THREAD_PROC)()> | |
| UINT ToThreadCallback(LPVOID pParam) | |
| { | |
| return (static_cast<T *>(pParam)->*THREAD_PROC)(); | |
| } |
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 <iostream> | |
| #include <sstream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <iterator> | |
| static const int SIZE = 100; | |
| int main(int argc, char const* argv[]) | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace TernaryOperatorTest | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
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
| @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
| #TabsToolbar { | |
| counter-reset: tabnumber; | |
| } | |
| #TabsToolbar tab { | |
| counter-increment: tabnumber; | |
| } |
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
| if exists("g:loaded_nerdtree_unite_filerec") | |
| finish | |
| endif | |
| let g:loaded_nerdtree_unite_filerec = 1 | |
| if !exists(':Unite') | |
| echoerr 'This plugin requires unite.vim' | |
| finish | |
| endif |
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
| diff --git a/autoload/unite/kinds/jump_list.vim b/autoload/unite/kinds/jump_list.vim | |
| index 15d6603..6c7b494 100644 | |
| --- a/autoload/unite/kinds/jump_list.vim | |
| +++ b/autoload/unite/kinds/jump_list.vim | |
| @@ -61,8 +61,8 @@ let s:kind.action_table.preview = { | |
| function! s:kind.action_table.preview.func(candidate)"{{{ | |
| execute 'pedit' | |
| \ (has_key(a:candidate, 'line') && a:candidate.line != '' ? '+'.a:candidate.line : '') | |
| - \ (has_key(a:candidate, 'pattern') && a:candidate.pattern != '' ? '+/'.substitute(escape(a:candidate.pattern, '\. ', 'g'), '[\[\]~/^$]', '\\\\\0', 'g') : '') | |
| - \ '`=a:candidate.word`' |
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! MoveCursorWithTmux(vim_dir, tmux_dir) | |
| let old_winnr = winnr() | |
| execute "normal! \<C-w>" . a:vim_dir | |
| " フォーカスがうつってなかったら | |
| if old_winnr == winnr() | |
| silent call system('tmux select-pane -' . a:tmux_dir) | |
| endif | |
| endfunction |
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 <unistd.h> | |
| #include <stdlib.h> | |
| void setline(char *s, int n) | |
| { | |
| int l = random() % n; | |
| int j; | |
| for(j = 0; j < l; ++j) { | |
| s[j] = 'A' + (random() % 60); |