<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	>
<channel>
	<title>Comments for gaskell.org</title>
	<atom:link href="http://gaskell.org/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://gaskell.org</link>
	<description>picking up where teh rest leave off</description>
	<pubDate>Tue, 06 Jan 2009 23:07:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on The requested operation requires elevation in Windows Vista by Northern Venom</title>
		<link>http://gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/comment-page-2/#comment-14304</link>
		<dc:creator>Northern Venom</dc:creator>
		<pubDate>Sun, 04 Jan 2009 04:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/#comment-14304</guid>
		<description>Can this also address the bluetooth problem I'm having? I'm using a WIDCOMM Bluetooth device.</description>
		<content:encoded><![CDATA[<p>Can this also address the bluetooth problem I&#8217;m having? I&#8217;m using a WIDCOMM Bluetooth device.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The requested operation requires elevation in Windows Vista by Northern Venom</title>
		<link>http://gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/comment-page-2/#comment-14303</link>
		<dc:creator>Northern Venom</dc:creator>
		<pubDate>Sun, 04 Jan 2009 04:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/#comment-14303</guid>
		<description>Thanks man. It's been my problem since I started using Vista.  This version of Windows have a lot of problems.</description>
		<content:encoded><![CDATA[<p>Thanks man. It&#8217;s been my problem since I started using Vista.  This version of Windows have a lot of problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The requested operation requires elevation in Windows Vista by Gunawan</title>
		<link>http://gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/comment-page-2/#comment-14302</link>
		<dc:creator>Gunawan</dc:creator>
		<pubDate>Wed, 10 Dec 2008 13:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/#comment-14302</guid>
		<description>Thanks... It's helpfull... :)</description>
		<content:encoded><![CDATA[<p>Thanks&#8230; It&#8217;s helpfull&#8230; <img src='http://gaskell.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Setting a default button using Master Pages in ASP.NET by prasanth</title>
		<link>http://gaskell.org/setting-a-default-button-using-master-pages-in-aspnet/comment-page-1/#comment-14300</link>
		<dc:creator>prasanth</dc:creator>
		<pubDate>Tue, 04 Nov 2008 12:58:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/setting-a-default-button-using-master-pages-in-aspnet/#comment-14300</guid>
		<description>Thank you</description>
		<content:encoded><![CDATA[<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The requested operation requires elevation in Windows Vista by andy gaskell</title>
		<link>http://gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/comment-page-2/#comment-14299</link>
		<dc:creator>andy gaskell</dc:creator>
		<pubDate>Tue, 28 Oct 2008 23:49:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/#comment-14299</guid>
		<description>@awm050501 what application are you trying to run?</description>
		<content:encoded><![CDATA[<p>@awm050501 what application are you trying to run?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The requested operation requires elevation in Windows Vista by awm050501</title>
		<link>http://gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/comment-page-2/#comment-14298</link>
		<dc:creator>awm050501</dc:creator>
		<pubDate>Tue, 28 Oct 2008 16:35:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/#comment-14298</guid>
		<description>I have UAC disabled &#38; did the run as admin (and my account is admin also)and still getting the elevated error. Any ideas?</description>
		<content:encoded><![CDATA[<p>I have UAC disabled &amp; did the run as admin (and my account is admin also)and still getting the elevated error. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The requested operation requires elevation in Windows Vista by Emily</title>
		<link>http://gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/comment-page-2/#comment-14297</link>
		<dc:creator>Emily</dc:creator>
		<pubDate>Sun, 26 Oct 2008 16:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaskell.org/the-requested-operation-requires-elevation-in-windows-vista/#comment-14297</guid>
		<description>THANK YOU!</description>
		<content:encoded><![CDATA[<p>THANK YOU!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hey Nick, let us know how you really feel by shags</title>
		<link>http://gaskell.org/hey-nick-let-us-know-how-you-really-feel/comment-page-1/#comment-14293</link>
		<dc:creator>shags</dc:creator>
		<pubDate>Thu, 09 Oct 2008 02:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://gaskell.org/?p=100#comment-14293</guid>
		<description>hahahahah that pic is sweet</description>
		<content:encoded><![CDATA[<p>hahahahah that pic is sweet</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails helper distance_of_time_in_words ported to C# by BEOakes74</title>
		<link>http://gaskell.org/rails-helper-distance_of_time_in_words-ported-to-c/comment-page-1/#comment-14292</link>
		<dc:creator>BEOakes74</dc:creator>
		<pubDate>Wed, 08 Oct 2008 19:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://gaskell.org/?p=85#comment-14292</guid>
		<description>Hmmm, my brackets were stripped. Actually, *alot* was stripped. I'll send you the code via email and you can post it.</description>
		<content:encoded><![CDATA[<p>Hmmm, my brackets were stripped. Actually, *alot* was stripped. I&#8217;ll send you the code via email and you can post it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails helper distance_of_time_in_words ported to C# by BEOakes74</title>
		<link>http://gaskell.org/rails-helper-distance_of_time_in_words-ported-to-c/comment-page-1/#comment-14291</link>
		<dc:creator>BEOakes74</dc:creator>
		<pubDate>Wed, 08 Oct 2008 19:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://gaskell.org/?p=85#comment-14291</guid>
		<description>using System;
using System.Collections.Generic;
using System.Linq;
using DistanceOfTimeInWordsDemo.Properties;

namespace DistanceOfTimeInWordsDemo
{
	public static class DateTimeExtension
	{
		private class RangePair { public int Lower { get; set; } public int Upper { get; set; } }
		private class KeyArgPair { public string ResourceKey { get; set; } public int DivideBy { get; set; } }
		private static Dictionary&#60;RangePair, KeyArgPair&#62; WordsRange;
		static DateTimeExtension()
		{
			WordsRange = new Dictionary&#60;RangePair, KeyArgPair&#62;();
			WordsRange.Add(new RangePair { Lower = 0, Upper = 4 }, new KeyArgPair { ResourceKey = "LessThanFiveSeconds", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = 5, Upper = 9 }, new KeyArgPair { ResourceKey = "LessThanTenSeconds", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = 10, Upper = 19 }, new KeyArgPair { ResourceKey = "LessThanTwentySeconds", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = 20, Upper = 39 }, new KeyArgPair { ResourceKey = "HalfAMinute", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = 40, Upper = 59 }, new KeyArgPair { ResourceKey = "LessThanAMinute", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(2).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(44).TotalSeconds }, new KeyArgPair { ResourceKey = "MultipleMinutes", DivideBy = 1 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(45).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(89).TotalSeconds }, new KeyArgPair { ResourceKey = "AboutOneHour", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(90).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(1439).TotalSeconds }, new KeyArgPair { ResourceKey = "AboutMultipleHours", DivideBy = 60 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(1440).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(2879).TotalSeconds }, new KeyArgPair { ResourceKey = "OneDay", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(2880).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(43199).TotalSeconds }, new KeyArgPair { ResourceKey = "MultipleDays", DivideBy = 1440 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(43200).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(86399).TotalSeconds }, new KeyArgPair { ResourceKey = "AboutOneMonth", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(86400).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(525599).TotalSeconds }, new KeyArgPair { ResourceKey = "MultipleMonths", DivideBy = 43200 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(525600).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(1051199).TotalSeconds }, new KeyArgPair { ResourceKey = "AboutOneYear", DivideBy = 0 });
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(1051200).TotalSeconds, Upper = Int32.MaxValue }, new KeyArgPair { ResourceKey = "MultipleYears", DivideBy = 525600 });
		}

		public static string TimeAgoInWords(this DateTime fromTime)
		{
			return DistanceOfTimeInWords(fromTime, DateTime.Now);
		}

		public static string TimeAgoInWords(this DateTime fromTime, bool includeSeconds)
		{
			return DistanceOfTimeInWords(fromTime, DateTime.Now, includeSeconds);
		}

		public static string DistanceOfTimeInWords(this DateTime fromTime, DateTime toTime)
		{
			return DistanceOfTimeInWords(fromTime, toTime, false);
		}

		public static string DistanceOfTimeInWords(this DateTime fromTime, DateTime toTime, bool includeSeconds)
		{
			Func&#60;int, double, int&#62; RoundedDistance = (value, dividedBy) =&#62; (int)Decimal.Round(Convert.ToDecimal(value / dividedBy), MidpointRounding.AwayFromZero);
			Func&#60;int, int, int, bool&#62; InRange = (value, low, high) =&#62; (value &#62;= low &#38;&#38; value &#60;= high);
			Func&#60;string, int?, string&#62; InWords = (name, args) =&#62; (!String.IsNullOrEmpty(name)) ? (args.HasValue) ? String.Format(Resources.ResourceManager.GetString(name), args.Value) : Resources.ResourceManager.GetString(name) : String.Empty;

			TimeSpan ts = (toTime - fromTime).Duration();
			int distanceInMinutes = (int)ts.TotalMinutes;
			int distanceInSeconds = (int)ts.TotalSeconds;

			if (distanceInMinutes &#60;= 1)
			{
				var query = (from s in WordsRange
						 where InRange(distanceInSeconds, s.Key.Lower, s.Key.Upper)
						 select s.Value.ResourceKey).FirstOrDefault();
				if (includeSeconds)
				{
					if (!String.IsNullOrEmpty(query)) { return InWords(query, null); }
					else { return InWords("OneMinute", null); }
				}
				else { return InWords((distanceInMinutes.Equals(0)) ? "LessThanAMinute" : "OneMinute", null); }
			}
			else
			{
				var query = (from s in WordsRange
							 where InRange(distanceInSeconds, s.Key.Lower, s.Key.Upper)
							 select s.Value).FirstOrDefault();
				if (query != null) { return InWords(query.ResourceKey, (query.DivideBy &#62; 0) ? new Nullable&#60;int&#62;(RoundedDistance(distanceInMinutes, query.DivideBy)) : null); }
			}
			return String.Empty;
		}
	}
}</description>
		<content:encoded><![CDATA[<p>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using DistanceOfTimeInWordsDemo.Properties;</p>
<p>namespace DistanceOfTimeInWordsDemo<br />
{<br />
	public static class DateTimeExtension<br />
	{<br />
		private class RangePair { public int Lower { get; set; } public int Upper { get; set; } }<br />
		private class KeyArgPair { public string ResourceKey { get; set; } public int DivideBy { get; set; } }<br />
		private static Dictionary&lt;RangePair, KeyArgPair&gt; WordsRange;<br />
		static DateTimeExtension()<br />
		{<br />
			WordsRange = new Dictionary&lt;RangePair, KeyArgPair&gt;();<br />
			WordsRange.Add(new RangePair { Lower = 0, Upper = 4 }, new KeyArgPair { ResourceKey = &#8220;LessThanFiveSeconds&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = 5, Upper = 9 }, new KeyArgPair { ResourceKey = &#8220;LessThanTenSeconds&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = 10, Upper = 19 }, new KeyArgPair { ResourceKey = &#8220;LessThanTwentySeconds&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = 20, Upper = 39 }, new KeyArgPair { ResourceKey = &#8220;HalfAMinute&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = 40, Upper = 59 }, new KeyArgPair { ResourceKey = &#8220;LessThanAMinute&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(2).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(44).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;MultipleMinutes&#8221;, DivideBy = 1 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(45).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(89).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;AboutOneHour&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(90).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(1439).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;AboutMultipleHours&#8221;, DivideBy = 60 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(1440).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(2879).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;OneDay&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(2880).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(43199).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;MultipleDays&#8221;, DivideBy = 1440 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(43200).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(86399).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;AboutOneMonth&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(86400).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(525599).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;MultipleMonths&#8221;, DivideBy = 43200 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(525600).TotalSeconds, Upper = (int)TimeSpan.FromMinutes(1051199).TotalSeconds }, new KeyArgPair { ResourceKey = &#8220;AboutOneYear&#8221;, DivideBy = 0 });<br />
			WordsRange.Add(new RangePair { Lower = (int)TimeSpan.FromMinutes(1051200).TotalSeconds, Upper = Int32.MaxValue }, new KeyArgPair { ResourceKey = &#8220;MultipleYears&#8221;, DivideBy = 525600 });<br />
		}</p>
<p>		public static string TimeAgoInWords(this DateTime fromTime)<br />
		{<br />
			return DistanceOfTimeInWords(fromTime, DateTime.Now);<br />
		}</p>
<p>		public static string TimeAgoInWords(this DateTime fromTime, bool includeSeconds)<br />
		{<br />
			return DistanceOfTimeInWords(fromTime, DateTime.Now, includeSeconds);<br />
		}</p>
<p>		public static string DistanceOfTimeInWords(this DateTime fromTime, DateTime toTime)<br />
		{<br />
			return DistanceOfTimeInWords(fromTime, toTime, false);<br />
		}</p>
<p>		public static string DistanceOfTimeInWords(this DateTime fromTime, DateTime toTime, bool includeSeconds)<br />
		{<br />
			Func&lt;int, double, int&gt; RoundedDistance = (value, dividedBy) =&gt; (int)Decimal.Round(Convert.ToDecimal(value / dividedBy), MidpointRounding.AwayFromZero);<br />
			Func&lt;int, int, int, bool&gt; InRange = (value, low, high) =&gt; (value &gt;= low &amp;&amp; value &lt;= high);<br />
			Func&lt;string, int?, string&gt; InWords = (name, args) =&gt; (!String.IsNullOrEmpty(name)) ? (args.HasValue) ? String.Format(Resources.ResourceManager.GetString(name), args.Value) : Resources.ResourceManager.GetString(name) : String.Empty;</p>
<p>			TimeSpan ts = (toTime - fromTime).Duration();<br />
			int distanceInMinutes = (int)ts.TotalMinutes;<br />
			int distanceInSeconds = (int)ts.TotalSeconds;</p>
<p>			if (distanceInMinutes &lt;= 1)<br />
			{<br />
				var query = (from s in WordsRange<br />
						 where InRange(distanceInSeconds, s.Key.Lower, s.Key.Upper)<br />
						 select s.Value.ResourceKey).FirstOrDefault();<br />
				if (includeSeconds)<br />
				{<br />
					if (!String.IsNullOrEmpty(query)) { return InWords(query, null); }<br />
					else { return InWords(&#8221;OneMinute&#8221;, null); }<br />
				}<br />
				else { return InWords((distanceInMinutes.Equals(0)) ? &#8220;LessThanAMinute&#8221; : &#8220;OneMinute&#8221;, null); }<br />
			}<br />
			else<br />
			{<br />
				var query = (from s in WordsRange<br />
							 where InRange(distanceInSeconds, s.Key.Lower, s.Key.Upper)<br />
							 select s.Value).FirstOrDefault();<br />
				if (query != null) { return InWords(query.ResourceKey, (query.DivideBy &gt; 0) ? new Nullable&lt;int&gt;(RoundedDistance(distanceInMinutes, query.DivideBy)) : null); }<br />
			}<br />
			return String.Empty;<br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.711 seconds -->
