<?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:blogger='http://schemas.google.com/blogger/2008' 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-9016105</id><updated>2013-02-18T22:04:19.625-06:00</updated><category term='C#'/><category term='C++'/><category term='Windows XP'/><category term='Reflection'/><category term='Visual Studio'/><category term='whitelist'/><category term='Boost'/><category term='VS 2005'/><category term='STL'/><category term='internet filter'/><title type='text'>heifner</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default?start-index=26&amp;max-results=25'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>72</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9016105.post-8794859056533739535</id><published>2011-06-06T14:31:00.000-05:00</published><updated>2011-06-06T14:31:48.567-05:00</updated><title type='text'>Coding Font</title><content type='html'>I'm setting up a new work computer today.  8 cores, 8 GB RAM (nice).&lt;br /&gt;&lt;br /&gt;I needed to download my favorite font for Visual Studio.  I like &lt;a href="http://www.proggyfonts.com/index.php?menu=download"&gt;Coding Font Tobi&lt;/a&gt;, which can be found here: &lt;a href="http://www.proggyfonts.com/"&gt;http://www.proggyfonts.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.proggyfonts.com/download/example_coding_font_tobi.gif" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="74" width="270" src="http://www.proggyfonts.com/download/example_coding_font_tobi.gif" /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/8794859056533739535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=8794859056533739535' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/8794859056533739535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/8794859056533739535'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2011/06/coding-font.html' title='Coding Font'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-2505841180164306957</id><published>2010-08-16T14:11:00.004-05:00</published><updated>2010-08-16T15:03:39.372-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Create Windows XP Pro SP3 OEM Install CD</title><content type='html'>How to create a Windows XP Pro SP3 OEM install CD with IE8 and many of the latest security updates.&lt;br /&gt;&lt;br /&gt;1. Grab a valid Windows install CD.  In my case, a OEM install CD since I wanted to use the COA sticker product id on the computer box.  The OEM stickers all were Windows XP Pro on Dell computers.  You can use an existing Dell Windows XP Pro CD, or contact Dell for one, or download one (not sure if the downloaded CDs are legal).  See &lt;a href="http://www.technibble.com/how-to-tell-what-type-of-windows-xp-cd-or-license-key-you-have/"&gt;http://www.technibble.com/how-to-tell-what-type-of-windows-xp-cd-or-license-key-you-have/&lt;/a&gt; on how to determine what type of windows license key you have.&lt;br /&gt;&lt;br /&gt;2. Copy the CD onto your computer for modification.&lt;br /&gt;&lt;br /&gt;3. Use &lt;a href="http://www.nliteos.com/"&gt;nLite&lt;/a&gt; to modify the CD and add the components you want.  In my case I wanted to add SP3, latest security updates, and IE8.&lt;br /&gt;&lt;br /&gt;4. Addons including IE8 can be found here: &lt;a href="http://www.winaddons.com/nlite-addons/"&gt;http://www.winaddons.com/nlite-addons/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. The latest security updates can be found here: &lt;a href="http://www.ryanvm.net/msfn/updatepack-sp3.html"&gt;http://www.ryanvm.net/msfn/updatepack-sp3.html&lt;/a&gt;  These can be used with the latest nLite, just follow the RyanVM nLite integration instructions on the RyanVM site.  Even with these latest security updates, I found that windows still wants to download and install many additional updates.  But at least this will be less than it would be without it.&lt;br /&gt;&lt;br /&gt;6. Add the IE8 add on from the nLite add on site above.  You can add others but be careful to not add more than will fit on a single CD.  If you have a DVD drive on your install computer and a DVD burner available then you can add all kinds of additional software from the addon site.  You can also integrate the universal drivers if you have room (see below).  Since my computers only had CDRom drives, I had to keep it small.&lt;br /&gt;&lt;br /&gt;7. One problem with installing Windows is drivers for existing hardware.  For example the network card, audio, and video was not setup during the windows install on my Dells.  This is particularly frustrating since you can't access the internet to download drivers.  However, a very nice solution is to use DriverPacks found here: &lt;a href="http://driverpacks.net/"&gt;http://driverpacks.net/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;7a. Download the driver packs base: &lt;a href="http://driverpacks.net/applications/latest"&gt;http://driverpacks.net/applications/latest&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;7b. Download all the driver packs for your version of Windows: &lt;a href="http://driverpacks.net/driverpacks/latest"&gt;http://driverpacks.net/driverpacks/latest&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;7C. Run DriversPack Base.  I created a Stand Alone Driver Disk and put it on a usb thumbdrive.  This worked amazingly well.  After the Windows install I just hooked up the usb thumbdrive and ran DP_Install_Tool.cmd.  It takes awhile to run, but when it is finished all hardware had updated drivers and worked without issue.  It installed missing audio drivers, network card drivers, and video drivers.  It really is quite amazing.  You can even run it multiple times.  I ran it after throwing a wireless network card in one computer and after adding a usb wireless adapter in another, in both cases it installed the needed drivers.  I plan on keeping it around for those cases where you have a network card, video card, usb wireless adapter, etc but don't have the driver cd.  It is easier than trying to find the correct driver on the web.&lt;br /&gt;&lt;br /&gt;8. Create a installer for all the free applications you want installed using &lt;a href="http://ninite.com/"&gt;Ninite&lt;/a&gt;.  This is nice because it creates a click free install for as many applications as you want.  The only drawback is the free version requires each computer to download the applications.  However, you can kick it off and forget about it, so not a big deal.  The installer can be included on the Windows XP CD by just putting it in the directory before creating the ISO image using nLite or just throw it on a usb thumbdrive.  The installer is small since it downloads all the applications from the web.  If the install fails for some reason (in my case unplugging the network switch during the install), then just go the ninite site and create another installer for the pieces that did not install.  Or just kick off the full install again.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/2505841180164306957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=2505841180164306957' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/2505841180164306957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/2505841180164306957'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2010/08/create-windows-xp-pro-sp3-oem-install.html' title='Create Windows XP Pro SP3 OEM Install CD'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-7421098711603951264</id><published>2010-06-08T08:10:00.002-05:00</published><updated>2010-06-08T08:31:47.422-05:00</updated><title type='text'>Visual Studio 2008 IntelliSense Tips</title><content type='html'>Recently started working with Visual Studio 2008 again.  Unfortunately my current project is restricted to 2008 and we can't yet upgrade to Visual Studio 2010.&lt;br /&gt;&lt;br /&gt;Visual Studio 2008's C++ IntelliSense is a big improvement over Visual Studio 2005, however at times I find it still has difficulties showing popup info and going to definition.  If you search for these types of problems you find many people advising deleting *.ncb and rebuilding.  After some trial and errors and hints from Microsoft sites about potential parser problems, I can offer the following advice which has worked great for me for solving these types of issues.&lt;br /&gt;&lt;br /&gt;If the "Go To Definition" goes to the declaration instead of the method definition, then make sure the declaration does not use any immediately undeclared types.  By immediate I mean in the header file itself.  Pre-compiled headers do not seem to count.&lt;br /&gt;&lt;br /&gt;For example:&lt;pre&gt;&lt;code&gt;&lt;br /&gt;  void foo(const string&amp;amp; str, ostream&amp;amp; os);&lt;br /&gt;  // should be:&lt;br /&gt;  void foo(const std::string&amp;amp; str, std::ostream&amp;amp; os);&lt;br /&gt;&lt;br /&gt;  // make sure A is forward declared, or included&lt;br /&gt;  void foo(const A&amp;amp; a);&lt;br /&gt;&lt;br /&gt;  // make sure Temp and A are forward declared,&lt;br /&gt;  //   class A;&lt;br /&gt;  //   template &amp;lt;class X&amp;gt; class Temp;&lt;br /&gt;  void foo(Temp&amp;lt;A&amp;gt;&amp;amp; t);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/7421098711603951264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=7421098711603951264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/7421098711603951264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/7421098711603951264'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2010/06/visual-studio-2008-intellisense-tips.html' title='Visual Studio 2008 IntelliSense Tips'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-6392838552306741886</id><published>2008-04-10T12:36:00.005-05:00</published><updated>2008-04-10T13:44:44.177-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ array size determination - Part 2</title><content type='html'>In my last post I showed &lt;a href="http://heifner.blogspot.com/2008/04/c-array-size-determination.html"&gt;how to create a template function to determine the size of a C++ array&lt;/a&gt; and promised to show how to create a template that will work with a type instead of a variable.&lt;br /&gt;&lt;br /&gt;Lets start by looking at a struct template that through specialization we can use to capture the number of elements in an array.&lt;pre&gt;  template &amp;lt;typename T&amp;gt;&lt;br /&gt;  struct array_info&lt;br /&gt;  {&lt;br /&gt;  };&lt;/pre&gt;This just names a template that we will specialize for arrays, like so:&lt;pre&gt;  template &amp;lt;typename T, size_t N&amp;gt;&lt;br /&gt;  struct array_info&amp;lt;T[N]&amp;gt;&lt;br /&gt;  {&lt;br /&gt;    typedef T type;&lt;br /&gt;    enum { size = N };&lt;br /&gt;  };&lt;br /&gt;&lt;/pre&gt;Now we have a template that for arrays will enable us to get to the size and type of elements in the array.  This can be used like so:&lt;pre&gt;  typedef int IntArray[10];&lt;br /&gt;  size_t s = array_info&amp;lt;IntArray&amp;gt;::size; // s == 10&lt;/pre&gt;Or like so:&lt;pre&gt;  float floatArray[array_info&amp;lt;IntArray&amp;gt;::size];&lt;/pre&gt;If we try something other than an array we get a compiler error.&lt;pre&gt;  size_t s = array_info&amp;lt;int*&amp;gt;::size; // error&lt;br /&gt;&lt;/pre&gt;Generates a compiler error similar to:&lt;pre&gt;  error: 'size' is not a member of '&amp;lt;unnamed&amp;gt;::array_info&amp;lt;int*&amp;gt;'&lt;/pre&gt;This is nice, but the real power is in using this with other templates.  Even though I'm working with arrays one of the apis I'm using returns a pointer instead of an array reference.  I know the type (which includes its length) so I wanted to take advantage of that.  Here I use the array_info in an equal method to determine the length:&lt;pre&gt;  template &amp;lt;typename A, typename T&amp;gt;&lt;br /&gt;  bool equal(const T* lhs, const T* rhs)&lt;br /&gt;  {&lt;br /&gt;    // Use 'typename array_info&amp;lt;A&amp;gt;::type' instead of 'T' so that compiler&lt;br /&gt;    // verifies A and T types match up.&lt;br /&gt;    const typename array_info&amp;lt;A&amp;gt;::type* const end = &amp;amp;lhs[array_info&amp;lt;A&amp;gt;::size];&lt;br /&gt;    return std::equal(&amp;amp;lhs[0], end, rhs, &amp;equal_to&amp;lt;T&amp;gt;);&lt;br /&gt;  }&lt;/pre&gt;This template can then be used like so:&lt;pre&gt;  equal&amp;lt;IntArray&amp;gt;(lhs.getVal(), rhs.getVal());&lt;/pre&gt;That is not syntax you get to use everyday.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/6392838552306741886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=6392838552306741886' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6392838552306741886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6392838552306741886'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/04/c-array-size-determination-part-2.html' title='C++ array size determination - Part 2'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-9120732378609321236</id><published>2008-04-10T10:02:00.006-05:00</published><updated>2008-04-10T13:34:23.816-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ array size determination</title><content type='html'>My current project has me working with C-style C++ arrays.  In order to make things easier and safer I created some helper templates.&lt;br /&gt;&lt;br /&gt;Lets start with finding the the number of elements in an array.  The conventional C way would be to use sizeof like:&lt;pre&gt;  sizeof(array)/sizeof(array[0])&lt;/pre&gt;I'm not a big fan of this approach.  I have seen production code by seasoned C++ developers that looks like this:&lt;pre&gt;  const char* tmp = 0;&lt;br /&gt;  // ...&lt;br /&gt;  int size = sizeof(tmp)/sizeof(tmp[0]);&lt;/pre&gt;Of course this is sometimes hidden behind a macro:&lt;pre&gt;  #define array_size(array) (sizeof(array)/sizeof(array[0]))&lt;br /&gt;  // ...&lt;br /&gt;  int size = array_size(tmp);&lt;/pre&gt;Either way, this gives the wrong answer.  The developer, of course, is not interested in what the size of a pointer to an element divided by the size of an element is.&lt;br /&gt;&lt;br /&gt;So, can we do better?  Actually, yes, we can.&lt;pre&gt;  template &amp;lt;typename T, size_t N&amp;gt;&lt;br /&gt;  inline&lt;br /&gt;  size_t array_size(const T (&amp;amp;lhs)[N])&lt;br /&gt;  {&lt;br /&gt;    return N;&lt;br /&gt;  }&lt;/pre&gt;Here we pass an array by reference to array_size() that extracts the size of the array and returns it.  I talked briefly about &lt;a href="http://heifner.blogspot.com/2005/06/c-reference-to-array.html"&gt;array passing&lt;/a&gt; a few years ago.&lt;br /&gt;&lt;br /&gt;We can now use it like so:&lt;pre&gt;  int ia[10];&lt;br /&gt;  size_t s = array_size(ia); // s == 10&lt;/pre&gt;And if we try to use this with a pointer like so:&lt;pre&gt;  const char* tmp = 0;&lt;br /&gt;  // ...&lt;br /&gt;  size_t s = array_size(tmp); // error&lt;/pre&gt;We get a compiler error similar to:&lt;pre&gt;  error: no matching function for call to 'array_size(const char*&amp;amp;)'&lt;/pre&gt;Very nice.&lt;br /&gt;&lt;br /&gt;However, sizeof can also be used with a type instead of a variable.  In my next post, I'll show how we can create a template that will work with a type instead of a variable.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/9120732378609321236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=9120732378609321236' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/9120732378609321236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/9120732378609321236'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/04/c-array-size-determination.html' title='C++ array size determination'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-7451270815664475154</id><published>2008-04-02T06:56:00.002-05:00</published><updated>2008-04-02T07:13:43.291-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Boost'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>BoostCon'08</title><content type='html'>I'm speaking on &lt;a href="http://www.boostcon.com/program#schedule.heifner-threading-with-boost"&gt;Boost.Thread&lt;/a&gt; this year at &lt;a href="http://www.boostcon.com/program"&gt;BoostCon'08&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here is the announcement from the Boost mailing list:&lt;br /&gt;&lt;br /&gt;Reminder: early registration for BoostCon'08 closes Monday, April 7.&lt;br /&gt;It's still not too late to avoid the late registration fee for what may&lt;br /&gt;be the finest C++ event of 2008.&lt;br /&gt;&lt;br /&gt;For the 2nd annual Boost C++ libraries conference, we've put together a&lt;br /&gt;fantastic program crowned by a keynote address from Bjarne Stroustrup.&lt;br /&gt;In addition to existing Boost libraries, we're covering technology of&lt;br /&gt;interest to any C++ developer trying to stay on the cutting edge,&lt;br /&gt;including hands-on sessions with features from the upcoming 2nd version&lt;br /&gt;of the C++ standard.  This year we've also added a collection of short&lt;br /&gt;"author's corner" sessions for those of you who want an inside&lt;br /&gt;perspective on how advanced libraries are developed.  See&lt;br /&gt;&lt;a href="http://www.boostcon.com/program"&gt;http://www.boostcon.com/program&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;BoostCon 2008 will be hosted at Aspen Center for Physics, one of the&lt;br /&gt;most beautiful meeting sites in the world, and a great venue for&lt;br /&gt;collaboration and discovery.  The combination of a relaxed pace and&lt;br /&gt;intense inquiry made BoostCon'07 an event to remember, and we expect no&lt;br /&gt;less for this year.  Please visit &lt;a href="http://www.boostcon.com/registration"&gt;http://www.boostcon.com/registration&lt;/a&gt;&lt;br /&gt;to register.&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;&lt;br /&gt;-- The BoostCon Planning Committee&lt;br /&gt;&lt;br /&gt;David Abrahams&lt;br /&gt;Beman Dawes&lt;br /&gt;Jeff Garland&lt;br /&gt;Joel de Guzman&lt;br /&gt;Eric Niebler&lt;br /&gt;Sean Parent&lt;br /&gt;Jeremy Siek&lt;br /&gt;Matthias Troyer</content><link rel='related' href='http://www.boostcon.com/home' title='BoostCon&apos;08'/><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/7451270815664475154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=7451270815664475154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/7451270815664475154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/7451270815664475154'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/04/boostcon08.html' title='BoostCon&apos;08'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-5991351844148963041</id><published>2008-03-31T21:27:00.004-05:00</published><updated>2008-03-31T23:15:09.376-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='Boost'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Building Boost 1.35.0</title><content type='html'>Seems I always have troubles building &lt;a href="http://www.boost.org/"&gt;Boost&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To start I followed the big '&lt;a href="http://www.boost.org/users/download/"&gt;Get Boost&lt;/a&gt;' button on the right side of &lt;a href="http://www.boost.org/"&gt;boost.org&lt;/a&gt;; thinking, 'That sure is obvious'.  That link takes you to a download page with &lt;a href="http://www.boost.org/users/news/version_1_35_0"&gt;boost version 1.35.0&lt;/a&gt; right at the top.  It shows the new libs with 'Detail' and 'Download'.  I took a few seconds to read the new libs section and clicked on &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041&amp;release_id=587936"&gt;download&lt;/a&gt;.  This took me to sourceforge.net where they have the source code only release.  Well, I knew that &lt;a href="http://www.boost-consulting.com/"&gt;Boost Consulting&lt;/a&gt; has  maintained an installer for Windows assuming you are using boost with Visual Studio.  So I jumped over to their &lt;a href="http://www.boost-consulting.com/products/free"&gt;boost installer site&lt;/a&gt;, only to find that they don't have one yet for 1.35.0.&lt;br /&gt;&lt;br /&gt;No problem, I'll just go back and grab the source code from sourceforge.net and follow the instructions in the &lt;a href="http://www.boost.org/doc/libs/1_35_0/more/getting_started/index.html"&gt;getting started document&lt;/a&gt;.  I kicked off the download and started looking for the getting started document.  After a while, I figure I must be crazy, because I can't find it.  I finally do a google search in order to find it.  Still thinking I must have just missed it, I went back and followed every link on the right of the the main boost site.  It is not under 'Introduction' or any other of the sections.  I finally did locate it, it is on the main page on the left under 'GETTING STARTED'.  Funny how you can look right past something like that.&lt;br /&gt;&lt;br /&gt;So now I figure all I have to do is follow the getting started guide to build boost.&lt;br /&gt;&lt;br /&gt;Step 1. Get Boost.  I already did that.  My download had already completed from sourceforge.net.  I unziped it (actually un-7zed it) to c:\boost\boost_1_35_0\.&lt;br /&gt;&lt;br /&gt;Step 2. Explain Boost Distribution.  Ok, nothing new here.&lt;br /&gt;&lt;br /&gt;Step 3. Header only libs.  Right, header only libs are nice.  Just compile and go.  However, Boost.Thread among others need to be compiled.&lt;br /&gt;&lt;br /&gt;Step 4. Build with a header only lib.  Been there done that many times.  There are sub-steps for building with Visual Studio.  I always use &lt;a href="http://www.ociweb.com/products/mpc"&gt;MPC&lt;/a&gt;, so this is not useful to me.  I plan to create a separate post or two about building boost applications with MPC.  When you see how easy it is to use MPC with Boost, I doubt that you will use anything else.&lt;br /&gt;&lt;br /&gt;Step 5. Building Boost libraries.  Alright, here we go.&lt;br /&gt;&lt;br /&gt;Step 5.1. Install Boost libraries.  Yeah, thats what I wanted to do to start with.  However, Boost Consulting has not yet put out an installer for 1.35.0.&lt;br /&gt;&lt;br /&gt;Step 5.2. Build from source.&lt;br /&gt;&lt;br /&gt;Step 5.2.1. Get &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941"&gt;bjam&lt;/a&gt;.  I put the executable in c:\boost\boost_1_35_0\.&lt;br /&gt;&lt;br /&gt;Step 5.2.2. Identify toolset.  I want: msvc.&lt;br /&gt;&lt;br /&gt;Step 5.2.3. Select a build directory.  It says this is not necessary.&lt;br /&gt;&lt;br /&gt;Step 5.2.4. Invoke bjam.  This is where I got in trouble.  I tried various combinations of commands/arguments to bjam.  I must have tried to build 3-4 times.  Finally I settled on the following after looking at bjam --help.&lt;br /&gt;&lt;pre&gt;cd c:\boost\boost_1_35_0&lt;br /&gt;bjam --build-type=complete --prefix="c:\boost\boost_1_35_0" install&lt;/pre&gt;Seems like I should have included --toolset=msvc, but I forgot and it picked msvc-8.0 anyway.  &lt;br /&gt;&lt;br /&gt;This worked for me creating a c:\boost\boost_1_35_0\lib directory as the rest of the getting started document assumes.  Actually the getting started doc has it under C:\Program Files\boost\boost_1_35_0\lib, but I like c:\boost\boost_1_35_0\lib better.  &lt;br /&gt;&lt;br /&gt;After the build you can delete the c:\boost\boost_1_35_0\bin.v2 directory to free up space.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/5991351844148963041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=5991351844148963041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/5991351844148963041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/5991351844148963041'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/03/building-boost-1350.html' title='Building Boost 1.35.0'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-8652748479848557073</id><published>2008-03-21T15:29:00.003-05:00</published><updated>2008-03-21T15:58:47.859-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Windows XP Daylight Savings Time Problem</title><content type='html'>On March 11, 2008 I had to turn off Windows XP automatic synchronization with an internet time server because the time was wrong on my laptop.  I manually set the time and forgot about it.  Yesterday I realized that my email message times were off by one hour.  I looked at one of my sent emails and it had "Date: Fri, 21 Mar 2008 14:39:48 -0600".  I googled and figured out that since I'm in CDT this should be -0500.  As a matter of fact emails sent to me from those I work with did in fact have this in the message header: "Fri, 21 Mar 2008 14:34:36 -0500 (CDT)".  I couldn't figure out why my machine wasn't updated for the new daylight savings time begin date.  I have all the latest Windows XP updates.&lt;br /&gt;&lt;br /&gt;I talked to our system admin at &lt;a href="http://www.ociweb.com/"&gt;OCI&lt;/a&gt; and he said I needed to apply this update:&lt;a href="http://http://support.microsoft.com/kb/928388"&gt;928388&lt;/a&gt;.  I downloaded it, but it said that it was already applied.  After digging around some more I found the following &lt;a href="http://support.microsoft.com/kb/914387"&gt;"How to configure daylight saving time for Microsoft Windows operating systems"&lt;/a&gt;. I followed the steps which require you to create and apply a registry file and create and run a vbs script.  That fixed the problem.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/8652748479848557073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=8652748479848557073' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/8652748479848557073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/8652748479848557073'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/03/windows-xp-daylight-savings-time.html' title='Windows XP Daylight Savings Time Problem'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-4232993606415982680</id><published>2008-03-10T15:11:00.003-05:00</published><updated>2008-03-10T15:38:49.595-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STL'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>std::for_each with C-style arrays</title><content type='html'>Although std::for_each is most often used with the standard containers, it can also be used with C-style arrays.  Take for example the following:&lt;pre&gt;#include &amp;lt;algorithm&amp;gt;&lt;br /&gt;#include &amp;lt;functional&amp;gt;&lt;br /&gt;// ...&lt;br /&gt;WriterTask writer[NumThreads];&lt;br /&gt;std::for_each(writer, writer+NumThreads, &lt;br /&gt;   std::mem_fun_ref(&amp;WriterTask::activate));&lt;br /&gt;// ...&lt;br /&gt;std::for_each(writer, writer+NumThreads, &lt;br /&gt;   std::mem_fun_ref(&amp;WriterTask::join));&lt;/pre&gt;Or if you prefer:&lt;pre&gt;std::for_each(&amp;writer[0], &amp;writer[NumThreads],&lt;br /&gt;   std::mem_fun_ref(&amp;WriterTask::activate));&lt;/pre&gt;Compare the above with the explicit for loop:&lt;pre&gt;for (int i = 0; i &amp;lt; NumThreads; ++i) {&lt;br /&gt;   writer[i].activate();&lt;br /&gt;}&lt;/pre&gt;I'm not completely convinced that the std::for_each case is more readable.  However, I liked it better than the for loop for some test cases I was writing.  It collapsed a number of subsequent for loops down into one line statements making it clearer the intent of the test.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/4232993606415982680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=4232993606415982680' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/4232993606415982680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/4232993606415982680'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/03/stdforeach-with-c-style-arrays.html' title='std::for_each with C-style arrays'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-6919149293313537780</id><published>2008-02-29T13:51:00.003-06:00</published><updated>2008-02-29T15:02:43.351-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>std::min and std::max</title><content type='html'>Today I typed the following:&lt;br /&gt;&lt;pre&gt;int t = (std::max)(timeout, lagtime);&lt;/pre&gt;&lt;br /&gt;Why did I put parentheses around std::max?  Because windows.h defines (among other things) a max and a min macro.  If you include windows.h the above code will not compile.  For example the following:&lt;br /&gt;&lt;pre&gt;#include "windows.h"&lt;br /&gt;#include &amp;lt;algorithm&amp;gt;&lt;br /&gt;&lt;br /&gt;void foo() {&lt;br /&gt;    int i = 5;&lt;br /&gt;    int j = 7;&lt;br /&gt;    int x = std::max(i,j);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Will produce the following error with Visual Studio C++ 2005:&lt;br /&gt;&lt;pre&gt;1&gt;test.cpp(7) : error C2589: '(' : illegal token on right side of '::'&lt;br /&gt;1&gt;test.cpp(7) : error C2143: syntax error : missing ';' before '::'&lt;/pre&gt;&lt;br /&gt;There are a number of ways to work around windows.h defining these two macros.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Use alternative names defined in windows.h.&lt;pre&gt;int x = _cpp_max(i,j);&lt;br /&gt;int y = _cpp_min(i,j);&lt;/pre&gt;This is not portable; only works on Windows.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Define NOMINMAX before including windows.h.  This might break existing code that assumes NOMINMAX is not defined.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Don't use std::min and std::max.  Instead use the tertiary operator like so: &lt;pre&gt;int x = i &amp;gt; j ? i : j; // max(i,j)&lt;br /&gt;int y = i &amp;lt; j ? i : j; // min(i,j)&lt;/pre&gt;This is portable but not as readable and more error prone.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use using statements to make the code portable:&lt;pre&gt;using std::min;&lt;br /&gt;using std::max;&lt;br /&gt;int x = max(i,j);&lt;br /&gt;int y = min(i,j);&lt;/pre&gt;This works but requires two more lines of code.  You could also just use 'using namespace std;' but that might pull in more than you want.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use std::min&amp;lt;int&amp;gt; and std::max&amp;lt;int&amp;gt;&lt;pre&gt;int x = std::max&amp;lt;int&amp;gt;(i,j);&lt;br /&gt;int y = std::min&amp;lt;int&amp;gt;(i,j);&lt;/pre&gt;This requires you to specify the type.  However in some cases this actually helps.  For example:&lt;pre&gt;int i = 5;&lt;br /&gt;unsigned int j = 7;&lt;br /&gt;int x = (std::max)(i,j);&lt;br /&gt;int y = (std::min)(i,j);&lt;/pre&gt;Note the 'unsigned'. Generates the following errors:&lt;pre&gt;1&gt;test.cpp(7) : error C2780: 'const _Ty &amp;std::max(const _Ty &amp;,const _Ty &amp;,_Pr)' : &lt;br /&gt;expects 3 arguments - 2 provided&lt;br /&gt;1&gt;        c:\program files\microsoft visual studio 8\vc\include\xutility(3190) :&lt;br /&gt;see declaration of 'std::max'&lt;br /&gt;1&gt;test.cpp(7) : error C2782: 'const _Ty &amp;std::max(const _Ty &amp;,const _Ty &amp;)' :&lt;br /&gt;template parameter '_Ty' is ambiguous&lt;br /&gt;1&gt;        c:\program files\microsoft visual studio 8\vc\include\xutility(3182) :&lt;br /&gt;see declaration of 'std::max'&lt;br /&gt;1&gt;        could be 'unsigned int'&lt;br /&gt;1&gt;        or 'int'&lt;/pre&gt;By explicitly specifying type via &amp;lt;int&amp;gt; you remove the ambiguity.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use (std::min) and (std::max)&lt;pre&gt;int i = 5;&lt;br /&gt;int j = 7;&lt;br /&gt;int x = (std::max)(i,j);&lt;br /&gt;int y = (std::min)(i,j);&lt;/pre&gt;This works (as does the std::max&amp;lt;int&amp;gt;) because the C++ preprocessor requires '(' as the next preprocessing token following the macro name to preform the macro expansion.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/6919149293313537780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=6919149293313537780' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6919149293313537780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6919149293313537780'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/02/stdmin-and-stdmax.html' title='std::min and std::max'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-1555156175552395321</id><published>2008-02-28T08:38:00.003-06:00</published><updated>2008-02-28T09:09:06.367-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ if variable initialization</title><content type='html'>All C++ programmer know that a variable can be initialized within the definition of a for statement like so:&lt;br /&gt;&lt;pre&gt;for (int i = 0; i &amp;lt; 9; ++i) {  &lt;br /&gt;   std::cout &amp;lt;&amp;lt; i &amp;lt;&amp;lt; '\n';&lt;br /&gt;}&lt;/pre&gt;However, many do not know that the same can be done in an if statement.  For example:&lt;br /&gt;&lt;pre&gt;if (Foo* f = dynamic_cast&amp;lt;Foo*&gt;(a)) {&lt;br /&gt;  f-&gt;doSomething();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// f is not available here.&lt;/pre&gt;You should always define your variables to have the smallest possible scope.  This technique allows you to pull your local if variables into the if statement thereby reducing their visibility.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/1555156175552395321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=1555156175552395321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1555156175552395321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1555156175552395321'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/02/c-if-variable-initialization.html' title='C++ if variable initialization'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-6559664471118728622</id><published>2008-02-25T09:55:00.005-06:00</published><updated>2008-02-25T10:47:57.415-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STL'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>std::fill_n</title><content type='html'>Many of the tests I have been writing lately involve creating min/max/misc. values to send across our messaging system.  It dawned on me today that the for loops I have been writing could be better expressed with std::fill_n.  For example take the following loop:&lt;br /&gt;&lt;pre&gt;std::vector&amp;lt;std::string&gt; strSeq;&lt;br /&gt;const int MAX_STRSEQ_SIZE = 31;&lt;br /&gt;for (int i = 0; i &amp;lt; MAX_STRSEQ_SIZE; ++i)&lt;br /&gt;  strSeq.push_back("0123456789");&lt;/pre&gt;This can be better written using the standard template library:&lt;br /&gt;&lt;pre&gt;std::vector&amp;lt;std::string&gt; strSeq;&lt;br /&gt;const int MAX_STRSEQ_SIZE = 31;&lt;br /&gt;std::fill_n(std::back_inserter(strSeq), MAX_STRSEQ_SIZE, &lt;br /&gt;            "0123456789");&lt;/pre&gt;Although this isn't really any shorter than the original for loop, I believe it reads better.&lt;br /&gt;&lt;br /&gt;Lets review std::fill_n():&lt;br /&gt;&lt;pre&gt;template&amp;lt;typename ForwardIter, typename Size, typename T&gt;&lt;br /&gt;fill_n(ForwardIter begin, Size n, const T&amp; value);&lt;/pre&gt;std::fill_n takes three arguments: ForwardIter, Size, and T.  ForwardIter is designed to take an iterator pointing to where to begin filling.  However, since std::fill_n assumes there is room in the container we use std::back_inserter() to adapt the assignment operator into a push_back on our container.  Size is how many of T to assign and T is the value to assign.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/6559664471118728622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=6559664471118728622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6559664471118728622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6559664471118728622'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/02/stdfilln.html' title='std::fill_n'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-3320982275090679095</id><published>2008-02-22T09:28:00.002-06:00</published><updated>2008-02-22T09:41:37.747-06:00</updated><title type='text'>Next-Gen PC Design Competition</title><content type='html'>I you have not already done so, hop over and check out some of these great designs and vote for you favorite.  &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.nextgendesigncomp.com/"&gt;Next-Gen PC Design Competition&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I voted for the &lt;a href="http://www.nextgendesigncomp.com/entrydetail.aspx?id=904"&gt;FluxPC&lt;/a&gt;.</content><link rel='related' href='http://www.nextgendesigncomp.com/' title='Next-Gen PC Design Competition'/><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/3320982275090679095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=3320982275090679095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/3320982275090679095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/3320982275090679095'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/02/next-gen-pc-design-competition.html' title='Next-Gen PC Design Competition'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-6880534077556624966</id><published>2008-02-20T09:11:00.002-06:00</published><updated>2008-02-20T09:16:40.764-06:00</updated><title type='text'>Providence Christian Academy Website</title><content type='html'>Since moving to Pensacola in June 2007 my kids old school, &lt;a href="http://www.pcastl.org"&gt;Providence Christian Academy&lt;/a&gt; has redone their website from when I maintained it.  Here is a link to the old version &lt;a href="http://web.archive.org/web/20070412232139/http://www.pcastl.org/"&gt;Providence Christian Academy&lt;/a&gt;.  I think the current one is better than the one I hacked together.  &lt;br /&gt;&lt;br /&gt;What do you think?</content><link rel='related' href='http://www.pcastl.org' title='Providence Christian Academy Website'/><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/6880534077556624966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=6880534077556624966' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6880534077556624966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/6880534077556624966'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/02/providence-christian-academy-website.html' title='Providence Christian Academy Website'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-2518966835144326338</id><published>2008-02-11T07:52:00.001-06:00</published><updated>2008-02-13T10:25:38.636-06:00</updated><title type='text'>Internet Browser Crashing</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Update&lt;/span&gt;: &lt;br /&gt;It now appears re-installing Java did not fix my problems.  My crashes are back and they are worse than ever.  I'm beginning to think it may be a hardware problem.  I booted with a Knoppix Linux CD and tried Firefox from there.  It also crashed multiple times.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Original Post&lt;/span&gt;:&lt;br /&gt;For many months I have suffered from an unstable Windows XP.  Firefox, IE, Safari, Opera, Thunderbird, Windows Media Player, QuickBooks, and every other program that dared attempt to access the internet would periodically crash (Microsoft Debug Window) or simply just disappear.  If I attempted to debug using Visual Studio 7.1 or 8, Visual Studio would crash with a Microsoft Debug Window (not very helpful).  I looked in the event viewer many times but never found anything.  I ran many different kinds of virus and spyware removal tools.  Nothing could be found to fix my problems.  I, of course, Googled my problem many times and never found anything.&lt;br /&gt;&lt;br /&gt;The most annoying thing was doing my online banking (and having the browser crash while trying to purchase something).  I was unable to access Bank of America from any browser except Safari.  Safari would also crash, just less often.  Other browsers might work for a few pages but would always crash more often than Safari.  IE was the worse.  I could hardly go to any pages without IE crashing.  Firefox (my browser of choice) was mostly stable.  It however would crash multiple times a day.  This was bearable because Firefox would restart exactly where I left it with all my tabs ready to go.&lt;br /&gt;&lt;br /&gt;I kept telling myself that I would re-install Windows XP when my current project ended.  I didn't want to risk making it worse since I use VSClient and VNC everyday to access a remote computer for work.  VNC never crashed.&lt;br /&gt;&lt;br /&gt;However, the other day I started doing my taxes.  I have used TurboTax online for many years.  So I fire up Firefox and access TurboTax only to have it crash almost immediately.  Same for Safari.  Ugh!  It was the straw that broke the camels back.  I dug out my Windows XP CD and kicked off a re-install.  Hours later, I finally have Windows XP reinstalled.  This was after having to call Microsoft to activate Windows XP since the activation window crashed trying to access the internet.  Not a good sign.  And as you may have guessed by now, this didn't help one bit.  The only difference I saw was that the icons in Bloglines have now disappeared; replaced with the text 'expand folder' and 'collapse folder'.&lt;br /&gt;&lt;br /&gt;Now I'm really frustrated.  I just knew the re-install of Windows XP would fix the problem.  At this point I'm starting to think the only remedy will be to start from scratch with a clean install of Windows XP (or maybe Linux).  However, I use Visual Studio and QuickBooks and other Windows only applications.&lt;br /&gt;&lt;br /&gt;Back to Googling.  I ran across this site: &lt;a href="http://en.allexperts.com/q/Microsoft-Internet-Explorer-1054/IE-crashes-certain-web.htm"&gt;IE crashes at certain web-sites&lt;/a&gt;.  It recommends re-installing Java.  So I follow their link and grab &lt;a href="http://java.com/en/download/windows_manual.jsp"&gt;Java&lt;/a&gt; and re-install it.  This seems to fix most, but not quite all, of my problems.  I can now access TurboTax and Bank of America from Firefox without it ever crashing.&lt;br /&gt;&lt;br /&gt;I re-installed Java about a week ago.  Firefox has only crashed on me twice since then.  Thunderbird has crashed a few times (this might not be related, not sure).  QuickBooks now can access the internet (very important since I had to register it).  Windows Media Player has not crashed since.  And IE seems to actually work now.  I use Firefox almost exclusively, however.  So I think I'm mostly back to normal.  I assume other folks have a few crashes here and there.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/2518966835144326338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=2518966835144326338' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/2518966835144326338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/2518966835144326338'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2008/02/internet-browser-crashing.html' title='Internet Browser Crashing'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-1590407507529106994</id><published>2007-04-20T21:38:00.001-05:00</published><updated>2008-07-08T15:22:28.709-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='whitelist'/><category scheme='http://www.blogger.com/atom/ns#' term='internet filter'/><title type='text'>Simple whitelist Internet filter</title><content type='html'>How to limit access to Internet websites so that only specified websites are allowed?&lt;br /&gt;&lt;br /&gt;If you have a Linux machine available, you can use squid to setup a whitelist.  This is a very effective and easily setup.&lt;br /&gt;&lt;br /&gt;Modify squid's /etc/squid.conf as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  acl white dstdomain "/etc/squid/whitelist"&lt;br /&gt;  http_access deny !white &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Create the /etc/squid/whitelist file and add domain names like .pcastl.org one per line.&lt;br /&gt;&lt;br /&gt;Setup your router to only allow your Linux box access to the Internet.  This is normally done my adding a allow list of MAC addresses.  Then configure all other machines on your network to point to the Linux box as there web proxy.&lt;br /&gt;&lt;br /&gt;See the following link for &lt;a href="http://enterprise.linux.com/article.pl?sid=07/02/06/1752220&amp;from=rss"&gt;detail instructions&lt;/a&gt; about setting up the proxy.  Note if all you want is a whitelist then you don't need SquidGuard.  Also note the config lines in this article are incorrect.  Use the ones I show above.&lt;br /&gt;&lt;br /&gt;If you want your other machines to be able to access email then use &lt;a href="http://www.boutell.com/rinetd/"&gt;rinetd&lt;/a&gt; to redirect some port on the Linux box to your mail server and setup all other machines on the network to point to the Linux box as their mail server.  You could alternatively setup iptables rules, but rinetd is much simpler to setup.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/1590407507529106994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=1590407507529106994' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1590407507529106994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1590407507529106994'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/04/simple-whitelist-internet-filter.html' title='Simple whitelist Internet filter'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-9102809914316790842</id><published>2007-04-19T13:44:00.000-05:00</published><updated>2007-04-19T13:52:35.462-05:00</updated><title type='text'>Move to Pensacola, FL</title><content type='html'>As announced today on the company internal 'The OCI/Advantage Business Summary':&lt;br /&gt;&lt;br /&gt;Kevin Heifner is planning on moving his family to Pensacola, Florida in the third quarter of this year. The move was promoted by family desires related to his children attending a specialized school. Kevin will continue to support OCI from Florida.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/9102809914316790842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=9102809914316790842' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/9102809914316790842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/9102809914316790842'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/04/move-to-pensacola-fl.html' title='Move to Pensacola, FL'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-1708743483856211596</id><published>2007-04-08T20:05:00.000-05:00</published><updated>2007-04-08T20:18:17.867-05:00</updated><title type='text'>5 Things About Myself</title><content type='html'>I was blog tagged by &lt;a href="http://www.weiqigao.com/blog/"&gt;Weiqi Gao&lt;/a&gt;.  I'm not really sure what that means, but I will follow the lead of others and tell 5 things that you probably don't know about me.&lt;br /&gt;&lt;br /&gt;1.  I think I was a freshman in high school when I built a bomb that almost killed me.  Actually it was suppose to be a rocket, but it didn't quite go as planned.  I took an empty CO2 cartridge (the kind used for beebee guns) and stuffed it full of match heads.  I put the CO2 cartridge in a PVC pipe and lit it.  I'm fortunate that it was a very cold day and I had many layers of clothes on.  My clothes were full of holes and it is only the grace of God that kept me from killing myself.  Only one piece of PVC pipe made it into my right arm.  I still have the scar from where they cut it out.  Also the side of my folks garage siding is still perforated with holes.&lt;br /&gt;&lt;br /&gt;2.  In my small high school (graduating class of 50) I was the school high jumper in track-n-field.  My personal best was 5'10" which was over my height of 5'8".  I also participated in a school record in the 440 yard relay.&lt;br /&gt;&lt;br /&gt;3.  I wouldn't say I'm a big music fan.  I own very few CDs.  Normally I listen to classical while driving.  However, I do like the band &lt;a href="http://www.third-day.com/"&gt;Third Day&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;4.  My first computer was an Apple II+ my dad bought when I was in grade school.  I thaught myself to program Apple Basic by listening to tapes that came with the computer.&lt;br /&gt;&lt;br /&gt;5.  Many of you know that I'm a 'born again Christian'.  I align myself with the &lt;a href="http://en.wikipedia.org/wiki/Reformed_churches"&gt;Reformed Christian faith&lt;/a&gt;.  One of my favorite books is: &lt;a href="http://www.ccel.org/ccel/boettner/predest.html"&gt;The Reformed Doctrine of Predestination by Loraine Boettner&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/1708743483856211596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=1708743483856211596' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1708743483856211596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1708743483856211596'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/04/5-things-about-myself.html' title='5 Things About Myself'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-2638731374435040093</id><published>2007-04-06T17:42:00.000-05:00</published><updated>2007-04-06T17:47:00.620-05:00</updated><title type='text'>Iridium One of 21 Biggest Technology Flops</title><content type='html'>For those who worked on the Iridium project, you may find it interesting that Iridium made ComputerWorld's list of &lt;a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;articleId=9012345&amp;source=rss_news50"&gt;21 Biggest Technology Flops&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/2638731374435040093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=2638731374435040093' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/2638731374435040093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/2638731374435040093'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/04/iridium-one-of-21-biggest-technology.html' title='Iridium One of 21 Biggest Technology Flops'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-8817084603431973575</id><published>2007-02-28T19:40:00.000-06:00</published><updated>2007-02-28T19:48:12.276-06:00</updated><title type='text'>int to String under Managed C++</title><content type='html'>I have been doing a little managed C++ at work the last couple of days.  Did you know you could do this:&lt;br /&gt;&lt;br /&gt;    System::String^ str = gcnew System::String("");&lt;br /&gt;    str += 5;&lt;br /&gt;    System::Console::WriteLine(str); // prints: 5&lt;br /&gt;&lt;br /&gt;or simply:&lt;br /&gt;&lt;br /&gt;    System::String^ str = "";&lt;br /&gt;    str += 5;&lt;br /&gt;    System::Console::WriteLine(str); // prints: 5&lt;br /&gt;&lt;br /&gt;or even:&lt;br /&gt;&lt;br /&gt;    System::String^ str;&lt;br /&gt;    str += 5;&lt;br /&gt;    System::Console::WriteLine(str); // prints: 5&lt;br /&gt;&lt;br /&gt;The 5 is converted to a String for you.  After working with C++ for so many years without a simple way to convert an int to a string this is nice.  Might not seem like that big a deal, but these little things add up.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/8817084603431973575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=8817084603431973575' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/8817084603431973575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/8817084603431973575'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/02/int-to-string-under-managed-c.html' title='int to String under Managed C++'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-1135790356577756953</id><published>2007-02-28T19:20:00.000-06:00</published><updated>2007-02-28T19:24:50.944-06:00</updated><title type='text'>CityDesk on Vista</title><content type='html'>I use CityDesk to maintain my kid's school website: &lt;a href="http://www.pcastl.org"&gt;Providence Christian Academy&lt;/a&gt;.  It would not run under Vista because it needed the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=b769a4b8-48ed-41a1-8095-5a086d1937cb&amp;displaylang=en"&gt;DHTML Editing Control&lt;/a&gt;.  However, a quick download and install and I was up and running again.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/1135790356577756953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=1135790356577756953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1135790356577756953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/1135790356577756953'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/02/citydesk-on-vista.html' title='CityDesk on Vista'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-3921749259824551047</id><published>2007-02-28T19:04:00.000-06:00</published><updated>2007-02-28T19:15:53.604-06:00</updated><title type='text'>Firefox on Vista</title><content type='html'>As some of you know, I have started using Windows Vista Business on my work laptop.  I received a free version for participating in Power Together campaign.  I prefer Firefox to IE, even IE7, so I wanted to make it the default browser on Vista.  I looked around and it appears that many people are having problems getting this to work.  Here is what I did:&lt;br /&gt;&lt;br /&gt;- Run Firefox as Administrator by right-clicking on the icon in the Quick Launch Toolbar.&lt;br /&gt;- Select Tools-&gt;Options-&gt;MainTab&lt;br /&gt;- Click "Check Now" button under System Defaults.&lt;br /&gt;- Indicate you want Firefox as the default browser.&lt;br /&gt;- Close Firefox (remember you are running as Administrator.&lt;br /&gt;&lt;br /&gt;Works great.</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/3921749259824551047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=3921749259824551047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/3921749259824551047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/3921749259824551047'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2007/02/firefox-on-vista.html' title='Firefox on Vista'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-9182104961326279334</id><published>2006-12-22T12:14:00.000-06:00</published><updated>2006-12-22T12:39:09.536-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reflection'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Logging Method Name in C#</title><content type='html'>&lt;pre&gt;&lt;br /&gt;logMessage("functionName",  "something bad happened");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Yes the above works if IF *if* you remember to update "functionName".  However, remembering to update the parameter after copying from another method is often not done.  It is also a pain and not necessary.  A little reflection easily solves this problem:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// start one up so that we don't get the current&lt;br /&gt;// method but the one that called this one&lt;br /&gt;StackFrame sf = new StackFrame(1, true);&lt;br /&gt;System.Reflection.MethodBase mb = sf.GetMethod();&lt;br /&gt;string methodName = mb != null ? mb.Name : "";&lt;br /&gt;// fileName can be null, if unable to determine&lt;br /&gt;string fileName = sf.GetFileName();&lt;br /&gt;// we only want the filename not the complete path&lt;br /&gt;if (fileName != null) fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);&lt;br /&gt;int lineNumber = sf.GetFileLineNumber();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However the above does not work if you are using RichException or other proxies.  So something a bit more complicated is needed:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private StackFrame GetCallingStackFrame()&lt;br /&gt;{&lt;br /&gt;    // Determine the method that called the one that is calling this one.&lt;br /&gt;    // This is not just two up the Stack because of RichException support.&lt;br /&gt;    StackFrame sf = null;&lt;br /&gt;    // Start at 2.  1 for this one and another for the one above that.&lt;br /&gt;    StackTrace st = new StackTrace(2, true);&lt;br /&gt;    Type thisType = GetType();&lt;br /&gt;    foreach (StackFrame sfi in st.GetFrames())&lt;br /&gt;    {&lt;br /&gt;        // Find a calling method that is not part of this log class but is part&lt;br /&gt;        // of the same Namespace.&lt;br /&gt;        Type callType = sfi.GetMethod().DeclaringType;&lt;br /&gt;        if (callType != thisType &amp;&amp;amp;&lt;br /&gt;            callType.Namespace == thisType.Namespace &amp;&amp;amp;&lt;br /&gt;            !callType.IsInterface)&lt;br /&gt;        {&lt;br /&gt;            sf = sfi;&lt;br /&gt;            break;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    return sf;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This can then be used like so:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;StackFrame sf = GetCallingStackFrame();&lt;br /&gt;if (sf != null) // if found add info to log message&lt;br /&gt;{&lt;br /&gt;    System.Reflection.MethodBase mb = sf.GetMethod();&lt;br /&gt;    string methodName = mb != null ? mb.Name : "";&lt;br /&gt;    string fileName = sf.GetFileName();&lt;br /&gt;    if (fileName != null) fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);&lt;br /&gt;    int lineNumber = sf.GetFileLineNumber();&lt;br /&gt;&lt;br /&gt;    if (fileName != null)&lt;br /&gt;    {&lt;br /&gt;         strMsg = fileName + "(" + lineNumber + ") - " + methodName + " - " + strMsg;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;         strMsg = "unknown - " + methodName + " - " + strMsg;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/9182104961326279334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=9182104961326279334' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/9182104961326279334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/9182104961326279334'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2006/12/logging-method-name-in-c.html' title='Logging Method Name in C#'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-116668079611822515</id><published>2006-12-20T23:54:00.000-06:00</published><updated>2006-12-20T23:59:56.120-06:00</updated><title type='text'>WRT54GL with Thibor's HyperWRT QoS setup</title><content type='html'>I have been using Vonage's VOIP with my &lt;a href="http://heifner.blogspot.com/2006/09/10-steps-to-setup-wrt54gl-with-thibors.html"&gt;WRT54GL setup with Thibor's HyperWRT&lt;/a&gt; as outlined in my previous post.  It has been working without any problems.&lt;br /&gt;&lt;br /&gt;I realized that I never did post my QoS setup.  So here it is:&lt;br /&gt;&lt;br /&gt;Priority  Name Information          &lt;br /&gt;Medium POP3 ---  &lt;br /&gt;Medium DNS ---  &lt;br /&gt;Medium SMTP ---  &lt;br /&gt;Medium Http ---  &lt;br /&gt;Medium SSH ---  &lt;br /&gt;High Skype ---  &lt;br /&gt;Medium Yahoo Messenger ---  &lt;br /&gt;Medium MSN Messenger ---  &lt;br /&gt;Medium AOL Messenger ---  &lt;br /&gt;Low Bittorrent ---  &lt;br /&gt;Low MSN File Transfers ---  &lt;br /&gt;Low FTP ---  &lt;br /&gt;Highest Vonage VT2442 MAC xx:xx:xx:xx:xx:xx&lt;br /&gt;Low Port 8080 Port 8080 - 8080</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/116668079611822515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=116668079611822515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/116668079611822515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/116668079611822515'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2006/12/wrt54gl-with-thibors-hyperwrt-qos.html' title='WRT54GL with Thibor&apos;s HyperWRT QoS setup'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9016105.post-115724915312964806</id><published>2006-09-02T20:59:00.000-05:00</published><updated>2006-09-02T23:54:13.826-05:00</updated><title type='text'>10 Steps to setup WRT54GL with Thibor's HyperWRT</title><content type='html'>In my previous post I discussed the problems I am having with Vonage VOIP.  In short I have been having problems with choppy, one-way, dropped audio.  I'm attempting to fix this by installing a LinkSys WRT54GL with third party firmware.  The third party firmware should allow me to setup QoS (Quality of Service) prioritization for the VOIP router.  Currently I have the following setup:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Charter-Cable-Modem &lt;br /&gt;    -&gt; WRT54GL &lt;br /&gt;          -&gt; Vonage-Motorola-VT2442 -&gt; telephone&lt;br /&gt;          -&gt; Wireless Network&lt;br /&gt;          -&gt; Wired Network&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I have not yet setup the QoS.  I'll outline those steps in a future post.&lt;br /&gt;&lt;br /&gt;Here are the steps I followed for setting up my WRT54GL with Thibor's HyperWRT firmware.&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;1. Order WRT54GL LinkSys router from Amazon.&lt;br /&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=kevinheifnesh-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B000BTL0OA&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000ff&amp;bc1=000000&amp;bg1=ffffff&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;  (If your RSS reader does not display a link to Amazon, please visit &lt;a href="http://heifner.blogspot.com/"&gt;my blog&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;2. Choose third party firmware to use.  &lt;a href="http://en.wikipedia.org/wiki/WRT54G"&gt;Here&lt;/a&gt; is a good spot to start looking.  I decided to go with &lt;a href="http://www.thibor.co.uk/"&gt;Thibor's HyperWRT&lt;/a&gt; because it is based on the original firmware and provided all the extra features I wanted.  Check out the &lt;a href="http://www.thibor.co.uk/#features"&gt;feature list&lt;/a&gt;.  Also there are really good directions &lt;a href="http://vonage.nmhoy.net/wrt54gl.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;3. Download the firmware.  Nate at vonage.nmhoy.net recommends version 14 of Thibor.  However it is not clear from his site or the Thibor site which of the version 14 to use for the WRT54GL.  I figured I would go with the latest version.  I can always downgrade to version 14 in the future if I want.  Since I'm upgrading from the stock firmware I downloaded &lt;a href="http://www.thibor.co.uk/files/firmware/Hyperwrt_G_Thibor15c.zip"&gt;this one&lt;/a&gt;.  I verified that the S/N of my WRT54GL started with CL7A or CL7B (mine was CL7B).&lt;br /&gt;&lt;br /&gt;4. Open Amazon box and remove router.  Remove the "Run CD First before connecting cables" sticker.  Kind of scary to completely ignore the directions but I didn't order this router to use the firmware that came with it.&lt;br /&gt;&lt;br /&gt;5. Give the router power and connect it to your computer via a wired connection (I used port #1).  Do not hook it up to your cable modem yet.  That will come later.    &lt;br /&gt;&lt;br /&gt;6. Navigate Internet Explorer (I use Firefox normally, but it is best to be safe) to: http://192.168.1.1.  I had to first do a ipconfig /renew since I was connected to my existing wireless when I started.  Login using blank userid and password: admin.&lt;br /&gt;&lt;br /&gt;7. I started with a factory reset.  Since it is from the factory it seems like that wouldn't been necessary, but once again I figure better safe than sorry.  Go to Administration - Factory Defaults.&lt;br /&gt;&lt;br /&gt;8. Install firmware downloaded above.  Unzip the firmware.  Go to Administration - Firmware Upgrade.  Select the unziped bin file: Hyperwrt_G_Thibor15c.bin.  Be patient and do not interrupt the upload.  Once the upload is complete you should see: "Firmware Version: v4.71.1, Hyperwrt 2.1b1 + Thibor15c" in the upper right hand corner.  Restart Internet explorer to clear out its cache.  Go to Administration - Factory Defaults and select "Clear NVRAM, restore factory defaults".&lt;br /&gt;&lt;br /&gt;9. Setup your router.  Here is what I did:&lt;br /&gt;9a. Administration - Management: Changed password, SSHD enabled, changed SSHD ports, remote management disabled.&lt;br /&gt;9b. Setup - Basic Setup: Changed router name, max DHCP clients: 10, changed to central standard time.  Since I have a cable modem I left it on the default of DHCP.  If you have PPPoE or something else then you will of course have to change this.&lt;br /&gt;9c. Wireless - Basic Wireless Setup: Changed SSID&lt;br /&gt;9d. Wireless - Advanced Wireless Setup: Transmit Power: 67% (I'll try this for now)&lt;br /&gt;9e. Security - Firewall: checked Block Portscans&lt;br /&gt;9f. That's enough to get us started.  I'll be posting more about configuration later.&lt;br /&gt;&lt;br /&gt;10. Add the WRT54GL to your network.  I hooked the WRT54GL router to my cable/dsl modem; hooked the Motorola VT2442 Vonage device to port #1 of the WRT54GL; hooked my wired computers to the WRT54GL and turned everything back on.&lt;br /&gt;&lt;br /&gt;My network is back up and working.  The Vonage phone is working (I have not tested yet with a large file upload in progress).  Its late and I'm going to bed...</content><link rel='replies' type='application/atom+xml' href='http://heifner.blogspot.com/feeds/115724915312964806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9016105&amp;postID=115724915312964806' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/115724915312964806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9016105/posts/default/115724915312964806'/><link rel='alternate' type='text/html' href='http://heifner.blogspot.com/2006/09/10-steps-to-setup-wrt54gl-with-thibors.html' title='10 Steps to setup WRT54GL with Thibor&apos;s HyperWRT'/><author><name>Kevin Heifner</name><uri>https://plus.google.com/102327530330808313601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-30t-aokNiOI/AAAAAAAAAAI/AAAAAAAAANE/VU3BNKd254U/s512-c/photo.jpg'/></author><thr:total>23</thr:total></entry></feed>