<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>General</title><link>http://ryanfarley.com/blog/category/7.aspx</link><description>General</description><managingEditor>Ryan Farley</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Ryan Farley</dc:creator><title>MERGE in SQL 2008</title><link>http://ryanfarley.com/blog/archive/2007/09/12/38120.aspx</link><pubDate>Wed, 12 Sep 2007 07:57:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2007/09/12/38120.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/38120.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2007/09/12/38120.aspx#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38120.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38120.aspx</trackback:ping><description>&lt;P&gt;A co-worker pointed out to me something cool that is coming in SQL 2008. A new keyword for MERGE has been introduced. This new type of statement reduces some of the tedious work you typically do when adding data to a table in SQL. As things are now, you will check for the existence of a row, and then proceed to update the matched row if it exists, or insert the new data if the matching row did not exist. The new MERGE keyword allows you to do this all in a single statement.&lt;/P&gt;
&lt;P&gt;This new MERGE statement reduces the following pseudo code:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: green"&gt;/*
    -- save parent table data
    If Data Indentifier found in Parent Data Table
        Update Data
    Else
        Insert Data
    End

    -- save child table data
    Delete from Child Data Table all items not in Data
    Update Child Data Table with all items in Data
    Insert into Child Data Table all new items in Data
*/&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;To the following:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: green"&gt;/*
    -- save parent table data
    MERGE Data to Parent Data Table

    -- save child table data
    MERGE Data to Chid Data Table
*/&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;Read more: &lt;A href="http://www.sqlservercentral.com/columnists/jSebastian/3122.asp"&gt;SQL Server 2008 - The Power of Merge&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/38120.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>Thanks Dave Burke ;-)</title><link>http://ryanfarley.com/blog/archive/2007/03/07/37318.aspx</link><pubDate>Wed, 07 Mar 2007 07:40:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2007/03/07/37318.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/37318.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2007/03/07/37318.aspx#Feedback</comments><slash:comments>14</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/37318.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/37318.aspx</trackback:ping><description>&lt;P&gt;Dave Burke has a long running series of posts on his blog titled &amp;#8220;CS Bytes&amp;#8221; (&lt;A href="http://dbvt.com/blog/archive/2007/03/07/cs-byte-for-march-7-2007.aspx" target=_blank&gt;example&lt;/A&gt;)&amp;nbsp;and &amp;#8220;CS Nugglets&amp;#8221; (&lt;A href="http://dbvt.com/blog/archive/2007/03/04/cs-nuglet-master-of-my-community-server-color-domain.aspx" target=_blank&gt;example&lt;/A&gt;). If you work with &lt;A href="http://communityserver.org/" target=_blank&gt;Community Server&lt;/A&gt; at all, you've probably found that these posts are pure gold. Completely invaluable information that I look forward to every day. I'm not sure I'd enjoy working with Community Server as much without Dave taking the time to gather all the best CS info for me ;-)&lt;/P&gt;
&lt;P&gt;I have two new CS sites on the verge of going live. One a product site for an addon for the great CRM software &lt;A href="http://www.saleslogix.com/"&gt;SalesLogix&lt;/A&gt;&amp;nbsp;called &lt;A href="http://outlook2crm.com/" target=_blank&gt;Outlook2CRM&lt;/A&gt;, and another for a user community site for professionals working with SalesLogix, called &lt;A href="http://goodtraining.com/" target=_blank&gt;Good Training&lt;/A&gt;.&amp;nbsp;Having worked with CS to build and customize these sites, I look forward to the great info collected by Dave every day (and the helpful people who post the stuff in the first place!)&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://dbvt.com/blog/archive/tags/Community+Server/default.aspx" target=_blank&gt;Take a look at Dave's Community Server related posts&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks for your help Dave! Long live CS Bytes and CS Nugglets!&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/37318.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>A new Level of Geekdom and a Childhood Dream</title><link>http://ryanfarley.com/blog/archive/2007/01/21/37178.aspx</link><pubDate>Sun, 21 Jan 2007 14:30:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2007/01/21/37178.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/37178.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2007/01/21/37178.aspx#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/37178.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/37178.aspx</trackback:ping><description>&lt;P&gt;My son, Trapper, just had his 9th birthday party this weekend. I had my friend, Neil (&lt;A href="http://www.kungfootrooper.com/" target=_blank&gt;kungfootrooper.com&lt;/A&gt;) come, who just completed his new Darth Vader costume to give the boys something to gawk over. Even though I knew it was my fiend Neil underneath I can't even describe how powerful and awe-inspiring it was to be in the presence of Darth Vader. Neil is a big guy and makes a really menacing Darth Vader. It was an indescribable feeling and felt like the fulfillment of a childhood dream to stand next to Darth Vader, up close and in person.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://files.farleyzone.com/images/ryan-vader.png" border=0&gt;&lt;/P&gt;
&lt;P&gt;The picture does not do it justice but it will be a memorable experience. Thanks Neil. BTW, Neil just recently marched in the Rose Bowl parade in CA as a Storm Trooper and even got to meet George Lucas. Neil is &lt;A href="http://kungfootrooper.com/outpost/archive/2007/01/13/37152.aspx" target=_blank&gt;documenting it on kungfootrooper.com&lt;/A&gt;.&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/37178.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>New GreatNews Style</title><link>http://ryanfarley.com/blog/archive/2006/12/01/36716.aspx</link><pubDate>Fri, 01 Dec 2006 08:01:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/12/01/36716.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/36716.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/12/01/36716.aspx#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/36716.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/36716.aspx</trackback:ping><description>&lt;P&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/12/05/13453.aspx"&gt;I've mentioned my love for my RSS aggregator before&lt;/A&gt;, &lt;A href="http://www.curiostudio.com/"&gt;GreatNews&lt;/A&gt;. This week I came across a new user-submitted style for GreatNews called Web-2-Zero, created by Jorwa. This is a great looking style and is very pleasing to the eye - despite the name ;-)&lt;/P&gt;
&lt;P&gt;Take a look:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://files.farleyzone.com/images/web2zero-style.png" border=0&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://jowra.com/journal/2006/08/greatnews-style-web-2-zero/" target=_blank&gt;Download Jorwa's Web-2-Zero GreatNews Style&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;There's a couple of things I didn't quite like about this style so I'm posting my own revised copy. The style posted by Jorwa was set to overflow into 2 columns, which is great for newspaper views, but for how I like to read (which is often posts with source code in them)&amp;nbsp;I want to see the text in the full width, so I removed that. Jorwa's style also removed images from the text, again optimized for a newspaper view. I removed that as well. I also added a line after each post to separate each post when in a newspaper view and did a little different treatment for comments.&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=download&gt;&lt;A href="http://files.farleyzone.com/downloads/web-2-zero-mod.zip"&gt;Download my modified Web-2-Zero GreatNews Style&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Speaking of GreatNews. I still love it as much as ever. I did test out the new Jubilee build of RSS Bandit this week. While it does have some great features and looks nice, you just can beat the speed of GreatNews. RSS Bandit felt a bit sluggish in comparison. Keep up the great work Jack!&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/36716.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>Accessing the Windows RSS Platform with C#</title><link>http://ryanfarley.com/blog/archive/2006/10/24/35190.aspx</link><pubDate>Tue, 24 Oct 2006 09:54:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/10/24/35190.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/35190.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/10/24/35190.aspx#Feedback</comments><slash:comments>16</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/35190.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/35190.aspx</trackback:ping><description>&lt;P&gt;Internet Explorer 7 introduced the Windows RSS Platform. The Windows RSS Platform will be a core part of Windows Vista, but with IE7 it is now avilable on XP as well. The new&amp;nbsp;functionality in IE7&amp;nbsp;to consume RSS feeds is&amp;nbsp;made capable by the Windows RSS platform. This new functionality exists in Outlook 2007 also, giving you the ability to consume RSS feeds in Outlook folders ala Newsgator style, which can also synchronize with the Windows RSS Platform.&lt;/P&gt;
&lt;P&gt;What makes this all so cool is that you now have the ability to have a single common store for subscribed RSS feeds. Well, this is the goal I suppose, although it will take some time for RSS Reader vendors to switch over - if that ever happens. Newsgator/FeedDemon has a utility for synching the Newsgator online feed store with the Windows RSS Platform.&lt;/P&gt;
&lt;P&gt;Accessing the Windows RSS Platform is a simple task. The RSS Platform is exposed by a COM-based API found in msfeeds.dll (in the System32 directory). Add a reference to the COM dll and add a using directive for the namespace in the generated interop assembly and it's all easy work to use. Although, do keep in mind that this is a COM based reference so you'll need to take care to properly release all objects.&lt;/P&gt;
&lt;P&gt;Let's say we want to populate a TreeView control with the feeds found in the local RSS store. An easy enough task, take a look:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; System.Runtime.InteropServices;
&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; Microsoft.Feeds.Interop;
&lt;SPAN style="COLOR: green"&gt;//..
&lt;/SPAN&gt;
&lt;SPAN style="COLOR: blue"&gt;private void&lt;/SPAN&gt; loadFeeds()
{
    TreeNode rootnode &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; treeView1.Nodes.Add(&lt;SPAN style="COLOR: #008080"&gt;"Feeds"&lt;/SPAN&gt;);
    IFeedsManager feedmgr &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
    IFeedFolder rootfolder &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;

    &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;
    {
        &lt;SPAN style="COLOR: green"&gt;// instanciate a new FeedManager
&lt;/SPAN&gt;        feedmgr &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; FeedsManagerClass();
        
        &lt;SPAN style="COLOR: green"&gt;// get reference to the root feed store folder
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: green"&gt;// there is always a root 
&lt;/SPAN&gt;        rootfolder &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; (IFeedFolder)feedmgr.RootFolder;

        &lt;SPAN style="COLOR: green"&gt;// call method to recursively add subfolders and feeds to treeview
&lt;/SPAN&gt;        addNode(rootnode, rootfolder);
        treeView1.ExpandAll();
    }
    &lt;SPAN style="COLOR: blue"&gt;finally&lt;/SPAN&gt;
    {
        Marshal.ReleaseComObject(rootfolder);
        Marshal.ReleaseComObject(feedmgr);
    }
}
&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; addNode(TreeNode parentnode, IFeedFolder folder)
{
    &lt;SPAN style="COLOR: green"&gt;// check to see if the current folder has subfolders
&lt;/SPAN&gt;    &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (folder.Subfolders !&lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
    {
        &lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt; (IFeedFolder subfolder &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; (IFeedsEnum)folder.Subfolders)
        {
            TreeNode foldernode &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; parentnode.Nodes.Add(subfolder.Name);
            &lt;SPAN style="COLOR: green"&gt;// recursively add subfolders under current folder
&lt;/SPAN&gt;            addNode(foldernode, subfolder);
        }
    }
    
    &lt;SPAN style="COLOR: green"&gt;// if current folder has feeds add them under the folder node
&lt;/SPAN&gt;    &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (folder.Feeds !&lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
    {
        &lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt; (IFeed feed &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; (IFeedsEnum)folder.Feeds)
        {
            TreeNode feednode &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; parentnode.Nodes.Add(feed.Name);
            feednode.Tag &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; feed;
        }
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Once you've gotten the list of feeds it is just as easy to get the items from a feed. In the example above I placed a reference to the feed in the tag of the TreeNode objects. Let's grab that on the TreeView's AfterSelect event and get the items from the feed to fill a ListView.&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
    listView1.Items.Clear();
    &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (e.Node.Tag !&lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
    {
        IFeed feed &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; e.Node.Tag as IFeed;
        &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (feed !&lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
        {
            &lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt; (IFeedItem item &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; (IFeedsEnum)feed.Items)
            {
                ListViewItem li &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; ListViewItem();
                li.Text &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; item.Title;
                li.SubItems.Add(item.PubDate.ToShortDateString());
                &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (!item.IsRead) li.Font &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Font(li.Font, FontStyle.Bold);

                li.Tag &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; item;
                listView1.Items.Add(li);
            }
        }
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So now as a last task, when an item in the ListView is selected let's display the text for the item in a webbrowser control.&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; listView1_SelectedIndexChanged(object sender, EventArgs e)
{
    &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (listView1.SelectedItems.Count &amp;gt; 0 &amp;amp;&amp;amp; listView1.SelectedItems[0].Tag !&lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
    {
        ListViewItem li &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; listView1.SelectedItems[0];
        IFeedItem item &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; li.Tag as IFeedItem;
        &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (item !&lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
        {
            &lt;SPAN style="COLOR: green"&gt;// let's mark the item as read
&lt;/SPAN&gt;            item.IsRead &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;
            li.Font &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Font(li.Font, FontStyle.Regular);
            
            &lt;SPAN style="COLOR: green"&gt;// set the item's text in the webbrowser
&lt;/SPAN&gt;            webBrowser1.DocumentText &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; item.Description;
        }
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So, that's easy enough. Just as easy to do other things as well, such as add a new feed to the local store.&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; addRyanFarleysFeed() &lt;SPAN style="COLOR: green"&gt;// ;-)
&lt;/SPAN&gt;{
    IFeedsManager feedmgr &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
    IFeedFolder rootfolder &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
    IFeedFolder folder &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
    IFeed feed &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
    
    &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;
    {
        &lt;SPAN style="COLOR: green"&gt;// instanciate a new FeedManager
&lt;/SPAN&gt;        feedmgr &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; FeedsManagerClass();
        
        &lt;SPAN style="COLOR: green"&gt;// get reference to the root feed store folder
&lt;/SPAN&gt;        rootfolder &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; (IFeedFolder)feedmgr.RootFolder;

        &lt;SPAN style="COLOR: green"&gt;// if we wanted to add the feed to an existing folder in the store
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: green"&gt;// we could use the following (for example, if we wanted to store
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: green"&gt;// the feed in a folder called "My Feeds")
&lt;/SPAN&gt;        folder &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; (IFeedFolder)rootfolder.GetSubFolder(&lt;SPAN style="COLOR: #008080"&gt;"My Feeds"&lt;/SPAN&gt;);
        
        &lt;SPAN style="COLOR: green"&gt;// if you didn't want to add it in a subfolder (ie: in the root instead)
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: green"&gt;// then you'd just use the reference to the root folder
&lt;/SPAN&gt;        
        feed &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; (IFeed)folder.CreateFeed(&lt;SPAN style="COLOR: #008080"&gt;"{ public virtual blog; }"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #008080"&gt;"http://ryanfarley.com/blog/rss.aspx"&lt;/SPAN&gt;);
        &lt;SPAN style="COLOR: green"&gt;// now force an async download of the items in the feed
&lt;/SPAN&gt;        feed.AsyncDownload();
    }
    &lt;SPAN style="COLOR: blue"&gt;finally&lt;/SPAN&gt;
    {
        Marshal.ReleaseComObject(feed);
        Marshal.ReleaseComObject(folder);
        Marshal.ReleaseComObject(rootfolder);
        Marshal.ReleaseComObject(feedmgr);
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So now in the course of about 10 minutes you've created your own simple RSS Reader that uses the Windows RSS Platform as the backend. Here's a screenshot of the sample I threw together using the same code I outlined above:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://files.farleyzone.com/images/rssreader.jpg" target=_blank&gt;&lt;IMG src="http://files.farleyzone.com/images/rssreader_th.jpg" border=0&gt;&lt;BR&gt;&lt;I&gt;(click for larger view)&lt;/I&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There's a whole lot more the Feed API can do, including downloading enclosures and more.&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/feedsapi/rss/overviews/msfeeds_ovw.asp" target=_blank&gt;View the Feed API Documentation for the Windows RSS Platform on MSDN&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/35190.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>Meet My New Favorite Text Editor</title><link>http://ryanfarley.com/blog/archive/2006/10/09/34249.aspx</link><pubDate>Mon, 09 Oct 2006 16:26:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/10/09/34249.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/34249.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/10/09/34249.aspx#Feedback</comments><slash:comments>18</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/34249.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/34249.aspx</trackback:ping><description>&lt;P&gt;I've been a long time fan of &lt;A href="http://www.textpad.com/" target=_blank&gt;TextPad&lt;/A&gt;. I live by my text editor. My text editor is probably one of the most highly used applications on my pc. Seriously. TextPad has been great and I've always loved it. I decided on TextPad years ago after I grew dissatisfied with &lt;A href="http://www.ultraedit.com/" target=_blank&gt;UltraEdit&lt;/A&gt;, I've tried a few others along the way, such as &lt;A href="http://www.flos-freeware.ch/notepad2.html" target=_blank&gt;Notepad2&lt;/A&gt;, but none would compare to my favorite TextPad. Funny thing is, I wasn't looking for a new text editor, but I came across a new one today that I had not heard of before and I decided to give it a try.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Enter Twistpad&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://files.farleyzone.com/images/twistpad.jpg" border=0&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://www.carthagosoft.net/twistpad/twistpadScreens.htm" target=_blank&gt;View more Twistpad screenshots&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Twistpad is an awesome text editor. It would have to be to get me to decide to move away from TextPad. Complete with syntax highlighting, plugin support, collapsable text blocks ala Visual Studio regions, code snippets &amp; template support, a built in clipboard ring, and a whole lot more.&lt;/P&gt;
&lt;P&gt;So what made me decide to switch? Well, one thing for sure, Twistpad is a really great looking app. It has a very Visual Studio looking UI, and I do like that. A lot. However, some of my favorite features are: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.carthagosoft.net/twistpad/tp_sc_10.png" target=_blank&gt;Collapsable sections (outline blocks)&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.carthagosoft.net/twistpad/tp_sc_6.png" target=_blank&gt;The way it handles searches&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.carthagosoft.net/twistpad/tp_sc_16.png" target=_blank&gt;Auto-complete&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.carthagosoft.net/twistpad/tp_sc_18.png" target=_blank&gt;Color syntax-highlighting printing&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.carthagosoft.net/twistpad/tp_sc_19.png" target=_blank&gt;File compares&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://www.carthagosoft.net/twistpad/tp_sc_22.png" target=_blank&gt;Word-style spell checking&lt;/A&gt; 
&lt;LI&gt;Very well thought-out and designed. It makes sense and it's layout is how you would expect a text editor to be 
&lt;LI&gt;Did I mention how great it looks. I am just loving the VS look and feel&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;DIV class=link&gt;&lt;A href="http://www.carthagosoft.net/twistpad/index.htm" target=_blank&gt;Visit the Twistpad site&lt;/A&gt;&lt;/DIV&gt;&lt;/P&gt;
&lt;P&gt;All in all, I am loving my new text editor. I have to say I didn't think the day would ever come that I would move away from TextPad. So far I love what I see. Sure there are some things that are missing, such as unicode support (coming in the next version) and maybe a shell extension to get better context menu support in Windows, but all in all I am happy.&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/34249.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>Awesome Command-Prompt Replacement</title><link>http://ryanfarley.com/blog/archive/2006/09/01/30742.aspx</link><pubDate>Fri, 01 Sep 2006 21:13:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/09/01/30742.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/30742.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/09/01/30742.aspx#Feedback</comments><slash:comments>16</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/30742.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/30742.aspx</trackback:ping><description>&lt;P&gt;I was catching up on some Scott Hanselman posts today after going through &lt;A href="http://www.hanselman.com/blog/ScottHanselmans2006UltimateDeveloperAndPowerUsersToolListForWindows.aspx" target=_blank&gt;Scott's new Utilmate Tools&lt;/A&gt; list (which is a great list) and came accross &lt;A href="http://www.hanselman.com/blog/ABetterPROMPTForCMDEXEOrCoolPromptEnvironmentVariablesAndANiceTransparentMultiprompt.aspx" target=_blank&gt;Scott's post on Console&lt;/A&gt;. Wow. I am in love. &lt;A href="http://ryanfarley.com/blog/archive/2004/03/25/470.aspx"&gt;I've always been a big command-prompt junkie&lt;/A&gt; and this app is the cat's meow. A tabbed console windows app with better support for copy/paste and so much more. &lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://files.farleyzone.com/images/console_screenshot.jpg" border=0&gt;&lt;/P&gt;
&lt;P&gt;How is it that Scott always find out about these kinds of awesome apps. This one is worth using for sure. I'm on the 2.0 beta build 125. I have mine with tabs for loading the VS 2005 &amp; VS 2003 environment vars on separate tabs and a few other custom ones for setting environment vars as well.&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://sourceforge.net/projects/console" target=_blank&gt;Visit the Source Forge Console home to download&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/30742.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>If IT had been Responsible for the Creation</title><link>http://ryanfarley.com/blog/archive/2006/08/23/28249.aspx</link><pubDate>Wed, 23 Aug 2006 07:44:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/08/23/28249.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/28249.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/08/23/28249.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/28249.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/28249.aspx</trackback:ping><description>&lt;P&gt;&lt;A href="http://www.simple-talk.com/author/phil-factor/" target=_blank&gt;Phil Factor&lt;/A&gt; had a great post where he spins the creation of the world as an IT project. A really amusing read.&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;"Art thou sure of meeting the aggressive six-day schedule for this project, verily??"&lt;/P&gt;
&lt;P&gt;The smartly-clad angels looked nervously around for a spokesman. After a moment, a well-groomed executive angel stepped forward.&lt;/P&gt;
&lt;P&gt;"We have, er...hath..., a total commitment to quality delivery of an effective solution"&lt;/P&gt;
&lt;P&gt;"...meaning?"&lt;/P&gt;
&lt;P&gt;"Our mission is to achieve total excellence in meeting the timescales for delivery of the project to the defined and agreed scope".&lt;/P&gt;
&lt;P&gt;"Quality...excellence...", harmonised the assembled IT angels, upon hearing this confirmation of their mission statement, and rustled their feathered-wings to signal their commitment and solidarity.&lt;/P&gt;
&lt;P&gt;"..and we're all clear on the project deliverables?" asked God. "Being more of the instinctive sort of executive, I realise I may have been heavy on the overall project vision...you know 'let there be light', and that sort of stuff...and light on the practicalities. I'm not really a detail person. That's why I delegate that sort of thing to you. I can appreciate that this is really a logistics and facilities-management issue but, we're 5 days in to a 6-day project and exploding two-headed donkeys at this stage make me rather nervous."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://www.simple-talk.com/opinion/opinion-pieces/if-it-had-been-responsible-for-the-creation/" target=_blank&gt;Read the entire article: If IT had been Responsible for the Creation&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/28249.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>More Null-Coalescing (??) Operator Love</title><link>http://ryanfarley.com/blog/archive/2006/08/22/28112.aspx</link><pubDate>Tue, 22 Aug 2006 13:21:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/08/22/28112.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/28112.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/08/22/28112.aspx#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/28112.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/28112.aspx</trackback:ping><description>&lt;P&gt;&lt;A href="http://ryanfarley.com/blog/archive/2006/08/10/27196.aspx"&gt;I last posted about the null coalescing operator&lt;/A&gt; in .NET 2.0 and just had to post a follow up. I came accross a post on Born 2 Code .NET (&lt;A href="http://bloggingabout.net/blogs/dennis/archive/2006/08/15/Advanced-usage-of-the-_3F003F00_-operator.aspx" target=_blank&gt;via Dennis van der Stelt&lt;/A&gt;) where several examples of ?? syntactic sugar are listed to demonstrate how the null coalescing operator surpasses the ternary conditional operator (?:) and if constructs as far as usefulness and readability. &lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;Take a look at &lt;A href="http://born2code.net/?p=50" target=_blank&gt;?? Operator, Part II&lt;/A&gt; (&lt;A href="http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=nl_en&amp;amp;url=http%3A%2F%2Fborn2code.net%2F%3Fp%3D50" target=_blank&gt;Babelfish - Dutch to English Translation&lt;/A&gt;)&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Here's a great sample from the post:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; Brush BackgroundBrush
{
    &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;
    {
        &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; _backgroundBrush ??
        (
            _backgroundBrush &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; GetBackgroundBrushDefault()
        );
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Which translates to (using a traditional if construct)&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; Brush BackgroundBrush
{
    &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;
    {
        &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (_backgroundBrush == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)
        {
            _backgroundBrush &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; GetBackgroundBrushDefault();
        }
        &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; _backgroundBrush;
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;The idea here is that the ?? is evaluated first before the return, causing the assignment to occur in the case when the _backgroundBrush variable is null. That is just plain cool. Make sure you check out the link to the post on Born 2 Code .NET for more examples. Also check out Jon Skeet's post on doing elegant comparisons using the null coalescing operator as well.&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://msmvps.com/blogs/jon.skeet/archive/2006/07/28/106119.aspx" target=_blank&gt;Elegant comparisons with the null coalescing operator&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/28112.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Ryan Farley</dc:creator><title>Null-Coalescing Operator in .NET 2.0</title><link>http://ryanfarley.com/blog/archive/2006/08/10/27196.aspx</link><pubDate>Thu, 10 Aug 2006 13:52:00 GMT</pubDate><guid>http://ryanfarley.com/blog/archive/2006/08/10/27196.aspx</guid><wfw:comment>http://ryanfarley.com/blog/comments/27196.aspx</wfw:comment><comments>http://ryanfarley.com/blog/archive/2006/08/10/27196.aspx#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/27196.aspx</wfw:commentRss><trackback:ping>http://ryanfarley.com/blog/services/trackbacks/27196.aspx</trackback:ping><description>&lt;P&gt;I blogged two years ago (See &lt;A href="http://ryanfarley.com/blog/archive/2004/05/18/679.aspx"&gt;Nullable Value Types and the New ? Syntax&lt;/A&gt;, and &lt;A href="http://ryanfarley.com/blog/archive/2004/05/25/726.aspx"&gt;More on Nullable Value Types&lt;/A&gt;)&amp;nbsp;about the new nullable operator in .NET 2.0 (wow, was that really 2 whole years ago? Time flies.). Since then, I waited patiently for it's arrival. Ever since .NET 2.0 came out I've been wanting to return and blog about it again.&lt;/P&gt;
&lt;P&gt;Here's a recap on the Null-Coalescing operator. It is a cleaner replacement for ternary conditional operator &lt;FONT face="Courier New"&gt;?:&lt;/FONT&gt; and has some additional uses as well. Think of the SQL Coalesce function (or IsNull). It is a lot like that. It gives you the first non-null between the two as SQL Coalesce does, but it doesn't allow multiple conditions to be checked as SQL Coalesce does (unless you chain them together). If the left-side is null, it gives you the right side. The right side could be considered your &amp;#8220;default&amp;#8220; in case the value on the left is null for some cases. I've always been a fan of using &lt;FONT face="Courier New"&gt;?:&lt;/FONT&gt; but there was something about needing to, at times, repeat variables in the statement. Here's a sample of what I am talking about:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; name &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; getName();
Console.WriteLine(name == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; ? &lt;SPAN style="COLOR: #008080"&gt;"No name"&lt;/SPAN&gt; : name);&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For as much as I love using &lt;FONT face="Courier New"&gt;?:&lt;/FONT&gt;&amp;nbsp;I've just never liked having to specify the variable name twice in that line. Not a huge deal, but things are even better using the null-coalescing operator in this scenario:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; name &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; getName();
Console.WriteLine(name  ?? &lt;SPAN style="COLOR: #008080"&gt;"No name"&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Much nicer. Gives you the same warm-fuzzy feelings you get from the SQL Coalesce function, doesn't it? It get's even better as you think of the possibilities you have using the new &lt;FONT face="Courier New"&gt;??&lt;/FONT&gt; operator. What previously would have been this (with the &lt;FONT face="Courier New"&gt;?:&lt;/FONT&gt; operator)&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;Customer customer &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; Broker.GetCustomer(id);
&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (customer == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;) customer &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Customer();&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Now becomes this:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;Customer customer &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; Broker.GetCustomer(id) ?? &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Customer();&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I feel the love. But don't forget about nullable types. Nullable types in .NET 2.0 allow you to use a use a value type that can essentially be null. For example, if you have an int, bool, or other value type, it is either uninitialized or a value. Never null. But what if you wanted/needed to indicate null for a value type? A nullable value type is declared with a &lt;FONT face="Courier New"&gt;?&lt;/FONT&gt; following the type. Let's take a look at a nullable int. &lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; GetInt()
{
    &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;? id &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
    &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; id ?? -1;
}
&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Ever since .NET 2.0 came out I've wondered why I don't see more of this syntax around. From everything I come accoss I don't find this very often. Maybe people are still getting used to it, but it sure is some cool stuff IMO.&lt;/P&gt;&lt;img src ="http://ryanfarley.com/blog/aggbug/27196.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>