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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication1 | |
{ | |
public abstract class HierarchyNode | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication1 | |
{ | |
public abstract class HierarchyNode | |
{ |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Demo.Default" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using System.IO; | |
namespace MvcApplication3 | |
{ | |
public static class ExtendBundleCollection |
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 abstract class MyViewPage<TModel> : System.Web.Mvc.WebViewPage<TModel> | |
{ | |
public override string Href(string path, params object[] pathParts) | |
{ | |
if (BundleTable.Bundles.Any(b => b.Path.Equals(path, StringComparison.InvariantCultureIgnoreCase))) | |
return BundleTable.Bundles.ResolveBundleUrl(path); | |
return base.Href(path, pathParts); | |
} | |
} |
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 Retry | |
{ | |
int _times; | |
Func<int, TimeSpan> _delay = i => TimeSpan.FromTicks(0); | |
List<Predicate<Exception>> _shouldRetry = new List<Predicate<Exception>>(); | |
Action<int, Exception> _log = (i, ex) => { Debug.WriteLine("Quartet.Core.Retry: {0}", ex.ToString()); }; | |
Retry(int times) | |
{ | |
_times = times; |
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
dir .\ -Include bin,obj -Recurse | del -Force -Recurse |
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 class StringExtensions | |
{ | |
// Generates a random seq of characters | |
// e.g. "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ01234567890!@#$%&*()-+".Randomize(8); | |
public static string Randomize(this string characters, int len) | |
{ | |
var rng = new RNGCryptoServiceProvider(); | |
var builder = new StringBuilder(len); | |
var bytes = new byte[4]; | |
for (var i = 0; i < len; i++) |
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
TAKEOWN /f "X:\" /r /d y | |
ICACLS "X:\" /reset /T |
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
SELECT | |
cat.name, | |
ItemCount = FULLTEXTCATALOGPROPERTY(cat.name, 'ItemCount'), | |
MergeStatus = FULLTEXTCATALOGPROPERTY(cat.name, 'MergeStatus'), | |
PopulateCompletionAge = FULLTEXTCATALOGPROPERTY(cat.name, 'PopulateCompletionAge'), | |
PopulateStatus = FULLTEXTCATALOGPROPERTY(cat.name, 'PopulateStatus'), | |
ImportStatus = FULLTEXTCATALOGPROPERTY(cat.name, 'ImportStatus') | |
FROM | |
sys.fulltext_catalogs AS cat |
OlderNewer