<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Smallegan.com &#187; Misc</title>
	<atom:link href="http://www.smallegan.com/blog/category/misc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smallegan.com/blog</link>
	<description>Geeks rule the world.</description>
	<lastBuildDate>Tue, 27 Dec 2011 21:00:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Someone has been eating skittles..</title>
		<link>http://www.smallegan.com/blog/2007/10/03/someone-has-been-eating-skittles/</link>
		<comments>http://www.smallegan.com/blog/2007/10/03/someone-has-been-eating-skittles/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 17:16:51 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=110</guid>
		<description><![CDATA[This was taken from my basement window a couple of nights ago. If you are familiar with the area you will quickly realize that isn&#8217;t any ol house that rainbow is landing on. That would be Adrian&#8217;s house. He claims that he wasn&#8217;t eating skittles but also muttered something about not being able to find [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm2.static.flickr.com/1411/1477437807_0db25bf657.jpg?v=0" /> This was taken from my basement window a couple of nights ago. If you are familiar with the area you will quickly realize that isn&#8217;t any ol house that rainbow is landing on. That would be <a href="http://www.virtualadrian.com">Adrian&#8217;s</a> house. He claims that he wasn&#8217;t eating skittles but also muttered something about not being able to find his lucky charms.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2007/10/03/someone-has-been-eating-skittles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I just have to do it!!</title>
		<link>http://www.smallegan.com/blog/2007/08/13/i-just-have-to-do-it/</link>
		<comments>http://www.smallegan.com/blog/2007/08/13/i-just-have-to-do-it/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 15:24:14 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=100</guid>
		<description><![CDATA[100th post!!!! Wahoo!!!! &#8230;in other sad news this is only my 44th post this year&#8230;I should be at over 150 posts to hit my goal&#8230; :-\]]></description>
			<content:encoded><![CDATA[<p>100th post!!!! Wahoo!!!! <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  &#8230;in other sad news this is only my 44th post this year&#8230;I should be at over 150 posts to hit my goal&#8230; :-\</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2007/08/13/i-just-have-to-do-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very Impressive!</title>
		<link>http://www.smallegan.com/blog/2007/04/29/very-impressive/</link>
		<comments>http://www.smallegan.com/blog/2007/04/29/very-impressive/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 01:31:37 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=80</guid>
		<description><![CDATA[As a follow up post I thought I would mention that it handled all of the resampling of the images for me so I don&#8217;t have to worry about having huge files posted up on the blog. Here is another slightly larger test. Also I am including a test of the mapping feature it has [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow up post I thought I would mention that it handled all of the resampling of the images for me so I don&#8217;t have to worry about having huge files posted up on the blog. Here is another slightly larger test.</p>
<p><a href="http://www.smallegan.com/blog/wp-content/uploads/2007/04/windowslivewriterveryimpressive-12eaadesert-landscape2.jpg" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="350" src="http://www.smallegan.com/blog/wp-content/uploads/2007/04/windowslivewriterveryimpressive-12eaadesert-landscape-thumb.jpg" width="462" border="0"/></a> </p>
<p>Also I am including a test of the mapping feature it has included.</p>
<div class="wlWriterSmartContent" id="84E294D0-71C9-4bd0-A0FE-95764E0368D9:33e545a0-e01b-43c8-92e6-24480a444f75" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><a href="http://local.live.com/default.aspx?v=2&amp;cp=42.9666~-85.6712&amp;lvl=13&amp;style=r" id="map-1b90aa48-c97f-48b9-a1c7-5614b7d19dda" alt="Click to view this map on Live.com" title="Click to view this map on Live.com"><img src="http://www.smallegan.com/blog/wp-content/uploads/2007/04/windowslivewriterveryimpressive-12eaamapa43c73ff8c69.jpg" width="320" height="240"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2007/04/29/very-impressive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Live Writer (Beta)</title>
		<link>http://www.smallegan.com/blog/2007/04/29/windows-live-writer-beta/</link>
		<comments>http://www.smallegan.com/blog/2007/04/29/windows-live-writer-beta/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 01:26:59 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=76</guid>
		<description><![CDATA[I am writing this post using Windows Live Writer (Beta) and I am pretty impressed. If you have a blog I suggest you go out and give it a shot! I am dropping a piece of windows clipart on here to see how it handles the file upload. Here goes nothing!]]></description>
			<content:encoded><![CDATA[<p>I am writing this post using <a href="http://get.live.com/betas/writer_betas">Windows Live Writer (Beta)</a> and I am pretty impressed. If you have a blog I suggest you go out and give it a shot! I am dropping a piece of windows clipart on here to see how it handles the file upload. Here goes nothing!</p>
<p><a href="http://www.smallegan.com/blog/wp-content/uploads/2007/04/windowslivewriterwindowslivewriterbeta-12d9b00261.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" src="http://www.smallegan.com/blog/wp-content/uploads/2007/04/windowslivewriterwindowslivewriterbeta-12d9b002-thumb41.jpg" width="240" border="0"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2007/04/29/windows-live-writer-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All Done</title>
		<link>http://www.smallegan.com/blog/2007/04/24/all-done/</link>
		<comments>http://www.smallegan.com/blog/2007/04/24/all-done/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 03:00:04 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[School]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=71</guid>
		<description><![CDATA[Done seems to describe most things that are going on right now. So here is my done list: Done working at Tiara Yachts &#8211; Spent last year working as a developer there and decided it was time to move on because another opportunity came knocking. Done with my Masters of Computer Information Systems program at [...]]]></description>
			<content:encoded><![CDATA[<p>Done seems to describe most things that are going on right now.</p>
<p>So here is my done list:</p>
<ul>
<li><strong>Done working at Tiara Yachts</strong> &#8211; Spent last year working as a developer there and decided it was time to move on because another opportunity came knocking.</li>
<li><strong>Done with my Masters of Computer Information Systems program at GVSU!</strong> &#8211; Sadly it has taken me nearly as long to get my Masters as it did for me to get my Bachelors! But after 18 years of nearly continous schooling I am finally calling it quits! I don&#8217;t see myself doing a PhD at this point in my life so maybe I will revisit education when I start going gray.</li>
<li><strong>Done teaching CISP220 at Davenport University</strong> &#8211; I really enjoyed teaching the class and I have been asked to teach an accelerated database design class there this spring/summer.</li>
</ul>
<p>Those are the big 3! but I have decided with them I woud like to be done with some smaller health focused things in life such as:</p>
<ul>
<li><strong>Mt. Dew Addiction</strong> &#8211; Should be easier to justify giving up (to myself) now that I don&#8217;t have to stay awake in class.</li>
<li><strong>Fast Food</strong> &#8211; Once again running to class after work alway gave me an excuse to grab a burger!</li>
<li><strong>Sedentary Lifestyle</strong> &#8211; No homework should be a big help with this one!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2007/04/24/all-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading List</title>
		<link>http://www.smallegan.com/blog/2007/01/24/reading-list/</link>
		<comments>http://www.smallegan.com/blog/2007/01/24/reading-list/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 19:58:56 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=63</guid>
		<description><![CDATA[So Dan Woolston is calling people out asking for their reading list. Well there you have it. The Giving Tree by Shel Silverstein is a classic. A little above my reading level but I have google definitions to get me through it. In all honesty I haven&#8217;t been doing much reading. I do however have [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ec2.images-amazon.com/images/P/0060256656.01._AA240_SCLZZZZZZZ_.jpg" alt="" align="left"/>So Dan Woolston is calling people out asking for their reading list. Well there you have it. The Giving Tree by Shel Silverstein is a classic. A little above my reading level but I have google definitions to get me through it. In all honesty I haven&#8217;t been doing much reading. I do however have a bunch of books sitting on my shelf that I should be reading. I will get to making a list of those later. I find myself browsing Digg, MSDN, Engadget, etc.. when I have free time. I also find when I try to sit down with one of these books I want to read I will hit a sentence that makese me think of an entirely new topic and I go off on a tangent. Usually I start goolging whatever it is I am thinking about so I am going to make an effort to read without a computer nearby. I will let you know how that turns out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2007/01/24/reading-list/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hogan flaunts his daugther&#8230;</title>
		<link>http://www.smallegan.com/blog/2006/10/26/hogan-flaunts-his-daugther/</link>
		<comments>http://www.smallegan.com/blog/2006/10/26/hogan-flaunts-his-daugther/#comments</comments>
		<pubDate>Thu, 26 Oct 2006 14:49:15 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=51</guid>
		<description><![CDATA[I am trying to figure out what must be going through his head as he holds his hand out as to serve his daughter to the world. Dude she isn&#8217;t a piece of @$$&#8230;.she is your daughter&#8230;]]></description>
			<content:encoded><![CDATA[<p>I am trying to figure out what must be going through his head as he holds his hand out as to serve his daughter to the world.<br />
<img src="images/hogan/hogan1.jpg"/> <img src="images/hogan/hogan2.jpg"/><br />
Dude she isn&#8217;t a piece of @$$&#8230;.she is your daughter&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2006/10/26/hogan-flaunts-his-daugther/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DNS Based Service Discovery (DNSSD)</title>
		<link>http://www.smallegan.com/blog/2005/06/09/dns-based-service-discovery-dnssd/</link>
		<comments>http://www.smallegan.com/blog/2005/06/09/dns-based-service-discovery-dnssd/#comments</comments>
		<pubDate>Fri, 10 Jun 2005 01:22:53 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=28</guid>
		<description><![CDATA[So lately I have been doing a lot of research into DNSSD. Here are my findings including but not limited to an explanation of what DNSSD is, how it can be used in .NET development with code samples, and a list of external resources.]]></description>
			<content:encoded><![CDATA[<p>So lately I have been doing a lot of research into DNSSD. Here are my findings including but not limited to an explanation of what DNSSD is, how it can be used in .NET development with code samples, and a list of external resources. <span id="more-28"></span></p>
<p><b>What is DNSSD?</b><br />
In the simplest terms DNSSD is a method of service discovery that is based upon one of the most well known and widely used lookup protocols.  DNSSD is robust enough that if setup properly it could have a use on the internet. However I am only going to be discussing LAN usage where DNSSD truly shines.</p>
<p><b>Zeroconf</b><br />
DNSSD is most widely known as one of the major components of Zeroconf networking. Zeroconf networking is a set of technologies that allow two or more computers to communicate with each other without any external configuration. Zeroconf is a whole different topic though that hopefully we can cover later. If you would like more information about Zeroconf check out <a href="http://www.zeroconf.org">http://www.zeroconf.org</a>. It isn&#8217;t the most exciting read but it is all there!</p>
<p><b>Why use DNSSD?</b><br />
Service Discovery is an interesting problem that usually goes something like this. You have an application that is capable of communicating P2P(Chat, File Sharing, Printer Sharing, Distributed Computing). It is a non-standard application (possibly only for your own personal or corporate use) so you don&#8217;t want or need to get a TCP port set aside. A number of machines are going to be running this application and there is a need to dynamically discover which machines these are and on what port they are expecting to communicate with their peers.</p>
<p>The first thought that generally comes to mind is to set aside one machine to act as a registration server that all of the peers running the application occasionally ping to inform the server that they are online. Although this method works very well in many instances it turns a decentralized p2p system into a semi-centralized p2p system. Meaning that if the &#8220;server&#8221; went offline the P2P &#8220;sessions&#8221; currently in progress would continue to work however no new &#8220;sessions&#8221; could be initiated without the help of the registration server.</p>
<p>DNSSD with the help of multicast DNS is able to clear up this issue. As defined on multicastdns.org &#8220;Multicast DNS is a way of using familiar DNS programming interfaces, packet formats and operating semantics, in a small network where no conventional DNS server has been installed.&#8221; DNSSD is not dependant on the multicast DNS technology, meaning service discovery with DNSSD can be done with a traditional DNS server setup however we must use the multicast DNS technology in order to eliminate the need for a DNS server in our quest for decentralization.</p>
<p><b>How do you implement DNSSD?</b><br />
Although DNSSD is not just an Apple technology it is well known that Apple is the largest advocate and implementer of DNSSD and Zeroconf technology. For this reason Apple is the single greatest resource for DNSSD development.</p>
<p><b>Apple&#8217;s Bonjour</b><br />
Bonjour is a Apple&#8217;s answer to Zeroconf management. It provides a framework for using DNSSD and it is where I have done most of my experimentation with DNSSD. Bonjour offers a version for Windows as well as a Windows SDK.</p>
<p><b>Example #1</b><br />
The first example that I am going to give shows how to use the console application that you can find at c:\program files\bonjour sdk\samples\c\dns-sd.exe once you install the Bonjour SDK for Windows.</p>
<p>Execute the following commands as shown below in a dos prompt.</p>
<p> <a href="http://www.smallegan.com/blog/images/dnssd/ss1.jpg"><img width="400" src="http://www.smallegan.com/blog/images/dnssd/ss1.jpg"/><br />click for larger view</a></p>
<p>Keep your command prompt open. Now if you have iTunes on another machine on the same LAN open it up and check your preferences to see if you have look for shared music checked. If so then you should see a shared library titled &#8220;test&#8221; in your left menu.  That&#8217;s rightâ€¦.iTunes being an Apple product is probably one of the most highly exposed practical applications of DNSSD.</p>
<p>To watch the magic happen in real time you can create and drop this registration by doing the following:</p>
<p>Return to the previously used command prompt window. You should still see &#8220;Got a reply for test._daap._tcp.local.: Name now registered and active&#8221; as the last line.</p>
<p>Press CTRL+C which will end the program</p>
<p>Your iTunes &#8220;test&#8221; library will disappear almost instantaneously.</p>
<p>Now press the up key on your keyboard to get the last executed command back and press enterâ€¦</p>
<p>Repeat the last few steps until your satisfied!</p>
<p><b>WARNING: </b>I did this quite a few times before I got bored of watch it magically appear and disappear, can be quite addictive <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><b>So what was that all about?</b><br />
That was probably the most simplified example of DNSSD experimentation that I could start off with. I am sure that everyone probably tried to click on the library in iTunes and iTunes was quick to tell them that there is no library available at that location.</p>
<p>In order to dissect what we actually just did lets first take a look at the command that we executed in order to make it all happen.</p>
<p>dns-sd -R test _daap._tcp . 1234</p>
<p><b>dns-sd</b><br />
is of course the program name that we are executing.</p>
<p><b>-R</b><br />
is the switch that we are passing to the program in order to let it know what exactly we are trying to do. A full list of switches is available by simply executing &#8220;dns-sd&#8221; without any parameters. -R in this case stands for register, because we are registering a DNS entry. &#8220;-R&#8221; takes in a command line that is formatted like so:<br />
dns-sd -R &#8220;name&#8221; &#8220;type&#8221; &#8220;domain&#8221; &#8220;port&#8221; ["txt"â€¦]</p>
<p><b>test</b><br />
is the name that we are giving our instance of this particular service we are registering</p>
<p><b>_daap._tcp</b><br />
is the Type of service that we are registering. In our example we are using &#8220;_daap._tcp&#8221; because this is apples reserved name for iTunes sharing. (I believe it stands for Digital Audio Access Protocol).</p>
<p><b>.</b><br />
we pass a period in as the domain in order to simply choose our local machine</p>
<p><b>1234</b><br />
is the port number that I randomly made up for our imaginary iTunes shared library.</p>
<p>It is also important to note that there is an optional TXT parameter that we neglected to pass in this instance. A DNS TXT record can be up to 65535 (0xFFFF) bytes long and it is used in DNSSD to pass additional information about the service that is being offered. An example taken from the DNSSD specifications suggests that printing via the LPR protocol often specifies a short queue name and the TXT parameter is good place for that type of information.</p>
<p><b>So ok I can make a fake library in iTunesâ€¦how is this going to help me?</b><br />
Well when it comes to basic examples the iTunes trick is about as simple as you can get. This next example is going to be more practical and hopefully it will give some ideas as to how you can use this in your own application.</p>
<p><b>Example #2</b><br />
In this example we will cover how to discover services that are being exposed via DNSSD. Using the same dns-sd.exe program we will pass in a -B for browse.</p>
<p>First off you are going to have to go through example one and register a service on your machine. You can modify the service instance name and type if wanted or just leave it the same. For the sake of consistency I am going to leave it the same in this example.</p>
<p>The next thing you need to do is start up another command prompt. This is where you are going to do the browsing and you can do this on either the same machine or from another machine on your network.</p>
<p>Execute the following commands as shown in command window below:</p>
<p> <a href="http://www.smallegan.com/blog/images/dnssd/ss2.jpg"><img width="400" src="http://www.smallegan.com/blog/images/dnssd/ss2.jpg"/><br />click for larger view</a></p>
<p>You should get something similar to the output you are seeing above. However please note that I have my command window set smaller than the output so it is wrapping.</p>
<p>The interesting thing here is that it is showing the broadcasted service from your other command window. If you CTRL+C the window that is broadcasting (the other window), you will notice that on this window a new record will be added and it will look similar to this next shot.</p>
<p> <a href="http://www.smallegan.com/blog/images/dnssd/ss3.jpg"><img width="400" src="http://www.smallegan.com/blog/images/dnssd/ss3.jpg"/><br />click for larger view</a></p>
<p>Notice that the first record was for adding a record so in the A/R column you will see where the record was added and then later removed. Hopefully this is starting to make practical sense by now?</p>
<p><b>Example #3</b><br />
In example three I am going to cover a small application that I wrote that basically wraps around the browse function examined in Example #2. The example is written in C# and although there is a .Net component that is still being worked on I wasn&#8217;t aware of this when I was working on this wrapper code. Hopefully the .Net component will be finished up and deployed soon.<br />
 <code><br />
//The method that handles the click of the start button<br />
private void startButton_Click(object sender, System.EventArgs e)<br />
{<br />
//define a new threadstart<br />
ThreadStart job = new ThreadStart(threadJob);<br />
//define a new thread<br />
Thread = new Thread(job);<br />
//start the thread<br />
thread.Start();<br />
}</p>
<p>//the thread method<br />
private void threadJob()<br />
{<br />
//create a new process object<br />
Process = new Process();<br />
//don't use shell execute<br />
process.StartInfo.UseShellExecute = false;<br />
//we are redirecting the standard output here and then we get it later<br />
process.StartInfo.RedirectStandardOutput = true;<br />
//don't create a console window that pops upâ€¦it is not needed<br />
process.StartInfo.CreateNoWindow = true;<br />
//here is the file that we want to execute<br />
process.StartInfo.FileName = "C:\\Program Files\\Bonjour SDK\\samples\\C\\dns-sd.exe";<br />
//here are the parameters we want to pass it<br />
process.StartInfo.Arguments = "-B _daap._tcp. .";<br />
//here we set the working directory<br />
process.StartInfo.WorkingDirectory = "C:\\Program Files\\Bonjour SDK\\samples\\C";<br />
//go ahead and start the process<br />
process.Start();<br />
//create an instance of stream reader and get the standard output from the process<br />
StreamReader myStreamReader = process.StandardOutput;</p>
<p>//create a blank string for later user<br />
string str = "";<br />
//while the process has not executed run the following<br />
while( !process.HasExited )<br />
//while we can still peak and see something in the outputstream run this<br />
while( myStreamReader.Peek().ToString() != string.Empty )<br />
{<br />
//assign the next line that is read to str<br />
str = myStreamReader.ReadLine();<br />
//if the line starts with a T that means we are dealing with the header<br />
//line that is printed on the console and we don't want to process<br />
if (str.Substring(0,1) != "T")<br />
{<br />
//create an array of strings called x and use a regular expression //to split up the output line by whitespace<br />
string[] x = Regex.Split (str.Trim(), @"\s+");<br />
//if there are 7 items in the array created from split proceed<br />
if (x.Length == 7)<br />
{<br />
//If the second item (index of 1) reads "Add" proceed //otherwise bounce to else<br />
if(x[1] == "Add")<br />
{<br />
//Add the instance to the combo box<br />
comboBox1.Items.Add(x[6]);<br />
}<br />
else<br />
{<br />
//Remove the instance from the combo box<br />
comboBox1.Items.Remove(x[6]);<br />
}</p>
<p>}<br />
}<br />
}<br />
}</p>
<p>//close the process<br />
process.Close();<br />
}<br />
 </code><br />
So basically what the above piece of code does is create a thread the constantly checks the standardoutput of the &#8220;dns-d.exe -B _daap._tcp. .&#8221; command. If it detects output that states that a new instance is added or removed it adds or removes the record from the combo box. This is a very trivial example but with something like this you could have a drop down that allows a user to select another pc that is available to interface with software you have running.</p>
<p><b>IMPORTANT:</b><br />
Since it is in a thread it is possible that you could sleep the thread for any amount of time you desire in order to preserve precious processing power, however I must note that you won&#8217;t even notice that it is checking if you don&#8217;t decide to sleep it.</p>
<p><b>Example #4</b><br />
The last example simply shows how we can do a simple query to find out more information on a particular instance of a service that we discover is available. Once we get the instance name by using the -B switch we are able to use the instance name to find more details by using the -L switch. The following example gives us an example as to how the query and results will look.</p>
<p> <a href="http://www.smallegan.com/blog/images/dnssd/ss4.jpg"><img width="400" src="http://www.smallegan.com/blog/images/dnssd/ss4.jpg"/><br />click for larger view</a></p>
<p>Almost identical to the -B switch except the -L switch wants us to specify an instance name  before the type and domain information. (The instance name is &#8220;test&#8221; in our example. )</p>
<p>Hopfully this information is useful to someone and I would love to know if anyone who reads this will decide to apply this knowledge to a real application. So feel free to contact me via comment!</p>
<p>There are not a whole lot of good resources but the two that I will point you to for more information are the specs for dns-sd and zeroconf:</p>
<p><a href="http://www.dns-sd.org/">http://www.dns-sd.org</a><br />
<a href="http://www.zeroconf.org/">http://www.zeroconf.org</a></p>
<p>If anyone is interested in learning more about ZeroConf  let me know! I am considering writing an article on the topic and knowing that it may be useful to some might be a nice incentive!</p>
<p>Also please contact me with any questions about this article or mistakes it may have in it <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2005/06/09/dns-based-service-discovery-dnssd/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
<enclosure url="http://www.smallegan.com/blog/images/dnssd/ss1.jpg" length="20824" type="image/jpeg" />
<enclosure url="http://www.smallegan.com/blog/images/dnssd/ss2.jpg" length="19612" type="image/jpeg" />
<enclosure url="http://www.smallegan.com/blog/images/dnssd/ss3.jpg" length="20821" type="image/jpeg" />
<enclosure url="http://www.smallegan.com/blog/images/dnssd/ss4.jpg" length="19462" type="image/jpeg" />
		</item>
		<item>
		<title>What I have been up to..</title>
		<link>http://www.smallegan.com/blog/2005/05/20/what-i-have-been-up-to/</link>
		<comments>http://www.smallegan.com/blog/2005/05/20/what-i-have-been-up-to/#comments</comments>
		<pubDate>Fri, 20 May 2005 22:34:43 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=26</guid>
		<description><![CDATA[Wow I hate wordpress for that&#8230;I just wrote a whole ton of stuff and lost it because I tabbed over and hit enter&#8230; Anyways once again here is what I have been up to: I have been working on an MCMS project for the last month or so. It is for a company in Dayton, [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>
			<img width="125" src="http://www.renderhosting.net/images/script-logos/wordpress.gif"/>
		</td>
<td>
			Wow I hate wordpress for that&#8230;I just wrote a whole ton of stuff and lost it because I tabbed over and hit enter&#8230;
		</td>
</tr>
<tr>
<td>
		</td>
<td>
			Anyways once again here is what I have been up to:
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://www.nusoftsolutions.com/img/logo.gif"/>
		</td>
<td>
I have been working on an MCMS project for the last month or so. It is for a company in Dayton, OH and I have been pretty much heads down on this project working to get it done.
		</td>
</tr>
<tr>
<td>
</td>
<td>
I am starting a new MCMS project next week for the University of Findlay. The project is new for me but actually only has a few more weeks of development left and I am jumping on in place of a NuSoft developer who is starting something new.
		</td>
</tr>
<tr>
<td>
</td>
<td>
I feel as though my knowledge base has doubled since I Started working @ NuSoft. I need to start studying for the MCAD/MCSD tests to prove it <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://www.gvsu.edu/identity/images/g-rgb10.jpg"/>
		</td>
<td>
I officially got kicked out of Grand Valley State University&#8217;s Masters of Computer Information Systems program..Long story but to make it short, it was a mistake and I am working to get it fixed&#8230;Only 4 more classes after I get it resolved. Then the question is&#8230;To PhD or not to PhD&#8230;
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://www.isc.tamu.edu/~lewing/linux/sit3-bwo-tran.1.gif"/>
		</td>
<td>
I have been working with linux a little bit lately. I installed a small version of linux on my linksys router. It wasn&#8217;t rocket science because I found some instructions online that helped outline it but it was still fun. I now have snort running on my router&#8230;and although I don&#8217;t know enough about snort (yet) for it to be useful..it is still cool.
		</td>
</tr>
<tr>
<td>
</td>
<td>
I also am running knoppix (live-cd) on a 2.00ghz laptop that I have that has no screen or HD. I hooked it up to a monitor and I am storing files to my thumb drive. Boot time isn&#8217;t half bad. I think I may set up a script (on the thumb-drive) that starts up a web server using that CD and thumb drive. It will be the most portable web server possible&#8230;(well actually I could probably just put the whole OS on the thumb drive and forget about the CD&#8230;But for now this is portable enough. THis is the most fun I have had with linux so far (NOTE: that isn&#8217;t say alot)
		</td>
</tr>
<tr>
<td>
</td>
<td>
I am currently in love with a program I found called Synergy. I think I read about it over @ hackaday. It basically allows me to control all four of my laptops with one mouse and keyboard. It is pretty simple technology but totally useful. So I have four laptops set up in a row and the mouse and keyboard is connected wirelessly to my zd7000 which sits beautifully on its docking station. (I got a zd7000 with dock, in a trade with a friend by the way.)
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://www.designedtoat.com/clipart5/wedding_04.gif"/>
		</td>
<td>
Michelle may be moving in soon will be awesome. Living alone has its perks but I have no problem giving that up for the love of my life! We have been thinking more and more about the details of the wedding (or lackthereof). She wants to get engagement pictures soon but I gotta work on those abs first <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ok ok&#8230;we all know that isn&#8217;t happening anytime soon so I should get them out of the way, I just keep putting it off.
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://images.google.com/images?q=tbn:KBQ1woig6SUJ:http://www.laserexcellence.com/postcards/galaxy/kissme/dentist.jpg"/>
		</td>
<td>
Speaking of putting things off I need to get to the Oral Surgeon. I have wisdom teeth that need removing. If you have any good experiences with that be sure to comment. All negative comments will surely be removed <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://kidshealth.org/broadcast/article_images/article38711/1098308139907.sayAAA.jpg"/>
		</td>
<td>
I also need to get to the doctor&#8230;.I really don&#8217;t have a good reson&#8230;but I should probably just get a checkup&#8230;.I haven&#8217;t been to the actual doctor in forever&#8230;.10 years maybe? I got some sports physicals in HS, but nothing since.
		</td>
</tr>
<tr>
<td>
			<img width="125"  src="http://www.sfedora.com/star%20wars%20logo.jpeg"/>
		</td>
<td>
I have seen Star Wars Episode III twice now, and I probably will see it again before it leaves theaters (I guess it is safe to assume I liked it).
		</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2005/05/20/what-i-have-been-up-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://images.google.com/images?q=tbn:KBQ1woig6SUJ:http://www.laserexcellence.com/postcards/galaxy/kissme/dentist.jpg" length="3068" type="image/jpeg" />
		</item>
		<item>
		<title>Losing a post</title>
		<link>http://www.smallegan.com/blog/2005/04/25/losing-a-post/</link>
		<comments>http://www.smallegan.com/blog/2005/04/25/losing-a-post/#comments</comments>
		<pubDate>Tue, 26 Apr 2005 03:14:01 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.smallegan.com/blog/?p=19</guid>
		<description><![CDATA[Losing a good post is like losing a child. You take the time to put your thoughts into cyberspace and then through bad luck it somehow gets lost. You know it is out there and you really don&#8217;t want it to be dead. People keep asking you about it and everytime they do you start [...]]]></description>
			<content:encoded><![CDATA[<p>Losing a good post is like losing a child.  You take the time to put your thoughts into cyberspace and then through bad luck it somehow gets lost.  You know it is out there and you really don&#8217;t want it to be dead.  People keep asking you about it and everytime they do you start crying 404!  Google caching is like the detective that brings your baby home.</p>
<p>Vote google for president! What is that you say? Google isn&#8217;t a person? <img src='http://www.smallegan.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallegan.com/blog/2005/04/25/losing-a-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

