<?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>Casey Wise</title>
	<atom:link href="http://caseywise.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://caseywise.com</link>
	<description>projects and web archive/sandbox</description>
	<lastBuildDate>Tue, 17 Apr 2012 14:11:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to list directories only on the unix/linux command line</title>
		<link>http://caseywise.com/?p=2051</link>
		<comments>http://caseywise.com/?p=2051#comments</comments>
		<pubDate>Tue, 17 Apr 2012 14:10:44 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[dirctories]]></category>
		<category><![CDATA[ls]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=2051</guid>
		<description><![CDATA[Disturbingly, this was a difficult answer to find. I'm looking for the fastest most concise command to list out directories only. Here's what I found/came up with: And then to list them vertically, throw a 1(numeral one) in your switches]]></description>
			<content:encoded><![CDATA[<p>Disturbingly, this was a difficult answer to find.  I'm looking for the fastest most concise command to list out directories only.  Here's what I found/came up with:</p>
<pre class="brush: bash; title: ; notranslate">ls -d */</pre>
<p>And then to list them vertically, throw a 1(numeral one) in your switches</p>
<pre class="brush: bash; title: ; notranslate">ls -1d */</pre>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=2051</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: NW Dupes</title>
		<link>http://caseywise.com/?p=2005</link>
		<comments>http://caseywise.com/?p=2005#comments</comments>
		<pubDate>Tue, 17 Apr 2012 02:18:26 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=2005</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://caseywise.com/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-2005">Password:<br />
<input name="post_password" id="pwbox-2005" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=2005</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphic Work: Ambassadors For Rebuilding</title>
		<link>http://caseywise.com/?p=1918</link>
		<comments>http://caseywise.com/?p=1918#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:34:19 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[graphic work]]></category>
		<category><![CDATA[university of akron]]></category>
		<category><![CDATA[volunteer]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1918</guid>
		<description><![CDATA[My brother is a fellow University of Akron employee and heads up the Ambassadors for Rebuilding program within the Construction Engineering Technology department.  He and a bunch of able bodied and skilled students are headed to Nashville, TN this March to assist in the rebuilding of some underprivileged US veterans in the area all on a volunteer [...]]]></description>
			<content:encoded><![CDATA[<p>My brother is a fellow University of Akron employee and heads up the Ambassadors for Rebuilding program within the Construction Engineering Technology department.  He and a bunch of able bodied and skilled students are headed to Nashville, TN this March to assist in the rebuilding of some underprivileged US veterans in the area all on a volunteer basis.</p>
<p>I was asked to help whip up a WordPress site and build some graphics.  I was asked to come up with a logo and tshirt design.  Below is the logo I came up with .  I made use of Adobe Illustrator CS3, messing around with it's 3D capabilities for one of the first times.  Very neat stuff!</p>
<div id="attachment_1919" class="wp-caption alignnone" style="width: 366px"><a href="http://caseywise.com/wp-content/uploads/2012/01/A4rTenessee2012-A4RCircleLogo-01.png" rel="lightbox[1918]"><img class="size-full wp-image-1919" title="A4rTenessee2012-A4RCircleLogo-01" src="http://caseywise.com/wp-content/uploads/2012/01/A4rTenessee2012-A4RCircleLogo-01.png" alt="" width="356" height="356" /></a><p class="wp-caption-text">University of Akron - Ambassadors For Rebuilding Logo</p></div>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1918</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Work: icandothatdesign.com</title>
		<link>http://caseywise.com/?p=1911</link>
		<comments>http://caseywise.com/?p=1911#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:24:58 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[web work]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1911</guid>
		<description><![CDATA[My wife got a message over facebook from one of her good childhood friends that saw our photography site and inquired about my web services.  She is a graphic designer in the greater Washington DC area and was looking for a way to showcase her services + build an online portfolio of her work.  We [...]]]></description>
			<content:encoded><![CDATA[<p>My wife got a message over facebook from one of her good childhood friends that saw our photography site and inquired about my web services.  She is a graphic designer in the greater Washington DC area and was looking for a way to showcase her services + build an online portfolio of her work.  We made use of WordPress and a premium theme that had some portfolio management built in to it.  We did a bit of code (PHP &amp; JavaScript) and styling customization.  The theme author made use of <a href="http://contactform7.com/">Contact Form 7</a> to collect contact information on a standard form on this one.  SEO was achieved with <a href="http://www.arnebrachhold.de/redir/sitemap-home/">Google XML Sitemaps</a>.  </p>
<p>As a graphic designer, it was really fun to put my own experiences to work here to help bring this one up.  The work was fun and quick on this one.  I look forward to the ongoing curatorship of this site.</p>
<div id="attachment_1913" class="wp-caption alignnone" style="width: 340px"><a href="http://icandothatdesign.com"><img class=" wp-image-1913 " title="icandothatscreenshot" src="http://caseywise.com/wp-content/uploads/2012/01/icandothatscreenshot-1024x864.png" alt="" width="330" height="278" /></a><p class="wp-caption-text">icandothatdesign.com</p></div>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1911</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphic &amp; Site Work: iControl Automation</title>
		<link>http://caseywise.com/?p=1908</link>
		<comments>http://caseywise.com/?p=1908#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:04:02 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[graphic work]]></category>
		<category><![CDATA[web work]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1908</guid>
		<description><![CDATA[I am in the process of doing a s site for the folks over at iControl Automation.  This is another WordPress site, making use of a premium them with some styling styling customization.  We're plugging in form work with one of my favorite plugins, Contact Form 7 and SEO via Google XML Sitemaps. They also asked [...]]]></description>
			<content:encoded><![CDATA[<p>I am in the process of doing a s site for the folks over at <a href="http://icontrolautomation.com/">iControl Automation</a>.  This is another WordPress site, making use of a premium them with some styling styling customization.  We're plugging in form work with one of my favorite plugins, <a href="http://contactform7.com/">Contact Form 7</a> and SEO via <a href="http://www.arnebrachhold.de/redir/sitemap-home/">Google XML Sitemaps</a>.</p>
<p>They also asked for some graphical work, and we quickly (and I mean quick!  15 minutes) came up with this logo:</p>
<div id="attachment_1909" class="wp-caption alignnone" style="width: 310px"><a href="http://caseywise.com/wp-content/uploads/2012/01/logoIControl-01.jpg" rel="lightbox[1908]"><img class="size-medium wp-image-1909" title="logoIControl-01" src="http://caseywise.com/wp-content/uploads/2012/01/logoIControl-01-300x176.jpg" alt="" width="300" height="176" /></a><p class="wp-caption-text">iControl Automation Corporate Logo</p></div>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1908</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standard PHP MySQL reporting</title>
		<link>http://caseywise.com/?p=1898</link>
		<comments>http://caseywise.com/?p=1898#comments</comments>
		<pubDate>Wed, 28 Dec 2011 22:34:15 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1898</guid>
		<description><![CDATA[This one here is pretty simple. 3 SQL queries report out data of certain cases and mails it out.]]></description>
			<content:encoded><![CDATA[<p>
	This one here is pretty simple.  3 SQL queries report out data of certain cases and mails it out.
</p>
<pre class="brush: php; title: ; notranslate">
&lt;?
	// This an email to be sent.  This is the top of the email with the CSS in the head
	$out =&quot;&lt;!DOCTYPE html PUBLIC \&quot;-//W3C//DTD XHTML 1.0 Transitional//EN\&quot; \&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\&quot;&gt;
	&lt;html&gt;
	&lt;head&gt;
	&lt;title&gt;Last 24 Hours of Employee Applications Snapshot&lt;/title&gt;
	&lt;/script&gt;
	&lt;style&gt;
		*{font-family: arial;}
		.unreported, .explanation{margin: 0 0 0 10px; font-weight: normal;}
		.unreported {font-size: 10px;}
		.explanation {font-size: 9px; font-style: italic; color: grey;}
		h4{margin: -25px 0 0 0; font-weight: normal;}
		.wrapperReportLine {margin: 10px 0 0 10px; height: 60px;}
		.wrapperReportLine h3, .wrapperReportLine img {float: left;}
		.wrapperReportLine h3{margin: 4px 0 0 4px;}
		#failedJobNoCapture {width: 400px; font-size: 12px; margin: -10px 0 0 20px;}
		#failedJobNoCapture th{font-size: 15px;}
		#failedJobNoCapture td{font-weight: normal; font-size: 10px;}
		.dark{background-color: whitesmoke;}
		.code{font-family: Courier, 'Courier New', monospace; font-weight: bold;}
		ul.explanation {font-size: 13px; font-style: normal; color: black; margin: 0 0 0 0;}
		ul.explanation a{font-style: italic; font-size: 10px; text-transform: uppercase; color: blue;}
		ul.explanation a:hover{text-decoration: none;}
	&lt;/style&gt;
	&lt;/head&gt;
	&lt;body&gt;
	&lt;h1&gt;Employee Applications 24hr Snapshot&lt;/h1&gt;
	&lt;h4&gt;This report pulls the past 24 hours of employee applications submitted&lt;/h4&gt;&quot;;

	// db connection string
	require(&quot;connst.php&quot;);

	// case whre data is lacking a position number
	$sql_pullFailedJobNumberCapture = &quot;
		select
			b.web_form_id,
			DATE_FORMAT(b.submit_date, '%c/%e/%Y %I:%i %p') as 'submit_date',
			concat(a.first_name,' ',a.last_name) as 'name',
			a.email
		from
			web_form a
			inner join employee_application b
				on a.web_form_id = b.web_form_id
		where
			RIGHT(SUBSTRING(a.custom_fields,LOCATE('|Position Number', a.custom_fields),23),6) = ''
			and b.reported = 1
			and a.form_type = 'Job_App'
			and b.PositionNumber = ''
		order by
			a.web_form_id desc&quot;;

	// case where data is no older than 24 hours old
	$sql_pull24Hours=&quot;
		SELECT
			NOW() as 'now',
			NOW() - INTERVAL 1 DAY as '24hrsago',
			a.web_form_id,
			DATE_FORMAT(a.submit_date, '%W %m/%d/%Y %r') as 'submit_date',
			TIMEDIFF(now(),a.submit_date) as 'age',
			concat(a.first_name,' ',a.last_name) as 'name',
			concat(b.PositionNumber,' ',b.PositionTitle) as 'pos',
			b.reported
		FROM
			web_form a
			left outer join employee_application b
				on a.web_form_id = b.web_form_id
		WHERE
			a.submit_date &gt;= NOW() - INTERVAL 1 DAY
			and a.form_type = 'Job_App'
		ORDER BY
			a.web_form_id desc&quot;;

	// case where submit_date capture failed
	$sql_pullNullRecordBottleNeckers = &quot;
		select
			b.*
		from
			web_form b
		where
			b.web_form_id &gt;= (select max(a.web_form_id) from employee_application a)
			and b.form_type = 'Job_App'
			and b.submit_date is null&quot;;

	$result = mysql_query($sql_pull24Hours);
	if (!$result)
	{
		echo 'Could not run pull24Hours query: ' . mysql_error();
		exit;
	} else {
		$rowCount = mysql_num_rows($result);

		$countReported = $countUnReported = $countUnMoved = 0;
		$out_unReported = $outUnMoved =  &quot;&quot;;
		$loopCounter = 0;
		while ($row = mysql_fetch_array($result))
		{
			$rowClass = &quot;&quot;;
			if($loopCounter%3==0)
			{
				$rowClass = ($rowClass == 'dark')?'light':'dark';
			}

			$web_form_id = $row['web_form_id'];
			$submit_date = $row['submit_date'];
			$name = $row['name'];
			$pos = $row['pos'];
			$age = $row['age'];
			$reported = $row['reported'];

			$applicationDetail = $web_form_id.&quot; &quot;.$name.&quot; &quot;.$pos.&quot; (&quot;.$age.&quot;)&quot;;
			if($reported!=1 &amp;&amp; !$pos)
			{
				// just been collected data hasn't moved from wfr to ea
				$countUnMoved++;
				$countUnReported ++;
				$out_unReported .= &quot;&lt;p class='unreported &quot;.$rowClass.&quot;'&gt;&quot;.$applicationDetail.&quot;&lt;/p&gt;&quot;;
				$outUnMoved .= &quot;&lt;p class='unreported &quot;.$rowClass.&quot;'&gt;&quot;.$applicationDetail.&quot;&lt;/p&gt;&quot;;
			} elseif ($reported!=1 &amp;&amp; $pos) {
				// moved from wfr to bu ea plugin hasn't fired
				$countUnReported ++;
				$out_unReported .= &quot;&lt;p class='unreported &quot;.$rowClass.&quot;'&gt;&quot;.$applicationDetail.&quot;&lt;/p&gt;&quot;;
			} elseif ($reported &amp;&amp; $pos) {
				// moved and reported
				$countReported++;
			}
			$loopCounter++;
		}

		$lineHeight = 60;

		if($rowCount == $countReported)
		{
			$out .= &quot;&lt;div class='wrapperReportLine'&gt;&lt;img src='https://www.uakron.edu/casey/images/green-glossy-ball-30.jpg'&gt;&lt;h3&gt;&quot;.$rowCount.&quot; Applications Collected &amp; Reported&lt;/h3&gt;&lt;/div&gt;&quot;;
		} else {
			$out .= &quot;&lt;h3&gt;&quot;.$rowCount.&quot; applicants' applications collected&quot;;
		}

		if($countUnReported&gt;0)
		{
			$thisLineHeight = $lineHeight + (13.1*$countUnReported);
			$out .= &quot;&lt;div class='wrapperReportLine' style='height: &quot;.$thisLineHeight.&quot;px;'&gt;&lt;img src='https://www.uakron.edu/casey/images/yellow-glossy-ball-30.jpg'&gt;&lt;h3&gt;&quot;.$countUnReported.&quot; Applications Unreported to Job Owners&lt;p class='explanation'&gt;This data has moved to HR's reporting tables, but the job owner hasn't been notified yet.  The employeeApplication plugin is responsible for this one.&lt;/p&gt;&quot;.$out_unReported.&quot;&lt;/h3&gt;&lt;/div&gt;&quot;;
		}

		if($countUnMoved&gt;0)
		{
			$thisLineHeight = $lineHeight + (13.1*$countUnMoved);
			$out .= &quot;&lt;div class='wrapperReportLine' style='height: &quot;.$thisLineHeight.&quot;px;'&gt;&lt;img src='https://www.uakron.edu/casey/images/yellow-glossy-ball-30.jpg'&gt;&lt;h3&gt;&lt;p class='explanation'&gt;&lt;/p&gt;&quot;.$countUnMoved.&quot; Applications Yet To Move&lt;p class='explanation'&gt;This is an application that's been submitted but hasn't been moved to HR's reporting tables and therefore unreported to the job owner as well.  The plugin responsible for this one is the webFormsReporter.&lt;/p&gt;&quot;.$outUnMoved.&quot;&lt;/h3&gt;&lt;/div&gt;&quot;;
		}
	}

	$result = mysql_query($sql_pullFailedJobNumberCapture);
	if (!$result)
	{
		echo 'Could not run pullFailedJobNumberCapture query: ' . mysql_error();
		exit;
	} else {
		$rowCount = mysql_num_rows($result);
		if($rowCount &gt; 0)
		{
			$out .= &quot;&lt;div class='wrapperReportLine'&gt;&lt;img src='https://www.uakron.edu/casey/images/red-glossy-ball-30.jpg'&gt;&lt;h3&gt;Found &quot;.$rowCount.&quot; instance(s) where job identification criteria capture failed&lt;/h3&gt;&lt;/div&gt;&lt;table id='failedJobNoCapture' cellpadding='0' cellspacing='0'&gt;&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;/tr&gt;&quot;;
		}
		$loopCounter = 0;
		while ($row = mysql_fetch_array($result))
		{
			if($loopCounter%3==0)
			{
				$rowClass = ($rowClass == 'dark')?'light':'dark';
			}
			$web_form_id = $row['web_form_id'];
			$submit_date = $row['submit_date'];
			$name = $row['name'];
			$out .= &quot;&lt;tr class=&quot;.$rowClass.&quot;&gt;&lt;td&gt;&quot;.$web_form_id.&quot;&lt;/td&gt;&lt;td&gt;&quot;.$submit_date.&quot;&lt;/td&gt;&lt;td&gt;&quot;.$name.&quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
			$loopCounter++;
		}
		$out .= &quot;&lt;/table&gt;&quot;;
	}

	/** Mon Aug  8 07:41:55 EDT 2011 - cmwise: Bottle Neckers - everytime the system goes down we see records get logged where the submit date and all custom fields are null
		* record deletions are required which at this time can only be executed by a sysadmin
		* by law, we're required to send these records to HR so they can keep them on file.  Gonna make a reporter to quickly create a CSV to send to Laura Srpay at HR
	*/

	$result = mysql_query($sql_pullNullRecordBottleNeckers);
	if (!$result)
	{
		echo 'Could not run pullNullRecordBottleNeckers query: '.mysql_error();
		exit;
	} else {
		$rowCount = mysql_num_rows($result);
		if($rowCount &gt; 0)
		{
			$pluralIsAre = ($rowCount &gt; 1)?&quot;are&quot;:&quot;is&quot;;
			$pluralRecords = ($rowCount &gt; 1)?&quot;s&quot;:&quot;&quot;;
			$out .= &quot;&lt;div class='wrapperReportLine'&gt;&lt;img src='https://www.uakron.edu/casey/images/red-glossy-ball-30.jpg'&gt;&lt;h3&gt;Found &quot;.$rowCount.&quot; instance&quot;.$pluralRecords.&quot; where null records were created&lt;/h3&gt;&lt;/div&gt;
				&lt;ul class='explanation'&gt;
					&lt;li&gt;To get the employment apps flowing again, there &quot;.$pluralIsAre.&quot; &quot;.$rowCount.&quot; record&quot;.$pluralRecords.&quot; to be deleted&lt;/li&gt;
					&lt;li&gt;By law, the WebTeam is required to remit any and all null records to HR prior to deletion&lt;br&gt;&lt;a href='https://www.uakron.edu/casey/exporter.php'&gt;Create CSV to send to HR&lt;/a&gt;&lt;/li&gt;&quot;;
			$loopCounter = 0;
			$theseWebFormIDs = &quot;&quot;;
			while ($row = mysql_fetch_array($result))
			{
				if($loopCounter%3==0)
				{
					$rowClass = ($rowClass == 'dark')?'light':'dark';
				}
				$web_form_id = $row['web_form_id'];
				$theseWebFormIDs .= $web_form_id.&quot;,&quot;;
			}
			$out .= &quot;&lt;li class='code'&gt;DELETE FROM web_form WHERE web_form_id in (&quot;.preg_replace('/,$/', '', $theseWebFormIDs).&quot;);&lt;/li&gt;&lt;/ul&gt;&quot;;
		}
	}
	$out.=&quot;&lt;h2&gt;&lt;a href='https://www.uakron.edu/casey/eap.php'&gt;Live reporting&lt;/a&gt;&lt;/h2&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
	$to = &quot;&quot;;
	$subject = &quot;Emp App 24hr Snapshot&quot;;
	$message = $out;
	$headers  = 'MIME-Version: 1.0' . &quot;\r\n&quot;;
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quot;\r\n&quot;;

	// Additional headers
	$headers .= 'To: Casey Sinister Wise &lt;caseymwise@gmail.com&gt;, Eric Kreider &lt;ewk@uakron.edu&gt;, Laura Chocolate-Chip-Cookie-Makin Spray &lt;spray@uakron.edu&gt;' . &quot;\r\n&quot;;
	$headers .= 'From: UA EmpApp 24hr Snapshot Report&lt;noreply@uakron.edu&gt;' . &quot;\r\n&quot;;
	$mailResult = mail($to, $subject, $message, $headers);
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1898</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP demos: iterate over XML with a MySQL recordset within</title>
		<link>http://caseywise.com/?p=1890</link>
		<comments>http://caseywise.com/?p=1890#comments</comments>
		<pubDate>Wed, 28 Dec 2011 21:57:52 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1890</guid>
		<description><![CDATA[This one starts out pulling a small db record set of buildings and reading an XML doucment of people. It then iterates over the XML document. Each person in the XML is associated with a respective building abbreviation. With the building abbreviation, we iterate over the pulled database records and pull the respective building information [...]]]></description>
			<content:encoded><![CDATA[<p>
		This one starts out pulling a small db record set of buildings and reading an XML doucment of people.  It then iterates over the XML document.  Each person in the XML is associated with a respective building abbreviation.  With the building abbreviation, we iterate over the pulled database records and pull the respective building information from it and move it in to variables.  All of this is then reported out as a tab seperated value text file.
	</p>
<pre class="brush: php; title: ; notranslate">
	&lt;?php

	$flag_debug = false;
	require(&quot;connst_editorWrite.php&quot;);

	$sql_pullBuildingsAndAbbreviations = &quot;
	  SELECT
		abbreviation,
		name,
		buildingID,
		LAT,
		LNG
	  FROM
		campusBuildings
	  WHERE
		active = 'Y'&quot;;

	$result = mysql_query($sql_pullBuildingsAndAbbreviations);
	$file = &quot;http://server/script.cgi?key1=value1&amp;key2=value2&amp;key3=value3&quot;;
	$xmlString = $folks = simplexml_load_file($file);  

	echo $xmlString;

	$tab = &quot;\t&quot;;
	$cr = &quot;\n&quot;;

	$out =  &quot;ID&quot;.$tab
		.&quot;Name&quot;.$tab
		.&quot;Title&quot;.$tab
		.&quot;Department&quot;.$tab
		.&quot;Office&quot;.$tab
		.&quot;Campus&quot;.$tab
		.&quot;Image&quot;.$tab
		.&quot;Street&quot;.$tab
		.&quot;City&quot;.$tab
		.&quot;State&quot;.$tab
		.&quot;Postal Code&quot;.$tab
		.&quot;Latlon&quot;.$tab
		.&quot;Address&quot;.$tab
		.&quot;Phone&quot;.$tab
		.&quot;Work Phone&quot;.$tab
		.&quot;Mobile Phone&quot;.$tab
		.&quot;Home Phone&quot;.$tab
		.&quot;Fax&quot;.$tab
		.&quot;Email&quot;.$tab
		.&quot;Notes&quot;.$tab
		.&quot;URL&quot;.$tab
		.&quot;Last Name&quot;.$cr;

	$proxyArray = array(array());

	foreach ($folks-&gt;entry as $entry)
	{
	  // reset the record pointer to the top of the recordset

		$ID = trim($entry['employeeID']);
		$URL = &quot;http://www.uakron.edu/search/people_detail.dot?employeeNumber=&quot;.$ID;
		$Name_Last = trim($entry-&gt;lastName);
		$Name_First = trim($entry-&gt;firstName);
		$displayName = trim($entry-&gt;displayName);

		// the reason for the breaking below is because we only want the dept and title that come out first, that's considered the &quot;default&quot; dept/title
		foreach ($entry-&gt;department as $department)
		{
			$thisDept = $department['name'];
			foreach ($department-&gt;title as $title)
			{
				$thisTitle = $title;
				break;
			}
			break;
		}

		$Zip = trim($entry-&gt;zip);
		$xmlPhone = trim($entry-&gt;phone);
		$Phone = (empty($xmlPhone))?&quot;&quot;:preg_replace('/^/','(',str_replace('/',')',$xmlPhone));
		$Email = trim($entry-&gt;email);
		$buildingRec = explode(&quot; &quot;,$entry-&gt;building);
		$thisBuildingAbbrev = $buildingRec[0];

		// Mon Jul 25 10:11:29 EDT 2011 some times there are buildings that have no room no, gotta test and make sure after the explode that there is a room
		$thisRoomNo = (sizeof($buildingRec)&gt;1)?$buildingRec[1]:&quot;&quot;;

		$thisBuildingName = $thisBuildingID = $thisLat = $thisLon = $office = $thisGeoCode =&quot;&quot;;
		while ($row = mysql_fetch_array($result))
		{
			$abbreviation = $row['abbreviation'];
			$name = $row['name'];
			$buildingID = $row['buildingID'];
			$LAT = $row['LAT'];
			$LNG = $row['LNG'];
			if($abbreviation == $thisBuildingAbbrev)
			{
				$thisBuildingName = $name;
				$thisBuildingID = $buildingID;
				$thisLon = $LNG;
				$thisLat = $LAT;
				$thisGeoCode = ($LNG)?$LAT.&quot;,&quot;.$LNG:null;
				$office = $thisBuildingName.&quot; &quot;.$thisRoomNo;
				break;
			}
		}

		mysql_data_seek($result ,0);

		$arrayToPush = array
		(
			&quot;ID&quot; =&gt; $ID,
			&quot;displayName&quot; =&gt; $displayName,
			&quot;thisTitle&quot; =&gt; $thisTitle,
			&quot;thisDept&quot; =&gt; $thisDept,
			&quot;office&quot; =&gt; $office,
			&quot;Campus&quot; =&gt; &quot;&quot;,
			&quot;Image&quot; =&gt; &quot;&quot;,
			&quot;Street&quot; =&gt; &quot;&quot;,
			&quot;City&quot; =&gt; &quot;&quot;,
			&quot;State&quot; =&gt; &quot;&quot;,
			&quot;Zip&quot; =&gt; $Zip,
			&quot;thisGeoCode&quot; =&gt; $thisGeoCode,
			&quot;Address&quot; =&gt; &quot;&quot;,
			&quot;Phone&quot; =&gt; $Phone,
			&quot;WorkPhone&quot; =&gt; &quot;&quot;,
			&quot;MobilePhone&quot; =&gt; &quot;&quot;,
			&quot;HomePhone&quot; =&gt; &quot;&quot;,
			&quot;Fax&quot; =&gt; &quot;&quot;,
			&quot;Email&quot; =&gt; $Email,
			&quot;Notes&quot; =&gt; &quot;&quot;,
			&quot;URL&quot; =&gt; $URL,
			&quot;NameLast&quot; =&gt; $Name_Last
		);
		array_push($proxyArray, $arrayToPush);
	}

	foreach ($proxyArray as $key =&gt; $row)
	{
		$NameLast[$key]  = $row['NameLast'];
	}

	array_multisort($NameLast, SORT_ASC, $proxyArray);
	$lastID = &quot;&quot;;

	for($i=1;$i&lt;sizeof($proxyArray);$i++)
	{
		if($lastID != $proxyArray[$i]['ID'])
		{
			$out .= $proxyArray[$i]['ID'].$tab
				.$proxyArray[$i]['displayName'].$tab
				.$proxyArray[$i]['thisTitle'].$tab
				.$proxyArray[$i]['thisDept'].$tab
				.$proxyArray[$i]['office'].$tab
				.$proxyArray[$i]['Campus'].$tab
				.$proxyArray[$i]['Image'].$tab
				.$proxyArray[$i]['Street'].$tab
				.$proxyArray[$i]['City'].$tab
				.$proxyArray[$i]['State'].$tab
				.$proxyArray[$i]['Zip'].$tab
				.$proxyArray[$i]['thisGeoCode'].$tab
				.$proxyArray[$i]['Address'].$tab
				.$proxyArray[$i]['Phone'].$tab
				.$proxyArray[$i]['WorkPhone'].$tab
				.$proxyArray[$i]['MobilePhone'].$tab
				.$proxyArray[$i]['HomePhone'].$tab
				.$proxyArray[$i]['Fax'].$tab
				.$proxyArray[$i]['Email'].$tab
				.$proxyArray[$i]['Notes'].$tab
				.$proxyArray[$i]['URL'].$tab
				.$proxyArray[$i]['NameLast'].$cr;
		}
		$lastID = $proxyArray[$i]['ID'];
	}

	$fileNameXLS = &quot;PeopleDirectory.txt&quot;;
	if(!$flag_debug)
	{
		header(&quot;Content-type: application/octet-stream&quot;);
		header(&quot;Content-Disposition: attachment; filename=&quot;.$fileNameXLS);
		header(&quot;Pragma: no-cache&quot;);
		header(&quot;Expires: 0&quot;);
	}

	echo $out;
	?&gt;
	</pre>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1890</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rexel Mobile App Documentation</title>
		<link>http://caseywise.com/?p=1873</link>
		<comments>http://caseywise.com/?p=1873#comments</comments>
		<pubDate>Mon, 22 Aug 2011 22:21:32 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1873</guid>
		<description><![CDATA[Details about the Rexel mobile app here.  Made first attempt making use of the PhoneGap framework.  Built originally in Android.  Due to a rush to market, I hand-ported to iOS as an XCode project.]]></description>
			<content:encoded><![CDATA[<p>Details about the Rexel mobile app here.  Made first attempt making use of the PhoneGap framework.  Built originally in Android.  Due to a rush to market, I hand-ported to iOS as an XCode project.</p>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1873</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting GMail as default email client Xubuntu 11.04</title>
		<link>http://caseywise.com/?p=1833</link>
		<comments>http://caseywise.com/?p=1833#comments</comments>
		<pubDate>Wed, 22 Jun 2011 18:34:54 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[mail client]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xubuntu]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1833</guid>
		<description><![CDATA[I've abandoned machine-based email clients.  So many reasons to do this, but the primary being that I spend my time on 5 different machines and I don't want to maintain 5 different email programs. I've decided that GMail is the way to go.  Easy enough of a transition, I just stopped using, in my case, [...]]]></description>
			<content:encoded><![CDATA[<p>I've abandoned machine-based email clients.  So many reasons to do this, but the primary being that I spend my time on 5 different machines and I don't want to maintain 5 different email programs. I've decided that GMail is the way to go.  Easy enough of a transition, I just stopped using, in my case, Mozilla Thunderbird.  I now head over to gmail.com for all of my emailing needs.  But what happens when I click on an email address?  Typically machines are configured to open up an Outlook (or Thunderbird) email composition window when you click on an address like <a href="mailto:caseymwise@gmail.com">caseymwise@gmail.com</a>.  But my machine doesn't know about GMail, right?  Not so much.</p>
<p>As I write this, I'm using Xubuntu 11.04.  Ideally when I click on an email address, I'd like for a "mail compose" GMail window to open in the Chrome browser.  I did a little snooping around and figured out how to get this done.   A tip of the cap to this <a href="http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/">How To Geek article</a> that got me pretty close.  Here are the steps I took to put this in place.</p>
<ol>
<li>Tell Xubuntu that GMail is your default mail client
<ol>
<li>Applications &gt; Settings &gt; Preferred Applications<a href="http://caseywise.com/?attachment_id=1834" target="_blank"><br /></a><a rel="attachment wp-att-1834" href="http://caseywise.com/?attachment_id=1834"><img class="alignnone size-full wp-image-1834" title="preferredApplications" src="http://caseywise.com/wp-content/uploads/2011/06/preferredApplications.png" alt="" width="374" height="453" /></a></li>
<li>Under Mail Reader, select <em>Other</em> then enter the following replacing <em>casey</em> with your username:<br /><span style="font-family: 'andale mono', times;">/home/casey/open_mailto.sh %s</span></li>
</ol>
</li>
<li><a href="http://caseywise.com/wp-content/uploads/2011/06/open_mailto.sh_.zip">Grab this shell script</a>, unzip and save in your home folder (/home/your username).</li>
<li>To make the script executable fire the following on the command line:<br /><span style="font-family: 'andale mono', times;">chmod u+x ~/open_mailto.sh</span> </li>
<li>Click on <a href="mailto: caseymwise@gmail.com">an email address</a> and see if you get a notification and a new GMail compose Chrome window.<br /><a rel="attachment wp-att-1839" href="http://caseywise.com/?attachment_id=1839"><img class="alignnone size-full wp-image-1839" title="GmailDefaultClient" src="http://caseywise.com/wp-content/uploads/2011/06/GmailDefaultClient.png" alt="" width="519" height="498" /></a>
<ol>
<li>Bonus: the first line of the shell script, sends a note to the (for us Mac users out there) a growl-like desktop notification saying "GMailing &lt;&lt;email addres&gt;&gt;."  If it doesn't work for you, it's available for free in the Ubuntu repositories with a quick:<br /><span style="font-family: 'andale mono', times;">sudo apt-get install libnotify-bin</span></li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1833</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: ACT Learning Site</title>
		<link>http://caseywise.com/?p=1821</link>
		<comments>http://caseywise.com/?p=1821#comments</comments>
		<pubDate>Mon, 13 Jun 2011 21:08:56 +0000</pubDate>
		<dc:creator>Casey Wise</dc:creator>
				<category><![CDATA[web work]]></category>

		<guid isPermaLink="false">http://caseywise.com/?p=1821</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://caseywise.com/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-1821">Password:<br />
<input name="post_password" id="pwbox-1821" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://caseywise.com/?feed=rss2&#038;p=1821</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

