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 sys, os | |
| if hasattr(sys, "isapidllhandle"): | |
| import win32traceutil | |
| sys.path.insert(0,'') | |
| path=os.path.dirname(os.path.abspath('D:\\web2py\\gluon')) | |
| if not path in sys.path: sys.path.append(path) | |
| os.chdir(path) |
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 System.Dynamic | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using System.Reflection.Emit; | |
| public class DynamicTypeBuilder | |
| { | |
| private AssemblyBuilder assemblyBuilder; |
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 System.Dynamic | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| public class DynamicDictionary : DynamicObject | |
| { | |
| private Dictionary<string, object> items; | |
| public DynamicDictionary() |
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 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 |
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 DynamicJson | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Dynamic; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| public static class Json | |
| { |
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
| private long ParseSize(string size) | |
| { | |
| string factor = "KMGTPEZY"; | |
| if (Regex.IsMatch(size, @"^\d+$")) | |
| { | |
| return long.Parse(size); | |
| } | |
| else | |
| { |
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
| 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 |
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
| 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]) |
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
| 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) |
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 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 |
OlderNewer