I hereby claim:
- I am kamyar1979 on github.
- I am kamyar (https://keybase.io/kamyar) on keybase.
- I have a public key whose fingerprint is 501C 5EE1 2BA0 8699 E154 4C69 3346 F754 C787 8090
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
namespace Extensions | |
{ | |
using System; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
/// <summary> | |
/// This class is in charge of reading numbers into culture specific text phrases. | |
/// </summary> | |
public static class NumberReader |
public static Expression<Func<T, T>> CheckNull<T>(Expression<Func<T, T>> expression) | |
{ | |
var body = expression.Body as MemberInitExpression; | |
return Expression.Lambda<Func<T, T>>(AddCheckNull<T>(body, expression.Parameters[0]), expression.Parameters); | |
} | |
public static MemberInitExpression AddCheckNull<T>(MemberInitExpression expression, Expression parameter) | |
{ | |
var memberParams = new List<MemberBinding>(); | |
foreach (var item in expression.Bindings) |
def __repr__(self): | |
suf = 'BKMGTPEZY' | |
temp = self.size >> 10 | |
index = 0 | |
while temp: | |
temp >>= 10 | |
index += 1 | |
return '%g%s' % (round(float(self.size) / (1 << (10 * index)), 1), suf[index]) |
from bzrlib.transport.http import wsgi | |
import sys | |
import os | |
import isapi_wsgi | |
if hasattr(sys, 'isapidllhandle'): | |
import win32traceutil | |
path_strip = 0 # Strip this many path elements off (when using url rewrite) | |
path_prefix = 0 # This many path elements are prefixes (depends on the |
private long ParseSize(string size) | |
{ | |
string factor = "KMGTPEZY"; | |
if (Regex.IsMatch(size, @"^\d+$")) | |
{ | |
return long.Parse(size); | |
} | |
else | |
{ |
namespace DynamicJson | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
public static class Json | |
{ |
import os,sys | |
import isapi_wsgi | |
if hasattr(sys, "isapidllhandle"): | |
import win32traceutil | |
appdir = r'D:\Web\Rhodecode\\' | |
# The entry points for the ISAPI extension. | |
def __ExtensionFactory__(): | |
from paste.deploy import loadapp |
namespace System.Dynamic | |
{ | |
using System; | |
using System.Collections.Generic; | |
public class DynamicDictionary : DynamicObject | |
{ | |
private Dictionary<string, object> items; | |
public DynamicDictionary() |
namespace System.Dynamic | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
public class DynamicTypeBuilder | |
{ | |
private AssemblyBuilder assemblyBuilder; |