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
| \A | |
| # Push State A, Index = 0 | |
| (?<StateIdBit0>) | |
| (?<StateIdBit1>) | |
| (?<StateIdBit2>) | |
| (?: | |
| (?: | |
| (?: | |
| # When In State A, Index = 0 | |
| (?<=(?=.{0}(?<=\A\k<StateIdBit0>))\A.*) |
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 Ninject; | |
| namespace ConsoleApplication1Ninject | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| IKernel kernel = new StandardKernel(); |
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.Web; | |
| using System.Text.RegularExpressions; | |
| using System.Xml.Linq; | |
| public static class CassetteHelper | |
| { | |
| private static readonly Regex EnsurePathRegex = new Regex(@"((?:href|src)\s*=\s*"")/(_cassette/)", | |
| RegexOptions.Compiled); |
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 void ForEach(Action<T> action) | |
| { | |
| if (action == null) | |
| { | |
| ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); | |
| } | |
| for (int i = 0; i < this._size; i++) | |
| { | |
| action(this._items[i]); | |
| } |
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 IEnumerable<Point> GetPoints(IEnumerable<int> coordinates) | |
| { | |
| var e = coordinates.GetEnumerator(); | |
| while (e.MoveNext()) | |
| { | |
| int x = e.Current; | |
| // here I assume the length isn't odd, so I ignore the result of MoveNext | |
| e.MoveNext(); | |
| int y = e.Current; |
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.Text.RegularExpressions; | |
| namespace ConsoleApplication1 | |
| { | |
| // sample for http://kobikobi.wordpress.com/2011/04/25/net-regular-expressions-using-the-stack-state-to-understand-numeric-values/ | |
| class Program | |
| { | |
| static void Main(string[] args) |
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; | |
| using System.Text.RegularExpressions; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program | |
| { |
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
| 1 | |
| 1 1 | |
| 1 1 9 | |
| 2 1 1 1 |
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
| Hello World (hw) | |
| Home work (HW) | |
| Are We Going To Have To Go Through ALL This Again? (AWGTHTGTATA) | |
| a b c (Abc) | |
| e f (ef) | |
| g (g) | |
| From beneath you, it devours (fbyid) |
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
| // Source code of DocIdRedir.aspx | |
| // Microsoft.Office.DocumentManagement.Pages | |
| // DLL Folder: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\BIN\Microsoft.Office.DocumentManagement.Pages.dll | |
| // Used for http://kobikobi.wordpress.com/2010/09/29/sharepoint-2010-using-document-id-to-link-to-a-specific-version/ | |
| [PermissionSet(SecurityAction.Demand, Name="FullTrust"), PermissionSet(SecurityAction.InheritanceDemand, Name="FullTrust")] | |
| public class DocIdRedir : LayoutsPageBase | |
| { | |
| // Methods | |
| private static string GetSearchUrl(SPWeb web, string docId) |