Those interfaces exist in the real world too... Bayonet Cap, Edison Screw, Small edison Screw. They'd be modeled in the original version. Therefore I'd say 0 lines, its done in the dependancy injection framework's configuration script.... :-)
InfRes
Posts
-
How many lines of C# code does it take to change a light bulb? -
Real time peak identificationYou were on the right track with instantaneous derivative. At the actual peak the derivative goes to zero, one side of it is positive, the other side is negative. Remember though that your sample may not be at the peak, so the peak may be between 2 samples rather than the middle sample of a group of 3. So all you need do to is find where the derivatives changes sign, pos to neg is peak, neg to pos is trough. It doesn't tell you the exact point of the peak/trough, just that one happened between the sign changes. Hope this is some use Steven
-
Recursive FailIts odd, it seems to happen with a large number of "X# recursion" where X is any single letter it doesn't happen with z# or p#...if it was intentional i'd have expected "vb recusion" and only c# f# and possibly j# to do this... I'd imagine this is a bug rather than an intentional thing...
-
wcf communication errorOne tool I always find useful in diagnosing any network application, is wireshark. With this, you can see what exactly the client is asking for, and what exactly is being returned... Once you know whats going on 'over the wire' you can work back through your code & configuration to figure out what the problem is...
-
Advice on how to help an 11 year old start programming...Ok, people are going to shoot this down, but... a. It's free (he already has it) b. There is an instant gratification with it c. its flexible/different Its the very fact that it doesn't enforce oo style development, or rigid structures that make it good... Too many developers are blinded by OO that it limits their imagination as to whats possible... And besides, learning from a less structured language first, helps one appreciate the benefits of structure when you move to that.... All that said, the interest in robotics/games isn't catered for in this suggestion obviously...