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
declare @serchval varchar(20) = '12347' | |
declare @table_name varchar(max), @col_name varchar(max),@sql varchar(max) | |
create table #results (table_name varchar(100), column_name varchar(100)) | |
declare crunch_all cursor forward_only for | |
select t.table_schema+'.'+t.table_name table_name,c.COLUMN_NAME col_name from INFORMATION_SCHEMA.TABLES t | |
inner join INFORMATION_SCHEMA.COLUMNS c on c.TABLE_NAME = t.TABLE_NAME and c.TABLE_SCHEMA = t.TABLE_SCHEMA | |
where c.DATA_TYPE in ('int','decimal','smallint','float','real') | |
open crunch_all |
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
class Person | |
{ | |
public void sayHello() | |
{ | |
System.out.println("Hello World"); | |
} | |
} | |
class Employee extends Person | |
{ | |
public void sayHello() |
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
[SecurityException: That assembly does not allow partially trusted callers.] | |
Raven.Database.Util.PortUtil..cctor() +0 |
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
class PropertyChangeBase : INotifyPropertyChanged | |
{ | |
protected void SignalChanged<T>(Expression<Func<T>> exp) | |
{ | |
if (exp.Body.NodeType == ExpressionType.MemberAccess) | |
{ | |
var name = (exp.Body as MemberExpression).Member.Name; | |
PropertyChanged(this, new PropertyChangedEventArgs(name)); | |
} | |
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
public class SwapperTest | |
{ | |
public class Test_ | |
{ | |
public int X { get; set; } | |
public int Y { get; set; } | |
} | |
[TestMethod] |
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 class AddressResolver | |
{ | |
string language = "en-GB"; | |
public AddressResolver() | |
{ | |
} | |
public AddressResolver(string language) | |
{ | |
this.language = language; |
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 class RouteResolver | |
{ | |
string language = "en-GB"; | |
public RouteResolver() | |
{ | |
} | |
public RouteResolver(string language) | |
{ |
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 class Haversine | |
{ | |
private static double ToRadiant(this double ang) | |
{ | |
return ang * Math.PI / 180.0; | |
} | |
private static double ToDeg(this double ang) | |
{ | |
return ang / Math.PI * 180.0; | |
} |
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
static class PredicateRewriter | |
{ | |
public static Expression<Predicate<T>> Rewrite<T>(Expression<Predicate<T>> exp | |
, string newParamName) | |
{ | |
var param = Expression.Parameter(exp.Parameters[0].Type, newParamName); | |
var newExpression = new PredicateRewriterVisitor(param).Visit(exp); | |
return (Expression<Predicate<T>>)newExpression; | |
} |
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 interface IContract<T> | |
{ | |
IContract<T> Is<TT>(); | |
IContract<T> IsEqual<TT>(TT of) where TT : T,IEquatable<TT>; | |
IContract<T> IsGreatherThan<TT>(TT of) where TT : T,IComparable; | |
IContract<T> IsGreatherThanOrEqual<TT>(TT of) where TT :T, IComparable; | |
IContract<T> IsLessThan<TT>(TT of) where TT : T,IComparable; | |
IContract<T> IsLessThanOrEq<TT>(TT of) where TT : T,IComparable; | |
IContract<T> IsNot<TT>(); | |
IContract<T> IsNotEqual<TT>(TT of) where TT : T,IEquatable<TT>; |
NewerOlder