<?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>Xster.net &#187; Tips</title>
	<atom:link href="http://tech.xster.net/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.xster.net</link>
	<description>Never relearn twice</description>
	<lastBuildDate>Mon, 30 Aug 2010 00:30:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Draw Line/Shape in FarPoint FpSpread</title>
		<link>http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/</link>
		<comments>http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 00:28:59 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[draw]]></category>
		<category><![CDATA[FarPoint]]></category>
		<category><![CDATA[FpSpread]]></category>
		<category><![CDATA[GDI]]></category>
		<category><![CDATA[spread]]></category>
		<category><![CDATA[VB.Net]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=284</guid>
		<description><![CDATA[If you worked with FarPoint Spread, you know that it uses conventions and APIs entirely different from what&#8217;s used in normal Winforms. When it comes to drawing inside a FarPoint spread, CreateGraphics will definitely not work. If only FarPoint made their documentations Google-friendly, you will find that there are in fact APIs specifically made for [...]]]></description>
			<content:encoded><![CDATA[<p>If you worked with FarPoint Spread, you know that it uses conventions and APIs entirely different from what&#8217;s used in normal Winforms. When it comes to drawing inside a FarPoint spread, CreateGraphics will definitely not work. If only FarPoint made their <a href="http://blogs.fpoint.com/FarPointSupportSite/Modules/Docs/SpreadWin5Help/spwin-shape-code.html">documentations</a> Google-friendly, you will find that there are in fact APIs specifically made for drawing.<span id="more-284"></span></p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #008000;">'Draws a horizontal line
</span><span style="color: #000080;">Dim</span> <span style="color: #000080;">line</span> <span style="color: #000080;">As</span> <span style="color: #000080;">New</span> FarPoint.Win.Spread.DrawingSpace.LineShape
<span style="color: #000080;">line</span>.Thickness = 3
<span style="color: #000080;">line</span>.Width = x
<span style="color: #000080;">line</span>.Height = 1 <span style="color: #008000;">'if you don't specify it, the line will do weird things
</span><span style="color: #000080;">line</span>.Top = x
<span style="color: #000080;">line</span>.Left = x
<span style="color: #000080;">line</span>.ShapeOutlineColor = Color.FromArgb(x, x, x)
fpspread.ActiveSheet.AddShape(<span style="color: #000080;">line</span>)</pre></div></div>

<p>Please note that the line.Top is calculated from the top of the header. If you scroll down, it&#8217;s still calculated from the header (which may be screens away). Use ActiveSheet.AddShape(line, row, column) to set a starting reference point.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;title=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;t=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Draw+Line%2FShape+in+FarPoint+FpSpread+-+http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;n=Draw+Line%2FShape+in+FarPoint+FpSpread&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;title=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;title=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;t=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;title=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;title=Draw+Line%2FShape+in+FarPoint+FpSpread" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/&amp;title=Draw+Line%2FShape+in+FarPoint+FpSpread&amp;summary=If%20you%20worked%20with%20FarPoint%20Spread%2C%20you%20know%20that%20it%20uses%20conventions%20and%20APIs%20entirely%20different%20from%20what%27s%20used%20in%20normal%20Winforms.%20When%20it%20comes%20to%20drawing%20inside%20a%20FarPoint%20spread%2C%20CreateGraphics%20will%20definitely%20not%20work.%20If%20only%20FarPoint%20made%20their%20documentations%20Google-friendly%2C%20you%20will%20find&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/draw-lineshape-in-farpoint-fpspread/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Take on the MB2-633 CRM 4.0 Installation and Deployment Exam</title>
		<link>http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/</link>
		<comments>http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:40:59 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[MB2-633]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[practice]]></category>
		<category><![CDATA[Prometric]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[uCertify]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=279</guid>
		<description><![CDATA[Here&#8217;s my experience on Microsoft&#8217;s MB2-633 exam which I just passed, on the second try. First of all, as far as I can tell, the Prometric exam has 50 questions and there are only 50 questions in their question pool. The questions I got on my second try are the exact same as on my [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my experience on Microsoft&#8217;s MB2-633 exam which I just passed, on the second try.</p>
<p>First of all, as far as I can tell, the Prometric exam has 50 questions and there are only 50 questions in their question pool. The questions I got on my second try are the exact same as on my first exam.<span id="more-279"></span></p>
<p>2, it&#8217;s hard to pass by just studying Microsoft&#8217;s <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1ceb5e01-de9f-48c0-8ce2-51633ebf4714&amp;displaylang=en">Implementation Guide</a> available for free. While all the topics from the exam are touched upon in the guide, it doesn&#8217;t cover the full scope of the exam. For instance, almost 1/3 of the exam is on how to prepare and USE Outlook for CRM. The guide hardly talks about it. What&#8217;s useful, however, in the guide are the requirement lists. Every time you see a list in the guide, memorise it!</p>
<p>I also made use of uCertify&#8217;s practice exam. Somewhat disappointed. While it does give insight about the exam&#8217;s scope and about 1/3 of the questions are almost exam same in the exam, it pretty much misses out completely on the topics of Email and Outlook. It doesn&#8217;t feel carefully prepared either. Often time, it asks which requirements are needed to install, you&#8217;re baffled by the &#8216;right&#8217; answer and while rereading the implementation guide, you realise that while it copied the answer choices from the guide, it didn&#8217;t specify in the question that you&#8217;re trying to install onto a cluster etc, missing the point of the question. In brief, lots of copy paste and it feel like it&#8217;s prepared by a secretary rather than an engineer who took the test. At least I got my money back.</p>
<p>What saved me on the exams are those PDF sharing sites that have small free demos of practice tests other companies are selling. For instance, on <a href="http://www.scribd.com/search?cat=redesign&amp;q=mb2-633&amp;x=0&amp;y=0">Scribd</a>, all the results on the first page are ACTUAL questions from the exam and with all these companies combined, you got about half of the answers of the 50 question exam which you just have to memorise. Between this and the implementation guide, you have no reason to fail or pay for anything.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;title=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;t=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam+-+http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;n=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;title=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;title=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;t=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;title=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;title=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/&amp;title=My+Take+on+the+MB2-633+CRM+4.0+Installation+and+Deployment+Exam&amp;summary=Here%27s%20my%20experience%20on%20Microsoft%27s%20MB2-633%20exam%20which%20I%20just%20passed%2C%20on%20the%20second%20try.%0D%0A%0D%0AFirst%20of%20all%2C%20as%20far%20as%20I%20can%20tell%2C%20the%20Prometric%20exam%20has%2050%20questions%20and%20there%20are%20only%2050%20questions%20in%20their%20question%20pool.%20The%20questions%20I%20got%20on%20my%20second%20try%20are%20the%20exact%20same%20as%20on%20my%20first%20exam.%0D%0A%0D%0A&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/my-take-on-the-mb2-633-crm-4-0-installation-and-deployment-exam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRM 4.0 Read-Only / Disable / Hide Fields Based on Security Role</title>
		<link>http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/</link>
		<comments>http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:52:04 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=272</guid>
		<description><![CDATA[Suppose you want to make some fields editable for only some users in CRM forms, there is a great and simple MSDN blog that outlines how to do it. Here&#8217;s a copy of  their code. Just change _roles and _fields to the fields&#8217; names that you want to disable for _roles. Flip it around and [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you want to make some fields editable for only some users in CRM forms, there is a great and simple <a href="http://blogs.msdn.com/b/paf/archive/2010/03/08/field-level-security-for-microsoft-dynamics-crm-4-0.aspx">MSDN blog</a> that outlines how to do it.</p>
<p>Here&#8217;s a copy of  their code. Just change _roles and _fields to the fields&#8217; names that you want to disable for _roles. Flip it around and enable it only for those users by changing line x to false.</p>
<p>Put it in your form&#8217;s onLoad event at Customization-&gt;your entity-&gt;Forms and Views-&gt;Form-&gt;Form Properties-&gt;Event, OnLoad-&gt;Edit<span id="more-272"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> _roles <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'roleX'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'System Administrator'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//array of security roles name</span>
<span style="color: #003366; font-weight: bold;">var</span> _fields <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'name'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'accountNumber'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// array of field schema names to disable</span>
UpdateFields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> UpdateFields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> oXml <span style="color: #339933;">=</span> GetCurrentUserRoles<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>oXml <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> roles <span style="color: #339933;">=</span> oXml.<span style="color: #660066;">selectNodes</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;//BusinessEntity/q1:name&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>roles <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> roles.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>j <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> _roles.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>roles<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">text</span> <span style="color: #339933;">==</span> _roles<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>k <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> k <span style="color: #339933;">&lt;</span> _fields.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> k<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
                                document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>_fields<span style="color: #009900;">&#91;</span>k<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">Disabled</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
                            <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #009900;">&#125;</span>
                        <span style="color: #009900;">&#125;</span>
                        <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> GetCurrentUserRoles<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> xml <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #339933;">&lt;?</span>xml version<span style="color: #339933;">=</span>\<span style="color: #3366CC;">&quot;1.0<span style="color: #000099; font-weight: bold;">\&quot;</span> encoding=<span style="color: #000099; font-weight: bold;">\&quot;</span>utf-8<span style="color: #000099; font-weight: bold;">\&quot;</span>?&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot;&lt;soap:Envelope xmlns:soap=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://schemas.xmlsoap.org/soap/envelope/<span style="color: #000099; font-weight: bold;">\&quot;</span> xmlns:xsi=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://www.w3.org/2001/XMLSchema-instance<span style="color: #000099; font-weight: bold;">\&quot;</span> xmlns:xsd=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://www.w3.org/2001/XMLSchema<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span>
&nbsp;
GenerateAuthenticationHeader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span>
&nbsp;
<span style="color: #3366CC;">&quot; &lt;soap:Body&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;RetrieveMultiple xmlns=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://schemas.microsoft.com/crm/2007/WebServices<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;query xmlns:q1=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://schemas.microsoft.com/crm/2006/Query<span style="color: #000099; font-weight: bold;">\&quot;</span> xsi:type=<span style="color: #000099; font-weight: bold;">\&quot;</span>q1:QueryExpression<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:EntityName&gt;role&lt;/q1:EntityName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:ColumnSet xsi:type=<span style="color: #000099; font-weight: bold;">\&quot;</span>q1:ColumnSet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:Attributes&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:Attribute&gt;name&lt;/q1:Attribute&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:Attributes&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:ColumnSet&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:Distinct&gt;false&lt;/q1:Distinct&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkEntities&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkEntity&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkFromAttributeName&gt;roleid&lt;/q1:LinkFromAttributeName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkFromEntityName&gt;role&lt;/q1:LinkFromEntityName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkToEntityName&gt;systemuserroles&lt;/q1:LinkToEntityName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkToAttributeName&gt;roleid&lt;/q1:LinkToAttributeName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:JoinOperator&gt;Inner&lt;/q1:JoinOperator&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkEntities&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkEntity&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkFromAttributeName&gt;systemuserid&lt;/q1:LinkFromAttributeName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkFromEntityName&gt;systemuserroles&lt;/q1:LinkFromEntityName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkToEntityName&gt;systemuser&lt;/q1:LinkToEntityName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkToAttributeName&gt;systemuserid&lt;/q1:LinkToAttributeName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:JoinOperator&gt;Inner&lt;/q1:JoinOperator&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:LinkCriteria&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:FilterOperator&gt;And&lt;/q1:FilterOperator&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:Conditions&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:Condition&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:AttributeName&gt;systemuserid&lt;/q1:AttributeName&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;q1:Operator&gt;EqualUserId&lt;/q1:Operator&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:Condition&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:Conditions&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:LinkCriteria&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:LinkEntity&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:LinkEntities&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:LinkEntity&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/q1:LinkEntities&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/query&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/RetrieveMultiple&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot; &lt;/soap:Body&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot;&lt;/soap:Envelope&gt;&quot;</span> <span style="color: #339933;">+</span>
<span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> xmlHttpRequest <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Msxml2.XMLHTTP&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlHttpRequest.<span style="color: #000066;">Open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;POST&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;/mscrmservices/2007/CrmService.asmx&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlHttpRequest.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;SOAPAction&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot; http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlHttpRequest.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Content-Type&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;text/xml; charset=utf-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlHttpRequest.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Content-Length&quot;</span><span style="color: #339933;">,</span> xml.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    xmlHttpRequest.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span>xml<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> resultXml <span style="color: #339933;">=</span> xmlHttpRequest.<span style="color: #660066;">responseXML</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>resultXml<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>



<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;title=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;t=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role+-+http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;n=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;title=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;title=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;t=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;title=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;title=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/&amp;title=CRM+4.0+Read-Only+%2F+Disable+%2F+Hide+Fields+Based+on+Security+Role&amp;summary=Suppose%20you%20want%20to%20make%20some%20fields%20editable%20for%20only%20some%20users%20in%20CRM%20forms%2C%20there%20is%20a%20great%20and%20simple%20MSDN%20blog%20that%20outlines%20how%20to%20do%20it.%0D%0A%0D%0AHere%27s%20a%20copy%20of%20%C2%A0their%20code.%20Just%20change%20_roles%20and%20_fields%20to%20the%20fields%27%20names%20that%20you%20want%20to%20disable%20for%20_roles.%20Flip%20it%20around%20and%20enable%20it%20on&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/crm-4-0-read-only-disable-hide-fields-based-on-security-role/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRM Workflows Don&#8217;t Work, E-mails Don&#8217;t Send&#8230;</title>
		<link>http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/</link>
		<comments>http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 17:22:07 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=265</guid>
		<description><![CDATA[Symptom: You choose to run a workflow but nothing seems to happen and the new workflow doesn&#8217;t appear in the workflow tab. Theory: If my CRM exam studyage served me right, the Microsoft Dynamics CRM is composed of 3 parts. The application layer producing the business logic, the data layer interfacing with SQL and the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Symptom</strong>: You choose to run a workflow but nothing seems to happen and the new workflow doesn&#8217;t appear in the workflow tab.</p>
<p><strong>Theory</strong>: If my CRM exam studyage served me right, the Microsoft Dynamics CRM is composed of 3 parts. The application layer producing the business logic, the data layer interfacing with SQL and the async service layer doing stuff like workflows on the background (a bit like SQL agent). If the first 2 break, you won&#8217;t get your CRM site at all. When the async service layer breaks, it&#8217;s a bit more subtle like in this case.<span id="more-265"></span></p>
<p><strong>Diagnosis</strong>: The most important part is to intercept at least some form of error output and determine what&#8217;s wrong with the system. You need to turn on your tracing function for CRM as described <a href="http://support.microsoft.com/kb/907490">here</a>. The look at your web log and your async log, typically at C:\Program Files\Microsoft Dynamics CRM\Trace.</p>
<p><strong>Possible Causes</strong>:</p>
<ul>
<li>First, be sure to update your CRM software. At the time of the writing, the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f84f2bfb-393d-4b90-bf1b-300a82ec6083&amp;displaylang=en">Update Rollup 11</a> is the newest</li>
<li>Check your IIS web.config file. Make sure critical parts required for the async service are there. Make sure for instance that the &lt;System.Workflow.ComponentModel.WorkflowCompiler&gt; section is there to allow the workflow compiler to use basic CLI classes like String and Object etc.</li>
<li>If your CRM site is initially installed in port 5555, changing it after in IIS Manager won&#8217;t affect the async service. Therefore, if you change it to port 80 or do anything else to change the URL for accessing your CRM site, you won&#8217;t be able to access the async service. Check your trace to confirm your initial setting.</li>
</ul>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;title=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;t=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send...+-+http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;n=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send...&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;title=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;title=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;t=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;title=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;title=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send..." rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/&amp;title=CRM+Workflows+Don%27t+Work%2C+E-mails+Don%27t+Send...&amp;summary=Symptom%3A%20You%20choose%20to%20run%20a%20workflow%20but%20nothing%20seems%20to%20happen%20and%20the%20new%20workflow%20doesn%27t%20appear%20in%20the%20workflow%20tab.%0D%0A%0D%0ATheory%3A%20If%20my%20CRM%20exam%20studyage%20served%20me%20right%2C%20the%20Microsoft%20Dynamics%20CRM%20is%20composed%20of%203%20parts.%20The%20application%20layer%20producing%20the%20business%20logic%2C%20the%20data%20layer%20interfa&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/crm-workflows-dont-work-e-mails-dont-send/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop Transferring All Internet Traffic Through Windows VPN</title>
		<link>http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/</link>
		<comments>http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 18:52:14 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Gateway]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=257</guid>
		<description><![CDATA[By default, when you connect to VPN in Windows, it will put all your Internet traffic through the VPN. This can be annoying if you just want to VPN in to get access to some files on the network. This can be especially annoying if your VPN server is slow and now all your Internet [...]]]></description>
			<content:encoded><![CDATA[<p>By default, when you connect to VPN in Windows, it will put all your Internet traffic through the VPN. This can be annoying if you just want to VPN in to get access to some files on the network. This can be especially annoying if your VPN server is slow and now all your Internet access speed is slow.<span id="more-257"></span></p>
<p>To use VPN for domain network access only</p>
<ol>
<li>Right-click your VPN connection and choose properties.</li>
<li>Go to Networking tab and open your TCP/IPv4 item</li>
<li>Click on Advanced&#8230;</li>
<li>Uncheck &#8220;Use default gateway on remote network&#8221; and click OK</li>
</ol>
<p>Now, only relevant traffic goes through VPN</p>
<p style="text-align: center;"><a href="http://tech.xster.net/wp-content/uploads/2010/07/21-07-2010-2-48-46-PM1.png"><img class="aligncenter size-full wp-image-259" title="VPN Settings" src="http://tech.xster.net/wp-content/uploads/2010/07/21-07-2010-2-48-46-PM1.png" alt="" width="723" height="293" /></a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;title=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;t=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN+-+http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;n=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;title=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;title=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;t=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;title=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;title=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/&amp;title=Stop+Transferring+All+Internet+Traffic+Through+Windows+VPN&amp;summary=By%20default%2C%20when%20you%20connect%20to%20VPN%20in%20Windows%2C%20it%20will%20put%20all%20your%20Internet%20traffic%20through%20the%20VPN.%20This%20can%20be%20annoying%20if%20you%20just%20want%20to%20VPN%20in%20to%20get%20access%20to%20some%20files%20on%20the%20network.%20This%20can%20be%20especially%20annoying%20if%20your%20VPN%20server%20is%20slow%20and%20now%20all%20your%20Internet%20access%20speed%20is%20slow&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/stop-transferring-all-internet-traffic-through-windows-vpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free OBD2 Software for Mac</title>
		<link>http://tech.xster.net/tips/free-obd2-software-for-mac/</link>
		<comments>http://tech.xster.net/tips/free-obd2-software-for-mac/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 19:23:16 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[OBD]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[UART]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[wxPython]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=255</guid>
		<description><![CDATA[If you just picked up a generic OBD-II &#8211; USB interface on eBay and have a Mac, it is true that it is generally more convenient to access these hardware on Windows. Even embedded device developers tend to use Windows to develop against these generic FT232R chip based USB-UART devices simply because of more available [...]]]></description>
			<content:encoded><![CDATA[<p>If you just picked up a generic OBD-II &#8211; USB interface on eBay and have a Mac, it is true that it is generally more convenient to access these hardware on Windows. Even embedded device developers tend to use Windows to develop against these generic FT232R chip based USB-UART devices simply because of more available supports. But worry not, it can be done on Mac (really on Linux with a more open-platform framework than Windows), it&#8217;s just a bit more complicated since it tends to come in be open-source source code rather than prepackaged self-sufficient binaries.<span id="more-255"></span></p>
<p>But in this case, it&#8217;s not too bad. You can use <a href="http://www.obdtester.com/pyobd">pyOBD</a>, an Python open-source project. You just need some packages from MacPorts</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">install</span> py26-serial
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">install</span> py26-wxpython</pre></div></div>

<p>Download and unpack the source code. And run directly with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pythonw pyobd</pre></div></div>

<p>p.s. you need X11</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;title=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;t=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Free+OBD2+Software+for+Mac+-+http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;n=Free+OBD2+Software+for+Mac&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;title=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;title=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;t=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;title=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;title=Free+OBD2+Software+for+Mac" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/free-obd2-software-for-mac/&amp;title=Free+OBD2+Software+for+Mac&amp;summary=If%20you%20just%20picked%20up%20a%20generic%20OBD-II%20-%20USB%20interface%20on%20eBay%20and%20have%20a%20Mac%2C%20it%20is%20true%20that%20it%20is%20generally%20more%20convenient%20to%20access%20these%20hardware%20on%20Windows.%20Even%20embedded%20device%20developers%20tend%20to%20use%20Windows%20to%20develop%20against%20these%20generic%20FT232R%20chip%20based%20USB-UART%20devices%20simply%20because%20o&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/free-obd2-software-for-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Unpause Applications in Mac OS X</title>
		<link>http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/</link>
		<comments>http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 19:06:01 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[freeze]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[unfreeze]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=252</guid>
		<description><![CDATA[I asked this question on Superuser.com after experiencing this problem. Now it&#8217;s accessible to everyone. When something goes wrong and you run out of memory on Mac OS X, the system puts your existing applications to pause to prevent the system from becoming unstable. After taking care of the problem and freeing more memory, you [...]]]></description>
			<content:encoded><![CDATA[<p>I asked this question on <a href="http://superuser.com/questions/118190/unpause-application-in-mac-os-x">Superuser.com</a> after experiencing this problem. Now it&#8217;s accessible to everyone.</p>
<p>When something goes wrong and you run out of memory on Mac OS X, the system puts your existing applications to pause to prevent the system from becoming unstable. After taking care of the problem and freeing more memory, you might notice that the applications you had are still frozen. To unpause them, find their PID using <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?ps">ps</a> and use the kill command to revive it (irony)</p>
<pre lang = "bash">kill -CONT 111</pre>
<p>Of course, 111 here is replaced with the PID you found with ps</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;title=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;t=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+to+Unpause+Applications+in+Mac+OS+X+-+http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;n=How+to+Unpause+Applications+in+Mac+OS+X&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;title=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;title=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;t=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;title=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;title=How+to+Unpause+Applications+in+Mac+OS+X" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/&amp;title=How+to+Unpause+Applications+in+Mac+OS+X&amp;summary=I%20asked%20this%20question%20on%20Superuser.com%20after%20experiencing%20this%20problem.%20Now%20it%27s%20accessible%20to%20everyone.%0D%0A%0D%0AWhen%20something%20goes%20wrong%20and%20you%20run%20out%20of%20memory%20on%20Mac%20OS%20X%2C%20the%20system%20puts%20your%20existing%20applications%20to%20pause%20to%20prevent%20the%20system%20from%20becoming%20unstable.%20After%20taking%20care%20of%20the%20prob&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/how-to-unpause-applications-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to List Checked-Out Files in Team Foundation</title>
		<link>http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/</link>
		<comments>http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:55:48 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[check-out]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Team Explorer]]></category>
		<category><![CDATA[Team Foundation]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[TF]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[Visual SourceSafe]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=247</guid>
		<description><![CDATA[In Visual SourceSafe, you were able to look at all the files that were checked-out by members of your team. It is not a default function available for TFS users to find all the checked-out files but it&#8217;s an easy task to do. All over the Internet, people seem to be suggesting to use the [...]]]></description>
			<content:encoded><![CDATA[<p>In Visual SourceSafe, you were able to look at all the files that were checked-out by members of your team. It is not a default function available for TFS users to find all the checked-out files but it&#8217;s an easy task to do.</p>
<p><img class="aligncenter size-full wp-image-248" title="Power tools" src="http://tech.xster.net/wp-content/uploads/2010/07/19-07-2010-12-50-47-PM.png" alt="" width="509" height="227" /><span id="more-247"></span></p>
<p>All over the Internet, people seem to be suggesting to use the TF.exe tool to do it. It&#8217;s typically under</p>
<pre>C:\Program Files (x86)\Microsoft Visual Studio x.0\Common7\IDE</pre>
<p>but it sucks donkey ass. A much better tool to use is Microsoft&#8217;s <a href="http://msdn.microsoft.com/en-us/vstudio/bb980963.aspx">Team Foundation Server Power Tools</a> which are available for free for both the 2008 and 2010 versions of Team Explorer. The interface can be seen above.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;title=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;t=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+to+List+Checked-Out+Files+in+Team+Foundation+-+http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;n=How+to+List+Checked-Out+Files+in+Team+Foundation&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;title=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;title=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;t=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;title=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;title=How+to+List+Checked-Out+Files+in+Team+Foundation" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/&amp;title=How+to+List+Checked-Out+Files+in+Team+Foundation&amp;summary=In%20Visual%20SourceSafe%2C%20you%20were%20able%20to%20look%20at%20all%20the%20files%20that%20were%20checked-out%20by%20members%20of%20your%20team.%20It%20is%20not%20a%20default%20function%20available%20for%20TFS%20users%20to%20find%20all%20the%20checked-out%20files%20but%20it%27s%20an%20easy%20task%20to%20do.%0D%0A%0D%0A%0D%0A%0D%0AAll%20over%20the%20Internet%2C%20people%20seem%20to%20be%20suggesting%20to%20use%20the%20TF.exe&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/how-to-list-checked-out-files-in-team-foundation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quake Style Drop Down Terminal for Windows</title>
		<link>http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/</link>
		<comments>http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 01:54:47 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[quake]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[visor]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Yakuake]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=236</guid>
		<description><![CDATA[I was used to the convenience of drop-down terminals like Visor in Mac or Yakuake in Linux and needed something similar in Windows. It turns out, it is possible to achieve almost the same effects in Windows with the use of 2 tools. AutoHotkey -  lets you run scripts triggered by hotkeys anywhere in Windows Console [...]]]></description>
			<content:encoded><![CDATA[<p>I was used to the convenience of drop-down terminals like <a href="http://tech.xster.net/tips/the-perfect-visor-reborn/">Visor</a> in Mac or Yakuake in Linux and needed something similar in Windows.</p>
<p>It turns out, it is possible to achieve almost the same effects in Windows with the use of 2 tools.</p>
<ul>
<li><a href="http://www.autohotkey.com/">AutoHotkey</a> -  lets you run scripts triggered by hotkeys anywhere in Windows</li>
<li><a href="http://sourceforge.net/projects/console/">Console</a> &#8211; is a terminal app that lets you run a custom shell with no title bar, no borders, transparency etc.</li>
</ul>
<p style="text-align: center;"><a href="http://tech.xster.net/wp-content/uploads/2010/06/console.png"><img class="size-full wp-image-239 aligncenter" title="Console" src="http://tech.xster.net/wp-content/uploads/2010/06/console.png" alt="" width="652" height="235" /></a></p>
<p style="text-align: left;"><span id="more-236"></span>Follow these steps to get it working:</p>
<ol>
<li>Download <a href="http://sourceforge.net/projects/console/">Console</a> and put it somewhere (ie. C:\Program Files\Console2\)</li>
<li>Make sure it&#8217;s in your %path% system environment (Right-click My Computer, Properties, Advanced system settings, Advanced, Environment Variables)</li>
<li>Run it, go to Edit -&gt; Settings. Change the settings to suit your taste
<ul>
<li>Change your shell to PowerShell at C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe for Windows 7 and change your startup dir</li>
<li>Change the window size columns to take up most of your screen</li>
<li>Windows fonts suck, try <a href="http://www.font-zone.com/download.php?fid=2026">Andale Mono</a> or <a href="http://www.fonts101.com/fonts/view/Uncategorized/51239/Monaco.aspx">Monaco</a></li>
<li>Make sure initial position is at 0, 0 and always on top</li>
<li>Under Appearance -&gt; More&#8230;, make sure it has no menu, no toolbar, no caption, not resizable, no border, no taskbar, no tray icon for minimal footprint</li>
<li>Set your transparency</li>
</ul>
</li>
<li>Download <a href="http://www.autohotkey.com/">AutoHotkey</a> and install it</li>
<li>Download <a href="http://tech.xster.net/wp-content/uploads/2010/06/QuakeTerminal.ahk">this script</a> to your Startup foler, change the <a href="http://www.autohotkey.com/docs/Hotkeys.htm">hotkey</a> to what you want to use in the script. It is initially Ctrl-`</li>
<li>Run the script and press your hotkey</li>
<li>Boom, you got a terminal at your fingertip</li>
</ol>
<p>Sources: <a href="http://jake.ginnivan.net/2010/01/quake-style-powershell-console/">[1]</a> <a href="http://www.instructables.com/id/%22Drop-Down%22,-Quake-style-command-prompt-for-Window/">[2]</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;title=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;t=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Quake+Style+Drop+Down+Terminal+for+Windows+-+http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;n=Quake+Style+Drop+Down+Terminal+for+Windows&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;title=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;title=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;t=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;title=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;title=Quake+Style+Drop+Down+Terminal+for+Windows" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/&amp;title=Quake+Style+Drop+Down+Terminal+for+Windows&amp;summary=I%20was%20used%20to%20the%20convenience%20of%20drop-down%20terminals%20like%20Visor%20in%20Mac%20or%20Yakuake%20in%20Linux%20and%20needed%20something%20similar%20in%20Windows.%0D%0A%0D%0AIt%20turns%20out%2C%20it%20is%20possible%20to%20achieve%20almost%20the%20same%20effects%20in%20Windows%20with%20the%20use%20of%202%20tools.%0D%0A%0D%0A%09AutoHotkey%20-%C2%A0%C2%A0lets%20you%20run%20scripts%20triggered%20by%20hotkeys%20any&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The location of the file or directory &#8216;C:\Something&#8217; is not trusted</title>
		<link>http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/</link>
		<comments>http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 02:32:55 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=233</guid>
		<description><![CDATA[The error &#8220;The location of the file or directory &#8216;C:\Something&#8217; is not trusted&#8221; can sometimes be issued when linking or deploying assemblies in Windows. The issue is that Vista and Windows 7 have a way of automatically marking files received from another computer as unsafe to execute against. The easiest way to solve is to [...]]]></description>
			<content:encoded><![CDATA[<p>The error &#8220;The location of the file or directory &#8216;C:\Something&#8217; is not trusted&#8221; can sometimes be issued when linking or deploying assemblies in Windows. The issue is that Vista and Windows 7 have a way of automatically marking files received from another computer as unsafe to execute against.</p>
<p>The easiest way to solve is to remove the restriction against the particular file</p>
<p style="text-align: center;"><a href="http://tech.xster.net/wp-content/uploads/2010/06/unblock.png"><img class="size-full wp-image-234 aligncenter" title="unblock" src="http://tech.xster.net/wp-content/uploads/2010/06/unblock.png" alt="" width="188" height="258" /></a></p>
<p style="text-align: left;">Right-click the file and open properties and click unblock.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;title=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;t=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted+-+http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;n=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;title=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;title=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;t=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;title=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;title=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/&amp;title=The+location+of+the+file+or+directory+%27C%3A%5CSomething%27+is+not+trusted&amp;summary=The%20error%20%22The%20location%20of%20the%20file%20or%20directory%20%27C%3A%5CSomething%27%20is%20not%20trusted%22%20can%20sometimes%20be%20issued%20when%20linking%20or%20deploying%20assemblies%20in%20Windows.%20The%20issue%20is%20that%20Vista%20and%20Windows%207%20have%20a%20way%20of%20automatically%20marking%20files%20received%20from%20another%20computer%20as%20unsafe%20to%20execute%20against.%0D%0A%0D%0AThe&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/the-location-of-the-file-or-directory-csomething-is-not-trusted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Convert ISO8601/UTC to Local Time</title>
		<link>http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/</link>
		<comments>http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/#comments</comments>
		<pubDate>Sat, 08 May 2010 23:51:54 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[astimezone]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[dateutil]]></category>
		<category><![CDATA[ISO]]></category>
		<category><![CDATA[ISO8601]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[pytz]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timezone]]></category>
		<category><![CDATA[UTC]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=230</guid>
		<description><![CDATA[Ok, I looked this up twice now&#8230; once too many Suppose you have a datetime of the form &#8220;2010-05-08T23:41:54.000Z&#8221; and you want a local datetime object import pytz, dateutil.parser utctime = dateutil.parser.parse&#40;&#34;2010-05-08T23:41:54.000Z&#34;&#41; localtime = utctime.astimezone&#40;pytz.timezone&#40;&#34;Canada/Eastern&#34;&#41;&#41; Boom Digg this! Share this on Facebook Tweet This! Blog this on Blogger Share this on Reddit Stumble upon something [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I looked this up twice now&#8230; once too many</p>
<p>Suppose you have a datetime of the form &#8220;2010-05-08T23:41:54.000Z&#8221; and you want a local datetime object</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> pytz, dateutil.<span style="color: #dc143c;">parser</span>
utctime = dateutil.<span style="color: #dc143c;">parser</span>.<span style="color: black;">parse</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;2010-05-08T23:41:54.000Z&quot;</span><span style="color: black;">&#41;</span>
localtime = utctime.<span style="color: black;">astimezone</span><span style="color: black;">&#40;</span>pytz.<span style="color: black;">timezone</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Canada/Eastern&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Boom</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;title=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;t=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Python+Convert+ISO8601%2FUTC+to+Local+Time+-+http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;n=Python+Convert+ISO8601%2FUTC+to+Local+Time&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;title=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;title=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;t=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;title=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;title=Python+Convert+ISO8601%2FUTC+to+Local+Time" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/&amp;title=Python+Convert+ISO8601%2FUTC+to+Local+Time&amp;summary=Ok%2C%20I%20looked%20this%20up%20twice%20now...%20once%20too%20many%0D%0A%0D%0ASuppose%20you%20have%20a%20datetime%20of%20the%20form%20%222010-05-08T23%3A41%3A54.000Z%22%20and%20you%20want%20a%20local%20datetime%20object%0D%0Aimport%20pytz%2C%20dateutil.parser%0D%0Autctime%20%3D%20dateutil.parser.parse%28%222010-05-08T23%3A41%3A54.000Z%22%29%0D%0Alocaltime%20%3D%20utctime.astimezone%28pytz.timezone%28%22Canada%2F&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/python-convert-iso8601utc-to-local-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploy PyQt Applications on Mac OS X with PyInstaller!</title>
		<link>http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/</link>
		<comments>http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 07:20:39 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[PIL]]></category>
		<category><![CDATA[py2app]]></category>
		<category><![CDATA[PyInstaller]]></category>
		<category><![CDATA[PyQt]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=218</guid>
		<description><![CDATA[The interweb seem to incline on py2app when it come to deploying applications on mac. I&#8217;ve tried to make a single deployable .app file for my application for a long time trying to follow these instructions from ars technica. I&#8217;m not a hacker and just want to produce a deployable usable application for others to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pyinstaller.org/"><img class="alignright size-medium wp-image-221" title="PyInstaller" src="http://tech.xster.net/wp-content/uploads/2010/04/logo-300x60.png" alt="" width="240" height="48" /></a>The interweb seem to incline on <a href="http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html">py2app</a> when it come to deploying applications on mac. I&#8217;ve tried to make a single deployable .app file for my application for a long time trying to follow <a href="http://arstechnica.com/open-source/guides/2009/03/how-to-deploying-pyqt-applications-on-windows-and-mac-os-x.ars/2">these instructions from ars technica</a>. I&#8217;m not a hacker and just want to produce a deployable usable application for others to use. And it seems py2app from MacPorts wasn&#8217;t able to surmount the Snow Leopard&#8217;s 64-bit compatibility issue.</p>
<p>And then, I was slacking off while studying for my final and out of nowhere I found <a href="http://www.pyinstaller.org/">PyInstaller</a>&#8216;s explicit support for PyQt and its recent support for the mac. And after trying, almost everything works out without much of a kink. Credit goes to <a href="http://diotavelli.net/PyQtWiki/PyInstallerOnMacOSX">ChrisWayg</a> who produced an amazingly complete and up-to-date set of instructions to follow. I&#8217;m merely telling how my application did using his instructions (April 2010) and hopefully doing my part to draw more attention to the excellent <a href="http://www.pyinstaller.org/">PyInstaller</a>.<span id="more-218"></span></p>
<h3>My Application</h3>
<p>A PyQt application to help photographers apply custom watermarks in a manual but in an assisted way.</p>
<p>Uses:</p>
<ul>
<li>PIL 1.1.7</li>
<li>Qt4 4.6.2</li>
<li>PyQt4 4.7.2</li>
<li>SIP 4.10.1</li>
</ul>
<p>All from MacPorts on Python 2.6.5, OSX 10.6.3.</p>
<h3>Prepare PyInstaller</h3>
<p>PyInstaller is kinda special in that it&#8217;s not installed anywhere. It&#8217;s just a bunch of Python scripts that work on stuff in place. While you&#8217;re at it, read the <a href="http://www.pyinstaller.org/export/latest/tags/1.4/doc/Manual.html">manual</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.pyinstaller.org<span style="color: #000000; font-weight: bold;">/</span>trunk ~<span style="color: #000000; font-weight: bold;">/</span>PyInstaller</pre></div></div>

<p>Or put it somewhere you want.</p>
<p>Then you need to build the bootloaders. If you&#8217;re making PyQt applications, you probably have XCode already. Anyway, you need it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> source<span style="color: #000000; font-weight: bold;">/</span>linux
python Make.py
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
python Configure.py</pre></div></div>

<h3>Making your Application</h3>
<p><a href="http://www.pyinstaller.org/ticket/158">So far</a>, PyInstaller has a problem of not showing your application at the front when you run it. You can fix it in your own code by adding</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">form.raise_<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>right after</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">form.show<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>with &#8220;form&#8221; being whatever you called your instance of MainWindow().</p>
<p>Like with py2app, you gotta first make a &#8220;spec file&#8221;.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python Makespec.py <span style="color: #660033;">--onefile</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>YourApplication.py</pre></div></div>

<p>This will make a YourApplication/YourApplication.spec file in your PyInstaller folder.<br />
To make it work on mac, add</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">sys</span>.<span style="color: #dc143c;">platform</span>.<span style="color: black;">startswith</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;darwin&quot;</span><span style="color: black;">&#41;</span>:
    app = BUNDLE<span style="color: black;">&#40;</span>exe,
                 appname=<span style="color: #483d8b;">'WhateverYouWantToCallIt'</span>,
                 version=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span></pre></div></div>

<p>at the bottom.</p>
<p>For my application, it made 70 files inside the .app file on default. &#8211;onefile makes it more neat and 3 times smaller in size! but it does make it a bit slower. If you care to make it as fast as possible, leave out that option but you have to <a href="http://www.pyinstaller.org/ticket/155">fix a bug</a> yourself.</p>
<p>Finally, build the application!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python Build.py YourApplication<span style="color: #000000; font-weight: bold;">/</span>YourApplication.spec</pre></div></div>

<p>This will make your application and leave a YourApplication.app in your PyInstaller folder.</p>
<h3>Fix the Application</h3>
<p>Put your own nice icon on the application. Copy your graphic, right-click your application and choose Get Info, click the icon and paste the graphic.</p>
<p>Open the content of your application, open Contents/Info.plist, uncheck &#8220;Application is background only&#8221; and save. If you&#8217;re using a plain text editor, change LSBackgroundOnly to false.</p>
<p>There is only one last problem to deal with on mac. You have to copy the qt_menu.nib file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">locate</span> qt_menu.nib</pre></div></div>

<p>to find it. If you use MacPorts, it&#8217;s probably somewhere like /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib</p>
<p>Copy it to your YourApplication.app/Contents/Resources</p>
<p>Boom, you can double click your application and it will run!</p>
<p>Ok, one last problem, I swear. When you run, it shows 2 icons on the dock&#8230; pretty ugly. <a href="http://www.pyinstaller.org/ticket/156">This hack</a> can fix it, but it&#8217;s not perfect as it leaves junk on your computer. Hopefully PyInstaller can address it soon.</p>
<h3>Conclusion</h3>
<p>The program is beautiful! You don&#8217;t have to worry about your Python plug-ins, your 64-bitness, anything (mostly). It just works. I have yet to figure out how to make 32-bit binaries on 64-bit systems and how to make upx work properly to reduce executable size. I&#8217;m currently running at 32mb for an application that really should be 1mb. But then again, it&#8217;s packaging a whole new GUI framework that doesn&#8217;t exist on the target computer with the application. Consider Skype (yes, it&#8217;s infinitely more complex than my thing), it is still 43mb.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;title=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;t=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21+-+http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;n=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;title=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;title=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;t=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;title=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;title=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/&amp;title=Deploy+PyQt+Applications+on+Mac+OS+X+with+PyInstaller%21&amp;summary=The%20interweb%20seem%20to%20incline%20on%20py2app%20when%20it%20come%20to%20deploying%20applications%20on%20mac.%20I%27ve%20tried%20to%20make%20a%20single%20deployable%20.app%20file%20for%20my%20application%20for%20a%20long%20time%20trying%20to%20follow%20these%20instructions%20from%20ars%20technica.%20I%27m%20not%20a%20hacker%20and%20just%20want%20to%20produce%20a%20deployable%20usable%20application%20f&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python&#8217;s Function Static Variable</title>
		<link>http://tech.xster.net/tips/pythons-function-static-variable/</link>
		<comments>http://tech.xster.net/tips/pythons-function-static-variable/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 05:25:11 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[variable]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=211</guid>
		<description><![CDATA[So you want a variable that stays between different calls of a function. Not the sexiest thing ever but always handy in small programs. There&#8217;s tons of ways of doing this. You can embark on a quest to find the meaning of Pythonic or take this method that&#8217;s relatively simple: def a&#40;&#41;: if not hasattr&#40;a, [...]]]></description>
			<content:encoded><![CDATA[<p>So you want a variable that stays between different calls of a function. Not the sexiest thing ever but always handy in small programs.</p>
<p>There&#8217;s tons of ways of doing this. You can embark on a quest to find the meaning of Pythonic or take this method that&#8217;s relatively simple:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> a<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #008000;">hasattr</span><span style="color: black;">&#40;</span>a, <span style="color: #483d8b;">&quot;b&quot;</span><span style="color: black;">&#41;</span>: a.<span style="color: black;">b</span> = <span style="color: #ff4500;">0</span>
    a.<span style="color: black;">b</span> += <span style="color: #ff4500;">1</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> a.<span style="color: black;">b</span></pre></div></div>

<p>Calling a(), you&#8217;ll get 1, 2, 3, &#8230;</p>
<p>Note attribute &#8216;b&#8217; of &#8216;a&#8217; does not exist until you declare it for a first time. My main preference here is that &#8216;static&#8217; variables used this way does not spill onto the rest of your code. Also, it&#8217;s clean, no classes, no data structures.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;title=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/pythons-function-static-variable/&amp;t=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Python%27s+Function+Static+Variable+-+http://tech.xster.net/tips/pythons-function-static-variable/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/pythons-function-static-variable/&amp;n=Python%27s+Function+Static+Variable&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;title=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;title=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/pythons-function-static-variable/&amp;t=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;title=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;title=Python%27s+Function+Static+Variable" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/pythons-function-static-variable/&amp;title=Python%27s+Function+Static+Variable&amp;summary=So%20you%20want%20a%20variable%20that%20stays%20between%20different%20calls%20of%20a%20function.%20Not%20the%20sexiest%20thing%20ever%20but%20always%20handy%20in%20small%20programs.%0D%0A%0D%0AThere%27s%20tons%20of%20ways%20of%20doing%20this.%20You%20can%20embark%20on%20a%20quest%20to%20find%20the%20meaning%20of%20Pythonic%20or%20take%20this%20method%20that%27s%20relatively%20simple%3A%0D%0Adef%20a%28%29%3A%0D%0A%20%20%20%20if%20not&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/pythons-function-static-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suppress Scapy IPv6 Warning</title>
		<link>http://tech.xster.net/tips/suppress-scapy-ipv6-warning/</link>
		<comments>http://tech.xster.net/tips/suppress-scapy-ipv6-warning/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:45:13 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[packet]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scapy]]></category>
		<category><![CDATA[sniffer]]></category>
		<category><![CDATA[TCP]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=207</guid>
		<description><![CDATA[When you run Scapy without a default IPv6 routing gateway, Scapy will display this annoying warning: WARNING: No route found for IPv6 destination :: (no default route?) You definitely don&#8217;t want to see it every time you run the script you built with Scapy. To get rid of it, simply add import logging logging.getLogger&#40;&#34;scapy.runtime&#34;&#41;.setLevel&#40;logging.ERROR&#41; before [...]]]></description>
			<content:encoded><![CDATA[<p>When you run <a href="http://www.secdev.org/projects/scapy/" target="_blank">Scapy</a> without a default IPv6 routing gateway, Scapy will display this annoying warning:</p>
<pre>WARNING: No route found for IPv6 destination :: (no default route?)</pre>
<p>You definitely don&#8217;t want to see it every time you run the script you built with Scapy. To get rid of it, simply add</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">logging</span>
<span style="color: #dc143c;">logging</span>.<span style="color: black;">getLogger</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;scapy.runtime&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">setLevel</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">logging</span>.<span style="color: black;">ERROR</span><span style="color: black;">&#41;</span></pre></div></div>

<p>before importing Scapy to suppress all messages below error messages</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;title=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;t=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Suppress+Scapy+IPv6+Warning+-+http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;n=Suppress+Scapy+IPv6+Warning&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;title=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;title=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;t=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;title=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;title=Suppress+Scapy+IPv6+Warning" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/suppress-scapy-ipv6-warning/&amp;title=Suppress+Scapy+IPv6+Warning&amp;summary=When%20you%20run%20Scapy%20without%20a%20default%20IPv6%20routing%20gateway%2C%20Scapy%20will%20display%20this%20annoying%20warning%3A%0D%0AWARNING%3A%20No%20route%20found%20for%20IPv6%20destination%20%3A%3A%20%28no%20default%20route%3F%29%0D%0AYou%20definitely%20don%27t%20want%20to%20see%20it%20every%20time%20you%20run%20the%20script%20you%20built%20with%20Scapy.%20To%20get%20rid%20of%20it%2C%20simply%20add%0D%0Aimport%20logg&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/suppress-scapy-ipv6-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining Run-Time/DesignMode in .NET</title>
		<link>http://tech.xster.net/tips/determining-run-timedesignmode-in-net/</link>
		<comments>http://tech.xster.net/tips/determining-run-timedesignmode-in-net/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 23:42:27 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[design mode]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[memory leak]]></category>
		<category><![CDATA[run-time]]></category>
		<category><![CDATA[vb]]></category>
		<category><![CDATA[visual basic]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=204</guid>
		<description><![CDATA[Suppose you fill your table with data from a database, you wouldn&#8217;t want it to do so while in Visual Studio&#8217;s Designer. Control.DesignMode ought to be the perfect property to check for in your form initialisations but unfortunately, it&#8217;s so buggy that it hardly does what you need. It doesn&#8217;t work in the constructors and [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you fill your table with data from a database, you wouldn&#8217;t want it to do so while in Visual Studio&#8217;s Designer. Control.DesignMode ought to be the perfect property to check for in your form initialisations but unfortunately, it&#8217;s so buggy that it hardly does what you need. It doesn&#8217;t work in the constructors and have problems with user controls.</p>
<p>Then people tend to use</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">If</span> <span style="color: #000000;">&#40;</span>Process.<span style="color: #0000FF;">GetCurrentProcess</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ProcessName</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;devenv&quot;</span><span style="color: #000000;">&#41;</span></pre></div></div>

<p>which works fine if you call it once but inside a key user control&#8217;s initialiser, it may be called hundreds of time and cause a massive memory leak. Currently, the ProcessName string never gets freed and fills up memory very fast. Instead, save the process name in your own global variable when the program starts and check against</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">If</span> <span style="color: #000000;">&#40;</span>MyProcessName <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;devenv&quot;</span><span style="color: #000000;">&#41;</span></pre></div></div>

<p>instead.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-spaced">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;title=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;t=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Determining+Run-Time%2FDesignMode+in+.NET+-+http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;n=Determining+Run-Time%2FDesignMode+in+.NET&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;title=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;title=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;t=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;title=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;title=Determining+Run-Time%2FDesignMode+in+.NET" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://tech.xster.net/tips/determining-run-timedesignmode-in-net/&amp;title=Determining+Run-Time%2FDesignMode+in+.NET&amp;summary=Suppose%20you%20fill%20your%20table%20with%20data%20from%20a%20database%2C%20you%20wouldn%27t%20want%20it%20to%20do%20so%20while%20in%20Visual%20Studio%27s%20Designer.%20Control.DesignMode%20ought%20to%20be%20the%20perfect%20property%20to%20check%20for%20in%20your%20form%20initialisations%20but%20unfortunately%2C%20it%27s%20so%20buggy%20that%20it%20hardly%20does%20what%20you%20need.%20It%20doesn%27t%20work%20in&amp;source=Xster.net" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/determining-run-timedesignmode-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
