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
let g:BZR_EXECUTABLE='bzr' | |
if exists('s:commands') | |
unlet s:commands | |
endif | |
let s:cmd_options = {} | |
" コマンド名のリストを返す | |
function! s:GetCommands() | |
if !exists('s:commands') |
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
:python <<EOS | |
# coding=utf8 | |
import re | |
from types import MethodType | |
# lazy_importブロックを検出するための正規表現(適当) | |
re_lazy_import = re.compile( | |
ur'''^lazy_import\s*\(globals\(\)\s*,\s*("""|\'\'\') # lazy_import(globals(), """ | |
(?P<contents>[^"\']*) # inside here document | |
\1\s*\) # """) |
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
=== 変更 ファイル tbzrlib/wtcache.py | |
--- tbzrlib/wtcache.py 2011-12-22 09:33:51 +0000 | |
+++ tbzrlib/wtcache.py 2011-12-22 16:59:44 +0000 | |
@@ -787,7 +787,7 @@ | |
mutter(u"adding %s to our cache", path) | |
try: | |
- tree = open_containing_local_workingtree(path) | |
+ tree = open_containing_local_workingtree(path.path) | |
wt_entry = WtCacheEntry(tree, self.crawler) |
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
interface IFoo | |
{ | |
string Author { get; }; | |
} | |
class MyTextbox : TextBox, IFoo {...}; | |
class MyCombobox : ComboBox, IFoo {...}; | |
class MyListbox : ListBox, IFoo {...}; |
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
public static bool Included<T>(T target, params T[] values) | |
{ | |
return values.Contains(target); | |
} | |
If (foo.Included(hoge, fuga, piyo)) | |
{ | |
// ... | |
} |
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
@echo off | |
set BK_WORKON_HOME=%WORKON_HOME% | |
set BK_HOMEDIR=%HOMEDIR% | |
set WORKON_HOME=C:\DEVELOP\py_envs | |
set HOMEDIR=C:\DEVELOP\bin | |
for /F "usebackq" %%I IN (`python %HOMEDIR%\workon.py %*`) DO call %%I | |
set WORKON_HOME=%BK_WORKON_HOME% |
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
# -*- coding:utf8 -*- | |
# unittestでパラメタライズドテストしてみるテスト | |
from types import MethodType | |
__all__ = ["param", "parameterize"] | |
class _Param(object): | |
""" | |
パラメータを表現するデコレータ |
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
from bzrlib.commands import plugin_cmds | |
plugin_cmds.register_lazy('cmd_delta', [], | |
'bzrlib.plugins.delta.delta') | |
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
Public Module Extensions | |
<Extension()> _ | |
Public Function This(Of T)(ByVal target As T) As T | |
Return target | |
End Function | |
<Extension()> _ | |
Public Function IsNull(Of T As Class)(ByVal target As T) As Boolean | |
Return target Is Nothing | |
End Function |
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
public class WeekDay | |
{ | |
public readonly int Value; | |
public readonly string Name; | |
public readonly string ShortName; | |
public WeekDay(int value, string name, string shortName) | |
{ | |
this.Value = value; | |
this.Name = name; | |
this.ShortName = shortName; |
OlderNewer