Adam Speight
My Blog: The Madman Scribbling
Creator of DIC CodeAid
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
TWC9: 200! Kinect SDK v1.5, GitHub for Windows, Visual Studio 11 lineup and more
16 hours agoThe infiltration into The Death Star has begun. Bring on the Core and Clint episode.
Going Deeper with Project Roslyn: Exposing the C# and VB compiler’s code analysis
Apr 13, 2012 at 2:19 PMWhat communication protocol are you using to upload the video bits? Carrier Pigeon?
Lucian Wischik: What's New in VB11
Mar 30, 2012 at 2:28 AMLucian, I noticed something strange when you did the Hello World part at the beginning.
When using the "traditional" methods, the game it background continued to play, but when demo the Async approach, it seem (to me) to run synchronously. ie the Message Popup appeared then the game ran.
Was this an artefact of Async, the rest of code following this is lifted into a continuation?
Beckman Meijer Overdrive: LINQ - Composability Guaranteed
Mar 09, 2012 at 1:59 PMIsn't Mathematica based on Lisp?
Working with Depth Data
Feb 07, 2012 at 9:00 PMWhat happens at 2000mm? Dan
Undefined behavior ?
Announcing Visual Studio Achievements Beta
Jan 19, 2012 at 7:37 AMI predict this become the Coder's Version of Farmville. (ie; must people will not two hoots, as to what achievement you've gained)
Visual Studio's will be forever tarnished, cometh the day when it is a requirement in a job vacancy.
TWC9: New Team Members, Win8, C++, SQL 2012, Cloud Numerics
Jan 13, 2012 at 10:39 PMOn the subject of INotifyPropertyChanged, the Anders Hejlsberg Way.
The only issue I have with it is that it as to replicated across classes.
Now as I see it, if you slightly modify the code you can make it an extension method.
Different interface, so you raise the event on the correct object. (As I don't no a way to externally trigger them.).
Then you have the following extension method(s).
Imports System.Runtime.CompilerServices Imports System.ComponentModel Imports System.Collections.Generic Public Module Exts <Extension> Public Sub SetProperty(Of T, U As INotifyPropertyChanging_Extd)(ByVal obj As U, [property] As String, toValue As T, ByRef usingField As T, Optional ignored As Object = Nothing) If obj Is Nothing Then Exit Sub If Not EqualityComparer(Of T).Default.Equals(usingField, toValue) Then Dim old = usingField obj.RaisePropertyChangingEvent(obj, New PropertyChangingEventArgs([property])) usingField = toValue obj.RaisePropertyChangedEvent(obj, New PropertyChangedEventArgs([property])) End If End Sub <Extension> Public Sub SetProperty(Of T, U As INotifyPropertyChanged_Extd)(ByVal obj As U, [property] As String, toValue As T, ByRef usingField As T) If obj Is Nothing Then Exit Sub If Not EqualityComparer(Of T).Default.Equals(usingField, toValue) Then usingField = toValue obj.RaisePropertyChangedEvent(obj, New PropertyChangedEventArgs([property])) End If End Sub End ModuleExample Class using this extension method.
Public Class Example Implements INotifyPropertyChanged_Extd Private _Value As Integer Property Value As Integer Get Return _Value End Get Set(value As Integer) Me.SetProperty("Value", value, _Value) End Set End Property Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged Public Sub RaisePropertyChangedEvent(source As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged_Extd.RaisePropertyChangedEvent RaiseEvent PropertyChanged(source, e) End Sub End ClassAnd the _PropertyChanged event being handled.
Class MainWindow Private WithEvents MyExample As New Example Private Sub MyExample_PropertyChanged(sender As Object, e As ComponentModel.PropertyChangedEventArgs) Handles MyExample.PropertyChanged Debug.WriteLine(e.PropertyName) End Sub End ClassBrian Beckman: Hidden Markov Models, Viterbi Algorithm, LINQ, Rx and Higgs Boson
Dec 26, 2011 at 11:37 AMWhat advantages does the MayBe monad have over an Option<T> ?
Option<T> can be thought as nullable over any "kind" of type (ref or val)
YOW! 2011: Mike Lee - The Road to Appsterdam
Dec 19, 2011 at 12:30 PMStanding Ovation & Cheers or encore! encore!.
I was like WTF!? before playing the video, by the I'm more MMM!
GoingNative 4: Jim Springfield on ATL, GoingNative Conference - Register Today!
Nov 29, 2011 at 8:01 PM++ is the postfix increment and a unary operator
So wouldn't C++11 would be a compile-time error?
Would it be more (C++)+=11?
See more comments…