Author Archives: david

RX Example

Just an update to the doc with the Rx tutorial: Newer versions of Rx need a small change to the source code: Observable.FromEvent<EventArgs>(txt, “TextChanged”) Changes to Observable.FromEventPattern<EventArgs>(txt, “TextChanged”) And the references are: System.Reactive.Core System.Reactive.Interfaces System.Reactive.PlatformServices System.Reactive.Linq System.Reactive.Windows.Forms Rx is available on … Continue reading

Posted in C# | Tagged , | Leave a comment

Embedding a Python Interpreter in Java – Jython

So here is the other half of the code – the Java test end (Note Test Class in this case is a simple Java class with a property (string) Value) (The real case would not use propertis due to the … Continue reading

Posted in Python | Tagged , , , | Leave a comment

Embedding a Python Interpreter in C# – Iron Python

I needed to be able to execute scripts in two client applications. One was written in Java the other in C#. The script needs to manipulate classes in the language the interpreter in embedded in. This program works with IronPython … Continue reading

Posted in Python | Tagged , , | Leave a comment

More on F# Units

Another wonderful thing about units in F# is that you can specify conversions. Consider the following: [<Measure>] type s [<Measure>] type m [<Measure>] type v = m / s let v1 = 1<m> let v2 = 1<s> let v3 = … Continue reading

Posted in F# | Tagged | Leave a comment

EntityFramework DbContext Template Namespaces

I seem to be seeing something odd in EF. I have a working project that has a data model (.edmx) that was built from the database, with code generated using the DbContext template. The object model was then edited (introduction of inheritance, … Continue reading

Posted in EF | Tagged , | Leave a comment

F# Spec

This might be in one of the books on F# floating about, but if it is I never noticed it. This example is copied from the F# spec [<Measure>] type kg [<Measure>] type m [<Measure>] type s let gravityOnEarth = … Continue reading

Posted in F# | Tagged , | Leave a comment

Odd Excel Macro Behaviour with Date Formats

Just to make the day complete, part of the system we were updating had a bug raised against it by another team. The module in question imports data from excel spreadsheet files that are based on a standard template. The … Continue reading

Posted in Uncategorized | Leave a comment

Missing COM Callbacks

This was an odd one. A very simple piece of code failed on the server, but as usual works on our machines. The c# code in question looked a bit like this: void GetComToDoStuff() { comObjectInterop.Event += MyCallBack; comInterop.StartDoingStuff(); _manualResetEvent.Wait(); … Continue reading

Posted in Uncategorized | Leave a comment

MissingManifestResourceException

The problem was an odd visual studio 2010 solution that shared some code between a silverlight front end and a full fat .Net server. The silverlight project with the shared code contained the shared code as references to the files … Continue reading

Posted in Uncategorized | Leave a comment

Working with Databases in Visual Studio 2010

Having had a less than happy time with the Database Project in Visual Studio 2010 I can report that I have found a workable alternative. Create Database (DEV version) (However you like) Use Sql Server Management Studio to generate an … Continue reading

Posted in VS2010 | Tagged | Leave a comment