A A
RSS

Archive | Programming

Blackjack Simulator

Thursday, August 12, 2010

View Comments

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 [...]

Display a Dictionary/KeyValuePair as Grid in WPF

Friday, July 30, 2010

View Comments

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 [...]

Subversion (SVN) to Mercurial and TeamCity

Monday, May 3, 2010

View Comments

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 [...]

Serialize Object To Clean XML

Tuesday, February 23, 2010

Comments Off

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 [...]

Select Random Records Using Nhibernate

Wednesday, December 16, 2009

View Comments

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 [...]

Advertise Here
The Most Intelligent Add-In To Visual Studio Happy fan of

What I'm Doing...

Recent Posts

Yonkly Open Source

Sign up for my newsletter




* = required field

powered by MailChimp!

megree Widget

Apparently, I am connected to Obama. Check this out...
My path to Obama

Cyber Identity