Someone should really write some code for backing up articles to github :~
Kenneth Haugland
Posts
-
Begun Backing Up My CP Articles -
Pin numbers.I had no choice in the matter; I just got a letter saying that this is your PIN number.
-
Do americans not use the metric system because ...I found this video way too funny... :D
-
Binding Header in TabItem to child property in the ViewModelI have a standard C#, WPF, and PRISM project, and I wanted to have one module per tab item. But I want to bind the header of a property in the ViewModel directly to the parent TabItem. I tried this (among other things such as Content.DataContext.Message etc.) :
I have a distinct feeling I have done this before, but I cannot figure it out at the moment, so any suggestions?
-
I've heard it all now.Tell him to get a Finger-Longer :-D : Fing-Longer | Futurama Wiki | Fandom[^]
-
I bought this book: encyclopedia of architectureI think not; I think the book is too old to still hold a copyright.
-
MVVM As Explained by an Idiot (Yours, Truly)You can use the Behavior class to mess around with that. Effective but I wont say pretty; it's an attached property
-
Could a Giant Parasol in Outer Space Help Solve the Climate Crisis?Old idea: NASA's doomed plan to wrap the planet in a ring of floating copper - The Verge[^] Or we can smear all plants in the rain forest with sun protection cream? It should get everyone a job to do at least. :)
-
MVVM As Explained by an Idiot (Yours, Truly)I think it stinks at that job. Why has there been no improvement in the connection between UI and properties? All the errors and limitations of inputs connected to the UI are so tedious to do. Is the current situation really the best we can do?
-
MVVM As Explained by an Idiot (Yours, Truly)It was just a trick that made some things easier; there was nothing else special about it in my mind. And you could give your designer the Xaml and tell him/her to do their thing without having the need to speak to them. Kind of :laugh:
-
MVVM As Explained by an Idiot (Yours, Truly)honey the codewitch wrote:
It's just a pattern, not a technology.
Totally agree. I'm curios: Who says otherwise? :doh:
-
MVVM As Explained by an Idiot (Yours, Truly)I always just found bindings to leave the view clear of other code; just separate the view and other code. I used to like WinForms programming. It was so simple. Until the program got massive. And you would have to scroll endlessly to find the relevant code. MVVM just seems to me to be the next logical step to separate stuff and make the organization simpler.
-
MVVM As Explained by an Idiot (Yours, Truly)I always thought of it as having only one difference from "normal" programming in WinForms. The View contained all the code for animations and layout; other than that, its pretty self-explanatory.
-
Should 0.5 round up or down?It does both, does it not? 0.5 => 0 1.5 => 2 2.5 => 2 3.5 => 4 etc. This was mainly Carl Friedrich Gauss's idea. Basically, its a choice you make, and you could choose differently. Your computer might do it differently...
-
Mounting TV with swing arm in draywall?That is probably what I'll end up doing anyway, but I'm still curious if it will hold. :-D
-
Mounting TV with swing arm in draywall?I wanted to mount my shiny new TV with a swing arm directly into my drywall. I just like the flexibility a swingarm would give me, but there are some issues that make it difficult to mount the swingarm directly into the studs in my wall. So the question became: is this even feasible with drywall anchors alone? So I started watching this video where he tested out some different drywall anchors (summation of the results are roughly 16 min into the video): Which Drywall Anchor is Best? Let's find out! - YouTube[^] I was trying out some physics calculations here and wanted a second opinion to see if I was completely off. The TV itself weighs about 25 Kg and the swingarm is about 5 Kg alone. When fully extended, the TV extends about 60 cm from the wall. The mount itself (that I had lying around) is secured to the wall with three screws. One 15 cm above the arm, one 5 cm above the arm, and one 5 cm below the arm. So I'm thinking: I have three forces working on the drywall: F_y , F_x and momentum M_0. F_y has to withstand at least 30 Kg, which looks good, as one of the three screws, with a proper anchor, should be able to handle this weight alone. The momentum the TV and mount generate, a little simplified: 30 Kg * 9,81 m/s^2 * 0.6 m = 177 N * m The outward force at each of the wall screws (I chose it equally, which is a bit simplified, I guess) is (0,15m + 0,05m + 0,05m) * 3 * F_x = 177 Nm => 708 N/3 = 72 Kg/3 => F_x = 25 Kg each? Yes, I know that I can put up a new drywall that can handle more loads, or I can place a stud or something equivalent to reinforce the TV mount. I just wanted to check if this makes sense from a theoretical viewpoint. There are, of course, some safety margins to consider (30% or so?), but I'll have to deal with that later I guess.
-
In .NET enumeration is slowYou did the timing in debug mode, I assume? I always suspected that the compiler might optimize such things at release time, but no?
-
Free gameIf I only could remember my Epic game password...
-
I did a thing. It's neat.You can force C# to work like C++ with this code :laugh: I also remembered that a workaround for a bug in C# involved some Emit coding, which makes it pretty useful to know.
-
how hard to rewrite a legacy software from C++ to C# in WinForm?MFC to WPF or what? I did some conversions from C++ to C# for a complex math problem. That was pretty straight-forward since the finished C# code was not that different from C++ once you got into it.