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
/// <summary> | |
/// Utilties for reflection | |
/// </summary> | |
public static class ReflectionExtensions | |
{ | |
/// <summary> | |
/// Get all the fields of a class | |
/// </summary> | |
/// <param name="type">Type object of that class</param> | |
/// <returns></returns> |
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.Collections.Generic; | |
using System.Linq; | |
namespace NumberToWordsLib | |
{ | |
/// <summary> | |
/// Number to word languages | |
/// </summary> | |
public enum 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
using System; | |
/// <summary> | |
/// Contains approximate string matching | |
/// </summary> | |
static class LevenshteinDistance | |
{ | |
/// <summary> | |
/// Compute the distance between two strings. | |
/// </summary> |
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
/* | |
How to capture the whole screen: | |
var image = ScreenCapture.CaptureDesktop(); | |
image.Save(@"C:\temp\snippetsource.jpg", ImageFormat.Jpeg); | |
How to capture the active window: | |
var image = ScreenCapture.CaptureActiveWindow(); | |
image.Save(@"C:\temp\snippetsource.jpg", ImageFormat.Jpeg); | |
*/ | |
public class ScreenCapture | |
{ |
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 IranianSystemEncoding | |
{ | |
static char[] ByteToChar; | |
static Byte[][] CharToByte; | |
static IranianSystemEncoding() | |
{ | |
InitializeData(); | |
} | |
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
ResourceDictionary | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Style TargetType="Ribbon"> | |
<Setter Property="Background" Value="White"/> | |
<Setter Property="Foreground" Value="Black"/> | |
<Setter Property="BorderBrush" Value="{x:Null}"/> | |
<!-- TODO Template | |
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
<#@ template language="C#" debug="false" hostspecific="false" #> | |
<#@ output extension=".txt" #> | |
<#@ assembly name="System" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Data.Entity" #> | |
<#@ assembly name="EnvDTE" #> | |
<#@ include file="t4toolbox.tt" #> | |
<#@ import namespace="EnvDTE" #> | |
<#@ import namespace="System" #> | |
<#@ import namespace="System.Collections" #> |
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
Create Function dbo.[UDF_Gregorian_To_Persian] (@date datetime) | |
Returns nvarchar(50) | |
as | |
Begin | |
Declare @depoch as bigint | |
Declare @cycle as bigint | |
Declare @cyear as bigint | |
Declare @ycycle as bigint | |
Declare @aux1 as bigint | |
Declare @aux2 as bigint |
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
<Themes> | |
<Theme Name="Ninja" GUID="{18d95dec-1d05-4e75-b38a-b107a53d5fc4}"> | |
<Category Name="Autos" GUID="{a7ee6bee-d0aa-4b2f-ad9d-748276a725f6}"> | |
<Color Name="ChangedText"> | |
<Foreground Type="CT_RAW" Source="FFF7A1A1" /> | |
</Color> | |
</Category> | |
<Category Name="Cider" GUID="{92d153ee-57d7-431f-a739-0931ca3f7f70}"> | |
<Color Name="ToolWindow"> | |
<Background Type="CT_RAW" Source="FF252526" /> |