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 [...]
I previously wrote about shortening URLs with TinyURL’s API but my new favorite URL shortener is http://bit.ly and it also has a great API that you can use from within your .net code. I just recently used in my twitter contest website – tweetastica. The code is also very simple. I didn’t add all the [...]
Ok, so I thought the whole scaffolding thing was so easy and I would be done in a few minutes. I was so wrong. Nothing seemed to work right. I would call ruby script/generate scaffold Tag and it will generate all the files but the views were empty. Hmm… This is exactly what has been [...]
Tuesday, February 23, 2010
Comments Off