
<?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>daniel shiffman &#187; blog</title>
	<atom:link href="http://www.shiffman.net/category/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shiffman.net</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 03:41:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Big Screens Round Two</title>
		<link>http://www.shiffman.net/2008/10/26/big-screens-round-two/</link>
		<comments>http://www.shiffman.net/2008/10/26/big-screens-round-two/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 02:38:11 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mpe]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[teaching_]]></category>
		<category><![CDATA[big screens]]></category>
		<category><![CDATA[iac]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/?p=306</guid>
		<description><![CDATA[Big Screens Class @ IAC, Session 2 from shiffman on Vimeo.]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="281"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2063114&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2063114&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="281"></embed></object><br /><a href="http://vimeo.com/2063114?pg=embed&amp;sec=2063114">Big Screens Class @ IAC, Session 2</a> from <a href="http://vimeo.com/shiffman?pg=embed&amp;sec=2063114">shiffman</a> on <a href="http://vimeo.com?pg=embed&amp;sec=2063114">Vimeo</a>.</p>
<p><a href="http://www.flickr.com/photos/shiffman/2970962575/" title="SANY0286 by shiffman, on Flickr"><img src="http://farm4.static.flickr.com/3063/2970962575_81756f6f6c_t.jpg" width="100" height="75" alt="SANY0286" /></a> <a href="http://www.flickr.com/photos/shiffman/2971810936/" title="SANY0268 by shiffman, on Flickr"><img src="http://farm4.static.flickr.com/3173/2971810936_5a2163b241_t.jpg" width="100" height="75" alt="SANY0268" /></a> <a href="http://www.flickr.com/photos/shiffman/2971822534/" title="SANY0247 by shiffman, on Flickr"><img src="http://farm4.static.flickr.com/3164/2971822534_a167d94d2b_t.jpg" width="100" height="75" alt="SANY0247" /></a> <a href="http://www.flickr.com/photos/shiffman/2970964515/" title="SANY0276 by shiffman, on Flickr"><img src="http://farm4.static.flickr.com/3064/2970964515_9ba35a4237_t.jpg" width="100" height="75" alt="SANY0276" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2008/10/26/big-screens-round-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XBee API Library for Processing</title>
		<link>http://www.shiffman.net/2007/12/20/xbee-api-library-for-processing/</link>
		<comments>http://www.shiffman.net/2007/12/20/xbee-api-library-for-processing/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 21:06:19 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/12/20/xbee-api-library-for-processing/</guid>
		<description><![CDATA[Rob Faludi and I are working on a Processing library for Digiâ€™s XBee Series 1 radios. Direct from Rob&#8217;s blog: The library currently facilitates receiving single sample I/O packets in API mode, and returns an object that contains the analog &#8230; <a href="http://www.shiffman.net/2007/12/20/xbee-api-library-for-processing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://faludi.com">Rob Faludi</a> and I are working on a Processing library for Digiâ€™s <a href="http://www.digi.com/products/wireless/point-multipoint/xbee-series1-module.jsp">XBee Series 1 radios</a>.  Direct from <a href="http://blog.faludi.com/2007/12/19/xbee-api-library-for-processing/">Rob&#8217;s blog</a>:</p>
<p><i>The library currently facilitates receiving single sample I/O packets in <a href="http://www.digi.com/support/kbase/kbaseresultdetl.jsp?kb=184">API mode</a>, and returns an object that contains the analog values, digital values, senderâ€™s 16-bit address and RSSI value. The next tasks will be to receive regular RX frames, issue AT commands and receive responses, issue TX frames and receive responses to those. Weâ€™d also like to support the XBee Series 2 radios, which have a similar API structure.</i></p>
<p>Here&#8217;s where you can <a href="http://blog.faludi.com/code/xbee-api-library-for-processing/">download and learn about the library</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/12/20/xbee-api-library-for-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E-mail Processing</title>
		<link>http://www.shiffman.net/2007/11/13/e-mail-processing/</link>
		<comments>http://www.shiffman.net/2007/11/13/e-mail-processing/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 02:26:43 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/11/13/e-mail-processing/</guid>
		<description><![CDATA[While it may not be nearly as kooky as calling Processing on the phone, I&#8217;ve been asked about checking e-mail from Processing several times this semester. So rather than try to dig up example code on the internets, I&#8217;ve quickly &#8230; <a href="http://www.shiffman.net/2007/11/13/e-mail-processing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While it may not be nearly as kooky as <a href="http://www.shiffman.net/p5/asterisk">calling Processing on the phone</a>, I&#8217;ve been asked about checking e-mail from Processing several times this semester.  So rather than try to dig up example code on the internets, I&#8217;ve quickly thrown together one that checks a <a href="http://en.wikipedia.org/wiki/Post_Office_Protocol">POP account</a> and/or sends mail via <a href="http://en.wikipedia.org/wiki/Smtp">SMTP</a>.  It&#8217;s all done with <a href="http://en.wikipedia.org/wiki/Smtp">Javamail</a>.</p>
<p><a href="http://www.shiffman.net/p5/Email.zip">Download the example sketch.</a></p>
<p>Code snippets after the jump. . .</p>
<p><span id="more-201"></span></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #003399;">Properties</span> props <span style="color: #339933;">=</span> <span style="color: #003399;">System</span>.<span style="color: #006633;">getProperties</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.pop3.host&quot;</span>, <span style="color: #0000ff;">&quot;pop.gmail.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// These are security settings required for gmail</span>
    <span style="color: #666666; font-style: italic;">// May need different code depending on the account</span>
    props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.pop3.port&quot;</span>, <span style="color: #0000ff;">&quot;995&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.pop3.starttls.enable&quot;</span>, <span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    props.<span style="color: #006633;">setProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.pop3.socketFactory.fallback&quot;</span>, <span style="color: #0000ff;">&quot;false&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    props.<span style="color: #006633;">setProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.pop3.socketFactory.class&quot;</span>,<span style="color: #0000ff;">&quot;javax.net.ssl.SSLSocketFactory&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Create authentication object</span>
    Auth auth <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Auth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Make a session</span>
    Session session <span style="color: #339933;">=</span> Session.<span style="color: #006633;">getDefaultInstance</span><span style="color: #009900;">&#40;</span>props, auth<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    Store store <span style="color: #339933;">=</span> session.<span style="color: #006633;">getStore</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pop3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    store.<span style="color: #006633;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Get inbox</span>
    Folder folder <span style="color: #339933;">=</span> store.<span style="color: #006633;">getFolder</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INBOX&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    folder.<span style="color: #006633;">open</span><span style="color: #009900;">&#40;</span>Folder.<span style="color: #006633;">READ_ONLY</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>folder.<span style="color: #006633;">getMessageCount</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; total messages.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Get array of messages and display them</span>
    Message message<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> folder.<span style="color: #006633;">getMessages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> message.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;---------------------&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Message # &quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;From: &quot;</span> <span style="color: #339933;">+</span> message<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">getFrom</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Subject: &quot;</span> <span style="color: #339933;">+</span> message<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">getSubject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Message:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">String</span> content <span style="color: #339933;">=</span> message<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">getContent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>content<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Close the session</span>
    folder.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    store.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>and sending:</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">  <span style="color: #666666; font-style: italic;">// Create a session</span>
  <span style="color: #003399;">String</span> host<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;smtp.gmail.com&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #003399;">Properties</span> props<span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Properties</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// SMTP Session</span>
  props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.transport.protocol&quot;</span>, <span style="color: #0000ff;">&quot;smtp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.host&quot;</span>, host<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.port&quot;</span>, <span style="color: #0000ff;">&quot;25&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.auth&quot;</span>, <span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// We need TTLS, which gmail requires</span>
  props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.starttls.enable&quot;</span>,<span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Create a session</span>
  Session session <span style="color: #339933;">=</span> Session.<span style="color: #006633;">getDefaultInstance</span><span style="color: #009900;">&#40;</span>props, <span style="color: #000000; font-weight: bold;">new</span> Auth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">try</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Make a new message</span>
    MimeMessage message <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MimeMessage<span style="color: #009900;">&#40;</span>session<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Who is this message from</span>
    message.<span style="color: #006633;">setFrom</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> InternetAddress<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;name@gmail.com&quot;</span>, <span style="color: #0000ff;">&quot;Name&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Who is this message to (we could do fancier things like make a list or add CC's)</span>
    message.<span style="color: #006633;">setRecipients</span><span style="color: #009900;">&#40;</span>Message.<span style="color: #006633;">RecipientType</span>.<span style="color: #006633;">TO</span>, InternetAddress.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;address@email.com&quot;</span>, <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Subject and body</span>
    message.<span style="color: #006633;">setSubject</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    message.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;It's great to be here. . .&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// We can do more here, set the date, the headers, etc.</span>
    Transport.<span style="color: #006633;">send</span><span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Mail sent!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/11/13/e-mail-processing/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Day 2</title>
		<link>http://www.shiffman.net/2007/08/21/day-2/</link>
		<comments>http://www.shiffman.net/2007/08/21/day-2/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 04:27:43 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[big screens]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[iac]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mpe]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/08/21/day-2/</guid>
		<description><![CDATA[IAC Video Wall Day 2 from shiffman and Vimeo.]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" width="480" height="360" data="http://vimeo.com/moogaloop.swf?clip_id=282083&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=282083&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF" /></object></p>
<p><a href="http://vimeo.com/282083">IAC Video Wall Day 2</a> from <a href="http://vimeo.com/shiffman">shiffman</a> and <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/08/21/day-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>IAC Video Wall Tests</title>
		<link>http://www.shiffman.net/2007/08/20/iac-video-wall-tests/</link>
		<comments>http://www.shiffman.net/2007/08/20/iac-video-wall-tests/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 00:02:37 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[big screens]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[iac]]></category>
		<category><![CDATA[mpe]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[videowall]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/08/20/iac-video-wall-tests/</guid>
		<description><![CDATA[IAC Video Wall Test from shiffman and Vimeo. We&#8217;re testing the most pixels ever library on the IAC Video Wall. So far it works. More to come in the next two days. . .]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" width="480" height="360" data="http://vimeo.com/moogaloop.swf?clip_id=280373&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=280373&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF" /></object></p>
<p><a href="http://vimeo.com/280373">IAC Video Wall Test</a> from <a href="http://vimeo.com/shiffman">shiffman</a> and <a href="http://vimeo.com">Vimeo</a>.</p>
<p>We&#8217;re testing the <a href="http://www.shiffman.net/2007/03/02/most-pixels-ever/">most pixels ever</a> library on the <a href="http://www.iac.com/">IAC Video Wall</a>.  So far it works.  </p>
<p>More to come in the next two days. . . </p>
<p><script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=6&#038;display=random&#038;size=s&#038;layout=h&#038;source=user_set&#038;user=71462827%40N00&#038;set= 72157601572932676&#038;context=in%2Fset-1609469%2F"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/08/20/iac-video-wall-tests/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Processing Yahoo Search Library</title>
		<link>http://www.shiffman.net/2007/08/05/processing-yahoo-search-library/</link>
		<comments>http://www.shiffman.net/2007/08/05/processing-yahoo-search-library/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 02:51:22 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/08/05/processing-yahoo-search-library/</guid>
		<description><![CDATA[2011 Update: While this library may still work, I am deprecating it as Yahoo does not support the Java Search API any longer as far as I can tell Now, I am rather overdue for an update on my upcoming &#8230; <a href="http://www.shiffman.net/2007/08/05/processing-yahoo-search-library/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>2011 Update: While this library may still work, I am deprecating it as Yahoo does not support the Java Search API any longer as far as I can tell</strong></p>
<p><img src="http://www.shiffman.net/p5/pyahoo_files/names.jpg"/></p>
<p>Now, I am rather overdue for an update on <a href="http://book.shiffman.net">my upcoming book</a>.  I&#8217;ll be posting details soon.   However, in the course of finishing up a chapter on String parsing, I discovered that my good friend, the <a href="http://code.google.com/apis/soapsearch/">Google SOAP API</a> is no longer being supported (obviously, I&#8217;m a little late on the ball here.) </p>
<p>So, I quickly whipped up a <a href="http://www.processing.org">Processing</a> library to make use of the Yahoo Search API.  Now, you can access the Yahoo! API directly in Processing.  There&#8217;s <a href="http://processing.org/learning/libraries/yahoosearch.html">even an example here</a>.  However, you would have to write your own thread if you wanted to search asynchronously.  In addition, if you&#8217;re not comfortable diving into outside Java APIs, you might struggle to figure out the syntax.   (<a href="http://www.realtimeart.com/switchboard/">Switchboard</a> also provides an interface to the Yahoo! API.)</p>
<p>So I set out (as an example for my book) to make a quick and easy bridge to the Yahoo API.    </p>
<li class="arrow"><a href="http://www.shiffman.net/p5/pyahoo_files/pyahoo.zip">Download the library here</a></li>
<li class="arrow"><a href="http://developer.yahoo.com">Go and get a developer ID</a></li>
<li class="arrow"><a href="http://developer.yahoo.com/download">Download the Yahoo! Search SDK</a>  Find the file: yahoo_search-2.X.X.jar and put it in the library folder (along with the above download).</li>
<p>Finally, take a peek at this example code.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Import the library</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">pyahoo.*</span><span style="color: #339933;">;</span>
&nbsp;
YahooSearch yahoo<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span>,<span style="color: #cc66cc;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// Make a search object</span>
  yahoo <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> YahooSearch<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>,<span style="color: #0000ff;">&quot;YOUR API KEY HERE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> mousePressed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  yahoo.<span style="color: #006633;">search</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;processing.org&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// You can request more results like so (the default is 10):</span>
  <span style="color: #666666; font-style: italic;">// yahoo.search(&quot;processing.org&quot;,30);</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  noLoop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// The searches will come in one at a time to here when finished</span>
<span style="color: #000066; font-weight: bold;">void</span> searchEvent<span style="color: #009900;">&#40;</span>YahooSearch yahoo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// You can get the titles, URLs, or Summaries back as an array of Strings</span>
  <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> titles <span style="color: #339933;">=</span> yahoo.<span style="color: #006633;">getTitles</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> urls <span style="color: #339933;">=</span> yahoo.<span style="color: #006633;">getUrls</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>I searched for &quot;</span> <span style="color: #339933;">+</span> yahoo.<span style="color: #006633;">getSearchString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There are a total of &quot;</span> <span style="color: #339933;">+</span> yahoo.<span style="color: #006633;">getTotalResultsAvailable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; results available&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Here are the first &quot;</span> <span style="color: #339933;">+</span> yahoo.<span style="color: #006633;">getNumberRequested</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> titles.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;___________&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Item # &quot;</span> <span style="color: #339933;">+</span> i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    println<span style="color: #009900;">&#40;</span>titles<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    println<span style="color: #009900;">&#40;</span>urls<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// You can also access the Yahoo API Directly by asking for the WebSearchResult object:</span>
  <span style="color: #666666; font-style: italic;">// WebSearchResults results = yahoo.getResults();</span>
  <span style="color: #666666; font-style: italic;">// WebSearchResult[] results = yahoo.getResultsArray();</span>
  <span style="color: #666666; font-style: italic;">// In this mode, make sure to import the Yahoo library up topl</span>
  <span style="color: #666666; font-style: italic;">// import com.yahoo.search.WebSearchResults;</span>
  <span style="color: #666666; font-style: italic;">// See Yahoo API documentation for more</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>There&#8217;s also a fancier example (mostly uncommented, sorry) that produced the image at the top of this post <a href="http://www.shiffman.net/p5/pyahoo_files/names.zip">here</a>.  </p>
<p>Thoughts?  Helpful?  Useful?  </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/08/05/processing-yahoo-search-library/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Terminal Zero One Press</title>
		<link>http://www.shiffman.net/2007/07/14/airport-installation-press/</link>
		<comments>http://www.shiffman.net/2007/07/14/airport-installation-press/#comments</comments>
		<pubDate>Sat, 14 Jul 2007 14:32:08 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[airport]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[terminal01]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/07/14/airport-installation-press/</guid>
		<description><![CDATA[We have lift-off for airport-related puns! Terminally bored? You won&#8217;t be, with digital art by Nadja Sayej, The Globe and Mail. Airport art: Multi-screen, interactive digital art exhibition connects travellers with a disconnected world at Terminal One by Peter Goddard, &#8230; <a href="http://www.shiffman.net/2007/07/14/airport-installation-press/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We have lift-off for airport-related puns!</p>
<p><a href="http://www.theglobeandmail.com/servlet/story/LAC.20070714.AIRPORT14/TPStory/TPEntertainment/Ontario/">Terminally bored? You won&#8217;t be, with digital art</a> by Nadja Sayej, <a href="http://www.theglobeandmail.com/">The Globe and Mail.</p>
<p></a><a href="http://www.thestar.com/entertainment/article/234889">Airport art: Multi-screen, interactive digital art exhibition connects travellers with a disconnected world at Terminal One</a> by Peter Goddard, <a href="http://www.thestar.com/">Toronto Star</a></p>
<p><a href="http://www.blogto.com/arts/2007/07/terminal_zero_one_touches_down_at_pearson/">Terminal Zero One Touches Down at Pearson</a> by <a href="http://www.blogto.com/author/adam">Adam Schwabe</a>, <a href="http://www.blogto.com/">blogTO</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/07/14/airport-installation-press/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Processing QRCode Library</title>
		<link>http://www.shiffman.net/2007/06/26/processing-qrcode-library/</link>
		<comments>http://www.shiffman.net/2007/06/26/processing-qrcode-library/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 18:52:54 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[qrcode]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/06/26/processing-qrcode-library/</guid>
		<description><![CDATA[From: http://qrcode.sourceforge.jp/: &#8220;QR Code is a two-dimensional barcode, used widely in Japan. The advantage of QR Code from well-known barcode is larger data capacity (more than 100 bytes, typically) and error correction.&#8221; Thanks to an idea from Tom Igoe, I &#8230; <a href="http://www.shiffman.net/2007/06/26/processing-qrcode-library/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.shiffman.net/p5/pqrcode/"><img src="http://qrcode.kaywa.com/img.php?s=8&#038;d=I%20love%20Processing%21%21%21" alt="qrcode"  /></a></p>
<p>From: <a href="http://qrcode.sourceforge.jp/">http://qrcode.sourceforge.jp/</a>:</p>
<p>&#8220;QR Code is a two-dimensional barcode, used widely in Japan. The advantage of QR Code from well-known barcode is larger data capacity (more than 100 bytes, typically) and error correction.&#8221;</p>
<p>Thanks to an idea from Tom Igoe, I make a quick and dirty interface for Processing for QRCode decoding.  The <a href="http://www.shiffman.net/p5/pqrcode/">Pqrcode library page is here</a>.   </p>
<p>Also, qrcode images can be <a href="http://qrcode.kaywa.com/">generated here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/06/26/processing-qrcode-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Right Click Swarm</title>
		<link>http://www.shiffman.net/2007/05/23/right-click-swarm/</link>
		<comments>http://www.shiffman.net/2007/05/23/right-click-swarm/#comments</comments>
		<pubDate>Wed, 23 May 2007 12:15:38 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[exhibition]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[swarm]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/05/23/right-click-swarm/</guid>
		<description><![CDATA[My 2002 (my goodness, that&#8217;s 5 years ago!) piece Swarm is part of Right click &#8211; Open source new art media exhibition at the Kapok gallery in Hong Kong. Swarm uses an implementation of Craig Reynolds&#8217; flocking algorithm and the &#8230; <a href="http://www.shiffman.net/2007/05/23/right-click-swarm/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My 2002 (my goodness, that&#8217;s 5 years ago!) piece <a href="http://www.shiffman.net/projects/swarm/">Swarm</a> is part of <a href="http://ka-pok.blogs.com/kapok/2007/05/right_click_ope.html">Right click &#8211; Open source new art media exhibition</a> at the <a href="http://ka-pok.blogs.com/kapok/">Kapok</a> gallery in Hong Kong.    Swarm uses an implementation of <a href="http://www.red3d.com/cwr/">Craig Reynolds&#8217;</a> flocking algorithm and the <a href="http://www.shiffman.net/teaching/nature/steering">Processing source</a> is available in my <a href="http://www.shiffman.net/teaching/nature/">nature of code</a> tutorials.  The show also includes Josh Minor&#8217;s wonderfully addictive <a href="http://lux.vu/blog/2007/04/18/video-pong-exhibit/">Video Pong</a>.</p>
<p>I <a href="http://www.shiffman.net/2006/07/12/hong-kong/">miss Hong Kong</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/05/23/right-click-swarm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Airport Installation</title>
		<link>http://www.shiffman.net/2007/05/18/airport-installation/</link>
		<comments>http://www.shiffman.net/2007/05/18/airport-installation/#comments</comments>
		<pubDate>Sat, 19 May 2007 00:12:07 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[airport]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[p5]]></category>
		<category><![CDATA[terminal01]]></category>

		<guid isPermaLink="false">http://www.shiffman.net/2007/05/18/airport-installation/</guid>
		<description><![CDATA[I&#8217;m working on an interactive kiosk for the Toronto Airport, part of Terminal Zero One. Two early sketches: download download]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on an interactive kiosk for the Toronto Airport, part of <a href="http://www.year01.com/terminal01/">Terminal Zero One</a>.  Two early sketches:</p>
<p><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=192629" quality="best" scale="exactfit" width="400" height="300" type="application/x-shockwave-flash"></embed></p>
<p><a href="http://www.vimeo.com/download/video:17847471">download</a></p>
<p><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=192554" quality="best" scale="exactfit" width="400" height="300" type="application/x-shockwave-flash"></embed></p>
<p><a href="http://www.vimeo.com/download/video:17845568">download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiffman.net/2007/05/18/airport-installation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

