<?xml version="1.0" encoding="UTF-8"?><rss version="0.92">
<channel>
	<title>two guys from kc</title>
	<link>http://twoguysfromkc.com</link>
	<description>snippets&#124;&#124;solutions from two geeks in kansas city</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:12:00 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	<!-- generator="WordPress/3.0.1" -->

	<item>
		<title>Retrieving Warranty Dates From Dell</title>
		<description><![CDATA[Once a year our bosses (why is there always more than one?) ask us to produce reports outlining what workstations on campus need replaced. Thanks to our campus logon script we are able to use WMI and retrieve the serial (along with a host of other attributes) for every workstation on campus. The problem was [...]]]></description>
		<link>http://twoguysfromkc.com/?p=41</link>
			</item>
	<item>
		<title>Determine if anyone is logged onto a remote computer.</title>
		<description><![CDATA[Determining if someone is logged into a remote computer, either interactively or remotely, is not as easy as it sounds. A quick solution however is to merely enumerate the explorer.exe process (which will not be running if nobody is logged in): public static bool isAnyoneLoggedOn(string computer_name) { Console.Write("Looking for users on " + computer_name + [...]]]></description>
		<link>http://twoguysfromkc.com/?p=33</link>
			</item>
	<item>
		<title>Using Partitioning in TSQL to Mimic a MIDDLE Command</title>
		<description><![CDATA[TSQL provides a TOP command to retrieve a portion of the result set, but no MIDDLE command.  You can use partitioning (NTILE) to mimic the MIDDLE command. I created a simple four record data set (scores) for this example: bob, 12 mary, 15 jim, 19 lenny, 29 And here&#8217;s the code that divides the result [...]]]></description>
		<link>http://twoguysfromkc.com/?p=22</link>
			</item>
	<item>
		<title>Temporary Tables With WITH!</title>
		<description><![CDATA[We ran across the need to create some statistics on a set of results created by a query (with a group by statement). This kind of scenario is real simple by using a temporary table: -- Create your temporary table WITH tempTableName (theID, numberOfInstances) AS ( SELECT theID, COUNT(*) AS numberOfInstances FROM tableName GROUP BY [...]]]></description>
		<link>http://twoguysfromkc.com/?p=15</link>
			</item>
	<item>
		<title>Identify what Port(s) a Process/Program is Using</title>
		<description><![CDATA[Here&#8217;s a quick way to find out what port(s) a certain process/program is using. First, get the PID with tasklist. I&#8217;ll use the communicator.exe process in this example. Next, use the PID to get the port number(s) with netstat.]]></description>
		<link>http://twoguysfromkc.com/?p=9</link>
			</item>
	<item>
		<title>Alter/Add Table Schema</title>
		<description><![CDATA[Sadly, I spent 30 minutes looking for this yesterday. It is plenty easy to add a table to a schema: use databaseName go alter schema schemaName transfer dbo.tableName go Good Times!]]></description>
		<link>http://twoguysfromkc.com/?p=8</link>
			</item>
	<item>
		<title>Duplicate a Table in MSSQL</title>
		<description><![CDATA[If you would like to copy a table (or just a few columns) for backup / testing purposes: SELECT * INTO copy_of_original_table FROM original_table You do not have to create the new table ahead of time, but you will need to verify identity columns and create indexes if you screw up the original table.]]></description>
		<link>http://twoguysfromkc.com/?p=7</link>
			</item>
	<item>
		<title>Add Speech to a C# Application</title>
		<description><![CDATA[You&#8217;ll need .NET Framework >= 3.0 for this tip. First, add a reference to system.speech, and add the corresponding library to your code. using system.speech Now, you&#8217;re ready start talking. Just create an instance of Synthesis.SpeechSynthesizer, use the SelectVoice method to pick a voice and the SpeakAsync method to produce the sound. System.Speech.Synthesis.SpeechSynthesizer ss = [...]]]></description>
		<link>http://twoguysfromkc.com/?p=6</link>
			</item>
	<item>
		<title>Access a Control from within another Thread in C# (Delegates)</title>
		<description><![CDATA[If you attempt to change a property of a control from a thread other than the thread the control was created in, you&#8217;ll receive an exception similar to &#8211; &#8220;Cross-thread operation not valid: Control &#8216;pictureBox1&#8242; accessed from a thread other than the thread it was created on&#8221;. Read on to find out how to use [...]]]></description>
		<link>http://twoguysfromkc.com/?p=5</link>
			</item>
	<item>
		<title>Sql Server 2005 CLR Trigger</title>
		<description><![CDATA[So you want to create a SQL Server database trigger in C#? In this example, I&#8217;ll create an INSERT trigger. First, this snippet of code (C# class library) simply retrieves all the column names and values from the data being inserted into the database and stores it in a NameValueCollection. Note the connection string &#8220;context [...]]]></description>
		<link>http://twoguysfromkc.com/?p=4</link>
			</item>
</channel>
</rss>
