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.Messaging; | |
using System.Runtime.InteropServices; | |
static class MessageQueueExtensions { | |
[DllImport("mqrt.dll")] | |
private unsafe static extern int MQMgmtGetInfo(char* computerName, char* objectName, MQMGMTPROPS* mgmtProps); | |
private const byte VT_NULL = 1; |
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.Messaging; | |
using System.Runtime.InteropServices; | |
public static class MessageQueueExtensions { | |
[DllImport("mqrt.dll")] | |
private static extern int MQMgmtGetInfo([MarshalAs(UnmanagedType.BStr)]string computerName, [MarshalAs(UnmanagedType.BStr)]string objectName, ref MQMGMTPROPS mgmtProps); | |
private const byte VT_NULL = 1; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
public static class StaticStringDictionary { | |
public static StaticStringDictionary<Type> Create<Type>(IEnumerable<KeyValuePair<string, Type>> dict, Func<string, Type> fallback) { |
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; | |
public static class DoubleStaticStringDictionary { | |
public static DoubleStaticStringDictionary<Type> Create<Type>(IEnumerable<KeyValuePair<string, Type>> dict, Func<string, Type> fallback, Func<Type, string> reverseFallback) { | |
return new DoubleStaticStringDictionary<Type>(dict, fallback, reverseFallback); | |
} | |
} |
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; | |
#if XML_DEBUG_MODE | |
using System.Linq; | |
#endif | |
using System.Xml; | |
using System.Xml.Linq; | |
public class XElementReader : IDisposable { |
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
[<AutoOpen>] | |
module ChartExtensions | |
open System.Drawing | |
open System.Windows.Forms.DataVisualization.Charting | |
open MSDN.FSharp.Charting | |
open MSDN.FSharp.Charting.ChartTypes | |
type SeriesProperties with | |
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.Collections.Generic; | |
using Newtonsoft.Json; | |
using NUnit.Framework; | |
using ServiceStack.Text; | |
using JsonSerializer = ServiceStack.Text.JsonSerializer; | |
namespace Tests | |
{ | |
[TestFixture] | |
public class TestJsonSerialization |
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
#r "System.Xml.Linq" | |
open System | |
open System.IO | |
open System.Xml.Linq | |
let script = seq { | |
//TODO: this currently loads fsproj's in alphabeticall order, we should instead | |
//build the dependencies graph of the fsproj's and load them in topological sort order |
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
//This script generates | |
//a file named __project.fsx, for each proejct which can be #load "__project.fsx" in script intending to use the same dependency graph as the code in VS | |
//a file named __solmerged.fsx, at the solution root which can be #load "__solmerged.fsx" in script intending to use the same dependency graph as the code in VS | |
//In both cases, this enforce that a script compiling in VS should work from within FSI | |
#if INTERACTIVE | |
#r "System.Xml" | |
#r "System.Xml.Linq" | |
#endif |
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
#r "packages/FSharp.Data.1.1.10/lib/net40/FSharp.Data.dll" | |
open FSharp.Data.Csv | |
open FSharp.Data.Csv.Extensions | |
let csv = CsvFile.Load("http://faculty.washington.edu/heagerty/Books/Biostatistics/DATA/ozone.csv") | |
//What are the column names of the dataset? | |
csv.Headers |
OlderNewer