<?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>Jess Clark - Web Blog</title>
	<atom:link href="http://jessclark.com/feed" rel="self" type="application/rss+xml" />
	<link>http://jessclark.com</link>
	<description>Webmaster for the University of Northern Colorado</description>
	<lastBuildDate>Wed, 26 May 2010 16:30:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to go from your GPS to Google Maps</title>
		<link>http://jessclark.com/blog/projects/how-to-go-from-your-gps-to-google-maps</link>
		<comments>http://jessclark.com/blog/projects/how-to-go-from-your-gps-to-google-maps#comments</comments>
		<pubDate>Wed, 26 May 2010 16:30:31 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[GPS]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=488</guid>
		<description><![CDATA[This Sunday I took my GPS with me hiking on Devil&#8217;s Backbone. Normally I take it to log GPS quadrants for where I have taken pictures, but this time I left it on the whole time to track the progress. When I got back home I was able to pull the data down to my [...]]]></description>
			<content:encoded><![CDATA[<p>This Sunday I took my GPS with me hiking on Devil&rsquo;s  Backbone. Normally I take it to log GPS quadrants for where I have taken  pictures, but this time I left it on the whole time to track the progress. When  I got back home I was able to pull the data down to my computer and import it  into Google Maps. Here is what I did:</p>
<p>
<a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=106901434415345324918.00048759b781a45fadd99&amp;ll=40.423135,-105.157871&amp;spn=0.023882,0.040255&amp;t=h&amp;z=15"><img src="http://jessclark.com/files/2010/05/1final-map.jpg" alt="" title="Final Google Map" width="500" height="511" class="alignnone size-full wp-image-486" /></a></p>
<h3>Pulling the Data off the GPS</h3>
<p>The day after my hike I went to my office and downloaded the  data from my GPS to my Computer. I used a program called &ldquo;<a href="http://www.easygps.com/">EasyGPS</a>&rdquo; which works will all kinds of GPS  models.</p>
<p>
  I have a Garmin Legend as a GPS which connects via the COMM  port. When you start up EasyGPS, there is a setup screen that will walk you through  the steps for your GPS unit. Once the setup was complete, it transferred my data  from the GPS to my computer.</p>
<p>
  There were extra waypoints in my data from previous hikes,  so I removed them from the list. Once done, I saved the file as a .GPX file.</p>
<h3>Converting the Data</h3>
<p>Google Maps can&rsquo;t read a .GPX file, but it can read a .KLM  or .KMZ file. There is a great free converter out there called &ldquo;<a href="http://www.gpsvisualizer.com/">GPS Visualizer</a>&rdquo;. </p>
<ul>
<li>On the home page, click on &ldquo;Choose File&rdquo; to  upload your file; </li>
<li>For &ldquo;output format&rdquo; choose &ldquo;Google Earth&rdquo;.</li>
</ul>
<p> There is a &ldquo;Google  Maps&rdquo; option, but this will only display the data on their site. We want to  convert the file so we can upload it straight to Google Maps.</p>
<p>
  On the next page, click on the name of the file to download  it.</p>
<h3>Importing to GoogleMaps</h3>
<ul>
<li>Navigate to <a href="http://maps.google.com/">Google  Maps</a>. </li>
<li>On the left column of the page, click on &ldquo;My  Maps&rdquo;. This will bring up a list of custom maps you have made. </li>
<li>Click on &ldquo;Create New Map&rdquo;</li>
<li>There is a link towards the top to &ldquo;Import&rdquo;, click  this and a screen will popup ready to upload your KLM file.</li>
</ul>
<p>Using the buttons towards the top, you can add your own  stuff to the screen, like photos.</p>
<p>
<img src="http://jessclark.com/files/2010/05/controls.jpg" alt="" title="controls" width="101" height="31" class="alignnone size-full wp-image-487" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/projects/how-to-go-from-your-gps-to-google-maps/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Analytics API and PHP</title>
		<link>http://jessclark.com/blog/uncategorized/google-analytics-api-and-php</link>
		<comments>http://jessclark.com/blog/uncategorized/google-analytics-api-and-php#comments</comments>
		<pubDate>Mon, 24 May 2010 16:30:22 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=482</guid>
		<description><![CDATA[A few weeks ago I added stats on my Photoblog. This started out as just a link to a pie chart of cameras (tutorial here) but I started thinking I should add more than that. How about the top photos of the week and also what about top photos of all time. There were two [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I added stats on my Photoblog. This started  out as just a link to a pie chart of cameras (<a href="http://jessclark.com/blog/code/flex-piechart-with-xml-input">tutorial here</a>) but I started  thinking I should add more than that. How about the top photos of the week and also what about top photos of all time.</p>
<p> There were two ways I could see gathering the stats and  displaying them on my site. I could create a new table for statistics (or  perhaps a column in the existing table) and then whenever someone hit that  page, update the database. I would also have to include a cookie, or track  their IP address so they don&rsquo;t count for more than one. Or, I could leverage the power of Google  Analytics, a tool that I was already using. </p>
<h3>Class:</h3>
<p>I am using PHP for this project. </p>
<p> <a href="http://code.google.com/p/gapi-google-analytics-php-interface/">Download  the Google Analytics PHP Interface</a></p>
<h3>Code:</h3>
<p>The code below is borrowed from their documentation. I am  only loading five results but it takes a few seconds to load. Because of this,  I connected the code to a database, and created a cron job, so it would only  run once a day. The stats that are on my site, are actually pulling from my  database, which is being populated by Google Analytics.</p>
<div class="code">
<p>&lt;?php</p>
<p> include &quot;googleanalytics.class.php&quot;;</p>
<p> try {</p>
<p class="indent"> $ga = new GoogleAnalytics(&#8216;username&#8217;,'password&#8217;);</p>
<p class="indent"> $ga-&gt;setProfile(&#8216;profile &#8216;); //format: ga:6089897</p>
<p class="indent"> $ga-&gt;setDateRange(&#8217;2009-03-01&#8242;, date(&quot;Y-m-d&quot;));	//Starting date, Today&#8217;s Date</p>
<p class="indent"> $report = $ga-&gt;getReport(</p>
<p class="indent2"> array(&#8216;dimensions&#8217;=&gt;urlencode(&#8216;ga:pagePath&#8217;),</p>
<p class="indent3"> &#8216;metrics&#8217;=&gt;urlencode(&#8216;ga:pageviews,ga:visits&#8217;),</p>
<p class="indent3"> &#8216;filters&#8217;=&gt;urlencode(&#8216;ga:pagePath=@counter&#8217;),</p>
<p class="indent3"> &#8216;sort&#8217;=&gt;&#8217;-ga:pageviews&#8217;,</p>
<p class="indent3"> &#8216;max-results&#8217;=&gt;&#8217;5&#8242;</p>
<p class="indent2"> )</p>
<p class="indent"> );</p>
<p class="indent"> $x=0; </p>
<p class="indent"> $pages = array_keys($report);</p>
<p class="indent"> echo &quot;&lt;ul&gt;&quot;;</p>
<p class="indent"> foreach($report as $subArray){ </p>
<p class="indent2"> echo &quot;&lt;li&gt;&quot; . $pages[$x] . &quot; &#8211; &quot; . $subArray[&quot;ga:pageviews&quot;] . &quot;&lt;/li&gt;&quot;;</p>
<p class="indent2"> $x++;</p>
<p class="indent"> } </p>
<p class="indent"> echo &quot;&lt;/ul&gt;&quot;;</p>
</p>
<p> } catch (Exception $e) { </p>
<p class="indent"> echo &quot;&lt;p&gt;Service currently down&lt;/p&gt;&quot;;</p>
<p class="indent"> print &#8216;Error: &#8216; . $e-&gt;getMessage(); </p>
<p> }</p>
<p> ?&gt;</p>
</div>
<p> Under &ldquo;filters&rdquo;, I have it filtered out where the URL starts  with &ldquo;counter=&rdquo;. This is how all my photos are named, and by adding this  filter, the non-photo pages won&rsquo;t show up.</p>
]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/uncategorized/google-analytics-api-and-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devil&#8217;s Backbone</title>
		<link>http://jessclark.com/blog/projects/devils-backbone</link>
		<comments>http://jessclark.com/blog/projects/devils-backbone#comments</comments>
		<pubDate>Mon, 17 May 2010 16:30:07 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=467</guid>
		<description><![CDATA[On Sunday, Michelle, Brewer and I went hiking at Devil&#8217;s Backbone in Loveland Colorado. Here are some of the photos I captured. There will be more on Flickr and on my Photoblog.]]></description>
			<content:encoded><![CDATA[<p>On Sunday, Michelle, Brewer and I went hiking at Devil&#8217;s Backbone in Loveland Colorado. Here are some of the photos I captured. There will be more on Flickr and on my Photoblog.</p>
<p><img src="http://jessclark.com/files/2010/05/MG_5377-500.jpg" alt="" title="Devil&#39;s Backbone " width="500" height="334" class="alignnone size-full wp-image-468" /></p>
<p><img src="http://jessclark.com/files/2010/05/MG_5358-500.jpg" alt="" title="_MG_5358-500" width="500" height="334" class="alignnone size-full wp-image-470" /></p>
<p><img src="http://jessclark.com/files/2010/05/MG_5371-500.jpg" alt="" title="_MG_5371-500" width="500" height="334" class="alignnone size-full wp-image-469" /></p>
<p><a href="http://jessclark.com/files/2010/05/MG_5388-500.jpg"><img src="http://jessclark.com/files/2010/05/MG_5388-500.jpg" alt="" title="_MG_5388-500" width="500" height="334" class="alignnone size-full wp-image-471" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/projects/devils-backbone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex PieChart with XML input</title>
		<link>http://jessclark.com/blog/code/flex-piechart-with-xml-input</link>
		<comments>http://jessclark.com/blog/code/flex-piechart-with-xml-input#comments</comments>
		<pubDate>Wed, 12 May 2010 16:30:27 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=447</guid>
		<description><![CDATA[I have been working hard to compile statistics on my photo blog. Currently I have most visited photos and photos by camera. I wanted to create a dynamic chart and luckily, Flex 3 has a charting component that was easy to use. There were a lot of tutorials out there on Flex Charts (mostly bar [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working hard to compile statistics on my photo blog.  Currently I have most visited photos and photos by camera. I wanted to create a  dynamic chart and luckily, Flex 3 has a charting component that was easy to  use. There were a lot of tutorials out there on Flex Charts (mostly bar charts)  and a lot of tutorials on pulling XML but not one that combined the two.</p>
<h3>Demo:</h3>
<p>This demo pulls real time data from my photoblog using XML.  I could have hard coded in the data but then it wouldn&rsquo;t be flexible and every  time I uploaded a file I would have to update the chart.</p>

[inline]
<script type="text/javascript" src="/assets/javascript/swfobject.js"></script>
<div id="player2">ALTERNATE CONTENT</div>
<script type="text/javascript">
var s2 = new SWFObject("http://jessclark.com/files/2010/05/chartingFunBlog.swf", "playlist", "540", "600", "7");
s2.write("player2");
</script>
[/inline]

<h3>Code:</h3>
<div class="code">
  <p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</p>
  <p> &lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; backgroundColor=&quot;white&quot; creationComplete=&quot;siteData.send()&quot; height=&quot;600&quot; width=&quot;540&quot;&gt;</p>
  <p> &lt;mx:HTTPService url=&quot;http://jessclark.com/photo/stats/flex/cameras.xml.php&quot; id=&quot;siteData&quot; resultFormat=&quot;e4x&quot; result=&quot;serv_result(event)&quot;/&gt;</p>
  <p class="indent"> &lt;mx:Script&gt;</p>
  <p class="indent2"> &lt;![CDATA[ </p>
  <p class="indent3"> import mx.rpc.events.ResultEvent;</p>
  <p class="indent3"> [Bindable] private var fullXML:XMLList; </p>
  <p class="indent3"> public function serv_result(evt:ResultEvent):void { </p>
  <p class="indent4"> fullXML = evt.result.page; </p>
  <p class="indent3"> }</p>
  <p class="indent2"> ]]&gt;</p>
  <p class="indent"> &lt;/mx:Script&gt;</p>
  <p class="indent"> &lt;mx:PieChart id=&quot;pieChart&quot; selectionMode=&quot;single&quot; dataProvider=&quot;{fullXML}&quot; showDataTips=&quot;true&quot;  height=&quot;242&quot; width=&quot;530&quot; x=&quot;10&quot; y=&quot;0&quot;&gt;</p>
  <p class="indent2"> &lt;mx:series&gt;</p>
  <p class="indent3"> &lt;mx:PieSeries id=&quot;pieSeries&quot; field=&quot;data&quot; nameField=&quot;camera&quot;&gt;&lt;/mx:PieSeries&gt;</p>
  <p class="indent2"> &lt;/mx:series&gt;</p>
  <p class="indent"> &lt;/mx:PieChart&gt;</p>
  <p class="indent"> &lt;mx:Legend dataProvider=&quot;{pieChart}&quot; x=&quot;10&quot; width=&quot;520&quot; height=&quot;340&quot; y=&quot;250&quot; color=&quot;#000&quot; direction=&quot;horizontal&quot;/&gt;</p>
  <p> </p>
  <p> &lt;/mx:Application&gt;</p>
</div>
<h3>Explanation:</h3>
<p>Line 3 is an HTTPService that goes out and grabs the XML  file and names it &ldquo;siteData&rdquo;. </p>
<div class="code">
  <p>&lt;mx:HTTPService url=&quot;<a href="http://jessclark.com/photo/stats/flex/cameras.xml.php">http://jessclark.com/photo/stats/flex/cameras.xml.php</a>&quot; <strong>id=&quot;siteData&quot;</strong> resultFormat=&quot;e4x&quot; result=&quot;serv_result(event)&quot;/&gt;</p>
</div>
<p> Above that, on line 2, creationComplete says that once the application  has loaded run the HTTPService.</p>
<div class="code">
  <p>&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; backgroundColor=&quot;white&quot; <strong>creationComplete=&quot;siteData.send()&quot;</strong> height=&quot;600&quot; width=&quot;540&quot;&gt;</p>
</div>
<p> In the ActionScript (lines 6-11), this takes that results  from the HTTPService and captures it in the variable fullXML.</p>
<p>import mx.rpc.events.ResultEvent;</p>
<div class="code">
  <p> [Bindable] private var fullXML:XMLList; </p>
  <p> public function serv_result(evt:ResultEvent):void { </p>
  <p class="indent"> fullXML = evt.result.page; </p>
  <p> }</p>
</div>
<p> Then we have our PieChart, with a dataProvider of &ldquo;fullXML&rdquo;  and in the PieSeries the field is called &ldquo;data&rdquo; which corresponds to the xml  file (same with nameField).</p>
<div class="code">
  <p>&lt;mx:PieChart id=&quot;pieChart&quot; selectionMode=&quot;single&quot; <strong>dataProvider=&quot;{fullXML}&quot;</strong> showDataTips=&quot;true&quot;  height=&quot;242&quot; width=&quot;530&quot; x=&quot;10&quot; y=&quot;0&quot;&gt;</p>
  <p>...</p>
  <p>&lt;mx:PieSeries id=&quot;pieSeries&quot;<strong> field=&quot;data&quot; nameField=&quot;camera&quot;</strong>&gt;&lt;/mx:PieSeries&gt; </p>
</div>
<p> The Legend uses &ldquo;pieChart&rdquo; as its dataProvider.</p>
<div class="code">
  <p>&lt;mx:Legend dataProvider=&quot;{pieChart}&quot; x=&quot;10&quot; width=&quot;520&quot; height=&quot;340&quot; y=&quot;250&quot; color=&quot;#000&quot; direction=&quot;horizontal&quot;/&gt;</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/code/flex-piechart-with-xml-input/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colorado State University Photo Shoot</title>
		<link>http://jessclark.com/blog/projects/colorado-state-university-photo-shoot</link>
		<comments>http://jessclark.com/blog/projects/colorado-state-university-photo-shoot#comments</comments>
		<pubDate>Mon, 10 May 2010 16:56:27 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[photo shoot]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=436</guid>
		<description><![CDATA[Last week I went to Colorado State University to take behind the scenes pictures of an athletics’ photo shoot. The photos will be used next season for posters, tickets and flyers. Here are some of the good photos I got:]]></description>
			<content:encoded><![CDATA[Last week I went to Colorado State University to take behind the scenes pictures of an athletics’ photo shoot. The photos will be used next season for posters, tickets and flyers. Here are some of the good photos I got:

<img src="http://jessclark.com/files/2010/05/2010-05-06.jpg" />

<img src="http://jessclark.com/files/2010/05/MG_5203.jpg" />

<img src="http://jessclark.com/files/2010/05/2010-05-07.jpg" />

<img src="http://jessclark.com/files/2010/05/MG_5021.jpg" />

<img src="http://jessclark.com/files/2010/05/MG_4977.jpg" />]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/projects/colorado-state-university-photo-shoot/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Style Sheets with Server Side Scripting</title>
		<link>http://jessclark.com/blog/code/dynamic-style-sheets-with-server-side-scripting</link>
		<comments>http://jessclark.com/blog/code/dynamic-style-sheets-with-server-side-scripting#comments</comments>
		<pubDate>Wed, 05 May 2010 10:30:34 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=423</guid>
		<description><![CDATA[We are currently working on redesigning our top level pages at UNC. We are using multiple style sheets to separate out the structure of the page from the colors and typography. All pages will have the same layout but will have different patterns and colors. I want to use one style sheet (rather than multiple) [...]]]></description>
			<content:encoded><![CDATA[We are currently working on redesigning our top level pages at UNC. We are using multiple style sheets to separate out the structure of the page from the colors and typography. All pages will have the same layout but will have different patterns and colors. 

I want to use one style sheet (rather than multiple) so the user can’t remove the parts they don’t think are necessary. I also want this one style sheet to be able to access different CSS files depending on the querystring. 

<h3>ASP:</h3>
<div class="code">
  <p>&lt;%@LANGUAGE=&quot;VBSCRIPT&quot; CODEPAGE=&quot;65001&quot;%&gt;</p>
  <p> &lt;%response.ContentType=&quot;text/CSS&quot;%&gt;</p>
  <p> @import url(&quot;../uncheader.css&quot;);</p>
  <p> @import url(&quot;structure.css&quot;);</p>
  <p> @import url(&quot;typography.css&quot;);</p>
  <p> @import url(&quot;print.css&quot;) print;</p>
  <p>&lt;% if (request.QueryString(&quot;c&quot;) = &quot;blue&quot;) then %&gt;</p>
  <p class="indent"> @import url(&quot;colors/color-blue.css&quot;);</p>
  <p> &lt;% else if (request.QueryString(&quot;c&quot;) = &quot;red&quot;) then %&gt;</p>
  <p class="indent"> @import url(&quot;colors/color-red.css&quot;);</p>
  <p> &lt;% end if %&gt;</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/code/dynamic-style-sheets-with-server-side-scripting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Engineer Nike+ to create an API</title>
		<link>http://jessclark.com/blog/code/reverse-engineer-nike-to-create-an-api</link>
		<comments>http://jessclark.com/blog/code/reverse-engineer-nike-to-create-an-api#comments</comments>
		<pubDate>Mon, 03 May 2010 10:30:09 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[nike+]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://jessclark.com/?p=411</guid>
		<description><![CDATA[Earlier in the week we cleaned out the workout room and I started running on our treadmill again. One of the things that I am excited about it the Nike+ program. It tracks runs and keeps statists online about each run. I wanted to add these stats to my blog but Nike doesn’t offer a [...]]]></description>
			<content:encoded><![CDATA[Earlier in the week we cleaned out the workout room  and I started running on our treadmill again. One of the things that I am  excited about it the Nike+ program. It tracks runs and keeps statists online about  each run. I wanted to add these stats to my blog but Nike doesn’t offer a  public API. Their website was created in Flash (well actually it was created  using Flex; a discussion for a later time) using ActionScript; lucky for us,  ActionScript can’t access a database on its own; it needs a XML or JSON.
<h3>Finding the XML Feed</h3>
In FireFox there is a plugin called “<a href="https://addons.mozilla.org/en-US/firefox/addon/3829">Live HTTP headers</a>”.  This plugin will detect what information is being sent from the browser to the  server. Since Flash is a client-side technology, the XML file is pulled onto  the client’s machine.

Once the plugin is installed navigate to it by going to  [Tools]/[Live HTTP headers]. A box will popup and if there is information in it  already, hit to “Clear” button. Navigate to the <a href="http://nikerunning.nike.com/nikeos/p/nikeplus/en_US/plus/#//dashboard/">Nike+  login page</a>. As the site is loading you will notice “Live HTTP headers”  adding item after item. There will be the HTML page,  SWF files, graphics (PNGs, GIFs,JPEGs), CSS  and XML files.

Before you log on, hit the “Clear” button; this will make it  easier to find the feed.

Log in to the site and once loaded hit “Clear” again; then  in the site, click on runs.

“Live HTTP Headers” will log a ton of items, and you will have  to go through them to find the XML file. Look through the document until you  find a line similar to this:
<div class="code">

http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?userID=<em>userID</em>&amp;startIndex=0&amp;endIndex=1

</div>
<img src="http://jessclark.com/files/2010/04/liveHTTPheaders1.jpg" alt="Live HTTP Headers Box" />

You can also click “Save All”, and open the file with a text  editor and look for the phrase “run_list.jsp”.

Open this file in a new browser and an XML file will appear  with your basic information. If you get the error: “The userProfile is not  public, can't access the service”, you will go into the privacy settings and  share your information.
<h3>Create a Simple XML Parser</h3>
The data I will be retrieving is “plusService/runListSummary/distance”  which is the total distance run in kilometers:
<div class="code">

&lt;?php
<p class="indent">$xml = simplexml_load_file("http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?userID=<em>userID</em>&amp;startIndex=0&amp;endIndex=1");</p>
<p class="indent">$result = $xml-&gt;xpath('/plusService/runListSummary/distance');</p>
<p class="indent">$kilometers = $result[0];</p>
<p class="indent">echo round($kilometers*.621371192) . " miles";</p>

?&gt;

</div>
<h3>Save it to a database</h3>
Since Nike+ doesn’t have an official API, I am not sure if  they would appreciate you hitting their server for the XML file every time a  user visits your page. Since this data doesn’t change that often (only when you  upload a run, perhaps once a day) you should save this information on your  server in a database and only hit it once a day.]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/code/reverse-engineer-nike-to-create-an-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goals with Google Analytics</title>
		<link>http://jessclark.com/blog/metrics/goals-with-google-analytics</link>
		<comments>http://jessclark.com/blog/metrics/goals-with-google-analytics#comments</comments>
		<pubDate>Wed, 28 Apr 2010 10:30:28 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[metrics]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://gusclark.com/?p=401</guid>
		<description><![CDATA[One of the things I like to do with this blog is talk about what tools we are using at the University of Northern Colorado. We have been using Google Analytics for quite a while now (along with our log based stat tool) and have gathered a lot of data. One of the problems is [...]]]></description>
			<content:encoded><![CDATA[One of the things I like to do with this blog is talk about what tools we are using at the University of Northern Colorado. We have been using <a href="http://www.google.com/analytics" target="_blank">Google Analytics</a> for quite a while now (along with our log based stat tool) and have gathered a lot of data. One of the problems is that we have all this data but don’t know how to use it, or don’t have the time to look through it.

After attending a webinar last week about this very topic, I set up a goal on the tour form. To request a <a href="http://www.unco.edu/visit">visit to the university</a>, first you navigate to the visit page, find the type of tour you are interested in and then fill out a form. Each of these steps has a page associated with them so it was easy to track.
<h3>Setting up the Goal</h3>
From the dashboard, I clicked on "edit" next to the profile. I have the Admissions site (where the tour form exists) in a sub profile, but I used the main profile (which includes all of unco.edu) so I could see where people were coming from.

Click "Add goal".

On the next page fill out the Goal Name and Goal Type; for the Goal Details:
<h4>Goal Details</h4>
<ul>
	<li>Match Type – Head Match</li>
	<li>Goal URL – the final "Thank you for Registering Page"</li>
	<li>Case Sensitive</li>
	<li>Goal Value – if you have figured out the cost of each completion you can put that here. Since I am only counting tour signups, (which are free) I left this blank.</li>
</ul>
<h4>Goal Funnel</h4>
<ul>
	<li>Here is where I put in the two pages following the signup, the Visit Page and the Signup Page. I did not indicate "Required Step" because if you knew the URL you could go directly to the sign up form.</li>
</ul>
<a href="http://www.jessclark.com/wp-content/uploads/2010/04/setup.jpg"></a>

<a href="http://jessclark.com/files/2010/04/setup.jpg"><img class="alignnone size-medium wp-image-402" title="Goal Setup" src="http://jessclark.com/files/2010/04/setup-300x183.jpg" alt="" width="300" height="183" /></a>

Click "Save Goal" and wait a few days.
<h3>Viewing the data</h3>
Under the profile, click on "Goals" and you can see how many visitors have completed the goal. I am still learning a lot about this section, but the really neat thing I found was under "Funnel Visualization":


On the right side are where people are coming form. We are doing a redesign of the homepage right now and it will be important to leave the "Visit" link since that is where the majority of the people come from. On the left side are the users who exit, and where they exit to. Our Visit page is a little complicated (reasons beyond my control) and this data will be used to show the Admissions folks that only 14% of the visitors actually continue the form.

<img class="alignnone size-full wp-image-404" title="Goal Funnel" src="http://jessclark.com/files/2010/04/results2.jpg" alt="" width="500" height="453" />

I hope to be able to use this data to convince Admissions to relook at the usability of their visit page.]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/metrics/goals-with-google-analytics/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing Imported Objects in ActionScript 3</title>
		<link>http://jessclark.com/blog/code/accessing-imported-objects-in-actionscript-3</link>
		<comments>http://jessclark.com/blog/code/accessing-imported-objects-in-actionscript-3#comments</comments>
		<pubDate>Mon, 26 Apr 2010 16:30:20 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.jessclark.com/?p=390</guid>
		<description><![CDATA[I learned the bulk of my understanding of ActionScirpt 3 with UNC’s “Bringing Education to Life Campaign”. I rewrote the code for the base flash file 3 different times, each time updating the code with what I had learned. The site was created using modules, in which if we wanted to add something new, we [...]]]></description>
			<content:encoded><![CDATA[I learned the bulk of my understanding of ActionScirpt  3 with UNC’s “Bringing Education to Life  Campaign”. I rewrote the code for the base flash file 3 different times, each  time updating the code with what I had learned. The site was created using  modules, in which if we wanted to add something new, we just changed a few  parameters in an XML file. The first module we created was the "<a href="http://www.unco.edu/life/?a=7" target="_blank">Photo Tour</a>".
<h3>UIloaders:</h3>
The Photo Tour, connects to an XML document that tells flash where to place the marker and what photo to bring up when clicked. Back when I started this project I was fairly new at ActionScript so I created a  UILoader for each marker and loaded the same image into it each time.  This created huge performance issues.
<h3>Import to Library</h3>
The best way to add these objects is to import them into  your library and convert them to a MovieClip. In the Library, right click on  your movie clip and go to “Properties”.

Check the box that says “Export for ActionScript” and in the  “Class” box, enter:

assets.<em>symbolName</em>

Indicate “assets” in front of the object to maintain organization  in your code.

<img class="aligncenter size-full wp-image-392" title="MovieClip Properties" src="http://www.jessclark.com/wp-content/uploads/2010/04/Properties.jpg" alt="" width="455" height="588" />
<h3>Code:</h3>
To access your object in ActionScript first you need to  import it. Next create a variable based on your object and add it  to the stage:
<div class="code">

package {
<p class="indent">import  flash.display.Sprite;</p>
<p class="indent"><strong> import  assets.mySymbol;</strong></p>
<p class="indent">public class  importObjects extends Sprite{</p>
<p class="indent2">public  function importObjects(){</p>
<p class="indent3"><strong> var newSymbol = new mySymbol;</strong></p>
<p class="indent3"><strong> addChild(newSymbol);</strong></p>
<p class="indent2">}</p>
<p class="indent">}</p>
}

</div>]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/code/accessing-imported-objects-in-actionscript-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get FaceBook Comments with PHP</title>
		<link>http://jessclark.com/blog/code/facebook-comments-php-client-library</link>
		<comments>http://jessclark.com/blog/code/facebook-comments-php-client-library#comments</comments>
		<pubDate>Wed, 21 Apr 2010 16:30:14 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[photo blog]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.jessclark.com/?p=380</guid>
		<description><![CDATA[Last week I posted a photo on my photo blog and on Flickr of my hops starting to grow. Once uploaded, I went to FaceBook and posted a link to the photo there. A few people commented in different places and it got me thinking about how I receive comments. My photo blog doesn’t receive [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I posted a <a href="http://jessclark.com/photo/index.php?counter=1127">photo on my photo blog</a> and on Flickr of my hops starting to grow. Once uploaded, I went to FaceBook and posted a  link to the photo there. A few people commented in different places and it got me  thinking about how I receive comments.</p>
<p> My photo blog doesn’t receive too many comments to begin  with, so when I get one I get excited about it. One of my friends posted her  comment on my FaceBook wall, so I started to think about how I could pull those  comments into one place.</p>
<h3>FaceBook APIs</h3>
<p>FaceBook has a few different APIs; there is the one for  developing applications within their site. One for developers who would like to  use FaceBook’s authentication system, and finally, there is one for pulling  data off of FaceBook on your site: <a href="/http://wiki.developers.facebook.com/index.php/PHP">FaceBook PHP5 Client library</a>. </p>
<h3>Setup Code:</h3>
<div class="code">
<p>&lt;?php</p>
<p class="indent"><span class="linenumber">1:</span> $api_key = 'xxxxxx';</p>
<p class="indent"> $secret  =  'xxxxxx';</p>
<p class="indent"> include_once '../../assets/php/facebook/facebook.php';</p>
<p class="indent"> $facebook = new Facebook($api_key, $secret);</p>
<p class="indent"> $user = $facebook-&gt;require_login();</p>
<p> ?&gt;</p>
</div>
<h3>Grab the Message’s Comments:</h3>
<div class="code">
<p>&lt;?php</p>
<p class="indent">$facebookComments =  $facebook-&gt;api_client-&gt;stream_getComments(&quot; xxxx_ xxxxxx&quot;); //*</p>
<p class="indent">foreach ($facebookComments as $fb){</p>
<p class="indent2"> $user_details  = $facebook-&gt;api_client-&gt;users_getInfo($fb[&quot;fromid&quot;],  'last_name, first_name');</p>
<p class="indent2"> echo  &quot;&lt;hr&gt;&quot;;</p>
<p class="indent2"> echo  &quot;&lt;p&gt;from: &quot; . $user_details[0][&quot;first_name&quot;] . &quot;  &quot; . $user_details[0][&quot;last_name&quot;] . &quot;&lt;/p&gt;;</p>
<p class="indent2"> echo  &quot;&lt;p&gt;date: &quot; . date(&quot;Y-m-d H:i:s&quot;,  $fb[&quot;time&quot;]+64800) . &quot;&lt;/p&gt;;</p>
<p class="indent2"> echo &quot;&lt;p&gt;comment: &quot;  . $fb[&quot;text&quot;] . &quot;&lt;/p&gt;;</p>
<p class="indent"> }</p>
<p>&lt;?php</p>
</div>
<h3>Easy right?</h3>
<p>I was surprised how quickly I was able to mock up some code.  The stream_getComments command takes my user ID number and the comment ID  number and returns an array with the following items:</p>
<ul>
  <li>Fromid = users ID#;  *I have a second query to grab the  person’s name based on their ID </li>
  <li>Time = Unix timestamp format. I added 64800  second to the time so it would be converted to Mountain Standard Time.</li>
  <li>Text = The text of the Comment</li>
  <li>Id = usernameID_postID_commentID</li>
</ul>
<h3>The Problem:</h3>
<p>About an hour later I logged off of FaceBook and the whole  thing broke. What I didn’t realize was that the FaceBook library was using  existing session data from FaceBook. This makes since that I would have to authenticate  in since my FaceBook settings are private. </p>
<p> I set the project aside and came back to it the next day. I  came to the conclusion that rather than let the comments site on FaceBook (like  I do with Flickr), I will pull the comments down to my server. This will help with  two things:</p>
<ol>
  <li>When contacting any API there is usually a lag  and since I am already pulling comments from my SQL database and Flickr’s API,  it would take longer for the blog to load.</li>
  <li>I’m not sure how long I will be able to access  those comments on FaceBook. I would hope in two years from now if I wanted to  pull in those comments they would still exist; I’d rather have the comments  where I can access them quickly.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://jessclark.com/blog/code/facebook-comments-php-client-library/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
