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
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
#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
// [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
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
function! s:read_line() dict | |
let l:output = self.buffer | |
let l:res = l:output | |
while l:res !~ '\r\?\n' && !self.__eof | |
let l:res = self.read(256) | |
let l:output .= l:res | |
endwhile | |
let l:pos = match(l:output, '\v%(\r?\n|$)\zs') | |
let l:line = matchstr(l:output[: l:pos - 1], '.\{-}\ze\r\?\n$') |
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
-- | |
Yokohama.vim #2 | |
キーマッピングを考える | |
tsukkee | |
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 <windows.h> | |
#include <tchar.h> | |
#include <sstream> | |
typedef std::basic_stringstream<TCHAR> tstringstream; | |
template<typename T> tstringstream& operator,(tstringstream& tss, T t) { tss << _T(" ") << t; return tss; } | |
#define OUTPUT_DEBUG_STRING(...) ::OutputDebugString((tstringstream(), _T("***"), __VA_ARGS__, _T("\n")).str().c_str()); | |
int main(int argc, char *argv[]) { | |
OUTPUT_DEBUG_STRING(_T("abc"), 1, 2.3, true); // -> " *** abc 1 2.3 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
python <<EOM | |
# coding=utf-8 | |
import vim | |
import re | |
# decorator for defining Vim script function | |
_functions_for_vim = {} | |
def vimfunc(name, *args): | |
def _(func): | |
_functions_for_vim[name] = func |
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
echomsg 'begin' | |
python <<EOF | |
# coding: utf-8 | |
import thread | |
import time | |
def func(): | |
for i in range(0, 10): | |
print i |