Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

BennyG

BennyG BennyG

Niner since 2010

  • Rx Workshop: Reactive Coincidence

    I think my solution is close to the optimum!?

    But I had to modify the subscibtion from deltas to absolute points.

       var query = mouseDown.Join(mouseMove, l => mouseUp, r => Observable.Empty<Point>(),(l,r)=> Subtract(r,l));
    
               query.Subscribe(pos=>
                {
                    Canvas.SetLeft(image, pos.X);
                    Canvas.SetTop(image, pos.Y);
                });

  • Rx Workshop: Reactive Coincidence

    Am I allowed to post the solution of the challange?

    Benny

  • Nikolai Tillmann: Moles - Replace any .NET method with a delegate

    Nice, but have a look on F# Object Expressions. I already use F# in my Unit-Tests for mocking interfaces.

    With Object Expression you could write something like :

     

    let obj1 = { new System.Object() with member x.ToString() = "F#" }

    or

    let personComparer = {
    new
     IComparable<Person> with
     

     

    but you cannot write this, because DateTime is sealed.

     

    let now = {
    new
     System.DateTime() with
    member
     x.Now() = new
     DateTime(2000,1,1) }

     

    Benny

    
        member this.Compare(a,b) =
    
               if a.First
     > b.First then
     1
               elif
     a.First = b.First then
     0
    
               else
     0 }