<?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>DigInit :: digital initiatives &#187; code/files</title>
	<atom:link href="http://diginit.wordpress.com/category/codefiles/feed/" rel="self" type="application/rss+xml" />
	<link>http://diginit.wordpress.com</link>
	<description>building the digital commons for libraries</description>
	<lastBuildDate>Fri, 13 Nov 2009 15:18:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='diginit.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/e4beb2286778f11feb7338d9f2b0f5af?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>DigInit :: digital initiatives &#187; code/files</title>
		<link>http://diginit.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://diginit.wordpress.com/osd.xml" title="DigInit :: digital initiatives" />
		<item>
		<title>Mobile Web Design &#8211; Working Code, Tips, Best Practices</title>
		<link>http://diginit.wordpress.com/2009/11/13/mobile-web-design-working-code-tips-best-practices/</link>
		<comments>http://diginit.wordpress.com/2009/11/13/mobile-web-design-working-code-tips-best-practices/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 09:58:10 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/?p=107</guid>
		<description><![CDATA[Taking a web site to the small screen comes with a host of considerations: device width, available bandwidth, touch versus click interfaces, browsers with limited functionality, etc. At the same time, the simplicity of these mobile browsing environments lowers the barrier to entry for developers. Some basic HTML and CSS is all that is required [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=107&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Taking a web site to the small screen comes with a host of considerations: device width, available bandwidth, touch versus click interfaces, browsers with limited functionality, etc. At the same time, the simplicity of these mobile browsing environments lowers the barrier to entry for developers. Some basic HTML and CSS is all that is required to get started. In my research, I have learned a few things and decided to put the learning into action by creating a mobile web template available for anyone to download, remix, and reuse.</p>
<p>Demo: <a href="http://www.lib.montana.edu/~jason/files/m/">http://www.lib.montana.edu/~jason/files/m/</a><br />
Download: <a href="http://www.lib.montana.edu/~jason/files/m.zip">http://www.lib.montana.edu/~jason/files/m.zip</a><br />
Read Me: <a href="http://www.lib.montana.edu/~jason/files/m/_readme.txt">http://www.lib.montana.edu/~jason/files/m/_readme.txt</a></p>
<p>The above template is using HTML, CSS, Javascript, and PHP, but you could substitute any server side language for the programming logic. I also have it in my head that I can build an even simpler template with just HTML and CSS. I&#8217;ll keep people updated&#8230;</p>
<p>Here are some tips, best practices, and design conventions I learned along the way.</p>
<ul>
<li> One column is a design convention worth following (See m.facebook.com, or m.youtube.com, or m.twitter.com).</li>
<li>Pick the essence or core pieces of your site to deliver to your mobile users. Think abridged version.</li>
<li>Follow the &#8220;m&#8221; URL conventions (m.delicious.com OR amazon.mobi OR lifeonterra.com/m/).</li>
<li>Minify and optimize your CSS (See <a href="http://www.cleancss.com/">Clean CSS</a> ).</li>
<li> Minify and optimize your javascript (see <a href="http://www.jslint.com/">JSLint</a>).</li>
<li> Plan for low bandwidth &#8211; Keep images close to 1KB or under.</li>
<li> Test on multiple mobile browsers and emulators.</li>
<li>Don&#8217;t plan on javascript being available &#8211; the above template still works when it&#8217;s turned off.</li>
<li> Build your app so that it loads only necessary data when requested (Use Ajax or Server-Side includes).</li>
</ul>
<p>I&#8217;m interested in any feedback or questions so please share in the comments. I&#8217;ve also created a more robust mobile application example for TERRA: The Nature of Our World available at <a href="http://www.lifeonterra.com/m/">lifeonterra.com/m/</a>. If anyone is interested, I&#8217;m happy to share some of that code as well.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=107&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2009/11/13/mobile-web-design-working-code-tips-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Blip.tv API and YouTube API Code Samples &#8211; Library Mashups</title>
		<link>http://diginit.wordpress.com/2009/09/08/blip-tv-api-and-youtube-api-code-samples-library-mashups/</link>
		<comments>http://diginit.wordpress.com/2009/09/08/blip-tv-api-and-youtube-api-code-samples-library-mashups/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 23:09:58 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[blip.tv]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/?p=85</guid>
		<description><![CDATA[My chapter &#8220;Blip.tv and Digital Video Collections in the Library&#8221; for the recently released Library Mashups edited by Nicole Engard was in need of some code samples. I wanted to show how to use the APIs I kept mentioning in the writing which focused on the digital library mashup of TERRApod. So&#8230; here they are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=85&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My chapter &#8220;<strong><a href="http://mashups.web2learning.net/toc/chapter-15">Blip.tv and Digital Video Collections in the Library</a></strong>&#8221; for the recently released <em><a href="http://mashups.web2learning.net/">Library Mashups</a> </em>edited by <a href="http://www.web2learning.net/">Nicole Engard</a> was in need of some code samples. I wanted to show how to use the APIs I kept mentioning in the writing which focused on the digital library mashup of <a href="http://www.terrapodcast.com">TERRApod</a>. So&#8230; here they are in their basic, rudimentary glory.</p>
<ul>
<li>blip.tv API demo &#8211; <a href="http://www.lib.montana.edu/~jason/files/api/bliptv/">http://www.lib.montana.edu/~jason/files/api/bliptv/</a></li>
<li>blip.tv API code &#8211; <a href="http://www.lib.montana.edu/~jason/files/api/bliptv/index.phps">http://www.lib.montana.edu/~jason/files/api/bliptv/index.phps</a></li>
</ul>
<ul>
<li>YouTube API demo &#8211; <a href="http://www.lib.montana.edu/~jason/files/api/youtube/">http://www.lib.montana.edu/~jason/files/api/youtube/</a></li>
<li>YouTube API code &#8211; <a href="http://www.lib.montana.edu/~jason/files/api/youtube/index.phps">http://www.lib.montana.edu/~jason/files/api/youtube/index.phps</a></li>
</ul>
<p>The complete code is available for download from <a href="http://www.lib.montana.edu/~jason/files.php">my code archive</a>. Think of these examples as the raw materials for building mashups with the blip.tv API and YouTube API. The blip.tv example relies on PHP 5, but I made the YouTube PHP4 compatible and you could adapt the code from there for the blip.tv API. I also included some CURL code in the comments of the files just in case your host requires it. If you have questions or improvements, drop a comment.</p>
<p>A quick word about the book: If you are at all interested in mashups and web services, take a closer look. The book covers one profession&#8217;s (the librarian) application of web services to library data problems. Contributions from industry leader&#8217;s like <a href="http://www.blyberg.net/">John Blyberg</a>, <a href="http://dilettantes.code4lib.org/">Ross Singer</a> and <a href="http://www.librarywebchic.net/">Karen Coombs</a> make this an interesting read for anyone interested in how web services and open data are changing the nature of web development for libraries.</p>
<p>&lt;end bookplug /&gt;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=85&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2009/09/08/blip-tv-api-and-youtube-api-code-samples-library-mashups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Computers in Libraries 2009</title>
		<link>http://diginit.wordpress.com/2009/03/29/computers-in-libraries-2009/</link>
		<comments>http://diginit.wordpress.com/2009/03/29/computers-in-libraries-2009/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 02:41:53 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[conferences/events]]></category>
		<category><![CDATA[cil09]]></category>
		<category><![CDATA[cil2009]]></category>
		<category><![CDATA[web-services mobile gadgets widgets]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/?p=74</guid>
		<description><![CDATA[Computers in Libraries starts tomorrow and it&#8217;s always a great time. I arrived in DC earlier today from an uneventful flight which is always a good thing.  Met up with Karen Coombs and Michael Sauers for some SuperHappyTerrific sushi and now I&#8217;m collecting my thoughts regarding my upcoming workshops and presentation.
Web Services for Libraries (with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=74&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Computers in Libraries starts tomorrow and it&#8217;s always a great time. I arrived in DC earlier today from an uneventful flight which is always a good thing.  Met up with <a href="http://www.librarywebchic.net/wordpress/">Karen Coombs</a> and <a href="http://www.travelinlibrarian.info/">Michael Sauers</a> for some SuperHappyTerrific sushi and now I&#8217;m collecting my thoughts regarding my upcoming workshops and presentation.</p>
<p><strong>Web Services for Libraries (with Karen)</strong><br />
Sunday, March 30 from 1:00PM – 4:00 PM<br />
Delicious for subject guides, Flickr for library displays, YouTube for library orientation …Mashups and APIs (application programming interfaces) are becoming staples of modern web design. Libraries, as repositories of data, have a wealth of information that could be placed within the mashup context. With new tools and scripts available daily, it’s becoming easier and easier to bring pieces of the web together and enable users to find and build new web services with library data. This workshop focuses on what an API is and what it can do, the standard components of web services, how to build a simple mashup with JavaScript, how to work with PHP to consume a web service and create a mashup, what web services and mashups mean for libraries, and how to start consuming and creating web services for your library with available tools and scripts. Come learn how open data standards and a little “know-how” can change your library services. Hear what others are doing and what you can do too. (Participants should be comfortable with HTML markup and have an interest in learning about web scripting and programming.)</p>
<p><strong>Widgets, Gadgets, and Mobie Apps for Libraries (with Karen and Michael)</strong><br />
Sunday, March 30 from 9:00 AM – 12:00 PM<br />
As web content continues to grow and the noise-to-signal ratio increases, it has become important for libraries to find ways to get into users’ common web paths: the social networking sites such as Facebook, the web portals such as iGoogle, learning management systems such as Blackboard, even mobile devices such as the iPhone. Our panel of experts looks at creating widgets or gadgets that allow users to have basic library search and browse functions in these new user environments free from the catalog or library website. They demo and teach how to build live applications that provide gateway searching for library journals, books, articles, and much more. Come learn how to play in these new environments and to give users options for searching and consuming library materials in their own learning spaces.</p>
<p><strong>The Portable Library: Going &#8220;Atomic&#8221; with Library Web Services</strong><br />
Monday, March 30 from 10:30 AM – 11:45 AM<br />
There is an opportunity for libraries to braodcast into our users’ common web paths (like Facebook and iGoogle) and to create mobile library apps that allow users to have basic library search functions in these new user environments.  Live applications from MSU Libraries illustrate: a Google Gadget that allows gateway searching for library journals, books, and articles and a series of OpenSearch plugins that let patrons search library content from within the web browser. Come learn about the simple steps you can take to make these widgets and research tools happen at your library.</p>
<p><strong>Presentation files and handouts for all sessions are available</strong> at http://www.lib.montana.edu/~jason/talks.php.</p>
<p><strong>Demos and &#8220;Downloadables&#8221; for all sessions are available</strong> at http://www.lib.montana.edu/~jason/files.php.</p>
<p>I&#8217;m also trying to track the official tags and hashtags for the conference.  It&#8217;s looking like &#8220;#cil2009&#8243; for twitter and &#8220;cil2009&#8243; for all other tagging.  See everyone around Crystal City or teh Internets&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=74&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2009/03/29/computers-in-libraries-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix Global Find and Replace (using find, grep, and sed)</title>
		<link>http://diginit.wordpress.com/2008/04/23/unix-global-find-and-replace-using-find-grep-and-sed/</link>
		<comments>http://diginit.wordpress.com/2008/04/23/unix-global-find-and-replace-using-find-grep-and-sed/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 11:10:01 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/?p=54</guid>
		<description><![CDATA[Finding and replacing strings and characters can be a dicey operation for a web developer.  Too much can lead to breaking your web site.  Too little can lead to missing that piece of HTML needing to be updated or deleted. Many tools exist that can help you in the process &#8211; Dreamweaver, Homesite, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=54&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Finding and replacing strings and characters can be a dicey operation for a web developer.  Too much can lead to breaking your web site.  Too little can lead to missing that piece of HTML needing to be updated or deleted. Many tools exist that can help you in the process &#8211; Dreamweaver, Homesite, and many text editors have powerful interfaces for searching and replacing. (E.g., Use cntrl-f on windows or cmd-f on mac to see the Find and Replace window in Dreamweaver.) But there&#8217;s some really great functionality on the command line for Unix/Linux users that shouldn&#8217;t be overlooked. I&#8217;ve been experimenting with a procedure for making these global matches and replaces within the Unix shell environment and I wanted to document the process somewhere.  This seems like as good a place as any&#8230;</p>
<p>Important: All the commands below must be run from the shell environment on a Unix or Linux system. If you aren&#8217;t sure what I&#8217;m talking about, <a href="http://en.wikipedia.org/wiki/Unix_shell">check the wikipedia reference for shell</a>.</p>
<p><strong>Step 1: </strong>Find the pattern needing to be replaced or updated, print out files needing change</p>
<p>find . -exec grep &#8216;ENTER STRING OR TEXT TO SEARCH FOR&#8217; &#8216;{}&#8217; \; -print</p>
<p>*Note: I&#8217;m using the &#8220;find&#8221; and &#8220;grep&#8221; commands to search for a matching pattern which will print out a list of files and directories that need changes. If I&#8217;m at the top level of my web site the &#8220;.&#8221; in the find command will search for the pattern down through any directories below.  On a large site, the process can take some time.</p>
<p><strong>Step 2: </strong>Move/copy files into test directory to test expression; preserve owners, groups, timestamps<strong><br />
</strong></p>
<p>cp -p -r test test-backup</p>
<p>*Note: These directories would be named according to the directories or files you need to change based on the results from Step 1. The &#8220;-p&#8221; will preserve owners groups and timestamps in the copied directory. The &#8220;-r&#8221; will copy recursively down through any associated sub-directories. I do this so I can compare the new directory to the original directory after I&#8217;ve test run the global changes.</p>
<p><strong>Step 3: </strong>Run test on find and replace expression in /test-backup/ directory</p>
<p>find . \( -name &#8220;*.php&#8221; -or -name &#8220;*.html&#8221; \) | xargs grep -l &#8216;ENTER STRING OR TEXT TO SEARCH FOR&#8217; | xargs sed -i -e &#8217;s/ENTER OLD STRING OR TEXT TO REPLACE/ENTER REPLACEMENT STRING OR TEXT/g</p>
<p>*Note: I&#8217;m using the &#8220;find .&#8221; command to search for .php and html files in the current working directory as I only want to target the files that need to be touched (you should change according to your requirements), next I&#8217;m piping that result to the &#8220;grep&#8221; command which searches for the string or text specified and holds only the matched files in memory, and finally I&#8217;m passing the grep result to the &#8220;sed&#8221; command which matches the string or text and replaces it with the new string or text value.</p>
<p><strong>Step 4: </strong>Test files and applications to ensure changes didn&#8217;t break functionality and that owners, groups, timestamps were preserved</p>
<p><strong>Step 5:</strong> After testing, run expression from Step 3 in ALL the directories or files needing the changes. Delete /test-backup/ directory</p>
<p>Steps 1 and 3 are the heart of the matter. I&#8217;m learning the power of these commands, so I&#8217;m pretty cautious about backing up and testing on directories and files that aren&#8217;t live.  Once I have the expression dialed in, I&#8217;ll run it on a more global scale.  So, there you have it &#8211; my find and replace process in a nutshell. Use at your own discretion and feel free to share your thoughts in the comments.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/diginit.wordpress.com/54/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/diginit.wordpress.com/54/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=54&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2008/04/23/unix-global-find-and-replace-using-find-grep-and-sed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Ajax Workshop &#8211; Internet Librarian 2007</title>
		<link>http://diginit.wordpress.com/2007/10/29/ajax-workshop-internet-librarian-2007/</link>
		<comments>http://diginit.wordpress.com/2007/10/29/ajax-workshop-internet-librarian-2007/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 01:11:19 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[conferences/events]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[il2007]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/2007/10/29/ajax-workshop-internet-librarian-2007/</guid>
		<description><![CDATA[My preconference,&#8221;AJAX for Libraries&#8221;, with Karen Coombs went really well. It&#8217;s always great working with Karen. She&#8217;s cool, composed, and &#8220;wicked&#8221; knowledgeable. For the second year in a row, we had a great group of participants. It&#8217;s nice to see a growing interest in emerging web programming frameworks and how they might be applied to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=48&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My preconference,&#8221;AJAX for Libraries&#8221;, with <a href="http://www.librarywebchic.net/wordpress/2007/10/27/ajax-presentation-information-and-links/">Karen Coombs</a> went really well. It&#8217;s always great working with Karen. She&#8217;s cool, composed, and &#8220;wicked&#8221; knowledgeable. For the second year in a row, we had a great group of participants. It&#8217;s nice to see a growing interest in emerging web programming frameworks and how they might be applied to libraries.</p>
<p>Here are the updated slides and links:</p>
<p><a href="http://docs.google.com/TeamPresent?docid=agm4brmfpr7z_22gn955p&amp;skipauth=true">&#8220;AJAX for Libraries&#8221; Presentation</a><br />
<a href="http://docs.google.com/View?docid=dfcgqf69_132j77cpt">&#8220;AJAX for Libraries&#8221; Handout (Code Samples and Explanations)</a><a href="http://www.lib.montana.edu/~jason/files.php"><br />
&#8220;AJAX for Libraries&#8221; Code Downloads</a></p>
<p>And some additional examples of libraries using AJAX:</p>
<ul>
<li><a href="http://labs.di.tamu.edu:8080/geofolios/handle/123456789/2" target="_blank">TAMU Digital Repository :: Geologic Atlas of the United States</a></li>
<li><a href="http://www.vufind.org/demo/" target="_blank">VuFind Demo</a></li>
<li><a href="http://www.nines.org/collex" target="_blank">NINES</a></li>
<li><a href="http://blacklight.betech.virginia.edu/" target="_blank">Project Blacklight</a></li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/diginit.wordpress.com/48/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/diginit.wordpress.com/48/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=48&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2007/10/29/ajax-workshop-internet-librarian-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Globally match and replace text or string with MySQL query</title>
		<link>http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/</link>
		<comments>http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 21:29:03 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql sql howto]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/</guid>
		<description><![CDATA[In doing some research looking into possible ways to batch replace MSU Library URL strings in our various MySQL databases, I was able to construct this little nugget that will do the trick:
UPDATE table_name SET column_name = REPLACE(column_name, &#8216;old_string/text&#8217;, &#8216;new_string/text&#8217;);
A quick explanation:
table_name is the database table you need to edit.
column_name is the database table column [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=47&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><font size="2">In doing some research looking into possible ways to batch replace MSU Library URL strings in our various MySQL databases, I was able to construct this little nugget that will do the trick:</font></p>
<blockquote><p><font size="2">UPDATE table_name SET column_name = REPLACE(column_name, &#8216;old_string/text&#8217;, &#8216;new_string/text&#8217;);</font></p></blockquote>
<p><font size="2">A quick explanation:</font></p>
<p><font size="2">table_name is the database table you need to edit.<br />
column_name is the database table column name to edit.<br />
old_string/text is the original string or text to match and replace.<br />
new_string/text is the new string or text you want to add.</font></p>
<blockquote></blockquote>
<p><font size="2">It&#8217;s short, sweet, and delightfully efficient. The longevity and active development around MySQL and SQL always surprise me. If you have a business problem, chances are there is a function or built procedure already in the code ready to answer the problem.</font></p>
<p><font size="2">Tips and tricks just like this can be found pretty regularly by trolling the <a href="http://dev.mysql.com/doc/refman/5.0/en/">MySQL manual and forums</a>. Another method for keeping up and learning is &#8220;tagwatching&#8221; on del.icio.us. Some possibilities for watching the tag &#8220;mysql&#8221;:</font></p>
<p><font size="2">HTML page: <a href="http://del.icio.us/tag/mysql">http://del.icio.us/tag/mysql</a></font></p>
<p><font size="2">RSS feed: <a href="http://del.icio.us/rss/tag/mysql">http://del.icio.us/rss/tag/mysql</a></font></p>
<p><font size="2">That&#8217;s right. With that last RSS URL, you can subscribe to a tag and watch as the latest posts come into your feedreader of choice. (del.icio.us  has a feed for all of its tags.)  Good stuff for keeping the learning going. </font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/diginit.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/diginit.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=47&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2007/10/21/globally-match-and-replace-text-or-string-with-mysql-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Anatomy of a Function</title>
		<link>http://diginit.wordpress.com/2006/11/30/anatomy-of-a-function/</link>
		<comments>http://diginit.wordpress.com/2006/11/30/anatomy-of-a-function/#comments</comments>
		<pubDate>Thu, 30 Nov 2006 07:02:11 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/2006/11/30/anatomy-of-a-function/</guid>
		<description><![CDATA[It&#8217;s been a little while since my last post. My recent work schedule and Turkey Day played a part in that. I&#8217;ve been working .com hours on a super cool project. (I mentioned the TERRA group in an earlier post.) I&#8217;ve learned so much in the last couple of weeks. It&#8217;s amazing what a hard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=23&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s been a little while since my last post. My recent work schedule and Turkey Day played a part in that. I&#8217;ve been working .com hours on a super cool project. (I mentioned the TERRA group in an earlier post.) I&#8217;ve learned so much in the last couple of weeks. It&#8217;s amazing what a hard deadline and a shifting set of requirements will do to your web programming skills. All the hard work is about to bear fruit as as the <a href="http://www.lifeonterra.com/">new TERRA web site</a> is about to go live. Have a look at a different kind of digital library.</p>
<p>But, that&#8217;s not the point of this post&#8230; I wanted to share a little code that made some data conversion very simple over the course of the TERRA project. It&#8217;s a simple little php function that converts a <a href="http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html">MySQL timestamp</a> into <a href="http://en.wikipedia.org/?title=RFC_0822">an RFC 822 date format</a> (For the project, we stored the item update fields as timestamps and then converted them when we generated our various XML feeds. RFC 822 or RFC 2822 are necessary for valid feeds.) Here&#8217;s the php function in all its glory:</p>
<p>//function converts mysql timestamp into rfc 822 date<br />
function dateConvertTimestamp($mysqlDate)<br />
{<br />
$rawdate=strtotime($mysqlDate);<br />
if ($rawdate == -1) {<br />
$convertedDate = &#8216;conversion failed&#8217;;<br />
} else {<br />
$convertedDate = date(&#8216;D, d M Y h:i:s T&#8217;,$rawdate);<br />
return $convertedDate;<br />
}<br />
}<br />
//end dateConvertTimestamp</p>
<p>You call the function by including it on the page and using the following code:</p>
<p>$newPubdate = dateConvert(&#8220;$stringToConvert&#8221;);<br />
echo $newPubdate;</p>
<p>Where $stringToConvert would be any MySQL timestamp value that needs conversion.</p>
<p>In the end a string like this &#8220;2005-05-17 12:00:00&#8243; looks something like this &#8220;Tue, 17 May 2005 12:00:00 EST&#8221;. You could also reverse the conversion using this php function:</p>
<p>//function converts rfc 822 date into mysql timestamp<br />
function dateConvert($rssDate)<br />
{<br />
$rawdate=strtotime($rssDate);<br />
if ($rawdate == -1) {<br />
$convertedDate = &#8216;conversion failed&#8217;;<br />
} else {<br />
$convertedDate = date(&#8216;Y-m-d h:i:s&#8217;,$rawdate);<br />
return $convertedDate;<br />
}<br />
}<br />
//end dateConvert</p>
<p><strong>NOTE: If/when you copy and paste the above code, make sure all &#8221; (double quotes) and &#8216; (single quotes) are retyped. WordPress is doing a number on the proper format.</strong></p>
<p>I just wanted to share the wealth a bit. If you&#8217;ve got questions or suggestions, don&#8217;t be shy about dropping a comment. I&#8217;ll be home in Wisconsin for the next several days, but I&#8217;ll have limited internet access there.  I&#8217;ll try to answer questions if they arise.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/diginit.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/diginit.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=23&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2006/11/30/anatomy-of-a-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
		<item>
		<title>Proof of concept &#8211; Ajax page update</title>
		<link>http://diginit.wordpress.com/2006/10/22/proof-of-concept-ajax-page-update/</link>
		<comments>http://diginit.wordpress.com/2006/10/22/proof-of-concept-ajax-page-update/#comments</comments>
		<pubDate>Sun, 22 Oct 2006 21:55:51 +0000</pubDate>
		<dc:creator>Jason A. Clark</dc:creator>
				<category><![CDATA[code/files]]></category>
		<category><![CDATA[conferences/events]]></category>
		<category><![CDATA[il2006]]></category>

		<guid isPermaLink="false">http://diginit.wordpress.com/2006/10/22/proof-of-concept-ajax-page-update/</guid>
		<description><![CDATA[Yesterday, Karen Coombs and I had the opportunity to conduct an &#8220;Ajax for Libraries&#8221; workshop at Internet Librarian.  The workshop went pretty well and it was encouraging to work with a group of attendees who were engaged and willing to learn.  (Note to self: create a cross-domain Ajax query to show workshop attendees.) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=8&subd=diginit&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday, <a href="http://www.librarywebchic.net">Karen Coombs</a> and I had the opportunity to conduct an <a href="http://www.infotoday.com/il2006/preconference.shtml">&#8220;Ajax for Libraries&#8221; workshop at Internet Librarian</a>.  The workshop went pretty well and it was encouraging to work with a group of attendees who were engaged and willing to learn.  (Note to self: create a cross-domain Ajax query to show workshop attendees.)  I wanted to start with Ajax basics so I created a simple Ajax example that pulls WorldCat data and a WorldCat &#8220;find in a library&#8221; search form onto a page.  It&#8217;s very basic, but it showcases the fundamentals of the Ajax method &#8211; <a href="http://www.lib.montana.edu/%7Ejason/files/ajax/">take a look at the demo here</a>.</p>
<p>The example uses the XMLHttpRequest object to make a micro-HTTP GET request behind the scenes creating a seamless date update without a full page reload.  Feel free to <a href="http://www.lib.montana.edu/%7Ejason/files/worldcat-ajax.zip">download a zip of the sample files</a> in an active server directory.  Use modern browsers &#8211; Mozilla, Firefox, IE 6 and up.</p>
<p>Just wanted to share a bit, dig in and learn&#8230;</p>
<p><strong>Update:</strong> Karen has posted links to the workshop files: <a href="http://www.librarywebchic.net/presentations/internetlibrarian2006/ajax-workshop.ppt">presentation (.ppt)</a> AND <a href="http://www.librarywebchic.net/presentations/internetlibrarian2006/AJAX_handout.pdf">handout (.pdf)</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/diginit.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/diginit.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diginit.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diginit.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diginit.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diginit.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diginit.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diginit.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diginit.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diginit.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diginit.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diginit.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diginit.wordpress.com&blog=32913&post=8&subd=diginit&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://diginit.wordpress.com/2006/10/22/proof-of-concept-ajax-page-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9c3e8cd1eecfd6a197f17ede70b82a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">diginit</media:title>
		</media:content>
	</item>
	</channel>
</rss>