Skip to content

Instantly share code, notes, and snippets.

namespace LangexplrExperiments
open System.Drawing
open System.Drawing.Imaging
open Microsoft.FSharp.Math
module ImageProcExperiments = begin
let Load24BitImageData (fileName:string) =
using(new Bitmap(fileName))
(fun bm ->
namespace LangexplrExperiments
open System.Drawing
open System.Drawing.Imaging
open Microsoft.FSharp.Math
module ImageProcExperiments = begin
let Load24BitImageData (fileName:string) =
using(new Bitmap(fileName))
(fun bm ->
namespace LangexplrExperiments
open System.Drawing
open System.Drawing.Imaging
open Microsoft.FSharp.Math
module ImageProcExperiments = begin
let Load24BitImageData (fileName:string) =
using(new Bitmap(fileName))
(fun bm ->
// Learn more about F# at http://fsharp.net
open System.Runtime.InteropServices
module FttwModule = begin
[<System.Runtime.InteropServices.DllImport(@"c:\\development\\fftw\\libfftw3-3.dll")>]
extern System.IntPtr fftw_plan_dft_r2c_2d(int nx,int ny,System.IntPtr inData,System.IntPtr out,int32 flags )
[<System.Runtime.InteropServices.DllImport(@"c:\\development\\fftw\\libfftw3-3.dll")>]
extern void fftw_execute(System.IntPtr plan)
[<System.Runtime.InteropServices.DllImport(@"c:\\development\\fftw\\libfftw3-3.dll")>]
open System.Windows.Forms
open System.Drawing
open DirectShowLib
open System.Runtime.InteropServices
open System.Runtime.InteropServices.ComTypes
let findCaptureDevice =
let moniker:IMoniker array = Array.create 1 null
let source : obj ref = ref null
module LangExplrExperiments.DirectShowCapture
open DirectShowLib
open System.Runtime.InteropServices
open System.Runtime.InteropServices.ComTypes
let private checkResult hresult = DsError.ThrowExceptionForHR( hresult )
module LangExplrExperiments.DirectShowCapture
open DirectShowLib
open System.Runtime.InteropServices
open System.Runtime.InteropServices.ComTypes
let private checkResult hresult = DsError.ThrowExceptionForHR( hresult )
@ldfallas
ldfallas / XMLGrammar.ns2
Created May 13, 2010 12:20
XML Grammar in Newspeak (still incomplete)
XmlGrammar = ExecutableGrammar(
"Xml 1.0 grammar with namespaces"
|
openAB = char: $<.
closeAB = char: $>.
amp = char: $&.
semicolon = char: $; .
topenAB = tokenFromChar: $<.
tcloseAB = tokenFromChar: $>.
using System.Collections.Generic;
using System;
namespace Langexplr.Experiments
{
public class MyTuple<T,K>
{
public T Item1 { get; set; }
public K Item2 { get; set; }
@ldfallas
ldfallas / main.xaml
Created January 12, 2011 12:19
Small experiment for highlighting text on a wpf richtextbox
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:utils="clr-namespace:Langexplr;assembly=utils"
Title="Little query" Width="300" Height="300">
<StackPanel>
<TextBlock Text="??"/>
<RichTextBox x:Name="rtb">
</RichTextBox>