Skip to content

Instantly share code, notes, and snippets.

@panesofglass
panesofglass / SimpleGraph.fs
Created May 26, 2010 04:54
F# port of simplegraph.py from Chapter 2 of O'Reilly's Programming the Semantic Web
namespace SemanticWeb
open System
open System.Collections.Generic
open System.IO
open System.Text
open Kent.Boogaart.KBCsv
/// A simple triple store
type SimpleGraph(spo: Map<string, Map<string, Set<string>>>,
pos: Map<string, Map<string, Set<string>>>,
public class DetailLoaderProgressTest
{
private List<Fake> _batch;
private IDetailLoader<Fake> _detailLoader;
private int _counter;
public DetailLoaderProgressTest()
{
_batch = new List<Fake>();
_detailLoader = new FakeDetailLoader();
public interface IDetailItemLoader<T>
{
T GetDetailItemFrom(Row row);
}
class DetailLoaderProgressTest
{
private List<Fake> _batch;
private IDetailLoader<Fake> _detailLoader;
private SpreadsheetDocument _spreadsheet;
private int _counter;
public DetailLoaderProgressTest()
{
_batch = new List<Fake>();
public class DetailItemLoaderWithProgressItem<T> : IDetailItemLoader<T>
{
private readonly IDetailItemLoader<T> _itemLoader;
private readonly ProgressItem _progressItem;
public DetailItemLoaderWithProgressItem(IDetailItemLoader<T> itemLoader, ProgressItem progressItem)
{
_itemLoader = itemLoader;
_progressItem = progressItem;
}
module FsJson
open System
open System.Text.RegularExpressions
type Json =
| JsonObject of JsonSlot list
| JsonString of String
| JsonNumber of float
| JsonBool of bool
| JsonNull
@panesofglass
panesofglass / WinForms.rb
Created June 10, 2010 04:57 — forked from mattpodwysocki/WinForms.rb
Rx in IronRuby
require 'System.CoreEx, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
require 'System.Interactive, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
require 'System.Reactive, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
require 'System.Windows.Forms'
include System
include System::Collections::Generic
include System::Linq
include System::Windows::Forms
load_assembly 'System.Core'
load_assembly 'System.CoreEx, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
load_assembly 'System.Reactive, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
using_clr_extensions System
using_clr_extensions System::Linq
include System
include System::Linq
Server Error in '/MockChat' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
module Freac
open System.Net
open System.Net.Sockets
open System.Threading
type System.Net.Sockets.Socket with
member this.AsyncAccept() =
Async.FromBeginEnd(this.BeginAccept, this.EndAccept)
let inline (<--) (m:MailboxProcessor<_>) msg = m.Post(msg)