<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>unvisible &#187; programming</title>
	<atom:link href="http://unvisible.wordpress.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://unvisible.wordpress.com</link>
	<description>A day in the life of a computer vision graduate student.</description>
	<lastBuildDate>Wed, 17 Jun 2009 22:23:14 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='unvisible.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/51a59e0fa0d921ea6bc20d09b23c537c?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>unvisible &#187; programming</title>
		<link>http://unvisible.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://unvisible.wordpress.com/osd.xml" title="unvisible" />
		<item>
		<title>Tagging using the Flickr API</title>
		<link>http://unvisible.wordpress.com/2007/06/11/tagging-using-the-flickr-api/</link>
		<comments>http://unvisible.wordpress.com/2007/06/11/tagging-using-the-flickr-api/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 01:46:20 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[information technology]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[social software]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2007/06/11/tagging-using-the-flickr-api/</guid>
		<description><![CDATA[My goal for the day was to geotag the mongage images I uploaded last week.  Luckily each image title contains the latitude and longitude of the camera so I extracted the data from the title and added it back in the image tags.
Here is what I did:

Got a Flickr API key and authentication code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=254&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My goal for the day was to <a href="http://www.flickr.com/groups/geotagging/">geotag</a> <a href="http://unvisible.wordpress.com/2007/06/09/amos-on-flickr/">the mongage images I uploaded last week</a>.  Luckily each image title contains the latitude and longitude of the camera so I extracted the data from the title and added it back in the image tags.</p>
<p>Here is what I did:</p>
<ol>
<li>Got a Flickr API key and authentication code from the <a href="http://www.flickr.com/services/api/">Flickr services website</a>.</li>
<li>  Installed <a href="http://beej.us/flickr/flickrapi/">Beej&#8217;s Python Flickr API</a>.
<ol>
<li>Downloaded and extracted archive.</li>
<li>Called python setup.py build.</li>
<li>Called python setup.py install.</li>
<li>Edited flickrapi.py to properly call firefox from the Windows command line (added double quotes around the URL in <code>validateFrob</code>).</li>
</ol>
</li>
<li>Wrote a <a href="http://unvisible.files.wordpress.com/2007/06/geo.txt" title="python geotagging script">python script</a> to extract the title, parse it, and upload the new tags (I started with the <a href="http://beej.us/flickr/flickrapi/test.txt">test script</a> Beej provides).
<ol>
<li>It took a while to realize I needed to include both the method and auth_token parameters for the photo.setLocation and photo.addTags methods.</li>
</ol>
</li>
</ol>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/254/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/254/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=254&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2007/06/11/tagging-using-the-flickr-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>and relax</title>
		<link>http://unvisible.wordpress.com/2005/05/12/and-relax/</link>
		<comments>http://unvisible.wordpress.com/2005/05/12/and-relax/#comments</comments>
		<pubDate>Thu, 12 May 2005 08:41:32 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2005/05/12/and-relax/</guid>
		<description><![CDATA[The semester is over for me.  I spent the last few weeks working on projects and papers but they are done.  I still haven&#8217;t shaken the stress &#8212; or maybe it is just allergies &#8212; but my office is clean and I am ready for new projects.
I am currently working on a coding [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=235&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The semester is over for me.  I spent the last few weeks working on projects and papers but they are done.  I still haven&#8217;t shaken the stress &#8212; or maybe it is just allergies &#8212; but my office is clean and I am ready for new projects.</p>
<p>I am currently working on a coding standards document (about which, incidentally, <a href="http://joelonsoftware.com/">Joel Spolsky</a> just published an <a href="http://joelonsoftware.com/articles/Wrong.html">article</a>).  It is a topic that many have opinions about&#8230; but I am only hoping to get a reasonable standard in place for our group so that it can improve over time.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/235/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/235/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/235/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=235&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2005/05/12/and-relax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>asp.net yuckiness</title>
		<link>http://unvisible.wordpress.com/2005/02/09/aspnet-yuckiness/</link>
		<comments>http://unvisible.wordpress.com/2005/02/09/aspnet-yuckiness/#comments</comments>
		<pubDate>Wed, 09 Feb 2005 10:17:59 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2005/02/09/aspnet-yuckiness/</guid>
		<description><![CDATA[I just spent two hours yesterday trying to debug an annoying problem with deleting records from an ADO.NET DataSet.  I found the solution on jon(e)sie.net.  Also, do you think VisualStudio.NET could be any worse for creating HTML pages?  It is removing end tags left and right and making it hard for me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=227&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just spent two hours yesterday trying to debug an annoying problem with deleting records from an ADO.NET DataSet.  I found <a href="http://jonsie.net/archive/2004/12/15/283.aspx">the solution</a> on <a href="http://jonsie.net/">jon(e)sie.net</a>.  Also, do you think <a href="http://www.sitepoint.com/forums/archive/index.php/t-75676.html">VisualStudio.NET could be any worse for creating HTML pages</a>?  It is removing end tags left and right and making it hard for me to create valid HTML pages.  As much as I dislike using Dreamweaver&#8230; Macromedia figured this out years ago.  Hopefully the next version of VS.NET will fix this problem.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/227/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/227/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=227&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2005/02/09/aspnet-yuckiness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>quickies</title>
		<link>http://unvisible.wordpress.com/2004/05/21/quickies/</link>
		<comments>http://unvisible.wordpress.com/2004/05/21/quickies/#comments</comments>
		<pubDate>Fri, 21 May 2004 13:42:20 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2004/05/21/quickies/</guid>
		<description><![CDATA[

Yesterday was quite a long day&#8230; but it ended well.


The end result was the following line of code int exitValue = ((byte) p.exitValue()) &#38; 0xFF; instead of int exitValue = p.exitValue();.




If you want to do spell checking using PHP and Aspell you should check out this code and tell me what you think.

My plan is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=218&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul>
<li>
<p>Yesterday was quite a long day&#8230; but it ended well.
</p>
<p>
The end result was the following line of code <code>int exitValue = ((byte) p.exitValue()) &amp; 0xFF;</code> instead of <code>int exitValue = p.exitValue();</code>.
</p>
</li>
<li>
<p>
If you want to do spell checking using PHP and <a href="http://aspell.sourceforge.net/">Aspell</a> you should check out <a href="/log/2004/spell.php.txt">this code</a> and tell me what you think.
</p>
<p>My plan is to make this work via Javascript to enable spell checking of htdig search queries.</p>
</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/218/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/218/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=218&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2004/05/21/quickies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>snippet : find all email addresses in a text file using python</title>
		<link>http://unvisible.wordpress.com/2004/03/04/snippet-find-all-email-addresses-in-a-text-file-using-python/</link>
		<comments>http://unvisible.wordpress.com/2004/03/04/snippet-find-all-email-addresses-in-a-text-file-using-python/#comments</comments>
		<pubDate>Thu, 04 Mar 2004 16:20:02 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2004/03/04/snippet-find-all-email-addresses-in-a-text-file-using-python/</guid>
		<description><![CDATA[import sys
import re
thefile = open(sys.argv[1])
emailRegex = """[a-zA-Z0-9_\-\.]+@""" # id
emailRegex += """(?:""" # choose one of the following
emailRegex +=   """(?:\[?(?:[0-9]{1,3}\.){1,3}[0-9]{1,3}\]?)""" # IP address
emailRegex +=   """&#124;"""
emailRegex +=   """(?:(?:[a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,4})""" #domain name
emailRegex += """)"""
for line in thefile:
for address in re.findall(emailRegex, line):
print address
thefile.close()
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=213&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>import sys<br />
import re</p>
<p>thefile = open(sys.argv[1])</p>
<p>emailRegex = """[a-zA-Z0-9_\-\.]+@""" # id<br />
emailRegex += """(?:""" # choose one of the following<br />
emailRegex +=   """(?:\[?(?:[0-9]{1,3}\.){1,3}[0-9]{1,3}\]?)""" # IP address<br />
emailRegex +=   """|"""<br />
emailRegex +=   """(?:(?:[a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,4})""" #domain name<br />
emailRegex += """)"""</p>
<p>for line in thefile:<br />
for address in re.findall(emailRegex, line):<br />
print address<br />
thefile.close()</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/213/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/213/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=213&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2004/03/04/snippet-find-all-email-addresses-in-a-text-file-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>A speedy algorithm for testing membership in nested ldap groups.</title>
		<link>http://unvisible.wordpress.com/2004/01/15/a-speedy-algorithm-for-testing-membership-in-nested-ldap-groups/</link>
		<comments>http://unvisible.wordpress.com/2004/01/15/a-speedy-algorithm-for-testing-membership-in-nested-ldap-groups/#comments</comments>
		<pubDate>Thu, 15 Jan 2004 16:35:55 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2004/01/15/a-speedy-algorithm-for-testing-membership-in-nested-ldap-groups/</guid>
		<description><![CDATA[I just spent the better part of the day devising a speedy algorithm for testing if a given user is a member of an LDAP group.
All algorithms that I found while looking around the web looked something like this:

isMember parentGroup, user:
groupQueue.Enqueue parentGroup
while groupQueue is not empty:
currentGroup = groupQueue.Dequeue
if user is in currentGroup:
return true
else:
groupQueue.Enqueue all nested [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=207&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just spent the better part of the day devising a speedy algorithm for testing if a given user is a member of an LDAP group.</p>
<p>All algorithms that I found while looking around the web looked something like this:<br />
<code><br />
isMember parentGroup, user:<br />
groupQueue.Enqueue parentGroup<br />
while groupQueue is not empty:<br />
currentGroup = groupQueue.Dequeue<br />
if user is in currentGroup:<br />
return true<br />
else:<br />
groupQueue.Enqueue all nested groups of currentGroup<br />
end while<br />
return false<br />
</code></p>
<p>I implemented that solution in C# using System.DirectoryServices and found it to be too slow (taking about 40 seconds to perform a membership test for the highest level group if the result was false).  The slowness is the result of the network calls required by &#8216;all nested groups of currentGroup&#8217; and &#8216;user is in currentGroup&#8217;.</p>
<p>Here is the new algorithm that is much faster (approx .1 seconds regardless of user or group).</p>
<p><code>isMember parentGroup, user:<br />
// convert users memberships into a filter<br />
SearchFilter = buildGroupSearchFilter(get all users groups)</code></p>
<p>// perform a subtree search starting from the parentGroup<br />
return null != parentGroup.FindOne(SearchFilter)</p>
<p>buildGroupSearchFilter listOfGroups<br />
filter = &#8220;(|&#8221;<br />
foreach group in listOfGroups:<br />
filter += &#8220;(distinguishedName=&#8221; + group + &#8220;)&#8221;<br />
filter += &#8220;)&#8221;<br />
return filter<br />
My guess is that this is pretty standard but not posted on the web.  It is about time someone did!</p>
<p><strong>update</strong>: I thought about it last night and realized that in the above code the definition of the parent is based on a subtree within LDAP.  This is not usual definition of parent/child membership for LDAP security.  Here is a rough sketch of my newest algorithm which traverses the memberof properties and uses the correct definition:</p>
<p>* get all group the user is an immediate &#8220;memberof&#8221;<br />
* get the &#8220;memberof&#8221; property for all the groups you have seen but not expanded (gotten the &#8220;memberof&#8221; property).<br />
* if no new groups were discovered in the previous step return all the groups that you have seen; otherwise repeat previous step.</p>
<p>If the second step is performed in batches the above algorithm is very fast(approx .07 seconds)&#8230; otherwise, if a separate query is issued for each group, it takes 2-5 seconds.  Batches can be done in similar fashion to the second algorithm above.</p>
<p><strong>update</strong>: I just uploaded <a href="http://mu.org/~nathan/log/2004/LdapGroupLookup.cs.txt">source code that implements checking group membership in ActiveDirectory</a> as described in the update above.  It is not complete but should be enough to get you started&#8230; please let me know if it has any errors.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/207/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/207/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=207&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2004/01/15/a-speedy-algorithm-for-testing-membership-in-nested-ldap-groups/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>my first sql server trigger</title>
		<link>http://unvisible.wordpress.com/2003/11/17/my-first-sql-server-trigger/</link>
		<comments>http://unvisible.wordpress.com/2003/11/17/my-first-sql-server-trigger/#comments</comments>
		<pubDate>Mon, 17 Nov 2003 09:30:02 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2003/11/17/my-first-sql-server-trigger/</guid>
		<description><![CDATA[This took me surprisingly long to figure out&#8230;
First create two tables for the test:

CREATE TABLE TriggerTestOne (
 &#160; Name varchar 50,
 &#160; AdditionalField varchar 50
)


CREATE TABLE TriggerTestTwo (
 &#160; Name varchar 50,
 &#160; LogEntry varchar 256,
 &#160; Action varchar 100
)

Then create the following trigger:

CREATE TRIGGER TestLog ON TriggerTestOne
FOR  UPDATE
AS
if update(AdditionalField)
 &#160; insert into
 &#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=203&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This took me surprisingly long to figure out&#8230;</p>
<p>First create two tables for the test:<br />
<code><br />
CREATE TABLE TriggerTestOne (<br />
 &nbsp; Name varchar 50,<br />
 &nbsp; AdditionalField varchar 50<br />
)<br />
</code></p>
<p><code><br />
CREATE TABLE TriggerTestTwo (<br />
 &nbsp; Name varchar 50,<br />
 &nbsp; LogEntry varchar 256,<br />
 &nbsp; Action varchar 100<br />
)<br />
</code></p>
<p>Then create the following trigger:<br />
<code><br />
CREATE TRIGGER TestLog ON TriggerTestOne<br />
FOR  UPDATE<br />
AS<br />
if update(AdditionalField)<br />
 &nbsp; insert into<br />
 &nbsp;  &nbsp; TriggerTestTwo (Action, Name, LogEntry)<br />
 &nbsp;  &nbsp; select 'remove', del.Name , del.AdditionalField from deleted del<br />
 &nbsp; insert into<br />
 &nbsp;  &nbsp; TriggerTestTwo (Action, Name, LogEntry)<br />
 &nbsp;  &nbsp; select 'added', ins.Name , ins.AdditionalField from inserted ins<br />
</code></p>
<p>This will log all values changes in the <code>AdditionalField</code> column in <code>TriggerTestOne</code> into <code>TriggerTestTwo</code>.</p>
<p>The tricky part for me was trying to dig through the manuals to discover the <code>delelted</code> and <code>inserted</code> tables.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/203/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/203/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=203&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2003/11/17/my-first-sql-server-trigger/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>in-code documentation for .Net</title>
		<link>http://unvisible.wordpress.com/2003/10/03/in-code-documentation-for-net/</link>
		<comments>http://unvisible.wordpress.com/2003/10/03/in-code-documentation-for-net/#comments</comments>
		<pubDate>Fri, 03 Oct 2003 09:53:52 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2003/10/03/in-code-documentation-for-net/</guid>
		<description><![CDATA[
the documentation standard
<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=199&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul>
<li><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcoriXMLDocumentation.asp">the documentation standard</a></li>
<li><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrftagsfordocumentationcomments.asp<br />
&#8220;>recommended XML tags</a></li>
<li><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkxmldocumentationtutorial.asp"> a tutorial</a>
</li>
<li><a href="http://www.mantrotech.com/technology/csharp/article_using_xml_for_csharp_1.asp">Another tutorial</a></li>
<li><a href="http://www.squiffler.com/squiffler/article.aspx?id=1">A good tutorial</a></li>
<li> <a href="http://ndoc.sourceforge.net/">sweet looking tool</a></li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/199/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/199/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=199&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2003/10/03/in-code-documentation-for-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>word death</title>
		<link>http://unvisible.wordpress.com/2003/09/26/word-death/</link>
		<comments>http://unvisible.wordpress.com/2003/09/26/word-death/#comments</comments>
		<pubDate>Fri, 26 Sep 2003 12:10:19 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[noise]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ultimate frisbee]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2003/09/26/word-death/</guid>
		<description><![CDATA[Some words are just really cool.  I really like the word booyah!.  I don&#8217;t think it is used often enough amongst my co-workers.  I plan on changing this so that booyah knowledge does not die forever.
The best part of the word booyah is that you can say it while you are writing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=198&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some words are just really cool.  I really like the word <a href="http://www.urbandictionary.com/define.php?term=Booyah">booyah</a>!.  I don&#8217;t think it is used often enough amongst my <a href="http://iatservices.missouri.edu">co-workers</a>.  I plan on changing this so that booyah knowledge does not die forever.</p>
<p>The best part of the word booyah is that you can say it while you are writing code or playing ultimate frisbee.</p>
<p>For example:</p>
<p>* If you just finished debugging some really sick code you could shout &#8220;Booyah&#8221;!  And your cube neighbors would know that you just kicked some ass.</p>
<p>* Imagine that you just made a <a href="http://www.flukemedia.com/goat/images/nationals03/nats03_11.jpg">really good catch</a>&#8230; you could turn to your defender and shout &#8220;Booyah, I just caught the frisbee!&#8221;.  Then everyone on the field would know that you mean business.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/198/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/198/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=198&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2003/09/26/word-death/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
		<item>
		<title>C# LDAP multi-NT-domain lookup code</title>
		<link>http://unvisible.wordpress.com/2003/06/11/c-ldap-multi-nt-domain-lookup-code/</link>
		<comments>http://unvisible.wordpress.com/2003/06/11/c-ldap-multi-nt-domain-lookup-code/#comments</comments>
		<pubDate>Wed, 11 Jun 2003 14:30:28 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://unvisible.wordpress.com/2003/06/11/c-ldap-multi-nt-domain-lookup-code/</guid>
		<description><![CDATA[Here is a little bit of C# code I wrote that allows LDAP authentication to take place without providing a fully qualified user name&#8230; this may be highly implementation specific but I thought someone could use it.
It first maps an unqualified NT username to a fully-qualified NT username (by connecting anonymously to an ActiveDirectory global [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=190&subd=unvisible&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here is a <a href="http://www.khakipants.org/log/2003/LdapAuthentication.cs">little bit of C# code</a> I wrote that allows LDAP authentication to take place without providing a fully qualified user name&#8230; this may be highly implementation specific but I thought someone could use it.</p>
<p>It first maps an unqualified NT username to a fully-qualified NT username (by connecting anonymously to an ActiveDirectory global catalog).  It then extracts the distinguished name of the user and parses it to extract the correct domain.  This domain is then concatenated with the domain and an authentication request is issued.</p>
<p>update: I have since discovered that there a few bugs in the code&#8230;  But, I have a new and improved version that I will upload if there is enough demand.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unvisible.wordpress.com/190/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unvisible.wordpress.com/190/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unvisible.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unvisible.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unvisible.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unvisible.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unvisible.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unvisible.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unvisible.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unvisible.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unvisible.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unvisible.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unvisible.wordpress.com&blog=659420&post=190&subd=unvisible&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unvisible.wordpress.com/2003/06/11/c-ldap-multi-nt-domain-lookup-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5d3df9a66cc565c080f2965973db5c8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nathan jacobs</media:title>
		</media:content>
	</item>
	</channel>
</rss>