This file contains 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 TItem MaxBy<TItem, TValue>(this IEnumerable<TItem> items, Func<TItem, TValue> selector) | |
where TValue : IComparable | |
{ | |
if (items == null) | |
throw new ArgumentNullException("items"); | |
if (selector == null) | |
throw new ArgumentNullException("selector"); | |
TItem maxItem = items.FirstOrDefault(); |
This file contains 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
msbuild xpand.build /t:Copy;NuGetPackage /p:Version=13.2.9.100;SkipFixReferences=true;SkipDashboard=true |
This file contains 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
if not OBJECT_ID('dbo.Proc_BackupDatabaseDailyWithLog') is null | |
Drop Proc dbo.Proc_BackupDatabaseDailyWithLog | |
go | |
Create Proc dbo.Proc_BackupDatabaseDailyWithLog( | |
@DbName sysname, | |
@TargetPath nvarchar(1000)) as | |
This file contains 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
if not OBJECT_ID('dbo.Proc_BackupDatabaseDailyWithLog') is null | |
Drop Proc dbo.Proc_BackupDatabaseDailyWithLog | |
go | |
Create Proc dbo.Proc_BackupDatabaseDailyWithLog( | |
@DbName sysname, | |
@TargetPath nvarchar(1000)) as | |
This file contains 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 ActionContainerHolderEx : ActionContainerHolder | |
{ | |
protected override DevExpress.ExpressApp.Web.Templates.ActionContainers.Menu.MenuActionItemBase CreateSimpleActionItem(DevExpress.ExpressApp.Actions.SimpleAction simpleAction) | |
{ | |
SimpleActionMenuActionItem item = base.CreateSimpleActionItem(simpleAction) as SimpleActionMenuActionItem; | |
if (item != null) | |
{ | |
ModificationsController controller = item.Action.Controller as ModificationsController; |
This file contains 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 DateTimeMaskController : ViewController<DetailView> | |
{ | |
protected override void OnViewControlsCreated() | |
{ | |
base.OnViewControlsCreated(); | |
foreach (var viewItem in View.Items) | |
{ | |
ASPxDateTimePropertyEditor editor = viewItem as ASPxDateTimePropertyEditor; | |
if (editor != null) | |
editor.ControlCreated += (s, e) => |
This file contains 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 static int AddHashCodes(params object[] fields) | |
{ | |
return BitConverter.ToInt32(BitConverter.GetBytes(fields.Select(f => f == null ? 0L : f.GetHashCode()).Sum()),0); | |
} |
This file contains 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 ListWrapper<TSource, TDest> : IList<TDest> | |
where TDest : class | |
where TSource : TDest | |
{ | |
private readonly IList<TSource> list; | |
public ListWrapper(IList<TSource> list) | |
{ | |
this.list = list; | |
} |
This file contains 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
VBoxManage setextradata "<VMName>" "CustomVideoMode1" "1600x900x32" |
This file contains 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 Proc [dbo].[Proc_DropConstraints] | |
@TableName sysname, | |
@ColumnName sysname | |
as | |
Declare @SQL nvarchar(1000) | |
Declare RS Cursor local read_only for | |
Select 'Alter Table ' + @TableName+ |
NewerOlder