What’s a better way to get ready for a gambling trip other than write a blackjack simulator? I am no blackjack expert but one of the strategies I heard off is to double your bet every time you lose. So, if I start with a $100 bankroll and play $10 hands then I lost the [...]
Every time I work with WPF, I constantly think “I hate this shit” and “why is everything so damn hard”, but once I figure it out, I realize how powerful it really is and what I can really do with it. I remember starting out with WPF and trying to figure out how to bind [...]
Every time I think I got all the tools I need and I have a killer setup, something comes along that makes me question it all. I am referring to mercurial. For some reason, I have just heard of mercurial from TekPub. I don’t know why I never heard of it before. Probably because I [...]
I hate all the junk that gets added when serializing object to XML, so here is a quick way to do it cleanly. Here is the dirty way: public static string Serialize(this object obj) { string XmlString = String.Empty; using (var memStream = new MemoryStream()) { var serializer = new XmlSerializer(obj.GetType(), string.Empty); using (var xmlText [...]
Selecting 5 random rows in SQL is easy select top 5 * from users order by newid() .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode [...]
Thursday, August 12, 2010
View Comments