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 HtmlFormatter | |
| { | |
| #region Public Methods | |
| public void Format(JObject item, TextWriter writer) | |
| { | |
| writer.WriteLine("<table>"); | |
| foreach (JProperty property in item.Properties()) | |
| { |
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
| // Algorithm taken from | |
| // http://devdirective.com/post/91/creating-a-reusable-though-simple-diff-implementation-in-csharp-part-1 | |
| // http://devdirective.com/post/109/creating-a-reusable-though-simple-diff-implementation-in-csharp-part-2 | |
| // http://devdirective.com/post/115/creating-a-reusable-though-simple-diff-implementation-in-csharp-part-3 | |
| // Site is not available anymore | |
| const string FIRST = "Hello, beautiful world, I like you"; // -lie | |
| const string SECOND = "Hello, incredible world, I love you!"; // +ös | |
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
| TimeSpan maxBuildAge = TimeSpan.FromMinutes(15); | |
| void Main() | |
| { | |
| var coll = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://sv-int-tfs-02:8080/tfs/DefaultCollection")); | |
| var buildService = coll.GetService<IBuildServer>(); | |
| var spec = buildService.CreateBuildQueueSpec("*", "*"); | |
| spec.CompletedWindow = maxBuildAge; |
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
| // DumpClass: this.Connection.DumpClass("SELECT * from finalpdfpageinfo") | |
| // DumpInsert: this.Connection.DumpInsert("SELECT * from finalpdfpageinfo") | |
| public static class CSharpClassFromSqlGeneratorExtensions | |
| { | |
| private static readonly Dictionary<Type, string> TypeAliases = new Dictionary<Type, string> { | |
| { typeof(int), "int" }, | |
| { typeof(short), "short" }, | |
| { typeof(byte), "byte" }, | |
| { typeof(byte[]), "byte[]" }, |
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
| const int IWidth = 320; | |
| const int IHeight = 320; | |
| const int RWidth = 16; | |
| const int RHeight = 16; | |
| Bitmap b = new Bitmap(IWidth, IHeight); | |
| Graphics g = Graphics.FromImage(b); | |
| g.Clear(Color.Transparent); |
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
| ; The original script can be found at https://gist.github.com/Danik/5808330 (forked from there) | |
| ; Adapt to german layout: | |
| ; Capslock + Z - PageUp (changed from Y) | |
| ; And some new key remappings for better accessibility of {[]}\/ and adapt to german layout: | |
| ; Capslock + ( - [ | |
| ; Capslock + ) - ] | |
| ; Capslock + ? - \ | |
| ; Capslock + / - { | |
| ; Capslock + = - } | |
| ; Capslock + - - / |
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
| // required references: | |
| // Microsoft.VisualStudio.QualityTools.UnitTestFramework | |
| // Raven.Abstractions (3.0) | |
| // Raven.Client.Lightweight (3.0) | |
| // Raven.Database (3.0) | |
| // System | |
| // Sstem.ComponentModel.Composition | |
| using System; | |
| using System.Collections.Generic; |