<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5667473601942758331</id><updated>2012-01-12T00:16:33.940-08:00</updated><category term='sakai'/><category term='mac os x lion'/><category term='gitweb'/><category term='java'/><category term='fragments'/><category term='cluster'/><category term='sdata'/><category term='qr code'/><category term='entiybroker'/><category term='perl'/><category term='google visualization api'/><category term='jax-rs'/><category term='community'/><category term='jersey'/><category term='gwt'/><category term='MMS'/><category term='google chart api'/><category term='fiber'/><category term='rest'/><category term='firefox'/><category term='Geo Location'/><category term='android'/><category term='iPhone'/><category term='restlet'/><category term='mount-sd-card'/><category term='git'/><category term='sakai message-service'/><category term='javarebel'/><category term='jsr-311'/><category term='eclipse'/><category term='jms'/><category term='Current Location'/><category term='json'/><category term='subversion'/><category term='google'/><category term='viewpager'/><category term='HTML5'/><title type='text'>Thomas Amsler</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-2204269996960343601</id><published>2012-01-11T21:10:00.000-08:00</published><updated>2012-01-11T23:45:24.114-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='mac os x lion'/><title type='text'>Eclipse "command + hover" doesn't show the "Open Declaration" popup on Mac OS X Lion</title><content type='html'>&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;This is a know issue and has been reported here:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=353503"&gt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=353503&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-z1Qtf9hIVUY/Tw6PExydhxI/AAAAAAAAYSw/NKYdnbYKbLk/s1600/eclipse-ch-issue2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="114" src="http://2.bp.blogspot.com/-z1Qtf9hIVUY/Tw6PExydhxI/AAAAAAAAYSw/NKYdnbYKbLk/s320/eclipse-ch-issue2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;The workaround is to change the following Mac OS X System Preferences.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Open the Mac OS X System Preferences&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Click on General&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Change the "Show scroll bars:" setting to "Always"&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-fqWzxRbA8Uc/Tw5rIvd_uQI/AAAAAAAAYSo/6xsVeeg0Sb8/s1600/eclipse-ch-issue.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;img border="0" height="288" src="http://3.bp.blogspot.com/-fqWzxRbA8Uc/Tw5rIvd_uQI/AAAAAAAAYSo/6xsVeeg0Sb8/s320/eclipse-ch-issue.png" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-2204269996960343601?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/2204269996960343601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=2204269996960343601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/2204269996960343601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/2204269996960343601'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2012/01/eclipse-command-hover-doesnt-show-open.html' title='Eclipse &quot;command + hover&quot; doesn&apos;t show the &quot;Open Declaration&quot; popup on Mac OS X Lion'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-z1Qtf9hIVUY/Tw6PExydhxI/AAAAAAAAYSw/NKYdnbYKbLk/s72-c/eclipse-ch-issue2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-5816733106509658666</id><published>2011-11-24T11:17:00.001-08:00</published><updated>2011-11-24T12:46:05.591-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fragments'/><category scheme='http://www.blogger.com/atom/ns#' term='viewpager'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android: ViewPager and Fragments Part II</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;What are the different ways to get a reference to the currently visible fragment page in a ViewPager?&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&lt;b&gt;First Solution&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;You can set a unique tag on each fragment page:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;getSupportFragmentManager().beginTransaction().add(myFragment, "Some Tag").commit();&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;... and then retrieve the fragment page via:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;getSupportFragmentManager().findFragmentByTag("Some Tag");&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Using this approach, you need to keep track of the string tags and associate them with all the fragment pages. You could use a map to store each tag along with the current page index, which is set at the time when the fragment page is&amp;nbsp;instantiated.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;MyFragment myFragment = MyFragment.newInstance();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;mPageReferenceMap&lt;/span&gt;.put(index, "Some Tag");&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;getSupportFragmentManager().beginTransaction().add(myFragment, "Some Tag").commit();&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;To get the tag for the currently visible page, you then call:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="s1" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;int index = mViewPager&lt;/span&gt;.getCurrentItem();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;String tag =&amp;nbsp;mPageReferenceMap.get(index);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;... and then get the fragment page:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Fragment myFragment =&amp;nbsp;getSupportFragmentManager().findFragmentByTag(tag);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&lt;b&gt;Second Solution&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Similar to the first solution, you keep track of all the "active" fragment pages. In this case, you keep&amp;nbsp;track of the fragment pages in the&amp;nbsp;FragmentStatePagerAdapter, which is used by the ViewPager.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;public&lt;/span&gt; Fragment getItem(&lt;span class="s1"&gt;int&lt;/span&gt; index) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; Fragment myFragment = MyFragment.newInstance();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;&amp;nbsp; &amp;nbsp; mPageReferenceMap&lt;/span&gt;.put(index, myFragment);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; return myFragment;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;To avoid keeping a reference to "inactive" fragment pages, we need to implement the FragmentStatePagerAdapter's destroyItem(...) method:&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;public&lt;/span&gt; &lt;span class="s1"&gt;void&lt;/span&gt; destroyItem(View container, &lt;span class="s1"&gt;int&lt;/span&gt; position, Object object) {&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="s1"&gt;&amp;nbsp; &amp;nbsp; super&lt;/span&gt;.destroyItem(container, position, object);&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="s2"&gt;&amp;nbsp; &amp;nbsp; mPageReferenceMap&lt;/span&gt;.remove(position);&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;... and when you need to access the currently visible page, you then call:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;int index = mViewPager&lt;/span&gt;.getCurrentItem();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;MyAdapter adapter&amp;nbsp;= ((MyAdapter)&lt;span class="s1"&gt;mViewPager&lt;/span&gt;.getAdapter());&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;MyFragment fragment = adapter.getFragment(index);&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;... where the&amp;nbsp;MyAdapter's&amp;nbsp;getFragment(int) method looks like this:&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s1"&gt;public&lt;/span&gt;&amp;nbsp;MyFragment getFragment(&lt;span class="s1"&gt;int&lt;/span&gt; key) {&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="s2"&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="s1"&gt;&amp;nbsp; &amp;nbsp; return&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;mPageReferenceMap&lt;span class="s2"&gt;.get(key);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;I am using the second solution in my &lt;a href="http://code.google.com/p/android-flash-cards/" target="_blank"&gt;project&lt;/a&gt;, and it's working quite well. Here is the reference to the full &lt;a href="http://android-flash-cards.googlecode.com/svn/tags/blog-20111123/src/org/thomasamsler/android/flashcards/CardsPagerActivity.java" target="_blank"&gt;source code&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-5816733106509658666?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/5816733106509658666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=5816733106509658666' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5816733106509658666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5816733106509658666'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2011/11/android-viewpager-and-fragments-part-ii.html' title='Android: ViewPager and Fragments Part II'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-720881726523286800</id><published>2011-11-11T15:15:00.001-08:00</published><updated>2011-11-24T12:47:55.423-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mount-sd-card'/><title type='text'>Mount the Samsung Galaxy S II internal SD card on Mac OS X</title><content type='html'>&lt;br /&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Tap on left hand side menu button and then:&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Select Settings&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Select Wireless and network&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Select USB utilities&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Tap on "Connect storage to PC" button&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;When dialog "Connect USB cable to use mass storage."&amp;nbsp; comes up, connect the phone to the computer using a micro USB cable&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Then on the next screen tap on "Connect USB storage" button, and then confirm the dialog&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-720881726523286800?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/720881726523286800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=720881726523286800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/720881726523286800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/720881726523286800'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2011/11/mount-samsung-galaxy-s-ii-internal-sd.html' title='Mount the Samsung Galaxy S II internal SD card on Mac OS X'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-4269323513681582443</id><published>2011-10-23T21:17:00.000-07:00</published><updated>2011-11-09T20:59:16.846-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fragments'/><category scheme='http://www.blogger.com/atom/ns#' term='viewpager'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android: ViewPager and Fragments</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;The following is a simple Android sample application that uses a ViewPager, which is part&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;of the &lt;a href="http://developer.android.com/sdk/compatibility-library.html"&gt;Support Package&lt;/a&gt;,&amp;nbsp;and &lt;a href="http://developer.android.com/guide/topics/fundamentals/fragments.html"&gt;Fragments&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;The FragmentPagerActivity class creates the ViewPager and the associated FragmentPagerAdapter.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; import android.os.Bundle;  &lt;br /&gt; import android.support.v4.app.Fragment;  &lt;br /&gt; import android.support.v4.app.FragmentActivity;  &lt;br /&gt; import android.support.v4.app.FragmentManager;  &lt;br /&gt; import android.support.v4.app.FragmentPagerAdapter;  &lt;br /&gt; import android.support.v4.view.ViewPager;  &lt;br /&gt;   &lt;br /&gt; public class FragmentPagerActivity extends FragmentActivity {  &lt;br /&gt;   &lt;br /&gt;      private static final int NUMBER_OF_PAGES = 10;  &lt;br /&gt;   &lt;br /&gt;      private ViewPager mViewPager;  &lt;br /&gt;      private MyFragmentPagerAdapter mMyFragmentPagerAdapter;  &lt;br /&gt;   &lt;br /&gt;      public void onCreate(Bundle savedInstanceState) {  &lt;br /&gt;   &lt;br /&gt;           super.onCreate(savedInstanceState);  &lt;br /&gt;           setContentView(R.layout.main);  &lt;br /&gt;           mViewPager = (ViewPager) findViewById(R.id.viewpager);  &lt;br /&gt;           mMyFragmentPagerAdapter = new MyFragmentPagerAdapter(getSupportFragmentManager());  &lt;br /&gt;           mViewPager.setAdapter(mMyFragmentPagerAdapter);  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      private static class MyFragmentPagerAdapter extends FragmentPagerAdapter {  &lt;br /&gt;   &lt;br /&gt;           public MyFragmentPagerAdapter(FragmentManager fm) {  &lt;br /&gt;                super(fm);  &lt;br /&gt;           }  &lt;br /&gt;   &lt;br /&gt;           @Override  &lt;br /&gt;           public Fragment getItem(int index) {  &lt;br /&gt;   &lt;br /&gt;                return PageFragment.newInstance("My Message " + index);&lt;br /&gt;           }  &lt;br /&gt;   &lt;br /&gt;           @Override  &lt;br /&gt;           public int getCount() {  &lt;br /&gt;   &lt;br /&gt;                return NUMBER_OF_PAGES;  &lt;br /&gt;           }  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;The PageFragment only contains a TextView. It is&amp;nbsp;instantiated in the above&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;MyFragmentPagerAdapter's getItem(int index) method.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; package org.thomasamsler.android;  &lt;br /&gt;   &lt;br /&gt; import android.os.Bundle;  &lt;br /&gt; import android.support.v4.app.Fragment;  &lt;br /&gt; import android.view.LayoutInflater;  &lt;br /&gt; import android.view.View;  &lt;br /&gt; import android.view.ViewGroup;  &lt;br /&gt; import android.widget.TextView;  &lt;br /&gt;   &lt;br /&gt; public class PageFragment extends Fragment {  &lt;br /&gt;        &lt;br /&gt;      public static PageFragment newInstance(String title) {&lt;br /&gt;  &lt;br /&gt;          PageFragment pageFragment = new PageFragment();&lt;br /&gt;          Bundle bundle = new Bundle();&lt;br /&gt;          bundle.putString("title", title);&lt;br /&gt;          pageFragment.setArguments(bundle);&lt;br /&gt;          return pageFragment;&lt;br /&gt;      }&lt;br /&gt;        &lt;br /&gt;      @Override  &lt;br /&gt;      public void onCreate(Bundle savedInstanceState) {  &lt;br /&gt;          super.onCreate(savedInstanceState);  &lt;br /&gt;      }  &lt;br /&gt;        &lt;br /&gt;      @Override  &lt;br /&gt;      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {  &lt;br /&gt;             &lt;br /&gt;          View view = inflater.inflate(R.layout.fragment, container, false);  &lt;br /&gt;          TextView textView = (TextView) view.findViewById(R.id.textView1);  &lt;br /&gt;          textView.setText(getArguments().getString("title"));&lt;br /&gt;          return view;  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Sources:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://developer.android.com/guide/topics/fundamentals/fragments.html"&gt;Fragments&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html"&gt;Horizontal View Swiping with ViewPager&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://code.google.com/p/viewpagerexample/"&gt;ViewPagerExample&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-4269323513681582443?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/4269323513681582443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=4269323513681582443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/4269323513681582443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/4269323513681582443'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2011/10/android-viewpager-and-fragments.html' title='Android: ViewPager and Fragments'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-2790996707148986105</id><published>2011-07-22T00:02:00.000-07:00</published><updated>2011-07-22T00:02:11.085-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>git svn info : Can't locate Error.pm : on Mac OS X</title><content type='html'>I am using git to access Subversion repositories. After upgrading to the latest git version (1.7.6),  I got the following missing pearl module error:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Can't locate Error.pm in @INC ...&lt;/blockquote&gt;&lt;br /&gt;To fix this, I just loaded the missing module via:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo perl -MCPAN -e 'install Error' &lt;/blockquote&gt;&lt;br /&gt;... and everything was working again. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-2790996707148986105?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/2790996707148986105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=2790996707148986105' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/2790996707148986105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/2790996707148986105'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2011/07/git-svn-info-cant-locate-errorpm-on-mac.html' title='git svn info : Can&apos;t locate Error.pm : on Mac OS X'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-1526135126036486320</id><published>2011-06-23T11:02:00.000-07:00</published><updated>2011-06-23T11:02:19.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='google visualization api'/><title type='text'>GWT Chart Tools: loading new CoreChart via VisualizationUtils</title><content type='html'>The GWT Chart Tools have changed by adding new charts, that are of the same type as the deprecated ones, under "CoreChart". &amp;nbsp;The old charts such as:&lt;br /&gt;&lt;br /&gt;com.google.gwt.visualization.client.visualizations.ColumnChart&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;are deprecated in favor of:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;com.google.gwt.visualization.client.visualizations.corechart.ColumnChart&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are going to update to these new charts, you also have to change the way you load the&amp;nbsp;VisualizationApi. For example, in my application, I used to load three types of chars the following way:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; VisualizationUtils.loadVisualizationApi(new VisualizationRunnable(), PieChart.PACKAGE, ColumnChart.PACKAGE, LineChart.PACKAGE);  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="p2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p2"&gt;When switching to&amp;nbsp;"CoreChart", the above needs to be changed to:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; VisualizationUtils.loadVisualizationApi(new VisualizationRunnable(), CoreChart.PACKAGE);  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="p2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p2"&gt;References:&lt;/div&gt;&lt;div class="p2"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted"&gt;GWT Chart Tools&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://gwt-google-apis.googlecode.com/svn/javadoc/visualization/1.1/index.html"&gt;GWT Chart Tools API&lt;/a&gt;&amp;nbsp;v1.1&lt;/li&gt;&lt;li&gt;&lt;a href="http://gwt-google-apis.googlecode.com/svn/javadoc/visualization/1.1/com/google/gwt/visualization/client/visualizations/corechart/CoreChart.html"&gt;CoreChart API&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="p2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-1526135126036486320?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/1526135126036486320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=1526135126036486320' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1526135126036486320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1526135126036486320'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2011/06/gwt-chart-tools-loading-new-corechart.html' title='GWT Chart Tools: loading new CoreChart via VisualizationUtils'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-786615191359896323</id><published>2010-12-13T11:27:00.000-08:00</published><updated>2010-12-13T11:31:54.785-08:00</updated><title type='text'>Chrome OS CR-48 Finding MAC Address</title><content type='html'>&lt;span class="Apple-style-span" &gt;If you need to know the MAC address of your CR-48 running Chrome OS, type:&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;chrome:///system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;... in the address bar.  Then look for "ifconfig" in the list and click on "Expand...".  Then you should see a "wlan0" entry which shows you the "HWaddr", which is the MAC address.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-786615191359896323?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/786615191359896323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=786615191359896323' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/786615191359896323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/786615191359896323'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2010/12/chrome-os-cr-48-finding-mac-address.html' title='Chrome OS CR-48 Finding MAC Address'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-1322181465437336286</id><published>2010-08-20T22:01:00.000-07:00</published><updated>2010-08-20T22:25:05.969-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qr code'/><category scheme='http://www.blogger.com/atom/ns#' term='google chart api'/><title type='text'>How to create a QR Code</title><content type='html'>I wanted to create a QR code for my Google profile page. After a little googling, I came across this information. You can use Google's &lt;a href="http://code.google.com/apis/chart/docs/gallery/qr_codes.html"&gt;Chart API&lt;/a&gt; to generate a QR code:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can make a call to:&lt;/div&gt;&lt;div&gt; &lt;p class="p1"&gt;&lt;a href="http://chart.apis.google.com/chart?chs=250x250&amp;amp;cht=qr&amp;amp;chl=http://www.google.com/profiles/tamsler"&gt;http://chart.apis.google.com/chart?chs=250x250&amp;amp;cht=qr&amp;amp;chl="&lt;/a&gt;some url"&lt;/p&gt;&lt;p class="p1"&gt;e.g.&lt;/p&gt;&lt;p class="p1"&gt; &lt;/p&gt;&lt;p class="p1"&gt;&lt;a href="http://chart.apis.google.com/chart?chs=250x250&amp;amp;cht=qr&amp;amp;chl=http://www.google.com/profiles/tamsler"&gt;http://chart.apis.google.com/chart?chs=250x250&amp;amp;cht=qr&amp;amp;chl=http://www.google.com/profiles/tamsler&lt;/a&gt;&lt;/p&gt;&lt;p class="p1"&gt;... and it generates the QR code for the provided URL. You can than use a QR code scanner such as &lt;a href="http://www.google.com/mobile/goggles"&gt;Google Goggles&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_RsYY165eDRE/TG9h8unLILI/AAAAAAAAO0Q/znhiEHkshmI/s1600/ThomasAmslerQRCode.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_RsYY165eDRE/TG9h8unLILI/AAAAAAAAO0Q/znhiEHkshmI/s200/ThomasAmslerQRCode.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5507728565229789362" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-1322181465437336286?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/1322181465437336286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=1322181465437336286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1322181465437336286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1322181465437336286'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2010/08/how-to-create-qr-code.html' title='How to create a QR Code'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_RsYY165eDRE/TG9h8unLILI/AAAAAAAAO0Q/znhiEHkshmI/s72-c/ThomasAmslerQRCode.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-6560638241211938744</id><published>2010-04-01T14:33:00.000-07:00</published><updated>2010-04-01T14:53:08.471-07:00</updated><title type='text'>Taking Sakai 3 To The Next Level</title><content type='html'>&lt;div&gt;The Sakai community has put significant effort into developing the &lt;a href="http://sakaiproject.org/future-directions"&gt;next version&lt;/a&gt; of Sakai. Sakai3 will take the collaborative learning environment application space to the next level.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, some folks in the Sakai community thought that the new development effort is not going far enough in terms of utilizing the latest technologies.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For the past few months, a small group of dedicated programers and UI specialists have been experimenting with some new UI approaches. I am happy to share the results with the community today.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;b&gt;&lt;i&gt;Sakai 3 in 3D&lt;span class="Apple-style-span" style="font-weight: normal; "&gt; (a.k.a. Sakai3-3D):&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_RsYY165eDRE/S7UTe23ntVI/AAAAAAAAH2M/bD7mwnQLzBI/s1600/Sakai3-3D.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 221px;" src="http://2.bp.blogspot.com/_RsYY165eDRE/S7UTe23ntVI/AAAAAAAAH2M/bD7mwnQLzBI/s320/Sakai3-3D.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5455287944475030866" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;This UI technology is taking advantage of the latest 3D JavaScript library called JS-Goggles-3D. As with everything 3D, you need 3D glasses to really appreciate the application.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are interested in becoming an alpha tester, please contact me at:&lt;/div&gt;&lt;div&gt;sloof@lirpa.org&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thank you very much for your time and interest.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Best,&lt;/div&gt;&lt;div&gt;Thomas Amsler&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-6560638241211938744?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/6560638241211938744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=6560638241211938744' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6560638241211938744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6560638241211938744'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2010/04/taking-sakai-3-to-next-level.html' title='Taking Sakai 3 To The Next Level'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_RsYY165eDRE/S7UTe23ntVI/AAAAAAAAH2M/bD7mwnQLzBI/s72-c/Sakai3-3D.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-1461515605687553104</id><published>2010-03-13T13:53:00.000-08:00</published><updated>2010-03-13T13:56:24.560-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fiber'/><category scheme='http://www.blogger.com/atom/ns#' term='community'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Thank you Google for your "Google Fiber For Communities" experiment.</title><content type='html'>&lt;span class="Apple-style-span"  style=" ;font-family:Verdana;"&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;It's always amazing to see how community members from all different types of backgrounds come together, and work toward a common goal. In this case, to get affordable Internet access at unprecedented speeds, 1gbps. So many communities and cities around the United States have organized themselves to pitch to Google their "Google Fiber For Communities" readiness. I haven't seen so much entusiasm and energy evolving around such a project in a very long time.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;I am part of the West Sacramento's community effort, that shows Google that this progressive City is the right choice for launching their Google Fiber experiment. After March 26, 2010, when the nomination process closes, I hope that all of this positive work and progress doesn't just come to a halt. I think that the Google Fiber project is more than just picking one fortunate city/community, where they will make affordable high speed Internat access available. This project is also about communities coming together, and to foster the right environment where new ideas are born and applications are created.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;We should leverage this great momentum and try to organize a nation wide community effort, that strives for the same goal, to get affordable high speed Internet access. Equally important, we should collect and share all of our great new ideas and applications. As a nation wide community, we have all the knowledge and resources to work on these great ideas and applications together.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;If anybody is interested in pursuing this, please let me know. I have created a Google group where we could start to collaborate:&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;http://groups.google.com/group/google-fiber-momentum&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Twitter hash tag: #googlefm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-1461515605687553104?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/1461515605687553104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=1461515605687553104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1461515605687553104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1461515605687553104'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2010/03/thank-you-google-for-your-google-fiber.html' title='Thank you Google for your &quot;Google Fiber For Communities&quot; experiment.'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-4514074667737904343</id><published>2009-09-26T11:29:00.001-07:00</published><updated>2009-09-26T11:38:38.189-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Current Location'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='MMS'/><title type='text'>iPhone : Sending Current Location Via MMS</title><content type='html'>Here are the steps for sending your current location via MMS on an iPhone:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open Maps application&lt;/li&gt;&lt;li&gt;Press the bulls-eye button at the lower left&lt;/li&gt;&lt;li&gt;Once it shows your location, click on the blue dot&lt;/li&gt;&lt;li&gt;A simple Current Location menu pops up&lt;/li&gt;&lt;li&gt;Click on the right pointing arrow which will open the Info screen&lt;/li&gt;&lt;li&gt;Click on the bottom center button called "Share Location"&lt;/li&gt;&lt;li&gt;From the "Share Location Using:" menu, select MMS&lt;/li&gt;&lt;li&gt;This will take you to the messaging client and automatically past your location/contact&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-4514074667737904343?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/4514074667737904343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=4514074667737904343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/4514074667737904343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/4514074667737904343'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/09/iphone-sending-current-location-via-mms.html' title='iPhone : Sending Current Location Via MMS'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-1306202967055584770</id><published>2009-09-24T15:48:00.000-07:00</published><updated>2009-09-24T16:57:11.781-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='google visualization api'/><category scheme='http://www.blogger.com/atom/ns#' term='sakai'/><title type='text'>Google Visualization API : Implementing a Data Source in Sakai</title><content type='html'>This is a tutorial that shows how to create a Data Source in Sakai.&lt;br /&gt;&lt;br /&gt;Environment: Sakai v2.5.x, Java 1.5&lt;br /&gt;&lt;br /&gt;To install the Data Source Java Library, please follow these instructions:&lt;br /&gt;http://code.google.com/apis/visualization/documentation/dev/dsl_install.html&lt;br /&gt;NOTE:&lt;br /&gt;- This library requires commons-lang v2.4, sakai_2-5-x uses v2.1&lt;br /&gt;- This library was built using Java v1.6, sakai_2-5-x depends on v1.5&lt;br /&gt;&lt;br /&gt;I used the following maven dependency to get the library:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;dependency&amp;gt; &lt;br /&gt;  &amp;lt;groupId&amp;gt;com.google.visualization&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;visualization-datasource&amp;lt;/artifactId&amp;gt; &lt;br /&gt;  &amp;lt;version&amp;gt;1.0.2&amp;lt;/version&amp;gt; &lt;br /&gt;&amp;lt;/dependency&amp;gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can build the library under Java v1.5. Here is some information about this:&lt;br /&gt;http://groups.google.com/group/google-visualization-api/browse_thread/thread/7f4d2abb9d9d73c7&lt;br /&gt;&lt;br /&gt;When you build the library under Java v1.5, use maven "mvn clean install". This will place the library into the maven repository.&lt;br /&gt;&lt;br /&gt;Now we are ready to code:&lt;br /&gt;&lt;br /&gt;First, create a data source controller:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; package org.sakaiproject.gradebook.gwt.server;  &lt;br /&gt;   &lt;br /&gt; import javax.servlet.http.HttpServletRequest;  &lt;br /&gt; import javax.servlet.http.HttpServletResponse;  &lt;br /&gt; import org.springframework.web.servlet.ModelAndView;  &lt;br /&gt; import org.springframework.web.servlet.mvc.AbstractController;  &lt;br /&gt; import com.google.visualization.datasource.DataSourceHelper;  &lt;br /&gt; import com.google.visualization.datasource.DataTableGenerator;  &lt;br /&gt;   &lt;br /&gt; public class DataSourceController extends AbstractController {  &lt;br /&gt;   &lt;br /&gt;      private DataTableGenerator generator;   &lt;br /&gt;        &lt;br /&gt;      //@Override  &lt;br /&gt;      protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {  &lt;br /&gt;             &lt;br /&gt;           DataSourceHelper.executeDataSourceServletFlow(request, response, generator, false);  &lt;br /&gt;           return null;   &lt;br /&gt;      }  &lt;br /&gt;        &lt;br /&gt;      // Spring Injection:  &lt;br /&gt;      public void setGenerator(DataTableGenerator generator) {  &lt;br /&gt;           this.generator = generator;  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then, we create the data table generator:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; package org.sakaiproject.gradebook.gwt.sakai;  &lt;br /&gt;   &lt;br /&gt; import java.util.ArrayList;  &lt;br /&gt;   &lt;br /&gt; import javax.servlet.http.HttpServletRequest;  &lt;br /&gt;   &lt;br /&gt; import com.google.visualization.datasource.Capabilities;  &lt;br /&gt; import com.google.visualization.datasource.DataTableGenerator;  &lt;br /&gt; import com.google.visualization.datasource.base.DataSourceException;  &lt;br /&gt; import com.google.visualization.datasource.base.TypeMismatchException;  &lt;br /&gt; import com.google.visualization.datasource.datatable.ColumnDescription;  &lt;br /&gt; import com.google.visualization.datasource.datatable.DataTable;  &lt;br /&gt; import com.google.visualization.datasource.datatable.value.ValueType;  &lt;br /&gt; import com.google.visualization.datasource.query.Query;  &lt;br /&gt; &lt;br /&gt; // Sample code from: http://code.google.com/apis/visualization/documentation/dev/dsl_get_started.html&lt;br /&gt; public class StatsDataTableGenerator implements DataTableGenerator {  &lt;br /&gt;   &lt;br /&gt;      public DataTable generateDataTable(Query query, HttpServletRequest requst) throws DataSourceException {  &lt;br /&gt;   &lt;br /&gt;           DataTable data = new DataTable();  &lt;br /&gt;           ArrayList&amp;lt;ColumnDescription&amp;gt; cd = new ArrayList&amp;lt;ColumnDescription&amp;gt;();  &lt;br /&gt;           cd.add(new ColumnDescription("name", ValueType.TEXT, "Animal name"));  &lt;br /&gt;           cd.add(new ColumnDescription("link", ValueType.TEXT, "Link to wikipedia"));  &lt;br /&gt;           cd.add(new ColumnDescription("population", ValueType.NUMBER, "Population size"));  &lt;br /&gt;           cd.add(new ColumnDescription("vegeterian", ValueType.BOOLEAN, "Vegetarian?"));  &lt;br /&gt;   &lt;br /&gt;           data.addColumns(cd);  &lt;br /&gt;   &lt;br /&gt;           // Fill the data table.  &lt;br /&gt;           try {  &lt;br /&gt;                data.addRowFromValues("Aye-aye", "http://en.wikipedia.org/wiki/Aye-aye", 100, true);  &lt;br /&gt;                data.addRowFromValues("Sloth", "http://en.wikipedia.org/wiki/Sloth", 300, true);  &lt;br /&gt;                data.addRowFromValues("Leopard", "http://en.wikipedia.org/wiki/Leopard", 50, false);  &lt;br /&gt;                data.addRowFromValues("Tiger", "http://en.wikipedia.org/wiki/Tiger", 80, false);  &lt;br /&gt;           } catch (TypeMismatchException e) {  &lt;br /&gt;                System.out.println("Invalid type!");  &lt;br /&gt;           }  &lt;br /&gt;           return data;  &lt;br /&gt;      }  &lt;br /&gt;        &lt;br /&gt;      public Capabilities getCapabilities() {  &lt;br /&gt;           return Capabilities.NONE;  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The remaining part is the spring configuration. First we add the spring beans:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;bean id="org.sakaiproject.gradebook.gwt.server.DataSourceController" class="org.sakaiproject.gradebook.gwt.server.DataSourceController"&amp;gt;  &lt;br /&gt;   &amp;lt;property name="generator"&amp;gt;&amp;lt;ref bean="org.sakaiproject.gradebook.gwt.sakai.StatsDataTableGenerator"/&amp;gt;&amp;lt;/property&amp;gt;  &lt;br /&gt; &amp;lt;/bean&amp;gt;  &lt;br /&gt;   &lt;br /&gt; &amp;lt;bean id="org.sakaiproject.gradebook.gwt.sakai.StatsDataTableGenerator" class="org.sakaiproject.gradebook.gwt.sakai.StatsDataTableGenerator"&amp;gt;  &lt;br /&gt; &amp;lt;/bean&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next, we add the data source controller reference to the SimpleUrlHandlerMapping. The file name needs to match the servlet reference in web.xml. In our case, the file is called sakai.gradebook.gwt.rpc-servlet.xml:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&amp;gt;  &lt;br /&gt;   &amp;lt;property name="mappings"&amp;gt;  &lt;br /&gt;     &amp;lt;map&amp;gt;  &lt;br /&gt;       &amp;lt;entry key="/**/DataSource" value-ref="org.sakaiproject.gradebook.gwt.server.DataSourceController" /&amp;gt;  &lt;br /&gt;     &amp;lt;/map&amp;gt;  &lt;br /&gt;   &amp;lt;/property&amp;gt;  &lt;br /&gt; &amp;lt;/bean&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In the web.xml, make sure that you add the "DispatcherServlet":&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;servlet&amp;gt;  &lt;br /&gt;   &amp;lt;servlet-name&amp;gt;sakai.gradebook.gwt.rpc&amp;lt;/servlet-name&amp;gt;  &lt;br /&gt;   &amp;lt;servlet-class&amp;gt;org.springframework.web.servlet.DispatcherServlet&amp;lt;/servlet-class&amp;gt;  &lt;br /&gt;   &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;  &lt;br /&gt; &amp;lt;/servlet&amp;gt;  &lt;br /&gt;        &lt;br /&gt; &amp;lt;servlet-mapping&amp;gt;  &lt;br /&gt;   &amp;lt;servlet-name&amp;gt;sakai.gradebook.gwt.rpc&amp;lt;/servlet-name&amp;gt;  &lt;br /&gt;   &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;  &lt;br /&gt; &amp;lt;/servlet-mapping&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's pretty much it. To access it, browse to:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; http://localhost:8080/some-name/DataSource  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will return the the defined data table's data in JSON. You can get an HTML representation by entering:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; http://localhost:8080/some-name/DataSource?tqx=out:html  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;... as well as using the built in query support:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; http://localhost:8080/some-name/DataSource?tqx=out:html&amp;amp;tq=select link,name  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;... etc.&lt;br /&gt;&lt;br /&gt;There is an excellent Google I/O session about this:&lt;br /&gt;http://code.google.com/events/io/sessions/ImplementingOwnVisualizationDatasource.html&lt;br /&gt;&lt;br /&gt;Sources:&lt;br /&gt;Google Visualization API (Data Source): http://code.google.com/apis/visualization&lt;br /&gt;/documentation/dev/implementing_data_source_overview.htm&lt;br /&gt;Google API Libraries for GWT Visualization: http://code.google.com/docreader/#p=gwt-google-apis&amp;s=gwt-google-apis&amp;t=Visualization&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-1306202967055584770?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/1306202967055584770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=1306202967055584770' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1306202967055584770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1306202967055584770'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/09/google-visualization-api-implementing.html' title='Google Visualization API : Implementing a Data Source in Sakai'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-6757274206577049835</id><published>2009-06-21T15:27:00.000-07:00</published><updated>2009-06-21T16:20:23.707-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Geo Location'/><title type='text'>HTML5 Geo Location : GWT : iPhone</title><content type='html'>Since Apple has released the new iPhone 3.0 OS, I have been experimenting with its browser's HTML 5 Geo Location support. I am especially interested in getting this to work in a Google Web Toolkit (GWT) application hosted on Google App Engine (GAE). The following is some sample code that gets the Geo Location from the browser and makes that data available in a GWT application.&lt;br /&gt;&lt;br /&gt;Step 1:&lt;br /&gt;Using GWT's JavaScript Native Interface (JSNI), I wrapped the W3 GEO API calls.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;private native void getGeoLocation() /*-{&lt;br /&gt;&lt;br /&gt; if(null == $wnd.navigator.geolocation) {&lt;br /&gt;   return;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;$wnd.navigator.geolocation.getCurrentPosition(&lt;br /&gt; @org.thomasamsler.glm.client.Glm::geoLocationCallback(Lorg/thomasamsler/glm/client/Position;),&lt;br /&gt; @org.thomasamsler.glm.client.Glm::geoLocationCallbackError(Lcom/google/gwt/core/client/JavaScriptObject;),&lt;br /&gt; {enableHighAccuracy:true, maximumAge:60000});&lt;br /&gt;}-*/;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Step 2:&lt;br /&gt;The first argument to the getCurrentPosition(...) method is a Java onSuccess callback method:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;public static void geoLocationCallback(Position position) {&lt;br /&gt;   consoleFlowPanel.add(new HTML(position.getLatitude() + &amp;quot; : &amp;quot; + position.getLongitude()));&lt;br /&gt;   // ...&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The "Position" object is a GWT JavaScript overlay type:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;public final class Position extends JavaScriptObject {&lt;br /&gt;&lt;br /&gt;    protected Position() { }&lt;br /&gt;&lt;br /&gt;    public native double getLatitude()/*-{&lt;br /&gt;        return this.coords.latitude;&lt;br /&gt;      }-*/;&lt;br /&gt;    &lt;br /&gt;    public native double getLongitude()/*-{&lt;br /&gt;        return this.coords.longitude;&lt;br /&gt;      }-*/;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Step 3: The second argument to the getCurrentPosition(...) method is a Java onError callback method:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;public static void geoLocationCallbackError(JavaScriptObject jso) {&lt;br /&gt; // ...&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 4: The third argument to the getCurrentPosition(...) method are the W3 position options:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;interface PositionOptions {&lt;br /&gt;    attribute boolean enableHighAccuracy;&lt;br /&gt;    attribute long timeout;&lt;br /&gt;    attribute long maximumAge;&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's all that's needed. I hope that this will be part of a little GWT-Geo-Location library. In general, the above code works pretty well.&lt;br /&gt;&lt;br /&gt;One issue that I have seen so far is the GPS coordinates accuracy. The GPS location that the browsers passes on is not very accurate, meaning that the acquired location deviates from the actual location by as much as ~3miles. I am not quite sure why it doesn't have the same accuracy as native iPhone applications that access the location API. So far, I have experimented with the various Position Options but all the different combinations and setting didn't improve the acquired GPS coordinates.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sources:&lt;br /&gt;HTML 5 Geo Location: http://dev.w3.org/geo/api/spec-source.html&lt;br /&gt;GWT: http://code.google.com/webtoolkit/&lt;br /&gt;GWT JSNI: http://tinyurl.com/gwtjsni&lt;br /&gt;GAE: http://code.google.com/appengine/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-6757274206577049835?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/6757274206577049835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=6757274206577049835' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6757274206577049835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6757274206577049835'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/06/html5-geo-location-gwt-iphone.html' title='HTML5 Geo Location : GWT : iPhone'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-5943908591838410131</id><published>2009-04-01T09:30:00.000-07:00</published><updated>2009-04-01T09:34:15.463-07:00</updated><title type='text'>Sakai Tool : Flashlight</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_RsYY165eDRE/SdOXa0fDY_I/AAAAAAAAAhU/OR4bLV_bxXc/s1600-h/Flashlight.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 167px;" src="http://4.bp.blogspot.com/_RsYY165eDRE/SdOXa0fDY_I/AAAAAAAAAhU/OR4bLV_bxXc/s320/Flashlight.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5319762071875970034" /&gt;&lt;/a&gt;&lt;br /&gt;After countless hours of development, I am proud to announce the release of the brand new Sakai tool called Flashlight (code name #FFFFFF).  This very unique tool will light up a user's working environment and will help her/him to stay productive even during late hours.&lt;br /&gt;&lt;br /&gt;I already started on an improved version called Flashlight2 (code name #XXXXXX), which will let you choose different ambient light sources.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-5943908591838410131?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/5943908591838410131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=5943908591838410131' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5943908591838410131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5943908591838410131'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/04/sakai-tool-flashlight.html' title='Sakai Tool : Flashlight'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_RsYY165eDRE/SdOXa0fDY_I/AAAAAAAAAhU/OR4bLV_bxXc/s72-c/Flashlight.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-3780439216816024689</id><published>2009-02-03T23:22:00.000-08:00</published><updated>2009-02-03T23:27:10.072-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>patching with git diff</title><content type='html'>If you want to create a patch file via "git diff" that can be applied using "patch -p0 &lt; patchfile" use the following command:&lt;br /&gt;&lt;br /&gt;git diff --no-prefix &gt; patchfile&lt;br /&gt;&lt;br /&gt;then apply the patch:&lt;br /&gt;patch -p0 &lt; patchfile&lt;br /&gt;&lt;br /&gt;If you have an existing "git diff" patch file that was created without the "--no-prefix" option, you can apply that patch via:&lt;br /&gt;&lt;br /&gt;patch -p1 &lt; patchfile&lt;br /&gt;&lt;br /&gt;this will ignore the default a/ b/ source prefixes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-3780439216816024689?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/3780439216816024689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=3780439216816024689' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/3780439216816024689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/3780439216816024689'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html' title='patching with git diff'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-8720826160680958151</id><published>2009-01-28T21:58:00.000-08:00</published><updated>2009-01-28T22:35:37.396-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='json'/><category scheme='http://www.blogger.com/atom/ns#' term='jersey'/><category scheme='http://www.blogger.com/atom/ns#' term='jsr-311'/><title type='text'>JSR-311 : Taking Jersey for a test drive</title><content type='html'>I am adding REST support to our UCD Sakai gradebook2, by using the JSR-311 reference implementation Jersey. The JAX-RS (JSR-311) annotations are very easy to work with.&lt;br /&gt;So far, I ran into on issue. Jersey's JSON support depends on Jettison v1.0.1, which in conjunction with Jersey v1.0.1 produces JSON of the following format:&lt;br /&gt;&lt;pre class="prettyprint lang-js"&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span class="str"&gt;"gradeScaleRecord"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;[&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span class="str"&gt;"letterGrade"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="str"&gt;"A+"&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span class="str"&gt;"fromRange"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;"97"&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span class="str"&gt;"toRange"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;"100"&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span class="pun"&gt;},&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;The problem is that numbers are surrounded  double quotes. The JSON standard output should be:&lt;br /&gt;&lt;pre class="prettyprint lang-js"&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span class="str"&gt;"gradeScaleRecord"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;[&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span class="str"&gt;"letterGrade"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="str"&gt;"A+"&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span class="str"&gt;"fromRange"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;97&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span class="str"&gt;"toRange"&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;100&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span class="pun"&gt;},&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;The good news is that the current behaviour can be customized via a "javax.ws.rs.ext.ContextResolver":&lt;br /&gt;&lt;br /&gt;package org.sakaiproject.gradebook.gwt.sakai.rest.config;&lt;br /&gt;&lt;br /&gt;// imports ....&lt;br /&gt;&lt;br /&gt;@Provider&lt;br /&gt;public final class JAXBContextResolver implements ContextResolver&lt;jaxbcontext&gt; {&lt;br /&gt;&lt;br /&gt;   private final JAXBContext context;&lt;br /&gt;&lt;br /&gt;   private final Set&lt;class&gt; types;&lt;br /&gt;&lt;br /&gt;   private final Class[] cTypes = { GradeScaleRecord.class, GradeScaleRecords.class };&lt;br /&gt;&lt;br /&gt;   public JAXBContextResolver() throws Exception {&lt;br /&gt;&lt;br /&gt;       Map&lt;string,&gt; props = new HashMap&lt;string,&gt;();&lt;br /&gt;       props.put(JSONJAXBContext.JSON_NOTATION, JSONJAXBContext.JSONNotation.MAPPED);&lt;br /&gt;       props.put(JSONJAXBContext.JSON_ROOT_UNWRAPPING, Boolean.TRUE);&lt;br /&gt;       props.put(JSONJAXBContext.JSON_NON_STRINGS, new HashSet&lt;string&gt;(2) {&lt;br /&gt;&lt;br /&gt;           {&lt;br /&gt;               add("fromRange");&lt;br /&gt;               add("toRange");&lt;br /&gt;           }&lt;br /&gt;       });&lt;br /&gt;       this.types = new HashSet(Arrays.asList(cTypes));&lt;br /&gt;       this.context = new JSONJAXBContext(cTypes, props);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public JAXBContext getContext(Class objectType) {&lt;br /&gt;&lt;br /&gt;       return (types.contains(objectType)) ? context : null;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Jersey finds this class by placing the JAXBContextResolver's package name in the web.xml PackagesResourceConfig defintion:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;  &amp;lt;servlet-name&amp;gt;Jersey Web Application&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;  &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;  &amp;lt;init-param&amp;gt;&lt;br /&gt;    &amp;lt;param-name&gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;    &amp;lt;param-value&gt;org.sakaiproject.gradebook.gwt.sakai.rest;org.sakaiproject.gradebook.gwt.sakai.rest.config&amp;lt;/param-value&amp;gt;&lt;br /&gt;  &amp;lt;/init-param&amp;gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is also covered in a Jersey issue 197:&lt;br /&gt;https://jersey.dev.java.net/issues/show_bug.cgi?id=197&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;br /&gt;        &lt;/string&gt;&lt;/string,&gt;&lt;/string,&gt;&lt;/class&gt;&lt;/jaxbcontext&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-8720826160680958151?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/8720826160680958151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=8720826160680958151' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/8720826160680958151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/8720826160680958151'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/01/jsr-311-taking-jersey-for-test-drive.html' title='JSR-311 : Taking Jersey for a test drive'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-7603924529235260528</id><published>2009-01-24T21:06:00.000-08:00</published><updated>2009-01-24T21:11:37.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='json'/><title type='text'>Firefox plugin that pretty-prints and colorizes JSON</title><content type='html'>If you are doing REST development, that produces "application/json" you may want to try out the JSONovich Firefox extension:&lt;br /&gt;&lt;br /&gt;https://addons.mozilla.org/en-US/firefox/addon/10122&lt;br /&gt;http://lackoftalent.org/michael/blog/json-in-firefox/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-7603924529235260528?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/7603924529235260528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=7603924529235260528' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/7603924529235260528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/7603924529235260528'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/01/firefox-plugin-that-pretty-prints-and.html' title='Firefox plugin that pretty-prints and colorizes JSON'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-6166448385036223821</id><published>2009-01-21T21:04:00.000-08:00</published><updated>2009-01-21T21:12:49.811-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='jax-rs'/><category scheme='http://www.blogger.com/atom/ns#' term='jsr-311'/><title type='text'>JSR 311 : API for RESTful Web Services : continued ...</title><content type='html'>Now, there is a third REST framework that implements JSR 311 (JAX-RS).  Today, RESTEasy reached version 1.0.0GA.&lt;br /&gt;&lt;br /&gt;http://www.jboss.org/resteasy/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-6166448385036223821?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/6166448385036223821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=6166448385036223821' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6166448385036223821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6166448385036223821'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/01/jsr-311-api-for-restful-web-services_21.html' title='JSR 311 : API for RESTful Web Services : continued ...'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-5187549759509986897</id><published>2009-01-20T15:59:00.000-08:00</published><updated>2009-01-20T16:26:28.666-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='entiybroker'/><category scheme='http://www.blogger.com/atom/ns#' term='sdata'/><category scheme='http://www.blogger.com/atom/ns#' term='restlet'/><category scheme='http://www.blogger.com/atom/ns#' term='jersey'/><category scheme='http://www.blogger.com/atom/ns#' term='jsr-311'/><title type='text'>JSR 311 : API  for  RESTful Web Services</title><content type='html'>In the Sakai community, there is a  lot of activity going on around RESTful support using EntityBroker and or SData.  This effort takes palce in both the current Sakai 2  as well as the K2 envioronment. EB and SData may be a good fit, but we may also want to look at emerging and existing APIs and frameworks that implemnt JRS 311, JAX-RS.&lt;br /&gt;&lt;br /&gt;While I continue to experiment with REST based frameworks and APIs, a colleague of mine brought Sun's JSR 311 reference implementation called Jersey to my attention:&lt;br /&gt;https://jersey.dev.java.net/&lt;br /&gt;&lt;br /&gt;Here is a great overview of using Jersay:&lt;br /&gt;http://wikis.sun.com/display/Jersey/Overview+of+JAX-RS+1.0+Features&lt;br /&gt;&lt;br /&gt;Previously, I have written about Restlet. Restlet also has a JRS 311 extension. Here is an articel that explores this feature:&lt;br /&gt;http://www.javaworld.com/javaworld/jw-12-2008/jw-12-rest-series-2.html?page=1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-5187549759509986897?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/5187549759509986897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=5187549759509986897' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5187549759509986897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5187549759509986897'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/01/jsr-311-api-for-restful-web-services.html' title='JSR 311 : API  for  RESTful Web Services'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-1993430382755120258</id><published>2009-01-03T16:11:00.000-08:00</published><updated>2009-01-03T16:33:05.256-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='restlet'/><category scheme='http://www.blogger.com/atom/ns#' term='json'/><title type='text'>Exploring REST using Restlet</title><content type='html'>If you want to experiment with the REST architectural style in Java, I recommend that you have a look at Restlet:&lt;br /&gt;&lt;br /&gt;http://www.restlet.org/&lt;br /&gt;&lt;br /&gt;This lightweight REST "framework" is quite easy to understand lets you build RESTful web applications with ease.&lt;br /&gt;&lt;br /&gt;The tutorials located on the Restlet web site are quite basic. I found this example:&lt;br /&gt;&lt;br /&gt;http://www.2048bits.com/2008/06/creating-simple-web-service-with.html&lt;br /&gt;&lt;br /&gt;... which actually demonstrates how to do CRUD operations using Restlet and JSON.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-1993430382755120258?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/1993430382755120258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=1993430382755120258' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1993430382755120258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/1993430382755120258'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2009/01/exploring-rest-using-restlet.html' title='Exploring REST using Restlet'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-6612294489543525802</id><published>2008-12-31T15:11:00.000-08:00</published><updated>2009-01-03T16:34:33.879-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gitweb'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>gitweb allowing to view explicitly exported repositories</title><content type='html'>If you want to configure gitweb to view only selected repositories, you can do so by configuring the $export_ok variable in the "/etc/gitweb.conf" file.&lt;br /&gt;&lt;br /&gt;You have to define the "$export_ok" variable, by assigning it some file name.&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;$export_ok = "&lt;span class="nfakPe"&gt;gitweb&lt;/span&gt;-export-ok"&lt;br /&gt;&lt;br /&gt;Then, you have to touch a file in the repositorie's  "repository/.git/" directory:&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;&lt;br /&gt;touch /opt/repositories/sakai/authz.git/.git/&lt;span class="nfakPe"&gt;gitweb&lt;/span&gt;-export-ok&lt;br /&gt;&lt;br /&gt;That's it. Now, gitweb will only list repositories that have the "gitweb-export-ok" file in the ".git" directory.&lt;br /&gt;&lt;br /&gt;The gitweb documentation is located here:&lt;br /&gt;&lt;br /&gt;http://git.or.cz/gitwiki/Gitweb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-6612294489543525802?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/6612294489543525802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=6612294489543525802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6612294489543525802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6612294489543525802'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2008/12/gitweb-allowing-to-view-explicitly.html' title='gitweb allowing to view explicitly exported repositories'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-8058827153015745701</id><published>2008-12-27T14:53:00.000-08:00</published><updated>2009-01-03T16:33:48.723-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='javarebel'/><category scheme='http://www.blogger.com/atom/ns#' term='sakai'/><title type='text'>Using JavaRebel During GWT Development in Eclilpse</title><content type='html'>A couple of weeks ago, I read about JavaRebel  for the first time:&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;br /&gt;http://www.zeroturnaround.com/javarebel/&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, I had some time to experiment with it. Currently, I am working on the UCD Sakai gradebook, which uses Google's GWT. Developing in GWT is great and fast. One area that could use some speedup with respect to JavaRebel's capabilities is working in GWT hosted mode, and making server side code changes. Such a change requires that you restart the GWT hosted mode runtime in order for the changes to take effect.&lt;br /&gt;&lt;br /&gt;I watch the JavaRebel IDE support video:&lt;br /&gt;http://www.zeroturnaround.com/blog/javarebel-boosting-eclipse-plugin-development/&lt;br /&gt;&lt;br /&gt;... which shows how easy it is to configure eclipse to enable JavaReble.  Details are listed here as well:&lt;br /&gt;http://www.zeroturnaround.com/javarebel/installation/#configuration&lt;br /&gt;&lt;br /&gt;All you have to do is to edit your Eclipse runtime configuraiton by adding the following jvm args:&lt;br /&gt;&lt;br /&gt;java -noverify -javaagent:javarebel.jar &lt;args&gt;&lt;br /&gt;&lt;br /&gt;... which in my case are:&lt;br /&gt;&lt;br /&gt;-noverify -javaagent:/Users/thomas/lib/javarebel.jar -XstartOnFirstThread -Xmx768M&lt;br /&gt;&lt;br /&gt;That's it. Now, I am able to make server side code changes and it all just works. Whenever, JavaReble detects modified classes, it prints information to the Eclipse console such as:&lt;br /&gt;&lt;br /&gt;JavaRebel: Reloading class 'org.sakaiproject.gradebook.gwt.sakai.DelegateFacadeImpl'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This should work equally well within the normal Sakai development environment using tomcat, which I will try to do next...&lt;br /&gt;&lt;br /&gt;--Thomas&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/args&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-8058827153015745701?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/8058827153015745701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=8058827153015745701' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/8058827153015745701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/8058827153015745701'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2008/12/using-javarebel-during-gwt-development.html' title='Using JavaRebel During GWT Development in Eclilpse'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-929740472514750341</id><published>2008-10-05T21:33:00.000-07:00</published><updated>2008-10-05T21:35:25.126-07:00</updated><title type='text'>The Eclipse executable launcher was unable to locate its companion shared library</title><content type='html'>After doing a routine eclipse upgrade, v3.4, via the automatic upgrade&lt;br /&gt;agent, eclipse wouldn't start anymore. I got the following error&lt;br /&gt;message:&lt;br /&gt;&lt;br /&gt;The Eclipse executable launcher was unable to locate its companion&lt;br /&gt;shared library.&lt;br /&gt;&lt;br /&gt;Some folks just reinstall eclipse but if you don't want to go&lt;br /&gt;through the trouble of installing all of your needed plugins, here is&lt;br /&gt;a quick way to fix this:&lt;br /&gt;&lt;br /&gt;If you launch Eclipse via the shell, you get the following error message:&lt;br /&gt;&lt;br /&gt;localhost : eclipse/Eclipse.app/Contents/MacOS/eclipse&lt;br /&gt;&lt;div id=":1g8" class="ArwC7c ckChnd"&gt; dlopen(../../../plugins/org.&lt;wbr&gt;eclipse.equinox.launcher.&lt;wbr&gt;carbon.macosx_1.0.100.&lt;wbr&gt;v20080509-1800,&lt;br /&gt;2): image not found&lt;br /&gt;&lt;br /&gt;I just copied over the old version of the plugin and that seemed to work:&lt;br /&gt;&lt;br /&gt;cp -R plugins/org.eclipse.equinox.&lt;wbr&gt;launcher.carbon.macosx_1.0.&lt;wbr&gt;101.R34x_v20080731&lt;br /&gt;plugins/org.eclipse.equinox.&lt;wbr&gt;launcher.carbon.macosx_1.0.&lt;wbr&gt;100.v20080509-1800&lt;br /&gt;&lt;br /&gt;The startup takes a bit longer than usual.  This happened on Mac OS X,&lt;br /&gt;and I am not sure if other platforms are affected as well.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-929740472514750341?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/929740472514750341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=929740472514750341' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/929740472514750341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/929740472514750341'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2008/10/eclipse-executable-launcher-was-unable.html' title='The Eclipse executable launcher was unable to locate its companion shared library'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-6514041331147938674</id><published>2008-01-31T23:14:00.000-08:00</published><updated>2008-01-31T23:16:18.377-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='sakai message-service'/><category scheme='http://www.blogger.com/atom/ns#' term='jms'/><title type='text'>Cluster Service Using MessageService (JMS)</title><content type='html'>I have moved the cluster service sakai_2-4-x branch that uses the new MessageService from my personal repository into my new Sakai contrib subversion space.&lt;br /&gt;https://source.sakaiproject.org/contrib/tamsler/cluster/branches/sakai_2-4-x/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-6514041331147938674?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/6514041331147938674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=6514041331147938674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6514041331147938674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/6514041331147938674'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2008/01/cluster-service-using-messageservice.html' title='Cluster Service Using MessageService (JMS)'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-5050351666840430123</id><published>2008-01-22T09:31:00.000-08:00</published><updated>2008-01-22T09:36:46.691-08:00</updated><title type='text'>Sakai Cluster Service using MessageService</title><content type='html'>Over the weekend, I have been working on the Sakai cluster service so that it uses the MessageService instead the DB in cases where it makes sense. Things are shaping up pretty good. Most parts are working but  I am still trying to figure out some ActiveMQ v5.0.0 bugs. ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-5050351666840430123?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/5050351666840430123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=5050351666840430123' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5050351666840430123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/5050351666840430123'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2008/01/sakai-cluster-service-using.html' title='Sakai Cluster Service using MessageService'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5667473601942758331.post-4402335320504424777</id><published>2008-01-10T20:48:00.000-08:00</published><updated>2008-01-10T21:12:18.196-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sakai message-service'/><title type='text'>Sakai Message Service</title><content type='html'>I finally got around to work on the Sakai MessageService again. At the end of 2007, I converted Aaron's initial work into a pure MessageService. The API is simple. It allows you to get a Connection from the JMS ConnectionFactory. The Sakai MessageService uses ActiveMQ, which is a well known JMS implementation.&lt;br /&gt;&lt;br /&gt;Currently, the MessageService source code is located in contrib:&lt;br /&gt;https://source.sakaiproject.org/contrib/messageservice&lt;br /&gt;&lt;br /&gt;... we will use the following confluence page to document this project:&lt;br /&gt;http://confluence.sakaiproject.org/confluence/x/PoGi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5667473601942758331-4402335320504424777?l=tamsler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tamsler.blogspot.com/feeds/4402335320504424777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5667473601942758331&amp;postID=4402335320504424777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/4402335320504424777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5667473601942758331/posts/default/4402335320504424777'/><link rel='alternate' type='text/html' href='http://tamsler.blogspot.com/2008/01/sakai-message-service.html' title='Sakai Message Service'/><author><name>Thomas Amsler</name><uri>https://profiles.google.com/107233089730648128033</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-mu_gUvU9v4E/AAAAAAAAAAI/AAAAAAAAVP4/Te-80t-gj-w/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
