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 override int GetHashCode() | |
| { | |
| unchecked // Overflow is fine, just wrap | |
| { | |
| int hash = 17; | |
| // Suitable nullity checks etc, of course :) | |
| hash = hash * 23 + field1.GetHashCode(); | |
| hash = hash * 23 + field2.GetHashCode(); | |
| hash = hash * 23 + field3.GetHashCode(); | |
| return hash; |
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 DisposableClass : | |
| IDisposable | |
| { | |
| bool _disposed; | |
| public void Dispose() | |
| { | |
| Dispose(true); | |
| GC.SuppressFinalize(this); | |
| } |
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; | |
| public class Example | |
| { | |
| public static void Main() | |
| { | |
| int maxPrime = 100; | |
| List<int> primes = GetPrimes(maxPrime); | |
| Console.WriteLine("Primes less than {0}:", maxPrime); |
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
| git log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset' |
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
| #r @"..\packages\xunit.1.9.1\lib\net20\xunit.dll" | |
| #r @"..\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\FsUnit.Xunit.dll" | |
| #r @"..\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\NHamcrest.dll" | |
| #r @"..\packages\xunit.extensions.1.9.1\lib\net20\xunit.extensions.dll" |
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
| let Pivot (structure: List<List<'t>>) = | |
| let rows = [0..structure.Length - 1] | |
| let columns = [0..structure.[0].Length - 1] | |
| columns |> List.map(fun c -> rows |> List.map(fun r -> structure.[r].[c])) |
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
| <section name="messageBus" type="System.Configuration.NameValueSectionHandler"/> | |
| var busConfigSection = (NameValueCollection)ConfigurationManager.GetSection("messageBus"); |
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
| var collectionRootAttr = new XmlRootAttribute("settings"); | |
| var collectionRootAttrs = new XmlAttributes { XmlRoot = collectionRootAttr }; | |
| var roomTypeIgnoreAttrs = new XmlAttributes { XmlIgnore = true }; | |
| var detailsAttrs = new XmlAttributes(); | |
| var detailsElement = new XmlElementAttribute("setting"); | |
| detailsAttrs.XmlElements.Add(detailsElement); | |
| var langAttrs = new XmlAttributes(); |
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
| var Page = window.Page || {}; | |
| Page.DataParser = function (tableId, rowFormat) { | |
| self.tableId = tableId; | |
| self.rowFormat = rowFormat; | |
| }; | |
| // rowformat = [""] | |
| Page.DataParser.prototype = (function () { |
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
| mount -t 9p -o trans=virtio,version=9p2000.L /hostshare /mnt/software |