Cheval

Cheval N2Cheval Why not null?

Niner since 2009

  • Channel 9 has gone global!

    In Australia here and hitting the "North Central US" data center. Hope that's because I'm up earlier than the other sleepy heads and getting all the bandwidth...

  • Goodbye 9: Nic Fillingham Exit Interview

    Good luck Nic and don't forget to come back and visit some time. Sounds like you've been on a walk-about for some time indeed.

  • Microsoft‘s Windows 8 Reimagines Windows for the Future

    Apparently the download files are incomplete...? 21 seconds appears to be right.

     

  • Hawaii interns XAPfest 2011

    Adam: Agreed! Simple camera utilities like that one is as important to the smart phone as email is to the slow internet. Julia should expand the start recording on face smile (or any other per-assigned visual cue) to video as well.

    The next step in smart phone has to be tactile feed back, especially when USB key insertion. A simple electro-magnet that when in use, clips the key in place, and releases when not in use. ie. only when powered and in use the clips pop in.

  • Rx Workshop: Schedulers

    It runs and should do as the method explanations indicate but doesn't delay each quote as expected (unless I don't use the scheduler?), but I shouldn't think you need to for each over it like the other attempts above...

    Query Code:

    return from n in quotes.Where(p => p.Symbol == "MSFT")
      select new { date = n.Date, close = n.Close.ToString() };


    GetQuotes Code:

    var timer = Observable.Interval(TimeSpan.FromSeconds(5), scheduler).ObserveOn(this);
    return quotes.ToObservable().Zip(timer, (quoteList, timerList) => quoteList);

  • Rx Workshop: Writing Queries

    I'm not sure I got this right as it seemed a little to easy...

    var lookup = textChanged
                                .Select(_ => txt.Text)
                                .DistinctUntilChanged()
                                .Throttle(TimeSpan.FromMilliseconds(200))
                                .Do(text => Console.WriteLine("TextChanged: {0}", text))
                                .Where(text => text.Length >= 3)
                                .Do(text => Console.WriteLine("Lookup: {0}", text));
    
    var results = lookup
                              .Select(text => getSuggestions(text))
                              .Switch();


  • Rx Workshop: Unified Programming Model

    As more of an assembler, rather than programmer or developer, I just kept removing things and plugging different things together and it actually worked first time!?! So here is my effort.

    var textChanged = Observable.FromEventPattern(txt, "TextChanged");
    
    var getSuggestions = Observable.FromAsyncPattern<string, DictionaryWord[]>(BeginMatch, EndMatch);

     

  • Rx Workshop: Observables versus Events

    I got lost down the rabbit hole of trying to follow the hint. Here's mine:

    class Events {
            public event Action<string> TextChanged;
    
            public virtual void OnTextChanged(string text) {
                var t = TextChanged;
                if (t != null)
                    t(text);
            }
    
            private event Action<string> lc; //lengthChanged
            public event Action<int> LengthChanged {
                add {
                    lc += x => { Console.WriteLine(x == null ? 0 : x.Length); };
                    TextChanged += lc;
                }
                remove {
                    TextChanged -= lc;
                }
            }
        }
    
    class Observables {
            ISubject<string> textChanged = new Subject<string>();
    
            public virtual void OnTextChanged(string text) {
                textChanged.OnNext(text);
            }
    
            public IObservable<string> TextChanged { get { return textChanged; } }
    
            public IObservable<int> LengthChanged {
                get {
                    return textChanged.Select(s => s == null ? 0 : s.Length);
                }
            }
        }

  • Rx Workshop: Observables versus Events

    Sorry but I'm having a mental block solving the Observables section. I've checked the main site and looked through the links like HOL202 but it's not clicking yet. Where can I either get some more hints or find the solution.

  • Anders Hejlsberg: Questions and Answers

    Charles: With regards to the download with resume issue, please see this link:

    http://channel9.msdn.com/Forums/Feedback/mediach9ms-VS-filesch9ms

See more comments…