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 TextBlock CreateCellTextBlock(Cell cell) | |
| { | |
| TextBlock cellTextBlock = new TextBlock(); | |
| cellTextBlock.DataContext = cell; | |
| cellTextBlock.InputBindings.Add(CreateMouseClickInputBinding(cell)); | |
| cellTextBlock.SetBinding( | |
| TextBlock.BackgroundProperty, | |
| CreateCellAliveBinding() | |
| ); |
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
| USE MyDatabase | |
| GO | |
| CREATE ASSEMBLY SqlLibrary from 'C:\SqlLibrary.dll' WITH PERMISSION_SET = SAFE | |
| GO | |
| CREATE FUNCTION GetTextSimilarity(@inputOne [nvarchar](4000), @inputTwo [nvarchar](4000)) | |
| RETURNS [float] WITH EXECUTE AS CALLER, RETURNS NULL ON NULL INPUT | |
| AS | |
| EXTERNAL NAME [SqlLibrary].[SqlLibrary.Text.StringCompare].[GetTextSimilarity] |
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 Microsoft.SqlServer.Server; | |
| namespace SqlLibrary.Text | |
| { | |
| public class StringCompare | |
| { | |
| [SqlProcedure] | |
| public static double GetTextSimilarity( | |
| string inputOne, string inputTwo |
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 MyClass : IDoSomething | |
| { | |
| void IDoSomething.DoIt() | |
| { | |
| throw new NotImplementedException(); | |
| } | |
| } |
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
| void Main() | |
| { | |
| if (MethodOne() & MethodTwo()) | |
| { | |
| } | |
| } | |
| bool MethodOne() | |
| { | |
| Console.WriteLine("MethodOne: I got evaluated!"); |
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
| void Main() | |
| { | |
| if (MethodOne() && MethodTwo()) | |
| { | |
| } | |
| } | |
| bool MethodOne() | |
| { | |
| Console.WriteLine("MethodOne: I got evaluated!"); |
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 List<string> ParseCsvToList(this string source) | |
| { | |
| var valuesArray = source.Split(new char[] {','}); | |
| return valuesArray.Select(value => value.Trim()).ToList(); | |
| } |
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 void ForEach<T>(this T[] sourceArray, Action<T> action) | |
| { | |
| foreach (T obj in sourceArray) | |
| action(obj); | |
| } |
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 string InBase(this int number, int @base) | |
| { | |
| return Convert.ToString(number, @base); | |
| } |
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 ConversionOperators | |
| { | |
| public class Money | |
| { | |
| public string Currency { get; set; } |