<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-26062613</id><updated>2012-01-22T02:23:57.430-05:00</updated><category term='NUnit'/><category term='Foundry'/><category term='Inner Harbor'/><category term='Visual Studio'/><category term='Baltimore'/><category term='SAMSUNG YP-U2J'/><category term='Code Coverage'/><category term='Re-Stocking Fee'/><category term='Castings'/><category term='Racketeering'/><category term='Corvette'/><category term='Clearwire'/><category term='Z16'/><category term='NHibernate'/><category term='Logging'/><category term='Carmax'/><category term='Iron'/><title type='text'>Brian's .Net Programming Nuggets</title><subtitle type='html'>Sometimes I just want to share a small interesting thing I have found.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>78</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-26062613.post-5629468782007460542</id><published>2011-12-17T14:35:00.004-05:00</published><updated>2011-12-17T14:38:10.053-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Corvette'/><category scheme='http://www.blogger.com/atom/ns#' term='Z16'/><category scheme='http://www.blogger.com/atom/ns#' term='Carmax'/><title type='text'>Suze Orman would be proud</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;a href="http://youtu.be/h3io5FghoLM"&gt;&lt;br /&gt;My Car Payment Video Montage &lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;iframe width="420" height="315" src="http://www.youtube.com/embed/h3io5FghoLM" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-5629468782007460542?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/5629468782007460542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=5629468782007460542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5629468782007460542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5629468782007460542'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/12/suze-orman-would-be-proud.html' title='Suze Orman would be proud'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/h3io5FghoLM/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-3922087600928997976</id><published>2011-10-12T23:56:00.002-04:00</published><updated>2011-10-25T23:06:26.327-04:00</updated><title type='text'>RAZOR cascading DropDownList</title><content type='html'>RAZOR&lt;br /&gt; &lt;br /&gt; &lt;div style="color:#000000;background:#ffffff;height:240Px;overflow-y:scroll;"&gt;&lt;br /&gt;    @Html.DropDownList("ddlElementCode",&lt;br /&gt;                       TempData["ElementSelects"] as SelectList,&lt;br /&gt;                       new { onchange = "populateValueTexts(this)" })&lt;br /&gt; &lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:240Px;overflow-y:scroll;"&gt;&lt;br /&gt;// Where the parameter “dropdown” is the first of the two&lt;br /&gt; &lt;br /&gt;function populateValueTexts(dropdown) {&lt;br /&gt;   var myindex = dropdown.selectedIndex;&lt;br /&gt;   var selValue = dropdown.options[myindex].value&lt;br /&gt;   var xReq = jQuery.getJSON("ElementTexts",&lt;br /&gt;          { elementCode: selValue },&lt;br /&gt;          null)&lt;br /&gt;          .complete(receiveValueTexts);&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  function receiveValueTexts(context, textStatus) {    &lt;br /&gt;   var data = jQuery.parseJSON(context.responseText);&lt;br /&gt; &lt;br /&gt;   document.getElementById("ddlValueText").options.length = data.length;&lt;br /&gt; &lt;br /&gt;   jQuery.each(data, function (i, item) {&lt;br /&gt;    document.getElementById("ddlValueText").options[i].text = item.Text;&lt;br /&gt;   });&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;[AcceptVerbs(HttpVerbs.Get)]&lt;br /&gt; public JsonResult ElementTexts(string elementCode)&lt;br /&gt;        {          &lt;br /&gt;            Data d = new Data();&lt;br /&gt; &lt;br /&gt;            IList&lt;dbElementValue&gt; codes =  &lt;br /&gt;                d.GetElementsByCode(Convert.ToInt32(elementCode));&lt;br /&gt; &lt;br /&gt;            SelectList items =&lt;br /&gt;                new SelectList((from c in codes select c.ELEMENT_VALUE_TXT).Distinct());&lt;br /&gt; &lt;br /&gt;            return Json(items, JsonRequestBehavior.AllowGet);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-3922087600928997976?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/3922087600928997976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=3922087600928997976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3922087600928997976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3922087600928997976'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/10/razor-cascading-dropdownlist.html' title='RAZOR cascading DropDownList'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-5342383721536692944</id><published>2011-10-04T22:40:00.007-04:00</published><updated>2011-10-04T23:08:00.582-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Logging'/><category scheme='http://www.blogger.com/atom/ns#' term='NHibernate'/><title type='text'>On getting NHibernate to Log the SQL</title><content type='html'>This feature is very nice. You get to see the SQL that is generated for you.&lt;br /&gt;&lt;br /&gt;While logging is not rocket science, I don't want to learn it again on the next project, so I am saving it here. ( I am using Log4Net, but I am sure Enterprise Library or others will work similarly. )&lt;br /&gt;&lt;br /&gt;// Configure log4net using the .config file in GLOBAL.ASAX&lt;br /&gt;[assembly: XmlConfigurator(Watch = true)]&lt;br /&gt;protected void Application_BeginRequest(object sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;            XmlConfigurator.Configure();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;In the Web.config&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;log4net debug="true"&amp;gt;  &lt;br /&gt;  &amp;lt;!-- Define some output appenders --&amp;gt;&lt;br /&gt;    &amp;lt;appender name="trace" type="log4net.Appender.TraceAppender, log4net"&amp;gt;&lt;br /&gt;      &amp;lt;layout type="log4net.Layout.PatternLayout,log4net"&amp;gt;&lt;br /&gt;        &amp;lt;param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n"/&amp;gt;&lt;br /&gt;      &amp;lt;/layout&amp;gt;&lt;br /&gt;    &amp;lt;/appender&amp;gt;&lt;br /&gt;    &amp;lt;appender name="console" type="log4net.Appender.ConsoleAppender, log4net"&amp;gt;&lt;br /&gt;      &amp;lt;layout type="log4net.Layout.PatternLayout,log4net"&amp;gt;&lt;br /&gt;        &amp;lt;param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n"/&amp;gt;&lt;br /&gt;      &amp;lt;/layout&amp;gt;&lt;br /&gt;    &amp;lt;/appender&amp;gt;&lt;br /&gt;    &amp;lt;appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net"&amp;gt;&lt;br /&gt;      &amp;lt;param name="File" value="hib_log.txt"/&amp;gt;&lt;br /&gt;      &amp;lt;param name="AppendToFile" value="true"/&amp;gt;&lt;br /&gt;      &amp;lt;param name="maximumFileSize" value="500KB"/&amp;gt;&lt;br /&gt;      &amp;lt;param name="RollingStyle" value="Size"/&amp;gt;&lt;br /&gt;      &amp;lt;param name="DatePattern" value="yyyy.MM.dd"/&amp;gt;&lt;br /&gt;      &amp;lt;param name="StaticLogFileName" value="true"/&amp;gt;&lt;br /&gt;      &amp;lt;layout type="log4net.Layout.PatternLayout,log4net"&amp;gt;&lt;br /&gt;        &amp;lt;param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/&amp;gt;&lt;br /&gt;      &amp;lt;/layout&amp;gt;&lt;br /&gt;    &amp;lt;/appender&amp;gt;&lt;br /&gt;    &amp;lt;!-- Setup the root category, add the appenders and set the default priority --&amp;gt;&lt;br /&gt;    &amp;lt;root&amp;gt;&lt;br /&gt;      &amp;lt;priority value="DEBUG"/&amp;gt;&lt;br /&gt;      &amp;lt;appender-ref ref="rollingFile"/&amp;gt;&lt;br /&gt;    &amp;lt;/root&amp;gt;&lt;br /&gt;    &amp;lt;logger name="NHibernate"&amp;gt;&lt;br /&gt;      &amp;lt;level value="WARN"/&amp;gt;&lt;br /&gt;    &amp;lt;/logger&amp;gt;&lt;br /&gt;    &amp;lt;logger name="NHibernate.SQL"&amp;gt;&lt;br /&gt;      &amp;lt;level value="DEBUG"/&amp;gt;&lt;br /&gt;    &amp;lt;/logger&amp;gt;&lt;br /&gt;  &amp;lt;/log4net&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-5342383721536692944?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/5342383721536692944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=5342383721536692944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5342383721536692944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5342383721536692944'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/10/on-getting-nhibernate-to-log-sql.html' title='On getting NHibernate to Log the SQL'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-8385431076675409566</id><published>2011-10-03T22:08:00.003-04:00</published><updated>2011-10-03T22:22:23.600-04:00</updated><title type='text'>How to stream a File in MVC</title><content type='html'>In Classic ASP or ASP .Net, you can simply change the response type and start writing binary. In MVC you have a Controller method which returns an ActionResult. So this class will properly provide that :&lt;br /&gt;&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;overflow-y:scroll;height:240Px;"&gt;&lt;br /&gt; public class BinaryResult : ActionResult&lt;br /&gt;    {&lt;br /&gt;        private byte[] _fileBinary;&lt;br /&gt;        private string _contentType;&lt;br /&gt;        private string _fileName;&lt;br /&gt; &lt;br /&gt;        public BinaryResult(byte[] fileBinary, string contentType, string fileName)&lt;br /&gt;        {&lt;br /&gt;            _fileBinary = fileBinary;&lt;br /&gt;            _contentType = contentType;&lt;br /&gt;            _fileName = fileName;&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;        public override void ExecuteResult(ControllerContext context)&lt;br /&gt;        {&lt;br /&gt;            context.HttpContext.Response.Clear();&lt;br /&gt;            context.HttpContext.Response.ContentType = _contentType;&lt;br /&gt;            context.HttpContext.Response.AddHeader("Content-Disposition",&lt;br /&gt;                "filename=" + _fileName);&lt;br /&gt; &lt;br /&gt;            if (_fileBinary != null)&lt;br /&gt;            {&lt;br /&gt;                context.HttpContext.Response.BinaryWrite(_fileBinary);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt; In my case the only other challenge was getting the Byte array prepared, because I had to call Convert.FromBase64String, because of the way the data was stored.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-8385431076675409566?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/8385431076675409566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=8385431076675409566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/8385431076675409566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/8385431076675409566'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/10/how-to-stream-file-in-mvc.html' title='How to stream a File in MVC'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-8153655308150750341</id><published>2011-10-02T23:23:00.008-04:00</published><updated>2011-10-10T22:44:13.905-04:00</updated><title type='text'>Developing for MVC4 using Razor and JSON</title><content type='html'>Just playing around this weekend, I wanted some data listings in a page that did not post back in MVC. While not such a big deal in regular ASP, MVC does not have page event handlers in a code-behind file. There is instead a Controller class that you can call in Routing code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First : the client side javascript handler, this is what is called when the Controller method completes.&lt;br /&gt;&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:240Px;overflow-y:scroll;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  function jsonFSearchComplete(context) {&lt;br /&gt;   var jsonData = context.responseText;&lt;br /&gt;   var obj = jQuery.parseJSON(context.responseText);&lt;br /&gt;   MyDiv.innerHTML = obj.Data;&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next, the Razor syntax for the page :&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:240Px;overflow-y:scroll;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  @{using (Ajax.BeginForm("JsonSearchRequests",                       &lt;br /&gt;   "Request",                       &lt;br /&gt;   new AjaxOptions() { &lt;br /&gt;   OnComplete = "searchComplete", &lt;br /&gt;   OnFailure= "searchFail"&lt;br /&gt;   }))&lt;br /&gt;&lt;br /&gt;  // Not including the whole form I created here, just &lt;br /&gt;  //  labels and textboxes, etc..&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then the Controller code for getting the Partial view built and sent down (Got this from StackOverflow postings):&lt;br /&gt;&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:300Px;overflow-y:scroll;"&gt;&lt;br /&gt;private string RenderRazorViewToString(string viewName)&lt;br /&gt;   {           &lt;br /&gt;   using (var sw = new System.IO.StringWriter())&lt;br /&gt;   {&lt;br /&gt;   var viewResult =&lt;br /&gt;   ViewEngines.Engines.FindPartialView(ControllerContext, viewName);&lt;br /&gt;   var viewContext = &lt;br /&gt;       new ViewContext(ControllerContext, viewResult.View, ViewData, TempData, sw);&lt;br /&gt;   viewResult.View.Render(viewContext, sw); &lt;br /&gt;   viewResult.ViewEngine.ReleaseView(ControllerContext, viewResult.View);        &lt;br /&gt;   return sw.GetStringBuilder().ToString();&lt;br /&gt;    } &lt;br /&gt;   }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;For a form posting in a page, there must be a Controller method  ( :&lt;br /&gt;&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:240Px;overflow-y:scroll;"&gt;&lt;br /&gt;       [AcceptVerbs(HttpVerbs.Post)]&lt;br /&gt;        public JsonResult JsonSearchRequests(string AccountNumber,&lt;br /&gt;            string Subfirm,&lt;br /&gt;            string RegistrationType)&lt;br /&gt;        {&lt;br /&gt;            Data d = new Data();&lt;br /&gt; &lt;br /&gt;            if (AccountNumber.Length &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                ViewData["Requests"] =&lt;br /&gt;                    d.GetRequestsByAccount(AccountNumber);&lt;br /&gt;            }&lt;br /&gt;            else if (Subfirm.Length &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                ViewData["Requests"] =&lt;br /&gt;                    d.GetDBRequests(Subfirm, RegistrationType)&lt;br /&gt;                    .Skip(0).Take(100);&lt;br /&gt;            }&lt;br /&gt;            return Json(new { Data = RenderRazorViewToString("dbRequests") });                       &lt;br /&gt;        // Note the HttbVerb must be stated for Posting a form&lt;br /&gt;        }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt; For a link that a user can click in the page :&lt;br /&gt;&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:240Px;width:540Px;overflow-y:scroll;"&gt;&lt;br /&gt;    &lt;br /&gt;        [AcceptVerbs(HttpVerbs.Get)]&lt;br /&gt;        public JsonResult JsonSelectDbRequest(string Id)&lt;br /&gt;        {       &lt;br /&gt;            Data d = new Data();&lt;br /&gt;            ViewData["Generations"] = d.GetGenerations(Id);&lt;br /&gt; &lt;br /&gt;            return Json(new { Data = RenderRazorViewToString("dbGenerations") },&lt;br /&gt;                              JsonRequestBehavior.AllowGet);&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;     //   Note the Http Verb for GET must be stated&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Code for a Partial View of a list that does Ajax posting :&lt;br /&gt;&lt;div style="color:#000000;background:#ffffff;height:200Px;overflow-y:scroll;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;      @Ajax.ActionLink("SELECT",&lt;br /&gt;                       "JsonSelectDbRequest",&lt;br /&gt;                       "DocRequest",&lt;br /&gt;                       new  { Id = req.REQUEST_ID },&lt;br /&gt;                       new AjaxOptions() { OnComplete = "requestSelectComplete" });&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;EDIT: There is no need to include the old MVCAjax script files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-8153655308150750341?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/8153655308150750341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=8153655308150750341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/8153655308150750341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/8153655308150750341'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/10/developing-for-mvc4-using-razor-and.html' title='Developing for MVC4 using Razor and JSON'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-1476169763347279512</id><published>2011-09-10T15:55:00.002-04:00</published><updated>2011-09-10T15:59:56.422-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NHibernate'/><title type='text'>Generics For Dummys (re:NHibernate)</title><content type='html'>I am working on a rogue project that is not being paid for by the company for which I work. This is building something that just helps me do my job, so I have to be very quick. I am using NHibernate, and wanted to get listable data without writing even the smallest functions of my own. So I created this (not for production use):&lt;br /&gt;&lt;br /&gt;&lt;PRE&gt;&lt;br /&gt;   public IList&lt;T&gt; GetAll&lt;T&gt;()&lt;br /&gt;        {                     &lt;br /&gt;            return Session.GetSession()&lt;br /&gt;            .CreateCriteria(typeof(T))&lt;br /&gt;            .List&lt;T&gt;();&lt;br /&gt;         }&lt;br /&gt;&lt;/PRE&gt;&lt;br /&gt;&lt;br /&gt;Because NHibernate uses generics, this function can act as a pass-through, requesting the List method be run, but not much more. My ASP .NET webforms application has to give it the table name of interest.&lt;br /&gt;&lt;br /&gt;Again, just a fun way to rapidly get a "table viewer" application running but also providing some code value for potential full life cycle development later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-1476169763347279512?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/1476169763347279512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=1476169763347279512' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1476169763347279512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1476169763347279512'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/09/generics-for-dummys-renhibernate.html' title='Generics For Dummys (re:NHibernate)'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-643051238378382758</id><published>2011-09-10T15:45:00.002-04:00</published><updated>2011-09-10T15:54:12.348-04:00</updated><title type='text'>Text Template Transformation</title><content type='html'>My team stores some database logic in an XML file that is part of a CSharp project.&lt;br /&gt;This seems to be working efficiently for the application in runtime and for developers to maintain their SQL statements at design. I don't like it because the file has gotten large and finding things is a manual process.&lt;br /&gt;I am trying to keep up with innovations, so I wrote a transformation that changes that XML file into a class. That way Visual Studio can provide its drop-down navigation controls for finding statements in the file.&lt;br /&gt;&lt;br /&gt;&lt;PRE&gt;&lt;br /&gt;&lt;#@ template language="C#" #&gt;&lt;br /&gt;&lt;#@ output extension = "cs" #&gt;&lt;br /&gt;&lt;#@ assembly name="System.Xml.dll" #&gt;&lt;br /&gt;&lt;#@ import namespace = "System.Xml" #&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class SQLConfig {&lt;br /&gt;&lt;# &lt;br /&gt;   XmlDocument doc = new XmlDocument();&lt;br /&gt;   doc.Load("C:\\Projects\\MySolution\\MyDataLayer\\ORACLESQL.config");&lt;br /&gt;   &lt;br /&gt;   foreach(XmlNode node in doc.SelectNodes("//add")) {&lt;br /&gt;   &lt;br /&gt;   #&gt;&lt;br /&gt;   &lt;br /&gt;   public const string &lt;#= node.Attributes[0].Value.Replace(".","_").Replace("-","_") #&gt; = @"&lt;#= node.InnerText #&gt;";&lt;br /&gt;   &lt;br /&gt;   &lt;#   &lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    doc = null;&lt;br /&gt;   #&gt;&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;&lt;/PRE&gt;&lt;br /&gt;&lt;br /&gt;What this does is create a Class file using the above code every time the transform template is changed, or the developer can right-click "Run Custom Tool" on it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-643051238378382758?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/643051238378382758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=643051238378382758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/643051238378382758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/643051238378382758'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/09/text-template-transformation.html' title='Text Template Transformation'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-3036097277170807358</id><published>2011-08-24T23:48:00.003-04:00</published><updated>2011-10-03T22:27:37.809-04:00</updated><title type='text'>Developing for Oracle</title><content type='html'>Since I have seen a lot of hand-wringing over how to write a connection string to Oracle Express, I want to save a note about this. &lt;br /&gt;&lt;br /&gt;&lt;div style="background:#ffffff;color:#000000;"&gt;&lt;br /&gt;(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));User Id=Me;Password=dev;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This is just one of those things, that as a programmer I don't know how to build when I need it. It's a bit of technical stuff that I don't endeavor to deeply understand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-3036097277170807358?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/3036097277170807358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=3036097277170807358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3036097277170807358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3036097277170807358'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/08/developing-for-oracle.html' title='Developing for Oracle'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-5983097686285108712</id><published>2011-02-14T19:48:00.002-05:00</published><updated>2011-02-14T19:52:55.730-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Racketeering'/><category scheme='http://www.blogger.com/atom/ns#' term='Clearwire'/><category scheme='http://www.blogger.com/atom/ns#' term='Re-Stocking Fee'/><title type='text'>ClearWire is crap!</title><content type='html'>I found myself using Clearwire 3 years ago, because my apartment community did not have cable, even though it was a new enough place in a highly dense area of town.&lt;br /&gt;Since then, I have bought a home and kept Clearwire just out of convenience of not having to make a change. The service has always been up and down with the weather.&lt;br /&gt;Now, because of the way my company does remote dial-in, I have to switch to Comcast. I call Clearwire to cancel and they charge me for one extra month, and a $40 "re-stocking fee". They say I can skip the fee if I provide them with another customer. What kind of racket is that? Can't market the service on its own merits? Sounds like it.&lt;br /&gt;If you have not signed with ClearWire, DON'T.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-5983097686285108712?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/5983097686285108712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=5983097686285108712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5983097686285108712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5983097686285108712'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2011/02/clearwire-is-crap.html' title='ClearWire is crap!'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-5660958130915717520</id><published>2009-07-18T14:06:00.003-04:00</published><updated>2009-07-18T14:09:03.109-04:00</updated><title type='text'>SLP Smooth Bellows Fitment</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cp5cVj9XtXI/SmIPocJNRyI/AAAAAAAAADk/OlMyFgGKeQA/s1600-h/IMG00038.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_cp5cVj9XtXI/SmIPocJNRyI/AAAAAAAAADk/OlMyFgGKeQA/s400/IMG00038.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5359863693948307234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_cp5cVj9XtXI/SmIPbo--saI/AAAAAAAAADc/mMZp2ews__w/s1600-h/IMG00037.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_cp5cVj9XtXI/SmIPbo--saI/AAAAAAAAADc/mMZp2ews__w/s400/IMG00037.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5359863474056769954" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After rotating it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-5660958130915717520?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/5660958130915717520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=5660958130915717520' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5660958130915717520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5660958130915717520'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2009/07/slp-smooth-bellows-fitment.html' title='SLP Smooth Bellows Fitment'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cp5cVj9XtXI/SmIPocJNRyI/AAAAAAAAADk/OlMyFgGKeQA/s72-c/IMG00038.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-1322709518473080343</id><published>2009-01-20T23:19:00.002-05:00</published><updated>2009-01-20T23:22:45.151-05:00</updated><title type='text'>Handheld Green Laser</title><content type='html'>With all the talk about Green laser in small projectors, it was such a coincidence to have a friend show me his handheld one. These are used in combat for aim. Well, maybe a coincidence it WOULD be hypothetically, IF I had a friend who had one it would look like this.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cp5cVj9XtXI/SXaiw8uz59I/AAAAAAAAADA/2_X41wsuRJc/s1600-h/01-18-09_2115.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 300px; height: 400px;" src="http://3.bp.blogspot.com/_cp5cVj9XtXI/SXaiw8uz59I/AAAAAAAAADA/2_X41wsuRJc/s400/01-18-09_2115.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5293597373840484306" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-1322709518473080343?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/1322709518473080343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=1322709518473080343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1322709518473080343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1322709518473080343'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2009/01/handheld-green-laser.html' title='Handheld Green Laser'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cp5cVj9XtXI/SXaiw8uz59I/AAAAAAAAADA/2_X41wsuRJc/s72-c/01-18-09_2115.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-3528523279210756162</id><published>2008-11-28T00:05:00.002-05:00</published><updated>2008-11-28T00:14:18.782-05:00</updated><title type='text'>Eaton Vance</title><content type='html'>Since I read a lot of Blog posts about stock investing, and certainly have chased my share of dead end investment ideas, I feel a need to mention this one. The Eaton Vance Municipal Bond fund is currently yielding 10% and is tax free. Obviously, the tax free part is compelling, and bumps up the yield quite a bit depending on a person's obligations to the federal government each April. Also worth mentioning, is that the dividends come every month at the same time, and the fund has a history longer can Google can display. I don't get a lot of open ears to this idea from my peer group or even older widows or orphans. Maybe life moves too fast for everybody else to put money away at this rate. Maybe I need to spend more to get more out of my life. But for now, I just can't stay away from this one. I have entrusted real estate with my money and gotten burned like probably countless other Americans now. So here is a link to what might be a winner :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://finance.google.com/finance?client=ig&amp;q=EVN"&gt;EVN&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-3528523279210756162?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/3528523279210756162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=3528523279210756162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3528523279210756162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3528523279210756162'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/11/eaton-vance.html' title='Eaton Vance'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-9195354787673143221</id><published>2008-10-31T22:29:00.004-04:00</published><updated>2008-10-31T23:11:16.992-04:00</updated><title type='text'>.Net Pie Chart challenge</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cp5cVj9XtXI/SQvEgm8f15I/AAAAAAAAACU/69C7e4RXopk/s1600-h/PieChart.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 279px; height: 400px;" src="http://3.bp.blogspot.com/_cp5cVj9XtXI/SQvEgm8f15I/AAAAAAAAACU/69C7e4RXopk/s400/PieChart.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5263516654001706898" /&gt;&lt;/a&gt;&lt;br /&gt;My first response to this was very blah. Having seen this stuff done by every product since Access 2.0, made it unexciting to think about. But then my friend added a twist : make the pie chart clickable in a drill-down way. So as easy as it is, to create pie slices from an image of a circle, I was stumped at how to handle a "hotspot", and did not even know there was an ImageMap control available for a .Net webform. &lt;br /&gt;&lt;br /&gt;So to hurry up and get something to chart, I created a dataset with one column of numeric values, and a web user control to house the ImageMap control. My control exposes a method called "Draw" and raises an event called "HotSpotClicked" which is declared as follows : &lt;br /&gt;&lt;br /&gt;&lt;div style="height:80Px;overflow-y:scroll;background:#eeeeee;font-size:12Px;color:#000000;padding-left:8Px;"&gt;&lt;br /&gt;public event ImageMapEventHandler HotSpotClicked;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The graphics to write the circle and pie slices are easy to call in the System.Drawing namespace. Here is Draw method, which calls a separate method to add a percentage column to the DataSet table passed to it. It uses random colors for the pie slices, and selects the colors from the Brushes namespace of System.Drawing using Reflection. It creates a GUID for a temporary file name in which to store the Bitmap. For each pie slice it draws, it saves coordinates for where to put the map hotspot in another column in the dataset. So how to compute X,Y coordinates of the outer edge of a pie slice. My good enough answer is to use a triangle defined by center and two end points of the slice. Those should be easy enough to figure out by conversion from angles and knowing the radius of the bounding circle. But not when you have a large slice, say greater than 100 degrees. For that size and higher the triangle it defines is squeezed thinner and thinner and loses usability as a hot regaion. So in that case I added one more coordinate dividing the "sweep" angle by 2 in my computation.&lt;br /&gt;&lt;br /&gt;&lt;div style="height:300Px;overflow-y:scroll;background:#eeeeee;font-size:12Px;color:#000000;padding-left:8Px;"&gt;&lt;br /&gt;public void Draw(DataSet ds)&lt;br /&gt;    {&lt;br /&gt;        // Rectangle of that is the width of the ImageMap control.&lt;br /&gt;        Rectangle rect =&lt;br /&gt;            new Rectangle(0, 0,&lt;br /&gt;             Convert.ToInt32(ImageMap1.Width.Value),&lt;br /&gt;             Convert.ToInt32(ImageMap1.Height.Value));&lt;br /&gt;&lt;br /&gt;        / Using floats as they are small enough and liked by the Math namespace.&lt;br /&gt;        float radius = rect.Width / 2;&lt;br /&gt;&lt;br /&gt;        string imageName = System.Guid.NewGuid().ToString();&lt;br /&gt;        Bitmap bitmap = new Bitmap(rect.Width, rect.Height);&lt;br /&gt;&lt;br /&gt;        Graphics g = Graphics.FromImage(bitmap);&lt;br /&gt;&lt;br /&gt;        g.DrawRectangle(Pens.Khaki, rect);&lt;br /&gt;        g.FillRectangle(Brushes.LightBlue, rect);&lt;br /&gt;&lt;br /&gt;        g.DrawEllipse(Pens.Khaki, rect);&lt;br /&gt;        g.FillEllipse(Brushes.LightPink, rect);&lt;br /&gt;&lt;br /&gt;        calcPercents(ds);&lt;br /&gt;&lt;br /&gt;        // Using reflection to get an array of colors from which to choose.&lt;br /&gt;        PropertyInfo[] penInfos = typeof(Pens).GetProperties();&lt;br /&gt;        PropertyInfo[] brushInfos = typeof(Brushes).GetProperties();&lt;br /&gt;&lt;br /&gt;        float startAngle = 0;&lt;br /&gt;&lt;br /&gt;        // For selecting colors.&lt;br /&gt;        Random rand = new System.Random();&lt;br /&gt;&lt;br /&gt;        // Add a column to the dataset to record color used.&lt;br /&gt;        ds.Tables[0].Columns.Add("ChartColor");&lt;br /&gt;&lt;br /&gt;        for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++)&lt;br /&gt;        {&lt;br /&gt;            DataRow row = ds.Tables[0].Rows[i];&lt;br /&gt;&lt;br /&gt;            decimal fSweepAngle = 360 * (Convert.ToDecimal(row[1]) / 100);&lt;br /&gt;            float sweepAngle = (float)Math.Truncate(fSweepAngle);&lt;br /&gt;&lt;br /&gt;            if (i == ds.Tables[0].Rows.Count - 1)&lt;br /&gt;            {&lt;br /&gt;                sweepAngle += 360 - (startAngle + sweepAngle);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            int colorIndex = rand.Next(brushInfos.Length - 1);&lt;br /&gt;&lt;br /&gt;            Brush myBrush = (Brush)brushInfos[colorIndex].GetValue(null, null);&lt;br /&gt;&lt;br /&gt;            g.DrawPie((Pen)penInfos[colorIndex].GetValue(null, null),&lt;br /&gt;                      rect,&lt;br /&gt;                      startAngle,&lt;br /&gt;                      sweepAngle);&lt;br /&gt;&lt;br /&gt;            g.FillPie(myBrush,&lt;br /&gt;                      rect,&lt;br /&gt;                      startAngle,&lt;br /&gt;                      sweepAngle);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            // Calculate the Hot Spot polygon &lt;br /&gt;&lt;br /&gt;            // First line from center of the pie out to the edge.&lt;br /&gt;            string coords = radius.ToString() + "," +&lt;br /&gt;                            radius.ToString() + ",";&lt;br /&gt;&lt;br /&gt;            coords += getCoordinates(startAngle, radius);&lt;br /&gt;&lt;br /&gt;            if (sweepAngle &gt; 90)&lt;br /&gt;            {&lt;br /&gt;                //TODO: add more coordinates to get better hotspot coverage.&lt;br /&gt;                float intermediateAngle = startAngle + (sweepAngle / 2);&lt;br /&gt;&lt;br /&gt;                coords += getCoordinates(intermediateAngle, radius);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            // move the needle up to where we just stopped for the next draw operation.&lt;br /&gt;            startAngle += sweepAngle;&lt;br /&gt;&lt;br /&gt;            coords += getCoordinates(startAngle, radius);&lt;br /&gt;&lt;br /&gt;            row[2] = coords;&lt;br /&gt;            row[3] = ((System.Drawing.SolidBrush)myBrush).Color.Name;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        setHotSpots(ds);&lt;br /&gt;&lt;br /&gt;        ImageMap1.ImageUrl = "images/" + imageName + ".bmp";&lt;br /&gt;&lt;br /&gt;        bitmap.Save(Server.MapPath("images/" + imageName + ".bmp"),&lt;br /&gt;                    System.Drawing.Imaging.ImageFormat.Bmp);&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting hotspots in the map is easy once the coordinates have been solved :&lt;br /&gt;&lt;br /&gt;&lt;div style="height:200Px;overflow-y:scroll;background:#eeeeee;font-size:12Px;color:#000000;padding-left:8Px;"&gt;&lt;br /&gt; private void setHotSpots(DataSet ds)&lt;br /&gt;    {&lt;br /&gt;        ImageMap1.HotSpots.Clear();&lt;br /&gt;&lt;br /&gt;        foreach (DataRow row in ds.Tables[0].Rows)&lt;br /&gt;        {&lt;br /&gt;            PolygonHotSpot phs = new PolygonHotSpot();&lt;br /&gt;            phs.Coordinates = row[2].ToString();&lt;br /&gt;            phs.AlternateText = row[0].ToString() + " "&lt;br /&gt;                + row[1].ToString() + " "&lt;br /&gt;                + row[3].ToString();&lt;br /&gt;            phs.PostBackValue = row[0].ToString();&lt;br /&gt;            phs.HotSpotMode = HotSpotMode.PostBack;&lt;br /&gt;            phs.NavigateUrl = "";&lt;br /&gt;            ImageMap1.HotSpots.Add(phs);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Code for calculating the percentage value of each data point provided in the dataset is very trivial ,but I list it here for future reference :&lt;br /&gt;&lt;br /&gt;&lt;div style="height:200Px;overflow-y:scroll;background:#eeeeee;font-size:12Px;color:#000000;padding-left:8Px;"&gt;&lt;br /&gt; private void calcPercents(DataSet ds)&lt;br /&gt;    {&lt;br /&gt;        DataColumn PercentColumn = ds.Tables[0].Columns.Add("DataPercentage");&lt;br /&gt;        decimal total = 0;&lt;br /&gt;&lt;br /&gt;        foreach (DataRow row in ds.Tables[0].Rows)&lt;br /&gt;        {&lt;br /&gt;            total += Convert.ToDecimal(row[0]);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        decimal totalPercent = 0;&lt;br /&gt;        foreach (DataRow row in ds.Tables[0].Rows)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            decimal percentage = Convert.ToDecimal(row[0]) / total;&lt;br /&gt;            row[1] = Math.Round(percentage * 100, 1);&lt;br /&gt;            totalPercent += Convert.ToDecimal(row[1]);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        if (totalPercent &lt; 100)&lt;br /&gt;        {&lt;br /&gt;            DataRow lastRow = ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1];&lt;br /&gt;            decimal lastRowPercent = Convert.ToDecimal(lastRow[1]) + (100 - totalPercent);&lt;br /&gt;            lastRow[1] = lastRowPercent;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // add a column for coordinate set.&lt;br /&gt;        DataColumn coordinatesColumn = ds.Tables[0].Columns.Add("MapAreaCoordinates");&lt;br /&gt;&lt;br /&gt;        ds.AcceptChanges();&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The real brain candy of the project was how to get the X.Y coordinates for an ImageMap knowing the size of the circle in the drawing and the "Sweep Angle" or angle of the pie slice. After some trial and error and merely remembering where to look from high school math, I wrote some calculations using SIN and COSINE. The fatal trap from hell, is that MATH.SIN does not accept Degrees, it accepts Radians. Intellisense doesn't tell us that. So here are the computations :&lt;br /&gt;&lt;br /&gt;&lt;div style="height:180Px;overflow-y:scroll;background:#eeeeee;font-size:12Px;color:#000000;padding-left:8Px;"&gt;&lt;br /&gt;   float Sin90 = (float)Math.Sin(ToRadian(90));&lt;br /&gt;&lt;br /&gt;   private string getCoordinates(float startAngle,&lt;br /&gt;                                  float radius)&lt;br /&gt;    {&lt;br /&gt;        float rise = 0;&lt;br /&gt;        float run = radius;&lt;br /&gt;        string coords = string.Empty;&lt;br /&gt;&lt;br /&gt;        rise = (radius * SinOfDegree(startAngle)) / Sin90;&lt;br /&gt;        run = (radius * CosOfDegree(startAngle)) / Sin90;   &lt;br /&gt;&lt;br /&gt;        coords += Math.Round(radius + run, 0).ToString() + "," +&lt;br /&gt;                  Math.Round(radius + rise, 0).ToString() + ",";&lt;br /&gt;&lt;br /&gt;        return coords;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private float SinOfDegree(float Degrees)&lt;br /&gt;    {&lt;br /&gt;        float radianOfDegree = ToRadian(Degrees);&lt;br /&gt;        return (float)Math.Sin(radianOfDegree);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    private float CosOfDegree(float Degrees)&lt;br /&gt;    {&lt;br /&gt;        float radianOfDegree = ToRadian(Degrees);&lt;br /&gt;        return (float)Math.Cos(radianOfDegree);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;   private static float ToRadian(float Degrees)&lt;br /&gt;    {&lt;br /&gt;        return Degrees * (float)Math.PI / 180;&lt;br /&gt;    }&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-9195354787673143221?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/9195354787673143221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=9195354787673143221' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/9195354787673143221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/9195354787673143221'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/10/net-pie-chart-challenge.html' title='.Net Pie Chart challenge'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cp5cVj9XtXI/SQvEgm8f15I/AAAAAAAAACU/69C7e4RXopk/s72-c/PieChart.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-1223794314162405507</id><published>2008-10-26T23:26:00.004-04:00</published><updated>2008-10-27T00:03:48.363-04:00</updated><title type='text'>Update to Config Builder</title><content type='html'>It has been requested that my tool create configuration elements that look more like old .Net Framework configuration elements, without the "add, remove, clear" syntax.&lt;br /&gt;&lt;br /&gt;The new syntax looks like the following :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; &amp;lt;BaseballConfig&amp;gt;&lt;br /&gt;   &amp;lt;WorldSeriess&amp;gt;&lt;br /&gt;        &amp;lt;add Year="2008"&amp;gt;&lt;br /&gt;        &amp;lt;Teams&amp;gt;&lt;br /&gt;          &amp;lt;add Name="Rays" /&amp;gt;&lt;br /&gt;         &amp;lt;/Teams&amp;gt;&lt;br /&gt;     &amp;lt;/add&amp;gt;&lt;br /&gt;   &amp;lt;/WorldSeriess&amp;gt;&lt;br /&gt; &amp;lt;/BaseballConfig&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;While the older, more traditional format looks like :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; &amp;lt;BaseballConfig&amp;gt;&lt;br /&gt;    &amp;lt;WorldSeriess&amp;gt;&lt;br /&gt;      &amp;lt;WorldSeries Year="2008"&amp;gt;&lt;br /&gt;       &amp;lt;Teams&amp;gt;&lt;br /&gt;           &amp;lt;Team Name="Phillies" /&amp;gt;&lt;br /&gt;           &amp;lt;Team Name="Rays" /&amp;gt;&lt;br /&gt;       &amp;lt;/Teams&amp;gt;&lt;br /&gt;      &amp;lt;/WorldSeries&amp;gt;&lt;br /&gt;    &amp;lt;/WorldSeriess&amp;gt;&lt;br /&gt;   &amp;lt;/BaseballConfig&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  In order to get the xml elements to match the configuration class names, an override can be added to the ElementCollection class  as follows :&lt;br /&gt;&lt;div style="background: rgb(238, 238, 238) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; overflow-y: scroll; height: 120px; font-size: 12px; color: rgb(0, 0, 0); padding-left: 8px;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; public override ConfigurationElementCollectionType CollectionType&lt;br /&gt;   {&lt;br /&gt;    get&lt;br /&gt;     {&lt;br /&gt;     return ConfigurationElementCollectionType.BasicMap;&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So to handle this update (or not) I have created the following function for my custom configuration tool:&lt;br /&gt;&lt;div style="background: rgb(238, 238, 238) none repeat scroll 0% 0%;    overflow-y: scroll; height: 240px; font-size: 12px; color: rgb(0, 0, 0); padding-left: 8px;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; private static void addConfigurationElementCollectionTypeProperty(CodeTypeDeclaration configElements)&lt;br /&gt;  {&lt;br /&gt;   CodeTypeReferenceExpression ctre = new CodeTypeReferenceExpression(typeof(ConfigurationElementCollectionType));&lt;br /&gt;   CodeTypeReference ctr =&lt;br /&gt;               new CodeTypeReference(typeof(ConfigurationElementCollectionType));&lt;br /&gt;   CodeMemberProperty propCollectionType = new CodeMemberProperty();&lt;br /&gt;   propCollectionType.Name = "CollectionType";&lt;br /&gt;   propCollectionType.Attributes = MemberAttributes.Override | MemberAttributes.Public;&lt;br /&gt;   propCollectionType.HasSet = false;&lt;br /&gt;   propCollectionType.HasGet = true;&lt;br /&gt;   propCollectionType.Type = ctr;&lt;br /&gt;   propCollectionType.GetStatements.Add(&lt;br /&gt;               new CodeMethodReturnStatement(&lt;br /&gt;                   new CodePropertyReferenceExpression(ctre, "BasicMap")));&lt;br /&gt;           configElements.Members.Add(propCollectionType);&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-1223794314162405507?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/1223794314162405507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=1223794314162405507' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1223794314162405507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1223794314162405507'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/10/update-to-config-builder.html' title='Update to Config Builder'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-7710022867415866885</id><published>2008-08-21T23:26:00.003-04:00</published><updated>2008-08-21T23:42:40.378-04:00</updated><title type='text'>CodeDom NHibernate Mapping File Builder</title><content type='html'>I am currently watching the 'Summer of NHibernate' videos and have found myself wanting a tool for generating the HBM Mapping file. This was a painful place to be looking at a white screen to hand-fill with XML, as if anybody wants to state again all of the columns and data types already typed into a class and a "Create Table" script.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    I have code already in all my other tools for getting database schema into my "columns" typed dataset. I ran XSD.EXE over the HBM file which I built by hand while watching 'Summer of NHibernate' to get a Class for easily authoring the XML document. Populating this class and then Serializing it was a nice way to stay in C# for the whole operation.&lt;br /&gt;&lt;br /&gt;So here is what I am starting out of the gate with.&lt;br /&gt;&lt;br /&gt;&lt;div style="height:440Px;overflow-y:scroll;background:#eeeeee;color:#000000;font-size:12Px;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  public static string GetMappingFile(SqlConnection Connection, string TableName) &lt;br /&gt;   {&lt;br /&gt;   string fileName = TableName + "hbm.xml";&lt;br /&gt;   hibernatemapping newMapping = new hibernatemapping();&lt;br /&gt;   newMapping.@namespace = "Acme.DataLayer";&lt;br /&gt;   newMapping.@class = new hibernatemappingClass();&lt;br /&gt;&lt;br /&gt;   hibernatemappingClass newClass = newMapping.@class;&lt;br /&gt;   newClass.name = TableName;&lt;br /&gt;   newClass.table = TableName;&lt;br /&gt;&lt;br /&gt;   Columns cols = PopulateColumns(Connection, TableName, CommandType.TableDirect);&lt;br /&gt;   newClass.property = new hibernatemappingClassProperty[cols.Column.Count];&lt;br /&gt;&lt;br /&gt;   int index = 0;&lt;br /&gt;            &lt;br /&gt;   foreach (Columns.ColumnRow cRow in cols.Column)&lt;br /&gt;    {&lt;br /&gt;      newClass.property[index] = new hibernatemappingClassProperty();&lt;br /&gt;      hibernatemappingClassProperty prop = newClass.property[index];               &lt;br /&gt;      prop.column = cRow.Column_Name;&lt;br /&gt;      prop.name = cRow.Column_Name;&lt;br /&gt;      prop.type = cRow.Data_Type;&lt;br /&gt;&lt;br /&gt;      switch (cRow.Data_Type.ToUpper())&lt;br /&gt;         {&lt;br /&gt;           case "DECIMAL":&lt;br /&gt;                        break;&lt;br /&gt;           case "INT":&lt;br /&gt;                        prop.type = "Int32";&lt;br /&gt;                        break;&lt;br /&gt;           case "SMALLINT":&lt;br /&gt;                        prop.type = "Int32";&lt;br /&gt;                        break;&lt;br /&gt;           case "BIT":&lt;br /&gt;                        prop.type = "Int32";&lt;br /&gt;                        break;&lt;br /&gt;           case "VARCHAR":&lt;br /&gt;                        prop.type = "string";&lt;br /&gt;                        break;&lt;br /&gt;           default:&lt;br /&gt;                        prop.type = "string";&lt;br /&gt;                        break;&lt;br /&gt;            }&lt;br /&gt;           index++;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    System.Xml.Serialization.XmlSerializer xmlSerializer = &lt;br /&gt;                new System.Xml.Serialization.XmlSerializer(typeof(hibernatemapping));&lt;br /&gt;            &lt;br /&gt;    StringBuilder sb = new StringBuilder();&lt;br /&gt;    StringWriter sw = new StringWriter(sb);&lt;br /&gt;            &lt;br /&gt;    xmlSerializer.Serialize(sw, newMapping);&lt;br /&gt;            &lt;br /&gt;    return sb.ToString();&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-7710022867415866885?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/7710022867415866885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=7710022867415866885' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/7710022867415866885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/7710022867415866885'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/08/codedom-nhibernate-mapping-file-builder.html' title='CodeDom NHibernate Mapping File Builder'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-3323535436338529865</id><published>2008-08-09T21:11:00.004-04:00</published><updated>2008-08-21T23:47:48.303-04:00</updated><title type='text'>CodeDom LWDO Builder</title><content type='html'>Seeing alot of classes that are "Lightweight Data Objects", simple representations of table entries that can be manipulated locally and then sent to a database, or passed around in application code. So I built a small generator using the CodeDom Namespace. Not intended to compete with MyGenerate or any other tool, just wanted to have this quick one handy.&lt;br /&gt;This is for SQL Server database tables. The main function below :&lt;br /&gt;&lt;div style="Overflow-y:scroll; height:400Px;background:#eeeeee;color:#000000;font-size:12Px;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  public static string GetClientClass(SqlConnection Connection, string TableName)&lt;br /&gt;    {&lt;br /&gt;       CodeTypeReference codeTypeRef;&lt;br /&gt;       CodeMemberField memberField;&lt;br /&gt;       CodeMemberProperty memberPropPublic;&lt;br /&gt;&lt;br /&gt;       Columns cols = PopulateColumns(Connection, TableName, CommandType.TableDirect);&lt;br /&gt;&lt;br /&gt;       CodeNamespace codeNS = new CodeNamespace("ACME.Data");&lt;br /&gt;            &lt;br /&gt;       CodeTypeDeclaration ct = new CodeTypeDeclaration(TableName);&lt;br /&gt;       ct.IsClass = true;&lt;br /&gt;       codeNS.Types.Add(ct);&lt;br /&gt;&lt;br /&gt;       CodeExpression markDirty = new CodeMethodInvokeExpression(&lt;br /&gt;                   new CodeThisReferenceExpression(),&lt;br /&gt;                   "MarkDirty",&lt;br /&gt;                   new CodeExpression[] { });&lt;br /&gt;&lt;br /&gt;       foreach (Columns.ColumnRow cRow in cols.Column)&lt;br /&gt;       {&lt;br /&gt;         switch (cRow.Data_Type.ToUpper())&lt;br /&gt;         {&lt;br /&gt;          case "DECIMAL":&lt;br /&gt;                        codeTypeRef = new CodeTypeReference("System.Decimal");&lt;br /&gt;                        break;&lt;br /&gt;          case "INT":&lt;br /&gt;                        codeTypeRef = new CodeTypeReference("System.Int32");&lt;br /&gt;                        break;&lt;br /&gt;          case "SMALLINT":&lt;br /&gt;                        codeTypeRef = new CodeTypeReference("System.Int32");&lt;br /&gt;                        break;&lt;br /&gt;          case "BIT":&lt;br /&gt;                        codeTypeRef = new CodeTypeReference("System.Int32");&lt;br /&gt;                        break;&lt;br /&gt;          case "VARCHAR":&lt;br /&gt;                        codeTypeRef = new CodeTypeReference("System.String");&lt;br /&gt;                        break;&lt;br /&gt;          default:&lt;br /&gt;               codeTypeRef = new CodeTypeReference("System.String");&lt;br /&gt;                        break;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;          memberField = new CodeMemberField(&lt;br /&gt;                            codeTypeRef,&lt;br /&gt;                            "_" + cRow.Column_Name.ToLower());&lt;br /&gt;&lt;br /&gt;          memberField.Attributes = MemberAttributes.Private;&lt;br /&gt;          ct.Members.Add(memberField);&lt;br /&gt;          memberPropPublic = new CodeMemberProperty();&lt;br /&gt;          memberPropPublic.Name = MakeFieldName(cRow.Column_Name);&lt;br /&gt;          memberPropPublic.Attributes = MemberAttributes.Public;&lt;br /&gt;          memberPropPublic.Type = codeTypeRef;&lt;br /&gt;          ct.Members.Add(memberPropPublic);&lt;br /&gt;&lt;br /&gt;          // Get Statement&lt;br /&gt;          CodeVariableReferenceExpression cvrexp =&lt;br /&gt;                 new CodeVariableReferenceExpression("_" + cRow.Column_Name.ToLower());&lt;br /&gt;          CodeMethodReturnStatement cmrstmnt = new CodeMethodReturnStatement(cvrexp);&lt;br /&gt;          memberPropPublic.GetStatements.Add(cmrstmnt);&lt;br /&gt;&lt;br /&gt;          // Set Statement&lt;br /&gt;          memberPropPublic.SetStatements.Add(&lt;br /&gt;                  new CodeAssignStatement(cvrexp,&lt;br /&gt;                    new CodePropertySetValueReferenceExpression()));&lt;br /&gt;&lt;br /&gt;          memberPropPublic.SetStatements.Add(markDirty);                &lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;         CSharpCodeProvider cSharpProvider = new CSharpCodeProvider();&lt;br /&gt;         StringBuilder sb = new StringBuilder();&lt;br /&gt;         System.IO.TextWriter tw = new System.IO.StringWriter(sb);&lt;br /&gt;         cSharpProvider.GenerateCodeFromNamespace(codeNS,&lt;br /&gt;                  tw,&lt;br /&gt;                  new System.CodeDom.Compiler.CodeGeneratorOptions());&lt;br /&gt;         return sb.ToString();&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;My code uses a DataSet Class I call "Columns.xsd" just for being able to iterate over something that represents the database table, without making a bunch of DataReader calls.&lt;br /&gt;&lt;br /&gt;&lt;div style="Overflow-y:scroll; height:400Px;background:#eeeeee;font-size:12Px;color:#000000;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private static Columns PopulateColumns(SqlConnection Connection, &lt;br /&gt;                                               string TableName,&lt;br /&gt;                                               CommandType TableOrSproc)&lt;br /&gt;     {&lt;br /&gt;       Columns cols = new Columns();&lt;br /&gt;            &lt;br /&gt;       Connection.Open();            &lt;br /&gt;       SqlCommand sqlCmd = new SqlCommand();&lt;br /&gt;&lt;br /&gt;       if(TableOrSproc == CommandType.StoredProcedure) &lt;br /&gt;        {&lt;br /&gt;         // Get Parameters for Command.&lt;br /&gt;         sqlCmd = new SqlCommand(&lt;br /&gt;             "Select Parameter_Name as Column_Name,Data_Type, Character_maximum_length" +&lt;br /&gt;             " from Information_Schema.Parameters Where Specific_Name = '"&lt;br /&gt;             + TableName +&lt;br /&gt;             "'",&lt;br /&gt;             Connection);&lt;br /&gt;            }&lt;br /&gt;       else&lt;br /&gt;        {&lt;br /&gt;         // Get Columns for the Table.&lt;br /&gt;         sqlCmd = new SqlCommand(&lt;br /&gt;                 "Select Column_Name,Data_Type,Character_maximum_length" +&lt;br /&gt;                 " from Information_Schema.Columns Where Table_Name = '"&lt;br /&gt;                 + TableName +&lt;br /&gt;                 "'",&lt;br /&gt;                 Connection);&lt;br /&gt;            }&lt;br /&gt;                        &lt;br /&gt;          sqlCmd.CommandType = CommandType.Text;&lt;br /&gt;&lt;br /&gt;          SqlDataReader dr = sqlCmd.ExecuteReader();&lt;br /&gt;          while (dr.Read())&lt;br /&gt;            {&lt;br /&gt;            Columns.ColumnRow row = cols.Column.NewColumnRow();&lt;br /&gt;            row.Column_Name = dr["Column_Name"].ToString();&lt;br /&gt;            row.Data_Type = dr["Data_Type"].ToString();&lt;br /&gt;            row.Character_maximum_length = dr["Character_maximum_length"].ToString();&lt;br /&gt;            cols.Column.AddColumnRow(row);&lt;br /&gt;            }&lt;br /&gt;          dr.Close();&lt;br /&gt;          Connection.Close();&lt;br /&gt;          &lt;br /&gt;     return cols;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_cp5cVj9XtXI/SJ5DNrfYSzI/AAAAAAAAABs/x4aR9UB9np0/s1600-h/XSD.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_cp5cVj9XtXI/SJ5DNrfYSzI/AAAAAAAAABs/x4aR9UB9np0/s400/XSD.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5232693719342795570" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-3323535436338529865?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/3323535436338529865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=3323535436338529865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3323535436338529865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3323535436338529865'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/08/codedom-lwdo-builder.html' title='CodeDom LWDO Builder'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cp5cVj9XtXI/SJ5DNrfYSzI/AAAAAAAAABs/x4aR9UB9np0/s72-c/XSD.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-7700891876338724882</id><published>2008-07-25T02:21:00.004-04:00</published><updated>2008-07-25T02:28:27.805-04:00</updated><title type='text'>More Visual Studio 2008 App Configuration</title><content type='html'>Much simpler than generating C# code, the class I use to build the XML elements for the .CONFIG file is shown below. Most of the methods take a WinForms TreeView object or some part of it as an input parameter to be able to traverse its nodes and create the XMLElements with the needed Attributes :&lt;br /&gt;&lt;br /&gt;&lt;div style="overflow-y:scroll; height:400Px;font-size:10Px;background:#eeeeee; color:#000000;padding-left:4Px;"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace CustomConfigBuilder&lt;br /&gt;{&lt;br /&gt;    public class ConfigXMLBuilder&lt;br /&gt;    {&lt;br /&gt;        private void appendChildConfigAttributes(XmlDocument doc, XmlElement element, TreeNode node)&lt;br /&gt;        {&lt;br /&gt;            foreach (TreeNode childNode in node.Nodes)&lt;br /&gt;                if (childNode.Tag.ToString() == Shared._attributeImageIndex.ToString())&lt;br /&gt;                {&lt;br /&gt;                    XmlAttribute attr = doc.CreateAttribute(childNode.Text);&lt;br /&gt;                    element.Attributes.Append(attr);&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void appendChildConfigElements(XmlDocument document,&lt;br /&gt;                                               XmlElement parentXmlElement,&lt;br /&gt;                                               TreeNode parentTreeNode)&lt;br /&gt;        {&lt;br /&gt;            foreach (TreeNode node in parentTreeNode.Nodes)&lt;br /&gt;                if (node.Tag.ToString() == Shared._elementImageIndex.ToString())&lt;br /&gt;                {&lt;br /&gt;                    if (!Shared.HasChildAttributes(node))&lt;br /&gt;                        continue;&lt;br /&gt;&lt;br /&gt;                    XmlElement element = document.CreateElement(node.Text + "s");&lt;br /&gt;                    parentXmlElement.AppendChild(element);&lt;br /&gt;&lt;br /&gt;                    XmlElement elementAdd = document.CreateElement("Add");&lt;br /&gt;                    element.AppendChild(elementAdd);&lt;br /&gt;&lt;br /&gt;                    appendChildConfigElements(document, elementAdd, node);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            appendChildConfigAttributes(document, parentXmlElement, parentTreeNode);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        /// &lt;summary&gt;&lt;br /&gt;        /// Create the actual XML configuration Text for the Web/App Config file.&lt;br /&gt;        /// &lt;/summary&gt;&lt;br /&gt;        public string BuildXMLConfigDocument(TreeView tvConfigData, string SaveXmlTo)&lt;br /&gt;        {&lt;br /&gt;            XmlDocument docConfig = new XmlDocument();&lt;br /&gt;            docConfig.LoadXml("&lt;" +&lt;br /&gt;                              tvConfigData.Nodes[Shared._rootConfigNodeName].Text +&lt;br /&gt;                              "&gt;&lt;/" +&lt;br /&gt;                              tvConfigData.Nodes[Shared._rootConfigNodeName].Text + "&gt;");&lt;br /&gt;&lt;br /&gt;            appendChildConfigElements(docConfig,&lt;br /&gt;                                      docConfig.DocumentElement,&lt;br /&gt;                                      tvConfigData.Nodes[Shared._rootConfigNodeName]);&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                if (SaveXmlTo.Length &gt; 0 &amp;&amp; (!SaveXmlTo.ToUpper().Equals("SAVE XML TO:")))&lt;br /&gt;                    docConfig.Save(SaveXmlTo);&lt;br /&gt;            }&lt;br /&gt;            catch (System.Exception exception)&lt;br /&gt;            {&lt;br /&gt;                MessageBox.Show(exception.Message);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            StringBuilder sb = new StringBuilder();&lt;br /&gt;            StringWriter sw = new StringWriter(sb);&lt;br /&gt;            docConfig.Save(sw);&lt;br /&gt;&lt;br /&gt;            // txtXMLConfigResults.Text = sb.ToString();&lt;br /&gt;&lt;br /&gt;            return sb.ToString();&lt;br /&gt;        }       &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-7700891876338724882?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/7700891876338724882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=7700891876338724882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/7700891876338724882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/7700891876338724882'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/07/more-visual-studio-2008-app.html' title='More Visual Studio 2008 App Configuration'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-477077373675934749</id><published>2008-07-25T01:47:00.009-04:00</published><updated>2008-07-27T13:25:11.596-04:00</updated><title type='text'>Visual Studio .Net Configuration Tool</title><content type='html'>I had occasion to have to author some configuration settings at a client and struggled at first with the nesting of the data and getting it out at runtime in an elegant way. The .Net Framework 2.0 has a much improved set of classes for interfacing complex configurations, but it can take a few minutes to learn them all, so I wrote a tool for for the whole operation which uses CodeDom to generate the classes and simple XMLDocument operations for the config file contents. &lt;br /&gt;&lt;br /&gt;While I found a ton of tutorials online for how to write it all by hand, nothing automated. Attached are some screenshots of the tool in use :&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cp5cVj9XtXI/SIlqDRN8DtI/AAAAAAAAABU/V5EEL61V-0k/s1600-h/HowItWorks1.jpg"&gt;&lt;br /&gt;&lt;img  src="http://bp0.blogger.com/_cp5cVj9XtXI/SIlqDRN8DtI/AAAAAAAAABU/V5EEL61V-0k/s400/HowItWorks1.jpg" alt="" id="BLOGGER_PHOTO_ID_5226825446934187730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cp5cVj9XtXI/SIlqRWxk33I/AAAAAAAAABk/y5X3ALsygfg/s1600-h/HowItWorks3.jpg"&gt;&lt;img src="http://bp0.blogger.com/_cp5cVj9XtXI/SIlqRWxk33I/AAAAAAAAABk/y5X3ALsygfg/s400/HowItWorks3.jpg" alt="" id="BLOGGER_PHOTO_ID_5226825688944009074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_cp5cVj9XtXI/SIlqLKtzvSI/AAAAAAAAABc/rbvZzFrlDy8/s1600-h/HowItWorks2.jpg"&gt;&lt;img src="http://bp2.blogger.com/_cp5cVj9XtXI/SIlqLKtzvSI/AAAAAAAAABc/rbvZzFrlDy8/s400/HowItWorks2.jpg" alt="" id="BLOGGER_PHOTO_ID_5226825582627765538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So once compiled into the target application, the developer can get at the settings by calling the generated method with this signature:&lt;br /&gt;&lt;br /&gt;public static MyConfigSection GetSettings() &lt;br /&gt;&lt;br /&gt;Here is the whole generated set of classes :&lt;br /&gt;&lt;div style="height:300Px;overflow-y:scroll; font-size:10Px;background:#eeeeee;color:#000000;padding-left:4Px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;namespace MyApp.NameSpace {&lt;br /&gt;    using System.Configuration;&lt;br /&gt;    using System;&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    public class MyConfigSection : System.Configuration.ConfigurationSection {&lt;br /&gt;        &lt;br /&gt;        [System.Configuration.ConfigurationProperty("Teams")]&lt;br /&gt;        public virtual TeamCollection Teams {&lt;br /&gt;            get {&lt;br /&gt;                return ((TeamCollection)(this["Teams"]));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        static MyConfigSection GetSettings() {&lt;br /&gt;            return ((MyConfigSection)(System.Configuration.ConfigurationManager.GetSection(MyConfigSection)));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public class Team : System.Configuration.ConfigurationElement {&lt;br /&gt;        &lt;br /&gt;        [System.Configuration.ConfigurationProperty("Name")]&lt;br /&gt;        public virtual string Name {&lt;br /&gt;            get {&lt;br /&gt;                return ((string)(this["Name"]));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        [System.Configuration.ConfigurationProperty("Players")]&lt;br /&gt;        public virtual PlayerCollection Players {&lt;br /&gt;            get {&lt;br /&gt;                return ((PlayerCollection)(this["Players"]));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public class TeamCollection : System.Configuration.ConfigurationElementCollection {&lt;br /&gt;        &lt;br /&gt;        protected override string ElementName {&lt;br /&gt;            get {&lt;br /&gt;                return "Team";&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        protected override System.Configuration.ConfigurationElement CreateNewElement() {&lt;br /&gt;            return new Team();&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        protected override object GetElementKey(System.Configuration.ConfigurationElement element) {&lt;br /&gt;            return ((Team)(element)).Name;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public class Player : System.Configuration.ConfigurationElement {&lt;br /&gt;        &lt;br /&gt;        [System.Configuration.ConfigurationProperty("Name")]&lt;br /&gt;        public virtual string Name {&lt;br /&gt;            get {&lt;br /&gt;                return ((string)(this["Name"]));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        [System.Configuration.ConfigurationProperty("Position")]&lt;br /&gt;        public virtual string Position {&lt;br /&gt;            get {&lt;br /&gt;                return ((string)(this["Position"]));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public class PlayerCollection : System.Configuration.ConfigurationElementCollection {&lt;br /&gt;        &lt;br /&gt;        protected override string ElementName {&lt;br /&gt;            get {&lt;br /&gt;                return "Player";&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        protected override System.Configuration.ConfigurationElement CreateNewElement() {&lt;br /&gt;            return new Player();&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        protected override object GetElementKey(System.Configuration.ConfigurationElement element) {&lt;br /&gt;            return ((Player)(element)).Name;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here is the Class where the CodeDom namespace objects create the config classes:&lt;br /&gt;&lt;div style="height:280Px;overflow-y:scroll; font-size:10Px;background:#eeeeee;color:#000000;padding-left:6Px;"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.CodeDom;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Windows;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;using Microsoft.CSharp;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace CustomConfigBuilder&lt;br /&gt;{&lt;br /&gt;    public static class Shared&lt;br /&gt;    {&lt;br /&gt;        public const int _elementImageIndex = 1;&lt;br /&gt;        public const int _attributeImageIndex = 0;&lt;br /&gt;        public const string _rootConfigNodeName = "RootConfigNode";&lt;br /&gt;&lt;br /&gt;        public static bool HasChildAttributes(TreeNode node)&lt;br /&gt;        {&lt;br /&gt;            foreach (TreeNode childNode in node.Nodes)&lt;br /&gt;                if (childNode.Tag.ToString() == Shared._attributeImageIndex.ToString())&lt;br /&gt;                    return true;&lt;br /&gt;&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public class configClassBuilder&lt;br /&gt;    {       &lt;br /&gt;&lt;br /&gt;        #region "Methods for building classes"&lt;br /&gt;       private static void addBaseGetCollectionIndexerFunction(string name, CodeTypeDeclaration parent)&lt;br /&gt;        {&lt;br /&gt;            CodeMemberProperty propertyIndexer = new CodeMemberProperty();&lt;br /&gt;            propertyIndexer.HasGet = true;&lt;br /&gt;            propertyIndexer.HasSet = false;&lt;br /&gt;            propertyIndexer.Attributes = MemberAttributes.Public;&lt;br /&gt;            propertyIndexer.Type = new CodeTypeReference(name);&lt;br /&gt;            propertyIndexer.Name = "Item";&lt;br /&gt;            propertyIndexer.Parameters.Add(&lt;br /&gt;                new CodeParameterDeclarationExpression(&lt;br /&gt;                new CodeTypeReference(typeof(int)), "index"));&lt;br /&gt;&lt;br /&gt;            CodeMethodReferenceExpression baseGet =&lt;br /&gt;                new CodeMethodReferenceExpression(new CodeThisReferenceExpression(), "BaseGet");&lt;br /&gt;&lt;br /&gt;            propertyIndexer.GetStatements.Add(&lt;br /&gt;                new CodeMethodReturnStatement(&lt;br /&gt;                 new CodeCastExpression(&lt;br /&gt;                  new CodeTypeReference(name),&lt;br /&gt;                   new CodeMethodInvokeExpression(&lt;br /&gt;                    baseGet,&lt;br /&gt;                      new CodeSnippetExpression[] { new CodeSnippetExpression("index") }))));&lt;br /&gt;            parent.Members.Add(propertyIndexer);&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;        private void addConfigurationElementsCollection(CodeNamespace codeNS,&lt;br /&gt;           string name,&lt;br /&gt;           CodeTypeDeclaration parent,&lt;br /&gt;           CodeTypeDeclaration itemInCollection)&lt;br /&gt;        {&lt;br /&gt;            CodeTypeReference configPropertyReference = &lt;br /&gt;                new CodeTypeReference(typeof(ConfigurationProperty));&lt;br /&gt;&lt;br /&gt;            // For a collection               &lt;br /&gt;            CodeTypeDeclaration configElements = new CodeTypeDeclaration(name + "Collection");&lt;br /&gt;            configElements.BaseTypes.Add(typeof(ConfigurationElementCollection));&lt;br /&gt;            codeNS.Types.Add(configElements);&lt;br /&gt;&lt;br /&gt;            // Make the Collection a property of the Config Section.&lt;br /&gt;            CodeMemberProperty property = new CodeMemberProperty();&lt;br /&gt;            property.Name = name + "s";&lt;br /&gt;            property.Type = new CodeTypeReference(configElements.Name);&lt;br /&gt;            property.HasGet = true;&lt;br /&gt;            property.HasSet = false;&lt;br /&gt;            property.Attributes = MemberAttributes.Public;&lt;br /&gt;            CodeAttributeArgument codeAttributeArgument = new CodeAttributeArgument();&lt;br /&gt;            codeAttributeArgument.Value = new CodeSnippetExpression("\"" + name + "s\"");&lt;br /&gt;            property.CustomAttributes.Add(&lt;br /&gt;                 new CodeAttributeDeclaration(configPropertyReference,&lt;br /&gt;                 new CodeAttributeArgument[] { codeAttributeArgument }));&lt;br /&gt;            // Add the elements collection to whatever parent section type is.&lt;br /&gt;            parent.Members.Add(property);&lt;br /&gt;&lt;br /&gt;            CodeIndexerExpression indexer =&lt;br /&gt;                new CodeIndexerExpression(new CodeThisReferenceExpression(),&lt;br /&gt;                new CodeExpression[] { new CodeSnippetExpression("\"" + name + "s\"") });&lt;br /&gt;&lt;br /&gt;            CodeCastExpression castIndexer =&lt;br /&gt;                new CodeCastExpression(new CodeTypeReference(configElements.Name), indexer);&lt;br /&gt;&lt;br /&gt;            property.GetStatements.Add(new CodeMethodReturnStatement(castIndexer));&lt;br /&gt;&lt;br /&gt;            addCreateNewElementMethod(name, configElements);&lt;br /&gt;&lt;br /&gt;            // protected override object GetElementKey(ConfigurationElement element)            &lt;br /&gt;            CodeMemberMethod methodGetKey = new CodeMemberMethod();&lt;br /&gt;            methodGetKey.Attributes = MemberAttributes.Override | MemberAttributes.Family;&lt;br /&gt;            methodGetKey.Name = "GetElementKey";&lt;br /&gt;            methodGetKey.Parameters.Add(&lt;br /&gt;                new CodeParameterDeclarationExpression(&lt;br /&gt;                    new CodeTypeReference(typeof(ConfigurationElement)), "element"));&lt;br /&gt;            methodGetKey.ReturnType = new CodeTypeReference(typeof(object));&lt;br /&gt;            CodeCastExpression castReturn =&lt;br /&gt;                new CodeCastExpression(new CodeTypeReference(itemInCollection.Name),&lt;br /&gt;                    new CodeVariableReferenceExpression("element"));&lt;br /&gt;            CodePropertyReferenceExpression propertyOfItem =&lt;br /&gt;                new CodePropertyReferenceExpression(castReturn,&lt;br /&gt;                itemInCollection.Members[0].Name);&lt;br /&gt;&lt;br /&gt;            methodGetKey.Statements.Add(new CodeMethodReturnStatement(propertyOfItem));&lt;br /&gt;            configElements.Members.Add(methodGetKey);&lt;br /&gt;&lt;br /&gt;            // Add the "this" indexer from the Base Collection.       &lt;br /&gt;            addBaseGetCollectionIndexerFunction(name, parent);&lt;br /&gt;&lt;br /&gt;            // Properties of the Collection&lt;br /&gt;            addElementNameProperty(name, configElements);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private void addFieldsToElement(TreeNode treeNode, CodeTypeDeclaration elementDataType)&lt;br /&gt;        {&lt;br /&gt;            foreach (TreeNode attribute in treeNode.Nodes)&lt;br /&gt;                if (attribute.Tag.ToString() == Shared._attributeImageIndex.ToString())&lt;br /&gt;                    addAttributeToElement(elementDataType, attribute.Text);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void addImportsToNamespace(CodeNamespace ns)&lt;br /&gt;        {&lt;br /&gt;            CodeNamespaceImport configNS = new CodeNamespaceImport("System.Configuration");&lt;br /&gt;            ns.Imports.Add(configNS);&lt;br /&gt;            configNS = new CodeNamespaceImport("System");&lt;br /&gt;            ns.Imports.Add(configNS);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void addClientSettingsAccessor(CodeTypeDeclaration settingsType)&lt;br /&gt;        {&lt;br /&gt;            CodeMemberMethod settingsGetter = new CodeMemberMethod();&lt;br /&gt;            settingsGetter.Name = "GetSettings";&lt;br /&gt;            settingsGetter.ReturnType = new CodeTypeReference(settingsType.Name);&lt;br /&gt;            settingsGetter.Attributes = MemberAttributes.Static | MemberAttributes.Public ;&lt;br /&gt;&lt;br /&gt;            CodeMethodInvokeExpression invokeGet =&lt;br /&gt;                new CodeMethodInvokeExpression(new CodeTypeReferenceExpression(typeof(ConfigurationManager)),&lt;br /&gt;                    "GetSection",&lt;br /&gt;                    new CodeSnippetExpression[] { new CodeSnippetExpression(settingsType.Name) });&lt;br /&gt;&lt;br /&gt;            CodeCastExpression castReturn =&lt;br /&gt;                new CodeCastExpression(new CodeTypeReference(settingsType.Name), invokeGet);&lt;br /&gt;&lt;br /&gt;            settingsGetter.Statements.Add(new CodeMethodReturnStatement(castReturn));&lt;br /&gt;&lt;br /&gt;            settingsType.Members.Add(settingsGetter);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void addAttributeToElement(CodeTypeDeclaration elementType, string name)&lt;br /&gt;        {&lt;br /&gt;            CodeTypeReference configPropertyReference =&lt;br /&gt;                new CodeTypeReference(typeof(ConfigurationProperty));&lt;br /&gt;&lt;br /&gt;            CodeMemberProperty property = new CodeMemberProperty();&lt;br /&gt;            property.Name = name;&lt;br /&gt;            property.Type = new CodeTypeReference(typeof(string));&lt;br /&gt;            property.HasGet = true;&lt;br /&gt;            property.HasSet = false;&lt;br /&gt;            property.Attributes = MemberAttributes.Public;&lt;br /&gt;&lt;br /&gt;            CodeIndexerExpression propertyIndexer =&lt;br /&gt;                new CodeIndexerExpression(new CodeThisReferenceExpression(),&lt;br /&gt;                    new CodeExpression[] { new CodeSnippetExpression("\"" + name + "\"") });&lt;br /&gt;&lt;br /&gt;            CodeCastExpression castIndexer =&lt;br /&gt;                new CodeCastExpression(new CodeTypeReference(typeof(string)), propertyIndexer);&lt;br /&gt;&lt;br /&gt;            CodeMethodReturnStatement returnStatement = new CodeMethodReturnStatement(castIndexer);&lt;br /&gt;&lt;br /&gt;            property.GetStatements.Add(returnStatement);&lt;br /&gt;&lt;br /&gt;            CodeAttributeArgument codeAttributeArgument = new CodeAttributeArgument();&lt;br /&gt;            // codeAttributeArgument.Name = "Name";&lt;br /&gt;            codeAttributeArgument.Value = new CodeSnippetExpression("\"" + name + "\"");&lt;br /&gt;&lt;br /&gt;            property.CustomAttributes.Add(&lt;br /&gt;                 new CodeAttributeDeclaration(configPropertyReference,&lt;br /&gt;                 new CodeAttributeArgument[] { codeAttributeArgument }));&lt;br /&gt;&lt;br /&gt;            elementType.Members.Add(property);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void addCreateNewElementMethod(string name, CodeTypeDeclaration configElements)&lt;br /&gt;        {&lt;br /&gt;            CodeMemberMethod methodCreate = new CodeMemberMethod();&lt;br /&gt;            methodCreate.ReturnType = new CodeTypeReference(typeof(ConfigurationElement));&lt;br /&gt;            methodCreate.Name = "CreateNewElement";&lt;br /&gt;            methodCreate.Attributes = MemberAttributes.Override | MemberAttributes.Family;&lt;br /&gt;            methodCreate.Statements.Add(&lt;br /&gt;                new CodeMethodReturnStatement(&lt;br /&gt;                new CodeObjectCreateExpression(name, new CodeExpression[] { })));&lt;br /&gt;            configElements.Members.Add(methodCreate);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static void addElementNameProperty(string name, CodeTypeDeclaration configElements)&lt;br /&gt;        {&lt;br /&gt;            CodeMemberProperty propEleName = new CodeMemberProperty();&lt;br /&gt;            propEleName.Name = "ElementName";&lt;br /&gt;            propEleName.Attributes = MemberAttributes.Override | MemberAttributes.Family;&lt;br /&gt;            propEleName.HasSet = false;&lt;br /&gt;            propEleName.HasGet = true;&lt;br /&gt;            propEleName.Type = new CodeTypeReference(typeof(string));&lt;br /&gt;            propEleName.GetStatements.Add(new CodeMethodReturnStatement(&lt;br /&gt;                new CodeSnippetExpression("\"" + name + "\"")));&lt;br /&gt;            configElements.Members.Add(propEleName);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private CodeTypeDeclaration addConfigurationElement(CodeNamespace codeNS, string name)&lt;br /&gt;        {&lt;br /&gt;            // For an item in the collection &lt;br /&gt;            CodeTypeDeclaration configElement = new CodeTypeDeclaration(name);&lt;br /&gt;            configElement.BaseTypes.Add(typeof(ConfigurationElement));&lt;br /&gt;            codeNS.Types.Add(configElement);&lt;br /&gt;            return configElement;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string RunBuild(TreeView tvConfigData, string SaveTo)&lt;br /&gt;        {&lt;br /&gt;            CodeNamespace configgedNamespace = new CodeNamespace("MyApp.NameSpace");&lt;br /&gt;&lt;br /&gt;            CodeTypeDeclaration configSectionDec = new CodeTypeDeclaration(tvConfigData.Nodes[0].Text);&lt;br /&gt;            configSectionDec.IsClass = true;&lt;br /&gt;&lt;br /&gt;            configSectionDec.BaseTypes.Add(typeof(ConfigurationSection));&lt;br /&gt;&lt;br /&gt;            configgedNamespace.Types.Add(configSectionDec);&lt;br /&gt;&lt;br /&gt;            addImportsToNamespace(configgedNamespace);&lt;br /&gt;&lt;br /&gt;            foreach (TreeNode tn in tvConfigData.Nodes[Shared._rootConfigNodeName].Nodes)&lt;br /&gt;            {&lt;br /&gt;                CodeTypeDeclaration newElement = addConfigurationElement(configgedNamespace, tn.Text);&lt;br /&gt;&lt;br /&gt;                // Add Fields to the new configuration element.&lt;br /&gt;                addFieldsToElement(tn, newElement);&lt;br /&gt;                // Add a collection class to hold all the instances of the element.&lt;br /&gt;                addConfigurationElementsCollection(configgedNamespace, tn.Text, configSectionDec, newElement);&lt;br /&gt;&lt;br /&gt;                addClientSettingsAccessor(configSectionDec);&lt;br /&gt;&lt;br /&gt;                // Add Any Child Elements to the new configuration element.&lt;br /&gt;                foreach (TreeNode childNode in tn.Nodes)&lt;br /&gt;                    if (childNode.Tag.ToString() == Shared._elementImageIndex.ToString())&lt;br /&gt;                    {&lt;br /&gt;                        CodeTypeDeclaration newChildElement =&lt;br /&gt;                            addConfigurationElement(configgedNamespace, childNode.Text);&lt;br /&gt;&lt;br /&gt;                        addFieldsToElement(childNode, newChildElement);&lt;br /&gt;&lt;br /&gt;                        addConfigurationElementsCollection(configgedNamespace,&lt;br /&gt;                            childNode.Text,&lt;br /&gt;                            newElement,&lt;br /&gt;                            newChildElement);&lt;br /&gt;                    }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            CSharpCodeProvider provider = new CSharpCodeProvider();&lt;br /&gt;&lt;br /&gt;            System.CodeDom.Compiler.CodeGeneratorOptions opts =&lt;br /&gt;                   new System.CodeDom.Compiler.CodeGeneratorOptions();&lt;br /&gt;&lt;br /&gt;            if (SaveTo.Length &gt; 0 &amp;&amp; !SaveTo.Contains("Save "))&lt;br /&gt;            {&lt;br /&gt;                StreamWriter sw = new StreamWriter(SaveTo);               &lt;br /&gt;                opts.BlankLinesBetweenMembers = true;&lt;br /&gt;                provider.GenerateCodeFromNamespace(configgedNamespace, sw, opts);&lt;br /&gt;                sw.Close();&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            StringBuilder sb = new StringBuilder();&lt;br /&gt;            StringWriter strWriter = new StringWriter(sb);&lt;br /&gt;            provider.GenerateCodeFromNamespace(configgedNamespace, strWriter, opts);&lt;br /&gt;            // txtClassResults.Text = sb.ToString();&lt;br /&gt;            strWriter.Close();&lt;br /&gt;            return sb.ToString();           &lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And here is the declaration of the new configuration Type in the App.Config ;&lt;br /&gt;&lt;br /&gt;&lt;div style="height:300Px;overflow-y:scroll; font-size:10Px;background:#eeeeee;color:#000000;padding-left:4Px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;  &amp;lt;configSections&amp;gt;&lt;br /&gt;    &amp;lt;section name="MyConfigSection" type="MyApp.NameSpace.MyConfigSection, CustomConfigBuilder" /&amp;gt;    &lt;br /&gt;  &amp;lt;/configSections&amp;gt;&lt;br /&gt;  &lt;br /&gt;  &amp;lt;MyConfigSection&amp;gt;&lt;br /&gt;    &amp;lt;Teams&amp;gt;      &lt;br /&gt;      &amp;lt;add Name="Dallas Cowboys"&amp;gt;&lt;br /&gt;        &amp;lt;Players&amp;gt;&lt;br /&gt;          &amp;lt;add Name="Terrell Owens"  Position="Wide Receiver" /&amp;gt;&lt;br /&gt;        &amp;lt;/Players&amp;gt;&lt;br /&gt;      &amp;lt;/add&amp;gt;&lt;br /&gt;    &amp;lt;/Teams&amp;gt;&lt;br /&gt;  &amp;lt;/MyConfigSection&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-477077373675934749?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/477077373675934749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=477077373675934749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/477077373675934749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/477077373675934749'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/07/visual-studio-net-configuration-tool.html' title='Visual Studio .Net Configuration Tool'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cp5cVj9XtXI/SIlqDRN8DtI/AAAAAAAAABU/V5EEL61V-0k/s72-c/HowItWorks1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-3016961535110255266</id><published>2008-06-15T00:20:00.003-04:00</published><updated>2008-06-15T00:28:11.712-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code Coverage'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='NUnit'/><title type='text'>Couple of Rants, IE 7.0 and NUnit</title><content type='html'>I can't use Blogger from Internet Explorer 7. I get infinite redirects I have to kill. Microsoft gets a bad grade here.&lt;br /&gt;&lt;br /&gt;Why NUnit is worse than a Visual Studio Test Project :&lt;br /&gt;&lt;br /&gt;A. You cannot DEBUG your test while it is running without Attaching to Process 'NUnit.exe' from the menu bar.  In Visual Studio, simply set the breakpoint, go to the Test pane, right-click and run the test. &lt;br /&gt;&lt;br /&gt;B. You cannot get the Application Configuration to work without renaming and moving around the "app.config" file. In Visual Studio, configuration just works. &lt;br /&gt;&lt;br /&gt;C. NUnit requires me to run an application called "NUnit" where Visual Studio requires nothing other than itself with the Test Project as part of the Solution. &lt;br /&gt;&lt;br /&gt;D. Visual Studio will automatically author the skeleton of your test methods, and this helps greatly for getting a high Code Coverage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-3016961535110255266?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/3016961535110255266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=3016961535110255266' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3016961535110255266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3016961535110255266'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/06/couple-of-rants-ie-70-and-nunit.html' title='Couple of Rants, IE 7.0 and NUnit'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-4713078798114483251</id><published>2008-01-01T23:48:00.000-05:00</published><updated>2008-01-01T23:50:50.447-05:00</updated><title type='text'>Oklahoma City Monument</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cp5cVj9XtXI/R3sYDFpv_DI/AAAAAAAAABM/f-xGyEvnA-w/s1600-h/OK+city+monument.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_cp5cVj9XtXI/R3sYDFpv_DI/AAAAAAAAABM/f-xGyEvnA-w/s400/OK+city+monument.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5150737040164256818" /&gt;&lt;/a&gt;&lt;br /&gt;I totally forgot about this tragedy, seems we have had so many since, until seeing this nice monument in the Whichita Mountains Wildlife Preserve near Fort Sill :&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-4713078798114483251?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/4713078798114483251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=4713078798114483251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/4713078798114483251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/4713078798114483251'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/01/oklahoma-city-monument.html' title='Oklahoma City Monument'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cp5cVj9XtXI/R3sYDFpv_DI/AAAAAAAAABM/f-xGyEvnA-w/s72-c/OK+city+monument.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-2857280490861425802</id><published>2008-01-01T23:27:00.000-05:00</published><updated>2008-01-01T23:44:26.285-05:00</updated><title type='text'>Jesus of the Whichitas</title><content type='html'>On my trip to Lawton, Oklahoma, home to Fort Sill and the really special people with whom I was ringing in the New Year, I got to see the Wildlife preserve with this nice statue :&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_cp5cVj9XtXI/R3sTKlpv_CI/AAAAAAAAABE/0dfsd47xDCk/s1600-h/Christ+o+whichitas.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_cp5cVj9XtXI/R3sTKlpv_CI/AAAAAAAAABE/0dfsd47xDCk/s400/Christ+o+whichitas.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5150731671455136802" /&gt;&lt;/a&gt;&lt;br /&gt;We saw a Longhorn and some grazing Bison, but not too many other species. &lt;br /&gt;The Christian attractions are part of the visitors center, which was a pleasant break from the cold air and wind.&lt;br /&gt;More info can be found here :&lt;br /&gt;&lt;a href="http://www.fws.gov/southwest/refuges/wichitamountains/"&gt;Wichita Mountains National Wildlife Refuge &lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-2857280490861425802?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/2857280490861425802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=2857280490861425802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/2857280490861425802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/2857280490861425802'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/01/jesus-of-whichitas.html' title='Jesus of the Whichitas'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_cp5cVj9XtXI/R3sTKlpv_CI/AAAAAAAAABE/0dfsd47xDCk/s72-c/Christ+o+whichitas.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-5788296737475099490</id><published>2008-01-01T23:24:00.000-05:00</published><updated>2008-01-01T23:32:13.272-05:00</updated><title type='text'>Arlington Texas View from a plane</title><content type='html'>I went on holiday to Texoma and took this cell phone shot of the new Cowboys Stadium under construction (Must zoom to see any details):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_cp5cVj9XtXI/R3sShVpv_BI/AAAAAAAAAA8/kL0YXcZYR5U/s1600-h/CowboysAndRangersClipped.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_cp5cVj9XtXI/R3sShVpv_BI/AAAAAAAAAA8/kL0YXcZYR5U/s400/CowboysAndRangersClipped.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5150730962785532946" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-5788296737475099490?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/5788296737475099490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=5788296737475099490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5788296737475099490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5788296737475099490'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2008/01/arlington-texas-view-from-plane.html' title='Arlington Texas View from a plane'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_cp5cVj9XtXI/R3sShVpv_BI/AAAAAAAAAA8/kL0YXcZYR5U/s72-c/CowboysAndRangersClipped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-4578339705354845502</id><published>2007-12-23T22:51:00.001-05:00</published><updated>2007-12-23T22:53:56.027-05:00</updated><title type='text'>Apartments at Christmas</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_cp5cVj9XtXI/R28s51pv-_I/AAAAAAAAAAs/ZpMKEh1sG7A/s1600-h/ApartmentXMas.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_cp5cVj9XtXI/R28s51pv-_I/AAAAAAAAAAs/ZpMKEh1sG7A/s400/ApartmentXMas.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5147382271274122226" /&gt;&lt;/a&gt;&lt;br /&gt;The tenants below me, did a great job with their decorations. But I give myself some credit for participating in the holiday just a bit with my single colored light strand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-4578339705354845502?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/4578339705354845502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=4578339705354845502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/4578339705354845502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/4578339705354845502'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/12/apartments-at-christmas.html' title='Apartments at Christmas'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_cp5cVj9XtXI/R28s51pv-_I/AAAAAAAAAAs/ZpMKEh1sG7A/s72-c/ApartmentXMas.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-3692280741331913824</id><published>2007-12-11T18:57:00.000-05:00</published><updated>2007-12-11T19:00:38.595-05:00</updated><title type='text'>Lewis Ginter Botanical Garden</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cp5cVj9XtXI/R18kHwXsUyI/AAAAAAAAAAk/X5HQXKDWt9U/s1600-h/ginter.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_cp5cVj9XtXI/R18kHwXsUyI/AAAAAAAAAAk/X5HQXKDWt9U/s400/ginter.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5142869015142355746" /&gt;&lt;/a&gt;&lt;br /&gt;Lewis Ginter Botanical Garden for Christmas&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-3692280741331913824?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/3692280741331913824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=3692280741331913824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3692280741331913824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/3692280741331913824'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/12/lewis-ginter-botanical-garden.html' title='Lewis Ginter Botanical Garden'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cp5cVj9XtXI/R18kHwXsUyI/AAAAAAAAAAk/X5HQXKDWt9U/s72-c/ginter.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-21689946323674149</id><published>2007-11-26T09:37:00.000-05:00</published><updated>2007-11-26T09:44:50.598-05:00</updated><title type='text'>Virginia Beach Christmas Decor</title><content type='html'>&lt;a href="http://bp0.blogger.com/_cp5cVj9XtXI/R0rbA92NLJI/AAAAAAAAAAc/o1PG_Lkiv_U/s1600-h/VABeachXMasLG.JPG"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_cp5cVj9XtXI/R0rbA92NLJI/AAAAAAAAAAc/o1PG_Lkiv_U/s400/VABeachXMasLG.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5137159134617873554" /&gt;&lt;/a&gt;&lt;br /&gt;They had the boardwalk open for automobiles this weekend to view the large decorations of light on the sand and grass in front of the hotels.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-21689946323674149?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/21689946323674149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=21689946323674149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/21689946323674149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/21689946323674149'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/11/virginia-beach-christmas-decor.html' title='Virginia Beach Christmas Decor'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cp5cVj9XtXI/R0rbA92NLJI/AAAAAAAAAAc/o1PG_Lkiv_U/s72-c/VABeachXMasLG.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-1740486162917169843</id><published>2007-11-01T16:28:00.001-04:00</published><updated>2007-11-01T16:33:13.996-04:00</updated><title type='text'>Programming .Net tip</title><content type='html'>Maybe administration tip is a better category.&lt;br /&gt;&lt;br /&gt;   Use AdminPack for Windows Server 2003 to manage the MMC Console. My biggest timesaver is the ability to add a bunch of Remote Connections to the Remote Desktop node of the console. It saves my user id and password so I can get into any server I saved on this list with one click.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-1740486162917169843?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/1740486162917169843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=1740486162917169843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1740486162917169843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1740486162917169843'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/11/programming-net-tip.html' title='Programming .Net tip'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-1577460635468262998</id><published>2007-09-24T10:36:00.001-04:00</published><updated>2008-06-15T00:31:08.415-04:00</updated><title type='text'>Something truly special</title><content type='html'>Since returning to Richmond, I have been waking up to this Charlottesville radio station WNRN, and hearing a lot of interesting new songs. This morning they solved my "what was that song" problem by pointing listeners to Andrew Bird. I was so happy to connect this song to its source.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andrewbird.net/news.htm"&gt;Andrew Bird (Awesome free MP3 here)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-1577460635468262998?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/1577460635468262998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=1577460635468262998' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1577460635468262998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1577460635468262998'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/09/something-truly-special.html' title='Something truly special'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-2268749042736358344</id><published>2007-07-13T22:02:00.000-04:00</published><updated>2007-11-26T09:50:24.172-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Iron'/><category scheme='http://www.blogger.com/atom/ns#' term='Castings'/><category scheme='http://www.blogger.com/atom/ns#' term='Baltimore'/><category scheme='http://www.blogger.com/atom/ns#' term='Inner Harbor'/><category scheme='http://www.blogger.com/atom/ns#' term='Foundry'/><title type='text'>OK Foundry decorates the Inner Harbor</title><content type='html'>&lt;a href="http://bp1.blogger.com/_cp5cVj9XtXI/RpgvHinlIvI/AAAAAAAAAAU/q2fh0kd43oY/s1600-h/Sponger2.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt;" src="http://bp1.blogger.com/_cp5cVj9XtXI/RpgvHinlIvI/AAAAAAAAAAU/q2fh0kd43oY/s400/Sponger2.JPG" alt="" id="BLOGGER_PHOTO_ID_5086867585713382130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;   My brother created this sculpture at the foundry with an artist to now display in the Inner Harbor of Baltimore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-2268749042736358344?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/2268749042736358344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=2268749042736358344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/2268749042736358344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/2268749042736358344'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/07/ok-foundry-decorates-inner-harbor.html' title='OK Foundry decorates the Inner Harbor'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_cp5cVj9XtXI/RpgvHinlIvI/AAAAAAAAAAU/q2fh0kd43oY/s72-c/Sponger2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-6470510319306491915</id><published>2007-05-10T11:12:00.000-04:00</published><updated>2007-05-10T11:14:02.193-04:00</updated><title type='text'>TOAD Question</title><content type='html'>Can we change the way Formatting works? I want my variables inCamel-Case and my Tables and Fields in UPPER. In the formatting options, it seems to force me to upper case everything, if anything.&lt;br /&gt;&lt;br /&gt;Any Oracle gurus out there know this or another way to get this result?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-6470510319306491915?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/6470510319306491915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=6470510319306491915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/6470510319306491915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/6470510319306491915'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/05/toad-question.html' title='TOAD Question'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-1322303984820078352</id><published>2007-04-30T10:46:00.000-04:00</published><updated>2007-04-30T10:49:25.660-04:00</updated><title type='text'>2 Cool things in programming</title><content type='html'>Google for "Copy Path Shell Extension" and likely the product by "BJB, Inc" will show up. This thing copies the path of a file to the clipboard. Useful in a command line world.&lt;br /&gt;&lt;br /&gt;After the Richmond Code Camp, I now know about using "?" in variable declarations. This creates a NULLABLE data type of the type you want. Very useful for database applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-1322303984820078352?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/1322303984820078352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=1322303984820078352' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1322303984820078352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/1322303984820078352'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/04/2-cool-things-in-programming.html' title='2 Cool things in programming'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-374303088634800300</id><published>2007-04-07T10:52:00.000-04:00</published><updated>2007-04-07T10:57:08.469-04:00</updated><title type='text'>SAMSUNG .. I HATE YOU!!!</title><content type='html'>I can't say enough about this. I have now tried the 4th Laptop with this YP- U2J player to no avail. The computer says no devices detected. This is pathetic. Where is my el cheapo Creative Media player from years past that refused to stop working?&lt;br /&gt;&lt;br /&gt;I am a software developer. I work with software all day that does not want to work. This player should just work. I should be able to put songs on it. Samsung, you are a fraud and a thief. Your product is crap. I am buying an I-Pod just as soon as I can get the battery acid out of my veins and my heart rate down to something safe for operating an automobile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-374303088634800300?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/374303088634800300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=374303088634800300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/374303088634800300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/374303088634800300'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/04/samsung-i-hate-you.html' title='SAMSUNG .. I HATE YOU!!!'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-5648539312251066004</id><published>2007-03-17T19:46:00.000-04:00</published><updated>2007-03-17T19:48:00.736-04:00</updated><title type='text'>Route 288</title><content type='html'>&lt;a href="http://bp1.blogger.com/_cp5cVj9XtXI/Rfx-HqUxIiI/AAAAAAAAAAM/ZyEqyxSsPCQ/s1600-h/288.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5043044352833692194" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://bp1.blogger.com/_cp5cVj9XtXI/Rfx-HqUxIiI/AAAAAAAAAAM/ZyEqyxSsPCQ/s320/288.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-5648539312251066004?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/5648539312251066004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=5648539312251066004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5648539312251066004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/5648539312251066004'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/03/route-288.html' title='Route 288'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_cp5cVj9XtXI/Rfx-HqUxIiI/AAAAAAAAAAM/ZyEqyxSsPCQ/s72-c/288.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-745249328940626140</id><published>2007-02-11T17:17:00.000-05:00</published><updated>2007-02-11T17:23:45.972-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAMSUNG YP-U2J'/><title type='text'>SAMSUNG YP-U2J (Shoulda bought IPOD)</title><content type='html'>I bought this SAMSUNG player because it was much cheaper than an IPOD. I thought, what the heck, all I need is a about 100 songs to make my workouts sing, so why pay more. But now every time I plug this thing into my Windows XP laptop, I get a loud beep that repeats indefinitely and the System event looks like this :&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000066;"&gt;Event Type: Error&lt;br /&gt;Event Source: WPDMTPDriver&lt;br /&gt;Event Category: (16)&lt;br /&gt;Event ID: 15300&lt;br /&gt;Date: 2/11/2007&lt;br /&gt;Time: 2:53:43 PM&lt;br /&gt;User: N/A&lt;br /&gt;Computer: BRIANSBOX&lt;br /&gt;Description:&lt;br /&gt;MTP WPD Driver has failed to start. Error 0x80042013.&lt;br /&gt;&lt;br /&gt;For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Even if this issue resolves itself, it has already caused enough pain that the monetary savings has been overspent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-745249328940626140?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/745249328940626140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=745249328940626140' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/745249328940626140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/745249328940626140'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/02/samsung-yp-u2j-shoulda-bought-ipod.html' title='SAMSUNG YP-U2J (Shoulda bought IPOD)'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-116994276541967759</id><published>2007-01-27T18:58:00.000-05:00</published><updated>2007-01-27T19:06:05.430-05:00</updated><title type='text'>Running the race for the cure</title><content type='html'>I have signed up to run the Monument Avenue 10K race in March. The cause is to raise funds for cancer research. I look forward to running in this setting on a nice tree-lined street with monuments of Confederate generals (and of course Arther Ashe). I am hoping the scenery helps distract me from the number of strides I will take. &lt;br /&gt; Having lost a father to cancer, I hope this event can strengthen the battle to fight this thing.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sportsbackers.org/10kraceinfo.htm"&gt;Link to race information&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-116994276541967759?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/116994276541967759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=116994276541967759' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116994276541967759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116994276541967759'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/01/running-race-for-cure.html' title='Running the race for the cure'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-116918382556202985</id><published>2007-01-19T00:15:00.000-05:00</published><updated>2007-05-10T11:16:39.500-04:00</updated><title type='text'>Bills Records and Tapes</title><content type='html'>Bill Wisener, owner of Bill's Record, has been in the record business for more than 25 years. A local legend, Bill will be moving from his north Dallas location to smaller digs at Southside on Lamar.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dallasnews.com/sharedcontent/dws/news/city/northdallas/"&gt;http://www.dallasnews.com/sharedcontent/dws/news/city/northdallas/&lt;/a&gt;&lt;br /&gt;stories/011407dnmetbillsrecords.33e9b4ab.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-116918382556202985?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/116918382556202985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=116918382556202985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116918382556202985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116918382556202985'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2007/01/bills-records-and-tapes.html' title='Bills Records and Tapes'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-116637664870372443</id><published>2006-12-17T12:27:00.000-05:00</published><updated>2006-12-17T12:30:48.716-05:00</updated><title type='text'>Tampa WCF Trip</title><content type='html'>Went to Tampa to learn Windows Communication Foundation. Lots of Data, Service, Operation, and Message Contracts.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/6395/2727/1600/537418/Tampa.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/6395/2727/400/703358/Tampa.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cuban Sandwich shop&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/6395/2727/1600/834767/Arturo.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/6395/2727/400/514080/Arturo.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Arturo Cigar shop&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-116637664870372443?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/116637664870372443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=116637664870372443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116637664870372443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116637664870372443'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/12/tampa-wcf-trip.html' title='Tampa WCF Trip'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-116529178580790293</id><published>2006-12-04T23:06:00.000-05:00</published><updated>2006-12-04T23:09:45.816-05:00</updated><title type='text'>Virtual PC 2007 - Correction</title><content type='html'>I found out how to get the session to share my VPN connection with my machine. You set the Ethernet adapter setting to NAT. What a relief. We are still switching to VMWare, but I accept Virtual PC as a great tool now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-116529178580790293?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/116529178580790293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=116529178580790293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116529178580790293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116529178580790293'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/12/virtual-pc-2007-correction.html' title='Virtual PC 2007 - Correction'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-116155132782408181</id><published>2006-10-22T17:06:00.000-04:00</published><updated>2006-10-22T17:08:47.836-04:00</updated><title type='text'>My 2 issues this week</title><content type='html'>The Papa Johns kids at my local favorite pizza shop, said tips are not happening. Even though, there is a delivery charge, people should tip the driver.&lt;br /&gt;&lt;br /&gt;Virtual PC 2007 does not support USB. If you have a dongle for security this is a major problem, as it was with VPC 2004.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-116155132782408181?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/116155132782408181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=116155132782408181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116155132782408181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116155132782408181'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/10/my-2-issues-this-week.html' title='My 2 issues this week'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-116050589785807445</id><published>2006-10-10T14:41:00.000-04:00</published><updated>2006-10-10T14:44:57.870-04:00</updated><title type='text'>My Faux Fireplace</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/MyFirePlace.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/MyFirePlace.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt; Quite nice on a cold day. Thanks, Belvidere apartments :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-116050589785807445?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/116050589785807445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=116050589785807445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116050589785807445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/116050589785807445'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/10/my-faux-fireplace.html' title='My Faux Fireplace'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115760118299652947</id><published>2006-09-06T23:51:00.000-04:00</published><updated>2006-09-06T23:53:03.010-04:00</updated><title type='text'>Create Dallas Dates .vbs</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;Dim otl&lt;br /&gt;Set otl = CreateObject("Outlook.Application")&lt;br /&gt;Const olAppointmentItem = 1&lt;br /&gt;&lt;br /&gt;Sub CreateGame(Start, EndDate,Name)&lt;br /&gt; Set e1 = otl.CreateItem(olAppointmentItem)&lt;br /&gt; e1.Start = Start&lt;br /&gt; e1.End = EndDate&lt;br /&gt; e1.Subject = Name&lt;br /&gt; ' e1.Location = "TV"&lt;br /&gt; e1.Save&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; CreateGame "8/12/2006 9:00PM",  "8/12/2006 11:00PM",   "DAL @ Seattle" &lt;br /&gt; CreateGame "8/21/2006 7:00PM",  "8/21/2006 9:00PM",   "DAL New Orleans @ Shreveport, LA (ESPN) "&lt;br /&gt; CreateGame "8/26/2006 7:00PM",  "8/26/2006 9:00PM",   "DAL SAN FRANCISCO "&lt;br /&gt; CreateGame "8/31/2006 7:00PM",  "8/31/2006 9:00PM",   "DAL MINNESOTA" &lt;br /&gt; CreateGame "9/10/2006 3:15PM",  "9/10/2006 5:15PM",   "DAL @ Jacksonville"    &lt;br /&gt; CreateGame "9/17/2006 7:15PM",  "9/17/2006 9:15PM",   "DAL WASHINGTON"    &lt;br /&gt; CreateGame "9/24/2006 12:00PM", "9/24/2006 2:00PM",  " DAL BYE"     &lt;br /&gt; CreateGame "10/1/2006 12:00PM", "10/1/2006 2:00PM",  "DAL @ Tennessee" &lt;br /&gt; CreateGame "10/8/2006 3:15PM",  "10/8/2006 5:15PM",   "DAL @ Philadelphia" &lt;br /&gt; CreateGame "10/15/2006 12:00PM","10/15/2006 2:00PM", "DAL HOUSTON"    &lt;br /&gt; CreateGame "10/23/2006 7:30PM", "10/23/2006 9:30PM",  "DAL NY GIANTS"    &lt;br /&gt; CreateGame "10/29/2006 7:15PM", "10/29/2006 9:15PM",  "DAL @ Carolina"    &lt;br /&gt; CreateGame "11/5/2006 12:00PM", "11/5/2006 2:00PM",  "DAL @ Washington"&lt;br /&gt; CreateGame "11/12/2006 3:15PM", "11/12/2006 5:15PM",  "DAL @ Arizona"    &lt;br /&gt; CreateGame "11/19/2006 12:00PM","11/19/2006 2:00PM", "DAL INDIANAPOLIS" &lt;br /&gt; CreateGame "11/23/2006 3:15PM", "11/23/2006 5:15PM",  "DAL TAMPA BAY"  &lt;br /&gt; CreateGame "12/3/2006 12:00PM", "12/3/2006 2:00PM",  "DAL @ NY Giants"    &lt;br /&gt; CreateGame "12/10/2006 12:00PM","12/10/2006 2:00PM", "DAL NEW ORLEANS"    &lt;br /&gt; CreateGame "12/16/2006 7:00PM", "12/16/2006 9:00PM",  "DAL @ Atlanta"     &lt;br /&gt; CreateGame "12/25/2006 4:00PM", "12/25/2006 6:00PM",  "DAL PHILADELPHIA"    &lt;br /&gt; CreateGame "12/31/2006 12:00PM","12/31/2006 2:00PM", "DAL DETROIT"&lt;br /&gt;&lt;br /&gt;Set otl = Nothing&lt;br /&gt;Msgbox "Finished"&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115760118299652947?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115760118299652947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115760118299652947' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115760118299652947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115760118299652947'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/09/create-dallas-dates-vbs.html' title='Create Dallas Dates .vbs'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115749071170660728</id><published>2006-09-05T17:11:00.000-04:00</published><updated>2006-09-05T17:12:32.813-04:00</updated><title type='text'>Burger King cracks me up</title><content type='html'>&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/aNQBQyNzNsM"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/aNQBQyNzNsM" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115749071170660728?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115749071170660728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115749071170660728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115749071170660728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115749071170660728'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/09/burger-king-cracks-me-up.html' title='Burger King cracks me up'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115630309822680709</id><published>2006-08-22T23:04:00.000-04:00</published><updated>2006-08-22T23:18:18.306-04:00</updated><title type='text'>Remembering Katrina</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/HURRICANE_KATRINA.sff_MSJL111_20050901042437.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/HURRICANE_KATRINA.sff_MSJL111_20050901042437.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  I feel equal compassion for all displaced by the hurricane, but something about these 2 girls in this picture, just brings it home. Big events fly by me for some reason. I have to really focus on their effect on somebody to feel them. Perhaps that is what journalism is all about when it is good. &lt;br /&gt;&lt;br /&gt;(I saved this photo from http://www.myway.com and hope no theft has occurred by my display of it here.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115630309822680709?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115630309822680709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115630309822680709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115630309822680709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115630309822680709'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/08/remembering-katrina.html' title='Remembering Katrina'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115466476269180955</id><published>2006-08-04T00:08:00.000-04:00</published><updated>2006-08-04T00:12:42.703-04:00</updated><title type='text'>richmond</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/ATT00007.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/ATT00007.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115466476269180955?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115466476269180955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115466476269180955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115466476269180955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115466476269180955'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/08/richmond.html' title='richmond'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115351135589778717</id><published>2006-07-21T15:47:00.000-04:00</published><updated>2006-07-21T15:49:15.910-04:00</updated><title type='text'>Picture of Tata</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/image002-0001.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/image002-0001.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Unfortunately for Tata, he did not live to see the effect of the Steel rod inserted into this picture given him :&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115351135589778717?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115351135589778717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115351135589778717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115351135589778717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115351135589778717'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/07/picture-of-tata.html' title='Picture of Tata'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115324974787074326</id><published>2006-07-18T14:46:00.000-04:00</published><updated>2006-07-18T15:09:07.910-04:00</updated><title type='text'>Old favorite site</title><content type='html'>I used to view this &lt;a href="http://antwrp.gsfc.nasa.gov/apod/astropix.html"&gt;&lt;br /&gt;NASA Picture of the Day&lt;/a&gt; daily many years ago. &lt;br /&gt;&lt;br /&gt;This stuff is just awe inspiring. &lt;br /&gt;The Space Shuttle getting ready for July 4th :&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger/6395/2727/400/discovery_06pd0906.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Stonehenge ( built in 2000 B.C. ) :&lt;br /&gt;&lt;img src="http://antwrp.gsfc.nasa.gov/apod/image/0606/stonehenge_strasser.jpg" width="440Px" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sun Spots :&lt;br /&gt;&lt;img width="440Px" src="http://antwrp.gsfc.nasa.gov/apod/image/0606/sun2_trace.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1950 Rocket Launch:&lt;br /&gt;&lt;img width="440Px" src="http://antwrp.gsfc.nasa.gov/apod/image/0606/bumper2_nasa.jpg"&lt;br /&gt; /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115324974787074326?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115324974787074326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115324974787074326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115324974787074326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115324974787074326'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/07/old-favorite-site.html' title='Old favorite site'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115309984984058354</id><published>2006-07-16T21:29:00.000-04:00</published><updated>2006-07-16T21:30:49.850-04:00</updated><title type='text'>Microsoft Event in Richmond</title><content type='html'>&lt;a href="http://www.msdnevents.com/"&gt;Richmond, VA&lt;br /&gt;Tuesday, August 8, 2006&lt;br /&gt;Theater - Regal Shortpump Stadium 14 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115309984984058354?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115309984984058354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115309984984058354' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115309984984058354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115309984984058354'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/07/microsoft-event-in-richmond.html' title='Microsoft Event in Richmond'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115288741724783466</id><published>2006-07-14T10:27:00.000-04:00</published><updated>2006-07-14T10:30:17.260-04:00</updated><title type='text'>Virtual PC is FREE!</title><content type='html'>&lt;a href="http://www.microsoft.com/windows/virtualpc/default.mspx"&gt;Virtual PC is FREE!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is totally cool. You can now run multiple copies of multiple operating systems on one machine for no extra cost. All you need is a big hard drive and lots of memory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115288741724783466?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115288741724783466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115288741724783466' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115288741724783466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115288741724783466'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/07/virtual-pc-is-free.html' title='Virtual PC is FREE!'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115229739773337063</id><published>2006-07-07T14:35:00.000-04:00</published><updated>2006-07-07T14:36:37.746-04:00</updated><title type='text'>Marines have more fun</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/Marine_image004.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/Marine_image004.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My friend David sent me this from his tour of duty in San Diego (must have been a rough one) :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115229739773337063?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115229739773337063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115229739773337063' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115229739773337063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115229739773337063'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/07/marines-have-more-fun.html' title='Marines have more fun'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115155207707547003</id><published>2006-06-28T23:31:00.000-04:00</published><updated>2006-06-28T23:53:47.346-04:00</updated><title type='text'>Foundry Pics From 1994</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/IMG0001.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/6395/2727/320/IMG0001.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I was digging around in a box looking for some touchup paint for my car, and found this old Kodak picture CD full of .PCD picture files of OK Foundry from when I worked there. My brother's site at &lt;a href="http://www.okfoundrycompany.com/"&gt;http://www.okfoundrycompany.com/&lt;/a&gt; will likely use these. I hope he appreciates the effort, as getting .PCD files converted to something usable is a quite a pain. Luckily there is a product with a trial period that I can refer to anyone who wants into this Kodak Photo CD stuff.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/IMG0002.1.jpg"&gt;&lt;img style="CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/6395/2727/400/IMG0002.1.jpg" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115155207707547003?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115155207707547003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115155207707547003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115155207707547003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115155207707547003'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/foundry-pics-from-1994.html' title='Foundry Pics From 1994'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115091371732451549</id><published>2006-06-21T13:52:00.000-04:00</published><updated>2006-06-21T14:15:17.993-04:00</updated><title type='text'>XML Namespace fun</title><content type='html'>What seemed like a steep mysterious challenge turned into a moldable, layered problem with many partial and a few complete easy solutions. I wrote some code to parse values out of and into elements of an XML document adhering to a schema. Very good, until I learn that schema can change infinitely. So I needed what I called an "agnotistic parser", a way to read and write the document without worrying about the namespace. Microsoft provides a NamespaceManager object in .Net for allowing you to run XPath statements against an XML document having schema information included. &lt;br /&gt;&lt;br /&gt; So the only solution so I thought was to figure out how to tell the NamespaceManager what to use for the prefix used on the XML nodes. &lt;br /&gt;&lt;br /&gt; It turns out one answer is to not attach a namespace manager and XPath as in :&lt;br /&gt;     &lt;blockquote&gt;*[local-name() = 'the-element-name-here']&lt;/blockquote&gt;&lt;br /&gt; from "Martin Honnen --- MVP XML".&lt;br /&gt;&lt;br /&gt; More interesting to me is the looping over namespaces and adding them as found in &lt;a href="http://groups.google.com/group/microsoft.public.dotnet.xml"&gt;microsoft.public.dotnet.xml&lt;/a&gt; :&lt;br /&gt; &lt;blockquote&gt;&lt;br /&gt;  foreach (XmlAttribute att in &lt;br /&gt;           Document.DocumentElement.Attributes)    &lt;br /&gt;   if (att.LocalName == "ns1")  &lt;br /&gt;    xmlNSMgr.AddNamespace(att.LocalName, &lt;br /&gt;                          att.Value);&lt;br /&gt; &lt;/blockquote&gt;&lt;br /&gt;But this requires hard-coding the LocalName to be used in XPath queries.&lt;br /&gt;&lt;br /&gt;The best answer I think is what my boss suggested. Get the defaults from the Root node of the doc as in:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; xmlDoc.DocumentElement.Prefix;&lt;br /&gt; xmlDoc.DocumentElement.Attributes["xmlns:" + xPathPrefix].Value;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And then add them to the Namespace Manager.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115091371732451549?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115091371732451549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115091371732451549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115091371732451549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115091371732451549'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/xml-namespace-fun.html' title='XML Namespace fun'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115068934622328490</id><published>2006-06-18T23:53:00.000-04:00</published><updated>2006-06-18T23:55:46.240-04:00</updated><title type='text'>The Hype Machine</title><content type='html'>&lt;a href="http://hype.non-standard.net"&gt;The Hype Machine&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;   This is the coolest thing in Blogs. Do a Search for "The Flaming Lips" and launch the "Hype Player" clicking on one of the resulting links. Or choose your own "Most compelling band on the planet" :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115068934622328490?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115068934622328490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115068934622328490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115068934622328490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115068934622328490'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/hype-machine.html' title='The Hype Machine'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115048705600016655</id><published>2006-06-16T15:36:00.000-04:00</published><updated>2006-06-16T15:44:16.090-04:00</updated><title type='text'>4 Favorite Keyboard Shortcuts</title><content type='html'>Or combination key strokes :&lt;br /&gt;&lt;br /&gt; 1. ALT + F4 was taught to me by our summer co-op student from Carnegie Melon. This shuts down a browser window (or any other window) faster than you can say "supervisor".&lt;br /&gt;&lt;br /&gt; 2. ALT + K is a new one I just learned for finishing somebody's name from an Exchange Server in Microsoft Outlook. I love this, and went the longest without knowing it, losing the most productivity.&lt;br /&gt;&lt;br /&gt; 3. CTRL + ENTER is an old standby for web surfing in Internet Explorer. Turns "google" into "www.google.com".&lt;br /&gt;&lt;br /&gt; 4. CTRL + SPACE will cause code-completion to happen for you in Visual Studio .NET. This was another long-time-coming shortcut, but not as bad as ALT K. Can't imagine life without this one as a developer.&lt;br /&gt;&lt;br /&gt;P.S.&lt;br /&gt;   Somebody should pass a law against the CAPS LOCK key.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115048705600016655?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115048705600016655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115048705600016655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115048705600016655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115048705600016655'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/4-favorite-keyboard-shortcuts.html' title='4 Favorite Keyboard Shortcuts'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-115008182228012466</id><published>2006-06-11T23:03:00.000-04:00</published><updated>2006-06-11T23:10:22.286-04:00</updated><title type='text'>Restaurant Review : Banditos</title><content type='html'>Banditos! One the corner of the end of Patterson Avenue in Richmond, this place sits right near my old apartment on Monument Avenue which could be described as 'grunge' at best. But that's another topic. Banditos was more of a hangout place for me than restaurant. I loved the chips and salsa and the draft Guinness. The people were awesome, except this guy James kept making fun of me for waiting around for a "dude". Sorry James, but I feel entitled to have a male drinking buddy. But even James was fun to talk to at the place. He encouraged my computer career in Richmond's market for such services.&lt;br /&gt;  Everybody was open and I met a girl named Heidi from Gainesville who commiserated with me about having spent some quantity of life in Northern Virginia. Banditos also had a great mix of agegroups. I felt right in my place there as a 30-something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-115008182228012466?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/115008182228012466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=115008182228012466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115008182228012466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/115008182228012466'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/restaurant-review-banditos.html' title='Restaurant Review : Banditos'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114996896934301383</id><published>2006-06-10T15:42:00.000-04:00</published><updated>2006-06-10T15:49:29.350-04:00</updated><title type='text'>New Tool/Toy</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/17-145-006-01.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/17-145-006-01.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My coworker, Tom, referred me to this SATA drive enclosure. It's pretty cool. You buy the hard drive and the enclosure from NewEgg here : &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.newegg.com/Product/Product.asp?Item=N82E16817145006"&gt;&lt;br /&gt;http://www.newegg.com/Product/Product.asp?Item=N82E16817145006&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This allows you to carry around a ton of very fast storage affordably.&lt;br /&gt;Some prefab external drives are cheaper, but much slower and smaller in capacity. The SATA standard is the upgrade in performance from the old ATA standard. That's about all I know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114996896934301383?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114996896934301383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114996896934301383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114996896934301383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114996896934301383'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/new-tooltoy.html' title='New Tool/Toy'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114947329690423744</id><published>2006-06-04T21:51:00.000-04:00</published><updated>2006-06-04T22:08:16.913-04:00</updated><title type='text'>Restaurant Review : Davis &amp; Main</title><content type='html'>As my friend David said during our meal "This is the jewel of the South". Truly the Davis And Main at the intersection of those streets in Richmond's Fan district is a gem. The walls have arches carved into them and the ceiling inlaid with Victorian handiwork. The lighting was dark and felt appropriate for the hot summer night. The staff was courteous and reachable, very genuinely kind and not in a hurry or stressed out. &lt;br /&gt;  We ate the coconut shrimp appetizer which came with something tasty that seemed like ginger. Then went for Angus burgers which came with either cheddar or Swiss cheese. Both were very good and priced competitively. David and I washed these delights down with Legend Lager and Wiedners Heffewisen, just to keep cool.&lt;br /&gt;  After this meal we progressed down the street to Metro Grill where I spend my night basking in the Southern speech of a beautiful girl named Ashley who said she manages a women's clothing store on the river.&lt;br /&gt;&lt;br /&gt;Davis &amp; Main is staffed in part by my friend Pierre Picardat who plays in a band that can be tracked here :  &lt;a href="http://www.insessionmusic.com/"&gt;in session music&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114947329690423744?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114947329690423744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114947329690423744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114947329690423744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114947329690423744'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/06/restaurant-review-davis-main.html' title='Restaurant Review : Davis &amp; Main'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114795933337819584</id><published>2006-05-18T09:32:00.000-04:00</published><updated>2006-05-18T21:57:52.216-04:00</updated><title type='text'>Am I sitting on a gold mine?</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/DcorridorHeader.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/DcorridorHeader.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;According to my neighbor, my condo may actually benefit me most by not selling because of the Metro rail stops coming way out in the future. Interesting source of hope, atleast. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is my condo for sale listing online :&lt;br /&gt;&lt;a href="http://matrix.mris.com/Matrix/Public/Email.aspx?ID=13767914934"&gt;&lt;br /&gt;ParcReston Condos For Sale&lt;br /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.dullescorridorrail.com/project.htm"&gt;http://www.dullescorridorrail.com/project.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114795933337819584?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114795933337819584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114795933337819584' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114795933337819584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114795933337819584'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/am-i-sitting-on-gold-mine.html' title='Am I sitting on a gold mine?'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114758493867870434</id><published>2006-05-14T01:13:00.000-04:00</published><updated>2006-05-14T01:35:38.686-04:00</updated><title type='text'>Goodbye FunFax!</title><content type='html'>Well, this is the end of my attempt at a life in the suburbs of the most powerful city in the world. I am headed back to my hometown of Richmond to work for a wonderful company I have held in high regard for many years. What is very appealing of this is the freshness of working with new people, but also for a company I have heard good things about. My interviews were challenging and purposeful, and the leadership really seems very competent. &lt;br /&gt;  All was not bad in Reston. I loved being near my alma mater, George Mason, and seeing the basketball team play every home game for 2 seasons. And the pools at the school and in my neighborhood were great therapy for am aching IT worker's lower back. Jogging on the trails in Reston can be a great release as well. There are miles and miles of solitude and deep thought to be found there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114758493867870434?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114758493867870434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114758493867870434' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114758493867870434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114758493867870434'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/goodbye-funfax.html' title='Goodbye FunFax!'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114706043590155653</id><published>2006-05-07T23:45:00.000-04:00</published><updated>2006-05-07T23:53:55.906-04:00</updated><title type='text'>Book Review : Automatic Millionaire</title><content type='html'>Today I read about a Vente cup of coffee's worth of this book by David Bach. So I can not give a true review. But I can say I was turned off by some of his assumptions. One of which is that a person making $50,000 a year can expect to buy a sizable home for under $300,000. Where? Wish I knew because not in my suburban location outside of Washington, DC. If a person making that little money in today's economy wants to become a real estate investor, the investing money would have to come from inheritance or the lottery. The whole landlording thing eludes me as I sit here watching "The Landlord" from 1970, a good optimistic story where Beau Bridges integrates with black culture while becoming a landlord.&lt;br /&gt; I think I just fail to see the pause in one's journey that allows for this stretch of the budget. Working hours are long in our economy. And social life places demands beyond one's own need for food and water.  If you don't yet have a family, maybe you are working to build one? If you are dissolving a family as many people do, then that gets expensive also. Maybe this real estate stuff is for the super rich or the empty nesters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114706043590155653?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114706043590155653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114706043590155653' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114706043590155653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114706043590155653'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/book-review-automatic-millionaire_07.html' title='Book Review : Automatic Millionaire'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114702365979699511</id><published>2006-05-07T13:36:00.000-04:00</published><updated>2006-05-07T13:40:59.803-04:00</updated><title type='text'>Condo Wireless Comcast Hell</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/Wirelesses.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/Wirelesses.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This list scrolls and scrolls, and the interference is as expected. I want my own house. I called the Comcast people, and the guy comes over to tell me my laptop which has like a google of gigabytes of memory, does not have enough memory. Right ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114702365979699511?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114702365979699511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114702365979699511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114702365979699511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114702365979699511'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/condo-wireless-comcast-hell.html' title='Condo Wireless Comcast Hell'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114693823315647282</id><published>2006-05-06T13:53:00.000-04:00</published><updated>2006-05-06T14:02:25.386-04:00</updated><title type='text'>Derby Day</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/trainerBAFFERT.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/6395/2727/320/trainerBAFFERT.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My picks are :&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Brother Derek&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Bob And John&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Point Determined&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Sinister Minister&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Tie Breakers :&lt;br /&gt;&lt;b&gt;Barbaro&lt;/b&gt;&lt;br /&gt;&lt;b&gt;AP Warrior&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I like to cheer Bob Baffert's horses because I read an interesting story about his life in Sports Illustrated. Just seems like an inspiring guy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114693823315647282?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114693823315647282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114693823315647282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114693823315647282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114693823315647282'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/derby-day.html' title='Derby Day'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114684107118736989</id><published>2006-05-05T10:49:00.000-04:00</published><updated>2006-05-10T12:21:46.056-04:00</updated><title type='text'>GridView challenge</title><content type='html'>How to get a button column that will confirm on the client side, but that does not have one of the standard "Select", "Delete", "Edit", "Update" command name property values?&lt;br /&gt;&lt;br /&gt; Much is buzzing on the internet about the wonderful "onClientClick" property which you can set for a LinkButton inside of an ItemTemplate of a GridView. Now I have seen Scott Guthrie and Fritz Onion writing about it. And I certainly love the ability to simply ask "window.confirm" in the on-client event for the "Delete" button for example. But I am wondering can I do this for some other use cases, such as when I have no SQLDataSource bound to the grid, just a DataSet pumped into it at Page Load, or I have an SQLDataSource but with only "Select" command defined?&lt;br /&gt; I wonder if the onClientClick -&gt; Confirm technique can apply for a regular button column, not part of an ItemTemplate?&lt;br /&gt;&lt;br /&gt;Maybe this is no biggie, I have worked around it thusfar. Maybe GridViewGirl knows the answer?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pluralsight.com/blogs/fritz/archive/2006/03/22/20514.aspx#22955"&gt;&lt;br /&gt;Link to my question to Fritz Onion, ASP .NET expert.&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have found a way to the RowIndex of the item clicked, even if it is not marked up with standard CRUD database operation attributes.&lt;br /&gt;&lt;br /&gt;Using :&lt;br /&gt;&lt;br /&gt; &lt;blockquote&gt;&lt;br /&gt;((e.CommandSource as ImageButton).Parent.Parent as GridViewRow).RowIndex;&lt;br /&gt; &lt;/blockquote&gt;&lt;br /&gt; &lt;br /&gt;I can get to the DataKey I need in the array of DataKeys in the grid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114684107118736989?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114684107118736989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114684107118736989' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114684107118736989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114684107118736989'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/gridview-challenge.html' title='GridView challenge'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114675825420492029</id><published>2006-05-04T11:52:00.000-04:00</published><updated>2006-05-04T11:59:15.920-04:00</updated><title type='text'>Homeownership Depicted by Harpers</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/HarpersLarge.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/HarpersLarge.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  What a telling image. I hope this is not me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114675825420492029?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114675825420492029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114675825420492029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114675825420492029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114675825420492029'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/homeownership-depicted-by-harpers.html' title='Homeownership Depicted by Harpers'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114674748593513198</id><published>2006-05-04T08:45:00.000-04:00</published><updated>2006-05-04T09:09:48.096-04:00</updated><title type='text'>www.StevePavlina.com!!</title><content type='html'>&lt;a href="http://www.stevepavlina.com/blog/2005/05/how-to-give-up-coffee/"&gt;To quit coffee&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  I love this guy's writing. If you have a need for awesome advice, even though not willing to follow through on all of it, this is great.&lt;br /&gt;&lt;br /&gt;  Some of the situations he describes seem a bit contrived to prove a point, but the way he writes about it, the end justifies the means. For example, the coffee article really doesn't tell a believable story about a person quitting a serious habit and addiction. It sounds like a guy who works in an office around a bunch of veteran coffee-drinkers who really do need the stuff, but our guy is a fresh out of college super strong goin' somewhere dude who doesn't NEED anything from day to day to inspire his efforts. Not your profile coffee habit bearer.&lt;br /&gt;&lt;br /&gt; But in this &lt;a href="http://www.stevepavlina.com/blog/2005/05/how-to-give-up-coffee/#comment-2948"&gt;comment entry &lt;/a&gt; he gives us an in depth explanation of why adding milk does not fix what is broken with coffee. &lt;br /&gt;&lt;br /&gt;Steve really fleshes out his arguments with useful facts, while also giving you some emotional intangible reasons to follow his advice. In the coffee article Pavlina explains unscientifically, but pausibly that coffee clouds long term judgment while enhancing short term productivity. In the words of Homer Simpson "Its so funny because its true". I just "get" this stuff. But I am not going to stop guzzling the dark, not while meetings are scheduled for 8AM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114674748593513198?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114674748593513198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114674748593513198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114674748593513198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114674748593513198'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/wwwstevepavlinacom.html' title='www.StevePavlina.com!!'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114671506627310794</id><published>2006-05-03T23:51:00.000-04:00</published><updated>2006-05-03T23:57:46.280-04:00</updated><title type='text'>Jai Lewis to play football</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/PH2006041302275.0.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/320/PH2006041302275.0.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is not hot off the presses, but I figure for the outside of Fairfax crowd might be. Jai Lewis who I have watched go from being called "Re-Run" to silencing every critic in sports in the past 4 years, is going to the NY Giants to play football. Awesome. I can remember the announcer for the Tennesee game we thought was such a big deal 2 years ago saying "that guy is enormous..arms like tree trunks!!!'&lt;br /&gt;&lt;br /&gt;Link to the thread of discussion on the CAA Zone :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.caazone.com/boards/viewtopic.php?t=46700"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114671506627310794?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114671506627310794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114671506627310794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114671506627310794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114671506627310794'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/jai-lewis-to-play-football.html' title='Jai Lewis to play football'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114658009288328331</id><published>2006-05-02T10:07:00.000-04:00</published><updated>2006-05-02T10:31:56.820-04:00</updated><title type='text'>To Page or Not to Page?</title><content type='html'>This is going somewhere I promise. &lt;br /&gt;   Visual Studio 2005 makes very easy the whole listing of data with paging links at the bottom. If we use a SQLDataSource object on the ASP page, all the paging and sorting is handled automatically, and can even have an AJAX kind of functionality if we turn on "EnablePagingAndSortingCallbacks". the grid pages and sorts without what some people consider to be a nasty page flash.&lt;br /&gt;&lt;br /&gt;   In a meeting about 2 months ago, some ultra-powerful managers shreaked in fear of the little numbered paging links at the bottom of the page. They demanded the pages be switched to scrolling wherever possible. So I promptly wrapped my GridView controls in DIV tags with style "overflow-y:scroll". This accomplished some immediate relief but not without some hangover.&lt;br /&gt;&lt;br /&gt;   If the user does some interacting with your list items, and a PostBack occurs, your page will refresh with the scroll position back to the top and the item down in the list the user was playing with, will be invisible. Thanks to Scott Guthrie for reminding us of the "ScrollIntoView" javascript function.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2006/04/03/441787.aspx"&gt;That article&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  One thing I would warn about is that controls get named AGAIN with unique names by the ASPX page when they are rendered, so you have to get that unique name down to the client javascript for it to be able to find the GridView row you want "scrolled into view". The control on the client side will end up with an ID such as &lt;br /&gt;&lt;br /&gt;"ctl00_ContentPlaceHolder1_GridViewMyListOfItems_ctl51_ctl00"&lt;br /&gt;&lt;br /&gt;What a mess.&lt;br /&gt;&lt;br /&gt;here is a partial code sample to attempt to scroll this thing :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; // Assuming you wanted the 112th row and &lt;br /&gt; //  had an index variable to use here, &lt;br /&gt; //   not a hardcoded one &lt;br /&gt;  Control control = &lt;br /&gt;    myGrid.Rows[112].Cells[1].Controls[1] as Control;&lt;br /&gt;&lt;br /&gt;  string scriptText = &lt;br /&gt;    "&amp;lt; script &amp;gt; &lt;br /&gt;    document.getElementById('" +&lt;br /&gt;    control.ClientID +&lt;br /&gt;    "').scrollIntoView(); &amp;lt; /script &amp;gt;";&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Doing all this in the PreRender phase of the page lifecycle, you can get the script into action with a call to "ClientScript.RegisterStartupScript" or some other variant in the array of new client scripty things in .Net.&lt;br /&gt;&lt;br /&gt;Now if we could just get my management to agree on a standard for this, my days would be half as long ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114658009288328331?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114658009288328331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114658009288328331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114658009288328331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114658009288328331'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/to-page-or-not-to-page.html' title='To Page or Not to Page?'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114657877938392188</id><published>2006-05-02T10:00:00.000-04:00</published><updated>2006-05-02T10:51:51.076-04:00</updated><title type='text'>XSLT Woes</title><content type='html'>Today I have a Google groups dialogue in progress with a major XML guru, &lt;br /&gt;&lt;br /&gt;  Martin Honnen --- MVP XML &lt;br /&gt;  http://JavaScript.FAQTs.com/ &lt;br /&gt;&lt;br /&gt;I think this may have some wide appeal to those of us who want to use XML/XSL for formatting things. With the new versions of the browser, Microsoft .NET, and the XML standards in general, I have been stuck in the mud on getting something out of my transformations.&lt;br /&gt;&lt;br /&gt;I link to my Google post here and will paste the solution, if there is one&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/microsoft.public.xsl/browse_frm/thread/ee21dad4bc4ad07a/95f3c6f5375a92ff?tvc=1#95f3c6f5375a92ff"&gt;Thread Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ANSWER!!&lt;br /&gt; It is all about the NameSpace. I wondered if that could be a problem, but had no hint as to how I would solve it.&lt;br /&gt;Seems my XML came from Microsoft .NET with a nice big tacky &lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt;&lt;br /&gt; xmlns="http://tempuri.org/PurchaseData.xsd"&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This required me to declare the namespace in my XSLT as :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; xmlns:prd=&lt;br /&gt;   "http://tempuri.org/PurchaseData.xsd" &lt;br /&gt;    exclude-result-prefixes="pd"&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And to be sure the prefix my selection criteria in the actual XSL commands with that namespace and a colon.&lt;br /&gt;&lt;br /&gt;I was wanting to use this technology for an emailed report thing, but have since gone on to employ a Page_PreRender event handler which captures all the HTML of a page by calling RenderChildControls, and then emails that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114657877938392188?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114657877938392188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114657877938392188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114657877938392188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114657877938392188'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/05/xslt-woes.html' title='XSLT Woes'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114619394488089973</id><published>2006-04-27T23:03:00.000-04:00</published><updated>2006-04-27T23:12:24.890-04:00</updated><title type='text'>Today's .Net Nuances</title><content type='html'>Well to me anyway. &lt;br /&gt;&lt;br /&gt;1. When using the latest version of Crystal Reports, save yourself the 2 hours I wasted today learning not to put multiple datatables in my report data schema. This caused great confusion for the report tool, even though one of the overloads to the SetDataSource() function is with a DataSet parameter [by definition means can have many tables]. My day went better after simply joining the parent and child tables on the SQL Server and letting the report tool clean up the mess of grouping at the proper levels and computing subtotals.&lt;br /&gt;&lt;br /&gt;2. When upgrading a website on an IIS Server from the .Net Framework 1.x to 2.x, remember that if the site is only a Virtual Directory, not a full Site, then its Framework version MUST match that of the other Virtual Directories. UNLESS, you go to the trouble of creating Application Pools for the different Virtual's which allows you to upgrade in the chaotic fashion I have unwittingly employed.&lt;br /&gt;&lt;br /&gt;3. Remember to check @@ERROR in your stored procedures on SQL Server. This can be helpful for say, when you want to know if you should COMMIT or ROLLBACK a transaction. I am quite embarassed about forgetting this, but luckily in only one small place in my current app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114619394488089973?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114619394488089973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114619394488089973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114619394488089973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114619394488089973'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/todays-net-nuances.html' title='Today&apos;s .Net Nuances'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114616186582351622</id><published>2006-04-27T14:14:00.000-04:00</published><updated>2006-04-27T14:29:21.733-04:00</updated><title type='text'>Venting with MS Paint</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/EmployeeEmployerRelations2.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/400/EmployeeEmployerRelations2.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is very therapeutic, and I claim no originality for the idea of course.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114616186582351622?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114616186582351622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114616186582351622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114616186582351622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114616186582351622'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/venting-with-ms-paint.html' title='Venting with MS Paint'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114593459782781862</id><published>2006-04-24T23:09:00.000-04:00</published><updated>2006-04-24T23:09:57.833-04:00</updated><title type='text'>Hope this is not my neighborhood</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/bubblebench.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/320/bubblebench.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A picture tells a thousand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114593459782781862?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114593459782781862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114593459782781862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114593459782781862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114593459782781862'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/hope-this-is-not-my-neighborhood.html' title='Hope this is not my neighborhood'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114569238744326499</id><published>2006-04-22T03:49:00.000-04:00</published><updated>2006-04-22T03:53:07.450-04:00</updated><title type='text'>Cowboys 2006 Regular Season Schedule Released</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/80x72.gif"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/320/80x72.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a .VBS file on your machine with the following code in it, and double-click it. Boom! Your Outlook Calendar will have all the best games scheduled. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;Dim otl&lt;br /&gt;Set otl = CreateObject("Outlook.Application")&lt;br /&gt;Const olAppointmentItem = 1&lt;br /&gt;&lt;br /&gt;Sub CreateGame(Start, EndDate,Name)&lt;br /&gt; Set e1 = otl.CreateItem(olAppointmentItem)&lt;br /&gt; e1.Start = Start&lt;br /&gt; e1.End = EndDate&lt;br /&gt; e1.Subject = Name&lt;br /&gt; ' e1.Location = "TV"&lt;br /&gt; e1.Save&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; CreateGame "8/12/2006 9:00PM",  "8/12/2006 11:00PM",   "DAL @ Seattle" &lt;br /&gt; CreateGame "8/21/2006 7:00PM",  "8/21/2006 9:00PM",   "DAL New Orleans @ Shreveport, LA (ESPN) "&lt;br /&gt; CreateGame "8/26/2006 7:00PM",  "8/26/2006 9:00PM",   "DAL SAN FRANCISCO "&lt;br /&gt; CreateGame "8/31/2006 7:00PM",  "8/31/2006 9:00PM",   "DAL MINNESOTA" &lt;br /&gt; CreateGame "9/10/2006 3:15PM",  "9/10/2006 5:15PM",   "DAL @ Jacksonville"    &lt;br /&gt; CreateGame "9/17/2006 7:15PM",  "9/17/2006 9:15PM",   "DAL WASHINGTON"    &lt;br /&gt; CreateGame "9/24/2006 12:00PM", "9/24/2006 2:00PM",  " DAL BYE"     &lt;br /&gt; CreateGame "10/1/2006 12:00PM", "10/1/2006 2:00PM",  "DAL @ Tennessee" &lt;br /&gt; CreateGame "10/8/2006 3:15PM",  "10/8/2006 5:15PM",   "DAL @ Philadelphia" &lt;br /&gt; CreateGame "10/15/2006 12:00PM","10/15/2006 2:00PM", "DAL HOUSTON"    &lt;br /&gt; CreateGame "10/23/2006 7:30PM", "10/23/2006 9:30PM",  "DAL NY GIANTS"    &lt;br /&gt; CreateGame "10/29/2006 7:15PM", "10/29/2006 9:15PM",  "DAL @ Carolina"    &lt;br /&gt; CreateGame "11/5/2006 12:00PM", "11/5/2006 2:00PM",  "DAL @ Washington"&lt;br /&gt; CreateGame "11/12/2006 3:15PM", "11/12/2006 5:15PM",  "DAL @ Arizona"    &lt;br /&gt; CreateGame "11/19/2006 12:00PM","11/19/2006 2:00PM", "DAL INDIANAPOLIS" &lt;br /&gt; CreateGame "11/23/2006 3:15PM", "11/23/2006 5:15PM",  "DAL TAMPA BAY"  &lt;br /&gt; CreateGame "12/3/2006 12:00PM", "12/3/2006 2:00PM",  "DAL @ NY Giants"    &lt;br /&gt; CreateGame "12/10/2006 12:00PM","12/10/2006 2:00PM", "DAL NEW ORLEANS"    &lt;br /&gt; CreateGame "12/16/2006 7:00PM", "12/16/2006 9:00PM",  "DAL @ Atlanta"     &lt;br /&gt; CreateGame "12/25/2006 4:00PM", "12/25/2006 6:00PM",  "DAL PHILADELPHIA"    &lt;br /&gt; CreateGame "12/31/2006 12:00PM","12/31/2006 2:00PM", "DAL DETROIT"&lt;br /&gt;&lt;br /&gt;Set otl = Nothing&lt;br /&gt;Msgbox "Finished"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114569238744326499?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114569238744326499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114569238744326499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114569238744326499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114569238744326499'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/cowboys-2006-regular-season-schedule.html' title='Cowboys 2006 Regular Season Schedule Released'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114558878825847949</id><published>2006-04-20T22:50:00.000-04:00</published><updated>2006-04-20T23:06:28.266-04:00</updated><title type='text'>Some obscure .NET tips</title><content type='html'>1. Avoid declaring page class variables as STATIC. This creates all kinds of confusion, because they end up shared across the whole application for every rendering of that page. A coworker of mine did this and we kicked it around for a few minutes before I convinced her to use VIEWSTATE or SESSION as a persistence mechanism.&lt;br /&gt;&lt;br /&gt;2. Don't assume pressing enter will cause a BUTTON object to get a click event when you are inside of a textbox. A POSTBACK, yes, but a button click no. I trap that event and send it to the button in a javascript snippet, but am sure there are other ways to do it as well.&lt;br /&gt;&lt;br /&gt;3. Use the AS casting technique for object variables. If you use the double parens (DataSet) for example, and the object is not hydrated, an exception will be thrown. Using the AS (myThing AS DataSet) for example, the Framework will convert your object to NULL. Traditional cast or a CONVERT function is the way for Value types.&lt;br /&gt;&lt;br /&gt;4. In C# use the USING wrapper around DISPOSABLE types. For example :&lt;br /&gt;   Using (SQLConnection myConnection = new SQLConnection) {&lt;br /&gt;    bunch of code&lt;br /&gt;    } &lt;br /&gt;   // This is just cool and the right way to get disposal. I am new to this style.&lt;br /&gt;&lt;br /&gt;5. And read this somewhere in Google, but useful for maintaining sanity, forget all about using .EQUALS for comparing VALUE types. It reads badly and runs slower because the system looks all around for an overridden implementation of the EQUALS comparison function.&lt;br /&gt;&lt;br /&gt;6. Use STRING.EMPTY or use STRING.LENGTH for comparison to string variables instead of the dreaded double-quotes. Performance, Localization and readability.&lt;br /&gt;&lt;br /&gt;My $0.02 on some things I am seeing lately, if I may be so bold.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114558878825847949?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114558878825847949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114558878825847949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114558878825847949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114558878825847949'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/some-obscure-net-tips.html' title='Some obscure .NET tips'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114549887719671130</id><published>2006-04-19T22:06:00.000-04:00</published><updated>2006-04-19T22:07:57.196-04:00</updated><title type='text'>This is way too much fun</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/Vienna.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/320/Vienna.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Vienna Metro Rail Stop :-( A place you never want to try to park and ride on a hot summer morning carrying a laptop and wearing business attire.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114549887719671130?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114549887719671130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114549887719671130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114549887719671130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114549887719671130'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/this-is-way-too-much-fun.html' title='This is way too much fun'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114549871504591238</id><published>2006-04-19T22:03:00.000-04:00</published><updated>2006-04-19T22:05:15.046-04:00</updated><title type='text'>Figuring out the whole Image Upload thing</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/6395/2727/1600/Puppetteer96X92.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6395/2727/320/Puppetteer96X92.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My favorite episode of South Park, Eric Cartman with the Mexican Staring Frog of Southern Sri Lanka.&lt;br /&gt;&lt;br /&gt;(Needed to make the uploading page a Trusted Site in IE)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114549871504591238?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114549871504591238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114549871504591238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114549871504591238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114549871504591238'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/figuring-out-whole-image-upload-thing.html' title='Figuring out the whole Image Upload thing'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114549769945296665</id><published>2006-04-19T21:36:00.000-04:00</published><updated>2006-04-19T21:48:19.460-04:00</updated><title type='text'>Poor man's code generator</title><content type='html'>Much is being said lately about CodeSmith, which I am sure is an awesome tool for building the data access layer for your application, and maintaining it.&lt;br /&gt;&lt;br /&gt;I only talk to SQL Server databases lately, so I am most familiar with its handy INFORMATION_SCHEMA.Columns view. This can give you the column listing for any table. A companion to this is the SYSOBJECTS table which harbors a list of the parameters in your Stored Procedures. Remember the XTYPE='P' in your where clause. &lt;br /&gt;&lt;br /&gt;As the picture begins to render on how to do this, I want to tell somebody really bad about using CodeDom namespace for building the actual code. You could use StringBuilder to concatenate a big bunch of text, but the CodeDom does it more elegantly. &lt;br /&gt;&lt;br /&gt;Getting started it always the hardest with new white canvas so I post the opener :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; // Declare a Class&lt;br /&gt; CodeTypeDeclaration ct = new CodeTypeDeclaration("data");&lt;br /&gt; ct.IsClass = true;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Another tricky thing for me was making the code concise by having the declaration and the instancing of the variables on one line :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;     // Declare a Connection&lt;br /&gt;     csne = new CodeSnippetExpression("this.ConnectionString");&lt;br /&gt;     // You need a Param array of things passed to a constructor.&lt;br /&gt;     CodeExpression[] cParams = { csne };&lt;br /&gt;     coc = new CodeObjectCreateExpression("SqlConnection", cParams);&lt;br /&gt;      // Then .. all the instancing and declaring on one line :&lt;br /&gt;     codeVar =&lt;br /&gt; new CodeVariableDeclarationStatement("SqlConnection", "sqlConnection", coc);&lt;br /&gt;     cmm.Statements.Add(codeVar);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Finally, building the actual class code from your heap of objects in memory could be elusive since you have been buried in the CodeDom bits for a few hours :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; // This could be a VB thing as well.&lt;br /&gt; CodeDomProvider prov = new Microsoft.CSharp.CSharpCodeProvider();&lt;br /&gt; System.Text.StringBuilder sb = new System.Text.StringBuilder();&lt;br /&gt; TextWriter tw = new StringWriter(sb);&lt;br /&gt; prov.GenerateCodeFromMember(ct, tw, null);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;HTH&lt;br /&gt;- Brian&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114549769945296665?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114549769945296665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114549769945296665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114549769945296665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114549769945296665'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/poor-mans-code-generator.html' title='Poor man&apos;s code generator'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114523988064416160</id><published>2006-04-16T22:08:00.000-04:00</published><updated>2006-04-16T22:11:20.646-04:00</updated><title type='text'>Happy Easter</title><content type='html'>If you have not eaten a Moon Pie by Chatanooga Bakery in a while or ever, I highly recommend it. These things are decadent. My mother threw me a box in my Easter basket and I had also bought one for my drive down to Richmond on Saturday. What a treat. That and seeing "Walk the Line" on DVD this weekend has me feelin' all Americana all over.&lt;br /&gt;&lt;br /&gt;P.S. &lt;br /&gt;  The Big Texas Cinnamon Bun by Cloverhill Bakery is also great. See your company snack machine for availability :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114523988064416160?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114523988064416160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114523988064416160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114523988064416160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114523988064416160'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/happy-easter.html' title='Happy Easter'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114506197392066646</id><published>2006-04-14T20:35:00.000-04:00</published><updated>2006-04-14T20:46:13.926-04:00</updated><title type='text'>Another coworker bites the dust</title><content type='html'>My third coworker in as many months was fired today. The upside is that I was given a polite explanation from the boss why the person was let go. The downside is as always that a company is willing to dismiss an intelligent and experienced programmer. That this happens this easily in the big information technology sector of Northern Virginia is a bit scary. Makes those of us in the field feel like endangered species.&lt;br /&gt;&lt;br /&gt;Good luck, friend. Your wit and enthusiasm for the code will be missed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114506197392066646?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114506197392066646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114506197392066646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114506197392066646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114506197392066646'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/another-coworker-bites-dust.html' title='Another coworker bites the dust'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114498439217801307</id><published>2006-04-13T22:56:00.000-04:00</published><updated>2006-04-14T10:09:03.416-04:00</updated><title type='text'>First Bee in my bonnet</title><content type='html'>I have long struggled with security in Internet Explorer, having been infected a few times since my Windows 95 days by various viruses. Not to say they were all the fault of IE, but some were. Since then, I am very careful which sites I allow to run scripts or ActiveX controls on my machine.&lt;br /&gt;Because I still like Internet Explorer better than Mozilla and really appreciate the "Trusted Sites" zone feature, I created a solution to all the dialog boxes required to get a new site added to the zone. It involves a small piece of script that is run from a custom context menu item I add to the standard ones. Internet Explorer allows for adding a link to an HTML page you write via a registry entry which I add with the following :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;' BRIAN ONEIL&lt;br /&gt;Dim fsDim sh&lt;br /&gt;Set sh = CreateObject("WScript.Shell")&lt;br /&gt;&lt;br /&gt;sh.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\ MenuExt\ Add To &amp;Trusted Sites\","&lt;a href="file:///C:/Program"&gt;file:\\C:\Program&lt;/a&gt; Files\TrustedSiteContextMenu\TrustedSiteAdder.HTML"&lt;br /&gt;&lt;br /&gt;sh.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\ MenuExt\ Add To &amp;amp;Trusted Sites\Flags",1,"REG_DWORD"&lt;br /&gt;Set sh = Nothing&lt;br /&gt;MsgBox "Registry Entries Created."&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The HTML file referenced by the registry contains the following script for adding the current site you are viewing to your Trusted Sites list :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;    // Brian O'Neil&lt;br /&gt;    &lt;br /&gt;    // alert("Adding the current page to Trusted Sites...");&lt;br /&gt;    var parentwin = external.menuArguments;&lt;br /&gt;    var doc = parentwin.document;&lt;br /&gt;    &lt;br /&gt;    var urlParts = doc.URL.split("/");&lt;br /&gt;    var httpColon = urlParts[0].substring(0,urlParts[0].indexOf(":"));&lt;br /&gt;    &lt;br /&gt;    var domain = urlParts[2];&lt;br /&gt;    var domainParts = domain.split(".");&lt;br /&gt;    var domainName = domainParts[domainParts.length-2] + &lt;br /&gt;                     "." + domainParts[domainParts.length-1];    &lt;br /&gt;    var prefix = &lt;br /&gt;        domain.substring(0,domain.indexOf(domainName)-1);&lt;br /&gt;    &lt;br /&gt;    Sh = new ActiveXObject("WScript.Shell");&lt;br /&gt;    var key = &lt;br /&gt;      "HKEY_CURRENT_USER\\ Software\\Microsoft\\Windows\\ CurrentVersion\\ Internet Settings\\ ZoneMap\\ Domains\\"&lt;br /&gt;    key = key + domainName;&lt;br /&gt;    key = key + "\\" + prefix;&lt;br /&gt;    Sh.RegWrite(key + "\\" + httpColon, 2, "REG_DWORD");&lt;br /&gt;    &lt;br /&gt;    Sh = null;&lt;br /&gt;    parentwin = null;&lt;br /&gt;    doc = null;&lt;br /&gt;    &lt;br /&gt;    alert("To Undo this action, remove key " &lt;br /&gt;          + key &lt;br /&gt;          + " from the Registry.");&lt;br /&gt;    window.close();&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;All of the above assumes a directory called &lt;br /&gt; &lt;blockquote&gt;C:\Program Files\TrustedSiteContextMenu&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If anybody is interested, I have a WinZip file which decompresses all that is needed for this into the proper folders. Another caveat I forgot to mention is the browser needs to have permissions to execute script on the "Local Intranet Zone".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114498439217801307?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114498439217801307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114498439217801307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114498439217801307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114498439217801307'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/first-bee-in-my-bonnet.html' title='First Bee in my bonnet'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26062613.post-114496399150750304</id><published>2006-04-13T17:23:00.000-04:00</published><updated>2006-04-13T17:33:24.846-04:00</updated><title type='text'>Had to have my own one of these</title><content type='html'>I have named this Blog after some technology used in my family's business. To learn more about foundry, visit my brother's site &lt;a href="http://www.okfoundrycompany.com"&gt;http://www.okfoundrycompany.com&lt;/a&gt;. I have to imagine if the foundry business were less industrial and more boutique, cafe' kind of thing, there would be a restaurant called "The Cope and Drag". Or at least a shady night club by that name.&lt;br /&gt;&lt;br /&gt;My name is Brian and I work in the software business in Sterling, VA near my home of Reston, VA. My language of choice is C# and the platform is Microsoft .Net. I often have a craving to tell somebody about some of the things I learn to do in developing ASP. Net code or javascript, or just refer somebody to a site where I read such an instruction. Maybe this Blog will work well for that. Let's see. If not, I will post some of my other interests and worries here.&lt;br /&gt;&lt;br /&gt;Welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26062613-114496399150750304?l=copeanddrag.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://copeanddrag.blogspot.com/feeds/114496399150750304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=26062613&amp;postID=114496399150750304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114496399150750304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26062613/posts/default/114496399150750304'/><link rel='alternate' type='text/html' href='http://copeanddrag.blogspot.com/2006/04/had-to-have-my-own-one-of-these.html' title='Had to have my own one of these'/><author><name>Brian O</name><uri>http://www.blogger.com/profile/04384721928041190844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/-nZLmWR_lJZI/TlXF2P7W9_I/AAAAAAAAAEI/rdFk2rQZCaI/s220/FreshWax6112011.JPG'/></author><thr:total>0</thr:total></entry></feed>
