<?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-2438166163329174006</id><updated>2012-02-16T06:19:38.721-08:00</updated><category term='cooking'/><category term='GIS'/><category term='microcontroller'/><category term='Productivity'/><category term='recipe'/><category term='RCP'/><category term='mushroom'/><category term='java'/><category term='web'/><category term='Eclipse'/><category term='programming'/><category term='Links'/><category term='tutorial'/><category term='vegetarian'/><category term='music'/><category term='fun'/><category term='art'/><category term='Android'/><category term='blogging'/><category term='inspiration'/><title type='text'>strangeoptics</title><subtitle type='html'>This Blog is dedicated to Java, Eclipse, Android, Arduino, Microcontroller and cooking.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-4480081683138192049</id><published>2012-02-01T11:07:00.000-08:00</published><updated>2012-02-01T11:07:36.939-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Productivity'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>How To Start Eclipse With A Certain Workspace</title><content type='html'>It is recomended to use one Eclipse installation with multiple workspaces. If you do so, Eclipse starts allways with the last used workspace. (Ok not allways, there is this annoying 'Workspace Laucher' that nobody uses)&lt;br /&gt;If this is not the desired workspace, you have to switch it after Eclipse has loaded. This is annoying and time consuming.&lt;br /&gt;&lt;br /&gt;The solution lies in a &lt;a href="http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html"&gt;command line argument&lt;/a&gt;.&lt;br /&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; eclipse.exe -data d:\downloads\eclipse\workspace\  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Create for every workspace a desktop link with the specific command line arguments.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-6GtKMOwGsek/TymMXZD2_9I/AAAAAAAAAHY/0bsL1hNTc9Q/s1600/eclipse_alternative_startscripts.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-6GtKMOwGsek/TymMXZD2_9I/AAAAAAAAAHY/0bsL1hNTc9Q/s1600/eclipse_alternative_startscripts.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-4480081683138192049?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/4480081683138192049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2012/02/how-to-start-eclipse-with-certain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4480081683138192049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4480081683138192049'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2012/02/how-to-start-eclipse-with-certain.html' title='How To Start Eclipse With A Certain Workspace'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-6GtKMOwGsek/TymMXZD2_9I/AAAAAAAAAHY/0bsL1hNTc9Q/s72-c/eclipse_alternative_startscripts.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-5083090330031857901</id><published>2012-01-31T13:15:00.000-08:00</published><updated>2012-01-31T13:15:19.741-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='art'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Logo Vector Drawings</title><content type='html'>My first steps in Illustrator. More will come!&lt;br /&gt;Download it at the bottom and use it for free.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-LeU0unUlBho/TyhYupla0oI/AAAAAAAAAHQ/Ba5_Nr7aDjI/s1600/AndroidCollage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-LeU0unUlBho/TyhYupla0oI/AAAAAAAAAHQ/Ba5_Nr7aDjI/s640/AndroidCollage.png" width="451" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Illustrator file:&amp;nbsp;&lt;a href="http://dl.dropbox.com/u/43635967/Android.ai"&gt;Android.ai&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-5083090330031857901?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/5083090330031857901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2012/01/android-logo-vector-drawings.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5083090330031857901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5083090330031857901'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2012/01/android-logo-vector-drawings.html' title='Android Logo Vector Drawings'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-LeU0unUlBho/TyhYupla0oI/AAAAAAAAAHQ/Ba5_Nr7aDjI/s72-c/AndroidCollage.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-6639312222826016498</id><published>2012-01-30T14:04:00.000-08:00</published><updated>2012-01-30T14:04:01.587-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='art'/><category scheme='http://www.blogger.com/atom/ns#' term='inspiration'/><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><title type='text'>Realy Usefull Inspiring Art, Design And Photo Links</title><content type='html'>If you need to get some fresh ideas ... get inspired ... or what ever, have a look at the following image collecting blogs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://oxane.tumblr.com/"&gt;The Infinite Fragmented Datawaves Of Oxane&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://biscodeja-vu.tumblr.com/"&gt;DejaVu&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://aurorasinica.tumblr.com/"&gt;aurorasinica&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.flickr.com/groups/46198829@N00/pool/"&gt;flickr: Vector Art&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ffffound.com/"&gt;ffffound&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://vi.sualize.us/"&gt;vi.sualize.us&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://deadfix.com/"&gt;Dead Fix&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://dribbble.com/"&gt;dribbble&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-6639312222826016498?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/6639312222826016498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2012/01/realy-usefull-inspiring-art-design-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6639312222826016498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6639312222826016498'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2012/01/realy-usefull-inspiring-art-design-and.html' title='Realy Usefull Inspiring Art, Design And Photo Links'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7640782258862538455</id><published>2012-01-30T13:54:00.000-08:00</published><updated>2012-01-30T14:14:31.236-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Productivity'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><title type='text'>ToDo: Nothing</title><content type='html'>&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-bxtHoadZTss/TycQtG83AFI/AAAAAAAAAHI/3cJ6I8isV1U/s1600/todonothing.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="355" src="http://4.bp.blogspot.com/-bxtHoadZTss/TycQtG83AFI/AAAAAAAAAHI/3cJ6I8isV1U/s400/todonothing.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After the task 'nothing' is finished I will continue with further posts.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7640782258862538455?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7640782258862538455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2012/01/todo-nothing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7640782258862538455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7640782258862538455'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2012/01/todo-nothing.html' title='ToDo: Nothing'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-bxtHoadZTss/TycQtG83AFI/AAAAAAAAAHI/3cJ6I8isV1U/s72-c/todonothing.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-5697270223239589946</id><published>2011-11-21T15:01:00.001-08:00</published><updated>2011-11-22T11:05:45.183-08:00</updated><title type='text'>Notes From The BarCamp #BCMZ 2011 In Mainz Day One</title><content type='html'>Mein erstes BarCamp und eine Tolle Erfahrung.&lt;br /&gt;Aufmerksam wurde ich vor einigen Jahren als ich noch in Eschborn wohnte und dort das erste Frankfurter BarCamp statt fand. Leider hatte ich den Event einen Monat zu spät entdeckt. Seit dem hat es 3 Jahre gedauert bis ich es endlich geschafft habe.&lt;br /&gt;Als ich nach dem zweiten Tag erschöpft nach Hause kam, habe ich mir meine Notizen angeschaut und mich gefragt was ich damit mache. Es währe zu schade wenn nur ich einen Nutzen davon hätte. Deshalb möchte ich jedem Interessiertem einen Einblick geben.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Best Practice: Social Media und Customer-Experience-Mgm in einem Start-up Unternehmen&lt;/h2&gt;Vortrag war von Philipp Hormel, einem Mitarbeiter von Flinc.&lt;br /&gt;Flinc ist ein junges Startup-Unternehmen das an der Hochschule Dieburg entstand.&lt;br /&gt;Es handelt sich um einen online Mitfahr-Dienst der nicht nur für lange Strecken und einen gewissen Planungshorizont Dienste anbietet wie &lt;a href="http://www.mitfahrzentrale.de/"&gt;mitfahrzentrale.de&lt;/a&gt; sonder auch kurze Strecken und spontane Mitfahrten ermöglicht.&lt;br /&gt;Der Vortrag ging um ‘&lt;a href="http://blog.flinc.org/2011/09/flinc-social-media-guidelines/"&gt;Social Media Guidelines&lt;/a&gt;’ und war sehr kurzweilig mit vielen realen Beispielen aus ihren Kundenbeziehungen. Diese wurden aber erstaunlicherweise, egal wie heftig sie ausfielen, positiv oder mindestens neutral dargestellt.&lt;br /&gt;Sie zeigten wie man “NEGATIV SCHREIENDE COMMENTARE” in positive wandeln kann.Was mich etwas überraschte war, dass das Unternehmen seit einiger Zeit seine Dienste anbietet aber fast ausschließlich Bussiness-Angel finanziert ist und noch keinen Plan hat mit welchem Bussiness-Modell sie Geld verdienen wollen. Es hieß, um das Thema kümmern wir uns im nächsten halben Jahr ;)&lt;br /&gt;Leider habe ich im Anschluss niemaden von Flinc getroffen um die Frage zu stellen, wie sinnreich es war auf die dynamische Sprachplattform Ruby zu setzen und ob sie es im nachhinnein bereut haben in Punkto Performance.&lt;br /&gt;Eine schön Idee fand ich es noch, dass sie für größere Firmen vorhabe einen Dienst anzubieten, der es den Mitarbeitern ermöglicht Firmen-Intern eine Mitfahrgelegenheit zu finden.&lt;br /&gt;Um ins Fernsehen zu kommen gab es auch einen Tip. Am besten startet man eine PR-Release-Tour zu einem geplanten Zeitpunkt. Macht sich bei den Printmedien bekannt und versucht dort Artikel zu bekommen. Danach schreibt eh jeder von jedem ab und die Sender werden auf einen aufmerksam.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;FrontEnd Best Practices&lt;/h2&gt;Vortrag von Jens &lt;a href="http://grochtdreis.de/"&gt;Grochtdreis&lt;/a&gt;.&lt;br /&gt;Ich bin Webtechnologie-Newbie und der Inhalt hat mich überfordert.Was ich aber mitgenommen habe ist, das die Trennung zwischen Semantik und Design wichtig ist. Zu oft vergessen Inhalteanbieter das eine Überschrift mit&amp;nbsp;ausgezeichnet werden sollte, statt mit einem &amp;lt;div&amp;gt;&amp;nbsp;oder &amp;lt;span&amp;gt;-Tag der toll designed ist. Suchmaschinen oder prinzipiell Maschinen können sollche Tags nicht auswerten.&lt;br /&gt;Als Beispiel wurden die &lt;a href="http://www.faz.net/"&gt;FAZ&lt;/a&gt; oder die &lt;a href="http://www.sueddeutsche.de/"&gt;Süddeutsche&lt;/a&gt;&amp;nbsp;genannt. Einfach mal nachschauen, es gibt zig Überschrifen auf der Seite aber nur einen einzigen Überschriftentag!&lt;br /&gt;Manche Slides kamen von &lt;a href="http://failblog.org/"&gt;failblog.org&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://meyerweb.com/"&gt;Eric Meyer&lt;/a&gt; wurde als CSS-Halbgott bezeichnet.&lt;br /&gt;Lustig fand ich seine Bezeichnungen für Browser und Plattformen:&lt;br /&gt;iPhone - iFöne&lt;br /&gt;IE - InternetExplodierer&lt;br /&gt;FireFox - FrickleFox&lt;br /&gt;Er selbst ist &lt;a href="http://www.yaml.de/"&gt;YAML&lt;/a&gt;-Ferfechter.Überhaupt war er Ferfechter von Frameworks im Web-Umfreld und sagte dont’t repeat yourself, ich glaube aber eher das eher das er don’t repeat itself meinte.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.nach-uns-die-zukunft.de/"&gt;Nach uns die Zukunft&lt;/a&gt;&lt;/h2&gt;Von Markus Seim ins Leben gerufenes und ambitioniertes Blog-Projekt.&lt;br /&gt;Es versucht das Thema Nachhaltigkeit im deutschsprachigen Raum zu bereichern.&lt;br /&gt;Diese Session erregte mein bessonderes Interesse, da ich seit einiger Zeit versuche selbst aus dem Kreislauf des blinden Konsums zu kommen und nachhaltiger zu handeln.&lt;br /&gt;Besonderes Interesse habe ich für das Thema Nahrung das Markus auch als zentrales Thema für den Blog sieht. Nirgendwo anders kann man als Konsument so viel bewirken. Vielleicht werde ich mich dort mit einigen Artikeln über meine eigenen Erfahrungen beteilligen.&lt;br /&gt;Die Session selbst war von Seiten der Zuhörer sehr kritikreich. Es wurde von allen Teilnehmern mit bohrenden Fragen versucht herauszufinden, warum es ein weiteres Blog mit diesem Thema geben sollte. Welches spezielle Ziel verfolgt wird, welche Strategie, das journalistischer Anspruch eher negativ besetzt währe und so weiter …&lt;br /&gt;Hinter den Kulissen gibt es bisher 7 Mitglieder von den 3 zum Kernteam gehören. Markus hatte im ersten Schritt versucht einen eigenen Blog zu starten ist aber nach dem allseits bekannten Motivationsschub versandet. Danach traf er in Berlin eine Gleichgesinnten und startete mit ihm diesen Gemeinschaftsblog.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Backend Entwicklung für Mobile Apps&lt;/h2&gt;Von Marcel Etzel der bei match2blue arbeitet.&lt;br /&gt;Es ging um eine firmeninterne Eigenentwicklung ener Backendlösung. Sowas gibts schon aber ihr Fokus liegt auf der Echtzeitverteilung von Lokationsbezogenen Daten. Als DB wird NoSQL verwendet, das gegenüber relationalen Datenbanken erst den Dienst für hohe Abfragehäufigkeiten ermöglicht.Dieses spezielle Thema ist nichts für mich.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Leiterplattenlayout erstellen&lt;/h2&gt;Von Oliver Perialis.&lt;br /&gt;Er hat sich 2006 während seiner Abschlussarbeit mit Mikrocontrollern beschäftigt und sich im Anschluss mit einem eigen entwickelten Produkt selbständig gemacht.&lt;br /&gt;Es handelt sich um eine Bluetooth-Bridge für Nikon Fotokameras zu einer beliebigen Bluetooth-GPS-Maus. Er vertreibt sie über seine Webseite &lt;a href="http://www.foolography.com/"&gt;foolography&lt;/a&gt;.&lt;br /&gt;Da ihm der Einstieg in die Entwicklung von Leiterplatinenprototypen schwer gefallen ist, hat er diese Session zur Erstellung von Leiterplattenlayouts und morgen für das Ätzen von Platinen angeboten um anderen den Einstieg zu erleichtern.&lt;br /&gt;Er hat die Sessions auch dazu genutzt publik zu machen das er vorhat ein FabLab in Wiesbaden ins Leben zu rufen. Soweit ich verstanden habe, hat er schon einen Lasercutter und möchte die Werkzeugkiste um einen 3D-Drucker erweiern.&lt;br /&gt;Für das Layouten verwendet er die Freeware Version von EagleCad von &lt;a href="http://www.cadsoftusa.com/"&gt;CadSoft&lt;/a&gt;.Sie hat die Einschränkung Leiterplatten nur in der Größe 100 x 80 mm und mit maximal 2 Layern designen zu können.Er empfiehlt obwohl es schon viele Bibliotheken mit allen Bauteilen gibt, sich seine eigenen zu erstellen da die meisten aus Amerika kommen und die Maße in Zoll sind.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Wie funktioniert Geld?&lt;/h2&gt;Von Alexander Boerger.&lt;br /&gt;Er ist eigentlich Künsler und kein Wirtschaftler. Nachdem er einem Artikel in der &lt;a href="http://www.brandeins.de/"&gt;brand eins&lt;/a&gt; über ein alternatives Währungssystem gelesen hatte, packte ihn das Thema so sehr, das er sich seit dem alles aus diesem Bereich angelesen hatte.&lt;br /&gt;Die Session war in zwei Teile aufgeteilt. Der erste ging um die Funktionsweise des Geldes bzw. des aktuellen zinsbehafteten Finanzsystems wie wir es haben. Die Aussage war, Zinsen sind die Wurzel allen Übels und bringen jedes Finanzsystem früher oder später zu Fall.&lt;br /&gt;Im zweiten Teil ging es um eine Alternative, angelehnt an dem Inhalt des brand eins Artikels, einer Chiemgauer Gemeinde mit ihrer Regionalwährung dem Chiemgauer und dem von einigen Wissenschaftlern entworfenen Modell eines negativen Zinses. Nach bestimmten Zeitintervallen 1 Jahr, ½ oder viertelhährlich verliert man einen festgelegten Prozentsatz seines Geldes. Das würde die Geldmenge nicht ins Unendlich wachsen lassen, das Horten von großen Mengen unwirtschaftlich machen und die Umlaufgeschwindigkeit steigern.Alles in allem eine sehr interessante Session mit einigen neuen Anregungen die Welt nicht immer so zu akzeptieren wie sie ist.&lt;br /&gt;Zum Schluss lancierte er dieser Session sein Projekt &lt;a href="http://futuremoney.org/"&gt;futuremoney.org&lt;/a&gt;. Zur Zeit noch ein Blog aber mit große Ambitionen für die Zukunft. Er plant für nächstes Jahr ein BarCamp zum Thema Geld. Ich werde dabei sein.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-5697270223239589946?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/5697270223239589946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/11/notes-from-barcamp-bcmz-2011-in-mainz.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5697270223239589946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5697270223239589946'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/11/notes-from-barcamp-bcmz-2011-in-mainz.html' title='Notes From The BarCamp #BCMZ 2011 In Mainz Day One'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7378528644040638581</id><published>2011-10-21T07:50:00.000-07:00</published><updated>2011-10-21T10:30:56.986-07:00</updated><title type='text'>Generating Traffic For Your Blog</title><content type='html'>I have my blog for nearly two month now. My statistics show me 500 page views whats nice. But when I look at the traffic sources 80% comes from stackoverflow where I postet some links to some of my postings. There is nearly no traffic from search engine requests.&lt;br /&gt;&lt;br /&gt;The first good idea to find out what is happening is to look at this site:&lt;br /&gt;http://www.wholinks2me.com&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-_U5Il9ryg6E/TqGEvyELbHI/AAAAAAAAAEo/fehdWO5mAjI/s1600/WhoLinks2Me_IndexedPages.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="75" src="http://2.bp.blogspot.com/-_U5Il9ryg6E/TqGEvyELbHI/AAAAAAAAAEo/fehdWO5mAjI/s400/WhoLinks2Me_IndexedPages.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This means only 26 of my 35 posts are actually indexed from google and the other two big search engines are unaware of me.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Search engine submission&lt;/span&gt;&lt;br /&gt;Submit your blog to all search engines manually:&lt;br /&gt;&lt;a href="https://ssl.bing.com/webmaster/SubmitSitePage.aspx"&gt;https://ssl.bing.com/webmaster/SubmitSitePage.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="https://siteexplorer.search.yahoo.com/"&gt;https://siteexplorer.search.yahoo.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://freewebsubmission.com/"&gt;http://freewebsubmission.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Sitemaps&lt;/span&gt;&lt;br /&gt;Sitemaps are xml documents that allows you to inform search engines which pages should get crawled. If you are using blogspot, the automatic generated sitemap contains only 26 of your most resent pages.&lt;br /&gt;To get all of your postings indexed, submit your own sitemap.&lt;br /&gt;This can be done in the google &lt;a href="https://www.google.com/webmasters/tools"&gt;webmaster-tools&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Add your blog.&lt;br /&gt;Go to 'website-configuration' and there to 'xml-sitemaps'.&lt;br /&gt;Hit the button 'submit xml-sitemap'&lt;br /&gt;In the dialog insert the following link to your atom feed.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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;span class="Apple-style-span"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; atom.xml?redirect=false&amp;amp;start-index=1&amp;amp;max-results=500  &lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;/span&gt;If you got more than 500 pages add them subsequently in 500 blocks.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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; atom.xml?redirect=false&amp;amp;start-index=501&amp;amp;max-results=1000  &lt;br /&gt; atom.xml?redirect=false&amp;amp;start-index=1001&amp;amp;max-results=1500  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7378528644040638581?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7378528644040638581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/generating-traffic-for-your-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7378528644040638581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7378528644040638581'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/generating-traffic-for-your-blog.html' title='Generating Traffic For Your Blog'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-_U5Il9ryg6E/TqGEvyELbHI/AAAAAAAAAEo/fehdWO5mAjI/s72-c/WhoLinks2Me_IndexedPages.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-6748725565863917782</id><published>2011-10-18T12:55:00.000-07:00</published><updated>2012-02-12T12:26:05.110-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android: How The Preference Framework Works</title><content type='html'>Every good application needs preferences that enables the user to customize and personalize it to his needs.&lt;br /&gt;Android provides us with a preference framework ready to use. Like the rest of the UI, you have the choice to define your preference declaratively or programmatically. Android stores the preferences as key-value pairs of primitive data types in a shared preferences object.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-kyoAu7eKLAY/Tp3VvegReuI/AAAAAAAAAEY/63BHUBAq6iI/s1600/twocategorypreferenceui.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-kyoAu7eKLAY/Tp3VvegReuI/AAAAAAAAAEY/63BHUBAq6iI/s1600/twocategorypreferenceui.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Example&lt;/span&gt;&lt;br /&gt;We will develope a preference activity consisting of two categories, each with a preference in it. The first categorie is defined declarativeley in an XML document while the second is defined programmatically.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The declarative Way of creating preferences&lt;/b&gt;&lt;br /&gt;Start a new Android project like I described it in &lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html"&gt;Part0-2&lt;/a&gt; of my 'Getting Started With Android' tutorial.&lt;br /&gt;&lt;br /&gt;At first we have to layout the preference screen through an xml file. This file comes by convention in the folder res/xml that we have to create.&lt;br /&gt;&lt;br /&gt;Create a new 'Android XML File' from the context menue of the folder. When the dialog pops up, select the resource type 'Preferences', name it my_preferences.xml and choose PreferenceScreen as the root element. &lt;br /&gt;&lt;br /&gt;&lt;pre style="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; &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;  &lt;br /&gt; &amp;lt;PreferenceScreen  &lt;br /&gt;      xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;  &lt;br /&gt; &amp;lt;/PreferenceScreen&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The preferences UI consists of three basic class types.&lt;br /&gt;&lt;i&gt;&lt;b&gt;PreferenceScreen&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;It is a container type. It can hold childs of the type&amp;nbsp;&lt;i&gt;PreferenceCategory&lt;/i&gt;, &lt;i&gt;Preference &lt;/i&gt;and even &lt;i&gt;PreferenceScreen &lt;/i&gt;itself to build up a nested preference UI.&lt;br /&gt;&lt;i&gt;&lt;b&gt;PreferenceCategory&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;Groups Preferences together under one common title.&lt;br /&gt;&lt;i&gt;&lt;b&gt;Preference&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;The actual preference that is a build in (&lt;i&gt;EditTextPreference&lt;/i&gt;, &lt;i&gt;CheckBoxPreference&lt;/i&gt;, ...) or custom preference.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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; &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;  &lt;br /&gt; &amp;lt;PreferenceScreen  &lt;br /&gt;      xmlns:android="http://schemas.android.com/apk/res/android"  &lt;br /&gt;      android:key="prefscreen"&amp;gt;  &lt;br /&gt;   &amp;lt;PreferenceCategory   &lt;br /&gt;        android:title="category 1"   &lt;br /&gt;        android:key="@string/pref_cat_1_key"&amp;gt;  &lt;br /&gt;     &amp;lt;EditTextPreference   &lt;br /&gt;          android:key="@string/pref_edittextpreference_key"   &lt;br /&gt;          android:title="EditTextPreference"   &lt;br /&gt;          android:dialogTitle="EditTextPreference"   &lt;br /&gt;          android:dialogMessage="message"   &lt;br /&gt;          android:summary="summary"/&amp;gt;  &lt;br /&gt;   &amp;lt;/PreferenceCategory&amp;gt;  &lt;br /&gt; &amp;lt;/PreferenceScreen&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;For the sake of getting things done quick in tutorials I used plain strings and not the string.xml from the resources.&lt;br /&gt;To bring the my_preferences.xml to the screen, extend an Activity from the class PreferenceActivity. In the onCreate() methode, inflate the ui from the file.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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; public class MyPreferenceActivity extends PreferenceActivity {  &lt;br /&gt;      @Override  &lt;br /&gt;      protected void onCreate(Bundle savedInstanceState) {  &lt;br /&gt;           super.onCreate(savedInstanceState);  &lt;br /&gt;           addPreferencesFromResource(R.xml.my_preferences);  &lt;br /&gt;           EditTextPreference etpUsername = (EditTextPreference)&lt;br /&gt;                      findPreference(getString(R.string.pref_edittextpreference_key));  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Dont't forget to add the Activity via the AndroidManifest.xml otherwise the app will crash when it can't find it.&lt;br /&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; &amp;lt;activity   &lt;br /&gt;      android:name=".MyPreferenceActivity"   &lt;br /&gt;      android:label="Preferences"&amp;gt;  &lt;br /&gt; &amp;lt;/activity&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now we have to implement the code that opens the MyPreferenceActivity from the options menue.&lt;br /&gt;Create a new menu file 'my_menu.xml' in the folder res/menu.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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; &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;  &lt;br /&gt; &amp;lt;menu  &lt;br /&gt;  xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;  &lt;br /&gt;   &amp;lt;item android:title="@string/menu_item_preferences"   &lt;br /&gt;        android:id="@+id/menu_preferences"   &lt;br /&gt;        android:icon="@android:drawable/ic_menu_preferences"/&amp;gt;  &lt;br /&gt; &amp;lt;/menu&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In the main Activity we override the following callback methods.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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; @Override  &lt;br /&gt;   public boolean onCreateOptionsMenu(Menu menu) {  &lt;br /&gt;        super.onCreateOptionsMenu(menu);  &lt;br /&gt;        MenuInflater mi = getMenuInflater();  &lt;br /&gt;        mi.inflate(R.menu.my_menu, menu);  &lt;br /&gt;        return true;  &lt;br /&gt;   }  &lt;br /&gt;   @Override  &lt;br /&gt;   public boolean onMenuItemSelected(int featureId, MenuItem item) {  &lt;br /&gt;        switch(item.getItemId()) {  &lt;br /&gt;             case R.id.menu_preferences:  &lt;br /&gt;                  Intent i = new Intent(this, MyPreferenceActivity.class);  &lt;br /&gt;                  startActivity(i);  &lt;br /&gt;                  return true;  &lt;br /&gt;        }  &lt;br /&gt;        return super.onMenuItemSelected(featureId, item);  &lt;br /&gt;   }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Start your Application and have a look at our new preferences screen with the first category.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The programmatic Way of creating preferences&lt;/b&gt;&lt;br /&gt;Go back to the &lt;i&gt;MyPreferenceActivity &lt;/i&gt;and add the following lines at the end of the &lt;i&gt;onCreate()&lt;/i&gt; methode.&lt;br /&gt;They will add a second &lt;i&gt;PreferencCategory &lt;/i&gt;called 'category 2' with a &lt;i&gt;CheckBoxPreference &lt;/i&gt;in it.&lt;br /&gt;&lt;br /&gt;&lt;pre style="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;     protected void onCreate(Bundle savedInstanceState) {  &lt;br /&gt;         ...  &lt;br /&gt;         PreferenceManager preferenceManager = getPreferenceManager();  &lt;br /&gt;         PreferenceScreen preferenceScreen = &lt;br /&gt;                  (PreferenceScreen) preferenceManager.findPreference("prefscreen");  &lt;br /&gt;         PreferenceCategory prefCat2 = new PreferenceCategory(this);  &lt;br /&gt;         prefCat2.setTitle("category 2");  &lt;br /&gt;         preferenceScreen.addPreference(prefCat2);  &lt;br /&gt;         CheckBoxPreference checkBoxPreference = new CheckBoxPreference(this);  &lt;br /&gt;         checkBoxPreference.setTitle("CheckBoxPreference");  &lt;br /&gt;         checkBoxPreference.setSummary("summary");  &lt;br /&gt;         prefCat2.addPreference(checkBoxPreference);  &lt;br /&gt;     }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;With the help of the &lt;i&gt;PreferenceManager &lt;/i&gt;we can obtain any preference that is declared so far.&amp;nbsp;We fetch the &lt;i&gt;PreferenceScreen &lt;/i&gt;because we want to add another &lt;i&gt;PreferenceCategory &lt;/i&gt;at the end. To create an object of one of the preference types, just call the constructor of its class.&lt;br /&gt;Plugging together the hierachy is done with the &lt;i&gt;addPreference()&lt;/i&gt; method.&lt;br /&gt;&lt;br /&gt;Start your Application and have a look at our new preferences screen.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-6748725565863917782?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/6748725565863917782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/android-how-preference-framework-works.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6748725565863917782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6748725565863917782'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/android-how-preference-framework-works.html' title='Android: How The Preference Framework Works'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-kyoAu7eKLAY/Tp3VvegReuI/AAAAAAAAAEY/63BHUBAq6iI/s72-c/twocategorypreferenceui.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-1710611532647508592</id><published>2011-10-16T05:57:00.000-07:00</published><updated>2011-10-16T13:39:20.400-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mushroom'/><category scheme='http://www.blogger.com/atom/ns#' term='vegetarian'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Cooking: Cauliflower Mushroom (Krause Glucke)</title><content type='html'>Today I found my biggest cauliflower mushroom ever.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6222/6249182989_3d17868629_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6222/6249182989_3d17868629.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;They grow as parasites on the roots of trees. I found them only on conifers expecially on pine trees and there, very close to the trunk.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6176/6249704318_5a8ab02d5a_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6176/6249704318_5a8ab02d5a.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6111/6249187223_97741a1ef4_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6111/6249187223_97741a1ef4.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I had to make a trophy photo to demonstrate the huge size.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6117/6249195009_2d16c0dba9_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6117/6249195009_2d16c0dba9.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;At home you have to cut it into smaler pieces to clean it.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6032/6249198503_7606db212c_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6032/6249198503_7606db212c.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This species is more dirty and harder to clean than any other mushroom.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6096/6249729890_118e4dfd3a_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6096/6249729890_118e4dfd3a.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I prefer to browse it with a shower head. The water should be cold.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6050/6249204979_13229b99db_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6050/6249204979_13229b99db.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;But you can't get it super clean. There will be always some soil. &lt;br /&gt;Pick out the big stuff like pine needles, pieces of bark or moth cocoons.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6057/6249207641_68eb59e702_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6057/6249207641_68eb59e702.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Cut the mushroom into finger thick slices and build up a schnitzel factory. Bath the slices in the scrambled egg and coat it with bread crumps.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://farm7.static.flickr.com/6169/6249739564_2c608ed7f7_b.jpg"&gt;&lt;br /&gt;&lt;img src="http://farm7.static.flickr.com/6169/6249739564_2c608ed7f7.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Heat oil in a pan and fry the mushroom schnitzel until the pieces are dark brown.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Synonyms: sparassis crispa, cauliflower mushroom, krause glucke, fette henne&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-1710611532647508592?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/1710611532647508592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/cooking-cauliflower-mushroom-krause.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/1710611532647508592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/1710611532647508592'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/cooking-cauliflower-mushroom-krause.html' title='Cooking: Cauliflower Mushroom (Krause Glucke)'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm7.static.flickr.com/6222/6249182989_3d17868629_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-927626291893972924</id><published>2011-10-14T14:48:00.000-07:00</published><updated>2011-10-14T15:28:05.732-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GIS'/><title type='text'>Using OSM data in GeoServer: Part3 - GeoServer</title><content type='html'>To install &lt;a href="http://geoserver.org/display/GEOS/Welcome"&gt;GeoServer&lt;/a&gt;&amp;nbsp;you have a lot of options:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://docs.geoserver.org/stable/en/user/installation/windows/installer.html"&gt;Installer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.geoserver.org/stable/en/user/installation/windows/binary.html"&gt;Binaries&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.geoserver.org/stable/en/user/installation/war.html"&gt;Web ARchive(WAR)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I choose the WAR because I want to extend the funktionality of the server later on (Not in this tutorial).&lt;br /&gt;Go to the &lt;a href="http://geoserver.org/display/GEOS/Download"&gt;download page&lt;/a&gt; and get the stable WAR and unzip it.&lt;br /&gt;&lt;br /&gt;geoserver-2.1.2-war.zip&lt;br /&gt;geoserver.war&lt;br /&gt;&lt;br /&gt;A WAR gets deployed into an application server. Also here you got a lot of options:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JBoss&lt;/li&gt;&lt;li&gt;Tomcat&lt;/li&gt;&lt;li&gt;Jetty&lt;/li&gt;&lt;li&gt;&lt;a href="http://glassfish.java.net/"&gt;GlassFish&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I choose GlassFish. Go to the &lt;a href="http://glassfish.java.net/public/downloadsindex.html#top"&gt;download page&lt;/a&gt; and get the newest open source version.&lt;br /&gt;&lt;br /&gt;glassfish-3.1-windows.exe&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;Installation folder&lt;/td&gt; &lt;td&gt;C:\glassfish3&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Http port&lt;/td&gt; &lt;td&gt;8080&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Admin port&lt;/td&gt; &lt;td&gt;4848&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;start command&lt;/td&gt; &lt;td&gt;C:\glassfish3\glassfish\bin\asadmin.bat start-domain domain1&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Go to the admin site and deploy the GeoServer WAR.&lt;br /&gt;Open your browser and type in 'http://localhost:4848'.&lt;br /&gt;Click on Applications and there on the 'Deploy...' button.&lt;br /&gt;Choose the&amp;nbsp;geoserver.war ond click 'OK'.&lt;br /&gt;&lt;br /&gt;Open the page 'http://localhost:8080/geoserver'.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-71XLW_FP-PA/Tpis-ccV_BI/AAAAAAAAAD4/SWIE6-OJ1D4/s1600/web-admin.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-71XLW_FP-PA/Tpis-ccV_BI/AAAAAAAAAD4/SWIE6-OJ1D4/s1600/web-admin.png" width="560" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The default username and password ist admin and geoserver.&lt;br /&gt;&lt;br /&gt;If you want to know how GeoServer generally works I recomend to read the excellent GeoServer &lt;a href="http://docs.geoserver.org/stable/en/user/index.html"&gt;User Manual&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now we want to bring the spacial data into the browser.&lt;br /&gt;&lt;br /&gt;Go to 'Workspaces'.&lt;br /&gt;Click 'Add new workspace'&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td style="width: 150px;"&gt;Name&lt;/td&gt; &lt;td&gt;osm&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Namespace URI&lt;/td&gt; &lt;td&gt;http://osm.de&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Go to 'Stores'.&lt;br /&gt;Click 'Add new Store'.&lt;br /&gt;Click 'PostGIS - PostGIS Database'.&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td style="width: 150px;"&gt;Workspace&lt;/td&gt; &lt;td&gt;osm&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Data Source Name&lt;/td&gt; &lt;td&gt;osm data&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;host&lt;/td&gt; &lt;td&gt;localhost&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;port&lt;/td&gt; &lt;td&gt;5432&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;database&lt;/td&gt; &lt;td&gt;osm&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;user&lt;/td&gt; &lt;td&gt;osmuser&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;passwd&lt;/td&gt; &lt;td&gt;***&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Now you have to create for every table a layer.&lt;br /&gt;&lt;br /&gt;Go to 'Layers'.&lt;br /&gt;Click 'Add a new resource'&lt;br /&gt;Choose 'osm:osm data'.&lt;br /&gt;&lt;br /&gt;In the Tab 'Data' go to the point 'Bounding Boxes' and compute the native- and Lat/Lon bounding boxes from data.&lt;br /&gt;Check in the Tab 'Publising' if the 'Standard Stil' is point for planet_osm_point and line for planet_osm_line, planet_osm_roads and polygon fro planet_osm_polygon.&lt;br /&gt;Click 'Save'.&lt;br /&gt;&lt;br /&gt;Go to 'Layer Groups'.&lt;br /&gt;Click 'Add new layer group'&lt;br /&gt;Name: osm group&lt;br /&gt;Click 'Add Layer...' and add all 4 layers.&lt;br /&gt;Click 'Geerate Bounds'.&lt;br /&gt;Click 'Save'&lt;br /&gt;&lt;br /&gt;Go to 'Layer Preview'.&lt;br /&gt;Find the osm group and click 'OpenLayers'.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-H9HNtGsq3-Q/Tpi23A1bleI/AAAAAAAAAEI/21hIXE48YYc/s1600/osm_data_in_browser.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-H9HNtGsq3-Q/Tpi23A1bleI/AAAAAAAAAEI/21hIXE48YYc/s1600/osm_data_in_browser.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part0.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-927626291893972924?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/927626291893972924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/927626291893972924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/927626291893972924'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html' title='Using OSM data in GeoServer: Part3 - GeoServer'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-71XLW_FP-PA/Tpis-ccV_BI/AAAAAAAAAD4/SWIE6-OJ1D4/s72-c/web-admin.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-8676408215064621223</id><published>2011-10-14T10:27:00.000-07:00</published><updated>2011-10-14T14:49:28.643-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GIS'/><title type='text'>Using OSM data in GeoServer: Part2 - osm2pgsql</title><content type='html'>For this part we have to:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;get the OpenStreetMap(OSM) data that are called planet files.&lt;/li&gt;&lt;li&gt;download the import tool osm2pgsql.&lt;/li&gt;&lt;li&gt;import the osm data.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;The OSM wiki has a &lt;a href="http://wiki.openstreetmap.org/wiki/Planet.osm"&gt;page &lt;/a&gt;that describes how to download their data.&lt;br /&gt;We choose &lt;a href="http://download.geofabrik.de/"&gt;geofrabrik&lt;/a&gt;. In the folder &lt;a href="http://download.geofabrik.de/osm/europe/germany/"&gt;osm/europe/germany&lt;/a&gt; wie click on hessen.osm.bz2. This file is not to big (121 MB) for this example. Germany would take the whole day to import.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For osm2pgsql exist a compiled version to download from &lt;a href="http://tile.openstreetmap.org/osm2pgsql.zip"&gt;here&lt;/a&gt;.&lt;br /&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; osm2pgsql -U postgres -W -c -s -d osm -S default.style hessen.osm.bz2  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The parameters:&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td style="width:40px"&gt;-U&lt;/td&gt;     &lt;td&gt;Postgresql user name.&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;-W&lt;/td&gt;     &lt;td&gt;Force password prompt.&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;-c&lt;/td&gt;     &lt;td&gt;Remove existing data from the database.&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top"&gt;-s&lt;/td&gt;     &lt;td&gt;Store temporary data in the database. This greatly reduce the RAM usage but is much slower. You are running this on 32bit system, so at most 3GB of RAM will be used. If you encounter unexpected exceptions during import, you should try this switch.&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;-d&lt;/td&gt;     &lt;td&gt;The name of the PostgreSQL database to connect.&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;-S&lt;/td&gt;     &lt;td&gt;Location of the style file. Defaults to /usr/share/osm2pgsql/default.style.&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The import takes around 30 minutes.&lt;br /&gt;&lt;br /&gt;Have a look in the osm-db. 5 new tables are there.&lt;br /&gt;planet_osm_line&lt;br /&gt;planet_osm_point&lt;br /&gt;planet_osm_polygon&lt;br /&gt;planet_osm_roads&lt;br /&gt;&lt;br /&gt;In the next part I will show you how to visualize the date with GeoServer.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part0.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-8676408215064621223?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/8676408215064621223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8676408215064621223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8676408215064621223'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part2.html' title='Using OSM data in GeoServer: Part2 - osm2pgsql'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-5150792504692334709</id><published>2011-10-14T08:27:00.000-07:00</published><updated>2011-10-14T14:49:14.155-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GIS'/><title type='text'>Using OSM data in GeoServer: Part1 - PostGIS</title><content type='html'>The first thing we need is a data base to store spacial data. Today ever big vendor has a spacial extension that is compliant with the simple feature specification from the OGC.&lt;br /&gt;We could choose from the following data bases:&lt;br /&gt;Oracle, MSSQL, MySQL, &lt;a href="http://www.postgresql.org/"&gt;Postgres&lt;/a&gt;, ...&lt;br /&gt;&lt;br /&gt;I pick &lt;a href="http://www.postgresql.org/"&gt;Postgres&lt;/a&gt; with its spacial extention called &lt;a href="http://postgis.refractions.net/"&gt;PostGIS&lt;/a&gt;. It is an stable open source data base with no costs. This is the only data base I know for which a tool exists to import the osm data. It is called osm2pgsql.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download and install PostgreSQL.&lt;/li&gt;&lt;li&gt;Update or manually install PostGIS&lt;/li&gt;&lt;li&gt;Create a spacial db called osm with a new user&lt;/li&gt;&lt;li&gt;Configure the connections&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;1. Download and install PostgreSQL&lt;br /&gt;&lt;br /&gt;Get the one click installer from the &lt;a href="http://www.postgresql.org/download/windows"&gt;download page&lt;/a&gt;. I choose the version 8.4 instead of the 9.x branch because it gots all the funktionality we need and it is the most stable and secure version.&lt;br /&gt;&lt;br /&gt;One click it :&amp;nbsp;&lt;i&gt;postgresql-8.4.9-1-windows.exe&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The installer will promt you:&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;Installation Directory:&lt;/td&gt;     &lt;td&gt;C:\Program Files\PostgreSQL\8.4&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Data Directory:&lt;/td&gt;     &lt;td&gt;C:\Program Files\PostgreSQL\8.4\data&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Password:&lt;/td&gt;     &lt;td&gt;&amp;lt;your password&amp;gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Port:&lt;/td&gt;     &lt;td&gt;5432&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;At the end you get asked if you want to launch the Stack Builder.&lt;br /&gt;Choose from the category tree 'spacial extensions' and then 'PostGIS 1.5'.&lt;br /&gt;&lt;br /&gt;Alternatively you can install the extention by hand. There are&amp;nbsp;&lt;a href="http://postgis.refractions.net/download/windows/"&gt;instructions&lt;/a&gt;&amp;nbsp;at the PostGIS site.&lt;br /&gt;&lt;br /&gt;Open up the 'pg Admin III' tool from your start menue. In the objectbrowser you will find a data base called 'template_postgis' with two tables 'geometry_columns' and 'spacial_ref_sys'. If you need a new gis data base you use this as a template. So don't alter it.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-HF0zq9DNbdU/TphRI6zfXAI/AAAAAAAAADw/DYvdTRbDw_4/s1600/postgis_objectbrowser.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-HF0zq9DNbdU/TphRI6zfXAI/AAAAAAAAADw/DYvdTRbDw_4/s1600/postgis_objectbrowser.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Create a new Login-Roll called osmuser by right clicking on 'Login-Rollen'.&lt;br /&gt;Create a new gis data base by right clicking on 'Databases' in the Tree.&lt;br /&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;Name:&lt;/td&gt;     &lt;td&gt;osm&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Owner:&lt;/td&gt;     &lt;td&gt;osmuser&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Template:&lt;/td&gt;     &lt;td&gt;template_postgis&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Finaly you have to assing the osmuser to the tables in the data base.&lt;br /&gt;&lt;br /&gt;This can also be done by the postgres console.&lt;br /&gt;&lt;br /&gt;Now you are ready with the basic data base setup. Next part will show you how to import the osm data.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part0.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-5150792504692334709?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/5150792504692334709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5150792504692334709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5150792504692334709'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part1.html' title='Using OSM data in GeoServer: Part1 - PostGIS'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-HF0zq9DNbdU/TphRI6zfXAI/AAAAAAAAADw/DYvdTRbDw_4/s72-c/postgis_objectbrowser.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-9165562874437576096</id><published>2011-10-14T08:26:00.000-07:00</published><updated>2011-10-14T14:49:00.727-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GIS'/><title type='text'>Using OSM data in GeoServer: Part0 - Introduction</title><content type='html'>In this tutorial I want to show you how we can setup our own OpenStreetMap(OSM) tiling server.&lt;br /&gt;Most of the tutorials are writen for linux, I will use windows instead.&lt;br /&gt;&lt;br /&gt;Several steps have to be done:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Setting up a data base (PostGIS)&lt;/li&gt;&lt;li&gt;Download and Import the OSM data via an importing tool (osm2pgsql)&lt;/li&gt;&lt;li&gt;Setting up a GIS-Server (GeoServer) and generating the map tiles&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part0.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-9165562874437576096?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/9165562874437576096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part0.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/9165562874437576096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/9165562874437576096'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part0.html' title='Using OSM data in GeoServer: Part0 - Introduction'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-3232540440570733601</id><published>2011-10-12T08:18:00.000-07:00</published><updated>2011-10-12T12:09:28.286-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><title type='text'>Really Useful Java Data Visualisation And Charting Links</title><content type='html'>This is a collection of my favorite Java libraries for data visualisation, diagrams, charting and graphs.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;a href="http://www.jfree.org/jfreechart/"&gt;JFreeChart&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.jfree.org/jfreechart/samples.html" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-3y7oG0MP1g8/TpWycM0KlNI/AAAAAAAAADQ/duhGQ-Y1rgY/s1600/jfreechart_gallery_w600.png" width="560" /&gt;&lt;/a&gt;&lt;/div&gt;I use it for a small project (&lt;a href="http://code.google.com/p/hotstock/"&gt;hotstock&lt;/a&gt;) of mine where I want to keep track of the stock market development.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://prefuse.org/"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;prefuse&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://prefuse.org/gallery/" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-0MnRe3droUM/TpWw6t3JJ2I/AAAAAAAAADI/Q3ZHOjL8s6A/s1600/prefuse_gallery_w600.png" width="560" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are an RCP developer or using SWT standalone, you might use the following libraries. They will blend into your projects.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/gef/zest/"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Zest&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_ErJ-ufWcjk/TpXFGTmd3WI/AAAAAAAAADY/eLW98Ume_h4/s1600/zest_screen1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-_ErJ-ufWcjk/TpXFGTmd3WI/AAAAAAAAADY/eLW98Ume_h4/s1600/zest_screen1.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Used to draw graphs and got the most important layouts.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/gef/gef_mvc/index.php"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;GEF (MVC)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gfN25e-DvtI/TpXFplmo41I/AAAAAAAAADo/2iM-c5WI5YI/s1600/GEF_Logic_Example.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-gfN25e-DvtI/TpXFplmo41I/AAAAAAAAADo/2iM-c5WI5YI/s1600/GEF_Logic_Example.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can draw interactive diagrams an expand them to an full working editor that uses the MVC pattern.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-3232540440570733601?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/3232540440570733601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/really-useful-java-data-visualisation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3232540440570733601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3232540440570733601'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/really-useful-java-data-visualisation.html' title='Really Useful Java Data Visualisation And Charting Links'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-3y7oG0MP1g8/TpWycM0KlNI/AAAAAAAAADQ/duhGQ-Y1rgY/s72-c/jfreechart_gallery_w600.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-3292981241951466124</id><published>2011-10-06T11:06:00.000-07:00</published><updated>2011-10-08T06:26:40.654-07:00</updated><title type='text'>Steve Jobs Died Today</title><content type='html'>&lt;img width="560" src="http://images.mirror.co.uk/upl/m4/oct2011/4/6/tribute-to-steve-job-made-from-macbook-parts-pic-rex-features-414872500.jpg"&gt;&lt;br /&gt;Made from MacBook parts.&lt;br /&gt;&lt;br /&gt;&lt;object style="height: 390px; width: 640px;"&gt;&lt;param name="movie" value="http://www.youtube.com/v/UF8uR6Z6KLc?version=3"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/UF8uR6Z6KLc?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="560" height="320"&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I was never a big fan of the restrictiv Apple strategy and the Steve Jobs hype until I saw this video on TED earlier this year. Great story.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-3292981241951466124?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/3292981241951466124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/steve-jobs-died-today.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3292981241951466124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3292981241951466124'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/steve-jobs-died-today.html' title='Steve Jobs Died Today'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-8936502156543661203</id><published>2011-10-06T09:07:00.000-07:00</published><updated>2011-10-16T06:01:16.175-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mushroom'/><category scheme='http://www.blogger.com/atom/ns#' term='vegetarian'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Cooking: Parasol Mushroom (Schirmpilz)</title><content type='html'>The parasol mushroom is very common, easy to spot,&amp;nbsp;hard to misstake and got a unique yummy taste.&lt;br /&gt;It is best to treat it like a schnitzel. Clean it, bath it into a bowl of scrambled eggs and coat it with bread crumbs.&lt;br /&gt;Put enough oil in a pan and fry it till deep brown.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-71898pJxfJ8/To3QopFw6-I/AAAAAAAAAC8/VeuBPgnHCes/s1600/mushroom_parasol_nature_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-71898pJxfJ8/To3QopFw6-I/AAAAAAAAAC8/VeuBPgnHCes/s320/mushroom_parasol_nature_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-RMKQOH91qV4/To3QwLxx1DI/AAAAAAAAADA/7OxfjYwUHQE/s1600/mushroom_parasol_eggandbreadcrups_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-RMKQOH91qV4/To3QwLxx1DI/AAAAAAAAADA/7OxfjYwUHQE/s320/mushroom_parasol_eggandbreadcrups_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-QLb98evrFTY/To3Q0wc1FRI/AAAAAAAAADE/J6N2yxycAXA/s1600/mushroom_parasol_fried_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-QLb98evrFTY/To3Q0wc1FRI/AAAAAAAAADE/J6N2yxycAXA/s320/mushroom_parasol_fried_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Synonyms: Macrolepiota procera, parasol mushroom, schirmpilz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-8936502156543661203?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/8936502156543661203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/cooking-parasol-mushroom-schirmpilz.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8936502156543661203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8936502156543661203'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/cooking-parasol-mushroom-schirmpilz.html' title='Cooking: Parasol Mushroom (Schirmpilz)'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-71898pJxfJ8/To3QopFw6-I/AAAAAAAAAC8/VeuBPgnHCes/s72-c/mushroom_parasol_nature_w600.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-6270789017716314055</id><published>2011-10-04T14:13:00.000-07:00</published><updated>2011-10-04T14:13:15.533-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Eclipse: Exclude Packages From Autocomplete and Organize Imports</title><content type='html'>If you are programming SWT there are allways this nasty AWT classes that come up when using the autocomplete (Ctrl + Space) or organize imports (&lt;a href="http://strangeoptics.blogspot.com/2011/09/best-of-short-cuts-for-eclipse-ctrl.html"&gt;Ctrl + Shift + O&lt;/a&gt;). Sometimes they are even in the first line of the result.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wr9QH5JaX-A/TotzVrP-8jI/AAAAAAAAAC0/5H2_DpXXsy8/s1600/eclipse_filter_awt_0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="100" src="http://2.bp.blogspot.com/-wr9QH5JaX-A/TotzVrP-8jI/AAAAAAAAAC0/5H2_DpXXsy8/s400/eclipse_filter_awt_0.png" width="500" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-GUfGfNZgiy8/Totz5lM4KyI/AAAAAAAAAC4/j6PGA_JOswo/s1600/eclipse_filter_awt_1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-GUfGfNZgiy8/Totz5lM4KyI/AAAAAAAAAC4/j6PGA_JOswo/s1600/eclipse_filter_awt_1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;If you want to get ride of it or other undesireable packages use &lt;b&gt;Type Filters&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Preferences -&amp;gt; Java -&amp;gt; Appearance -&amp;gt; Type Filters&lt;br /&gt;Add... the &amp;nbsp;&lt;i&gt;java.awt.*&lt;/i&gt;&amp;nbsp; package.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-6270789017716314055?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/6270789017716314055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/eclipse-exclude-packages-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6270789017716314055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6270789017716314055'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/eclipse-exclude-packages-from.html' title='Eclipse: Exclude Packages From Autocomplete and Organize Imports'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-wr9QH5JaX-A/TotzVrP-8jI/AAAAAAAAAC0/5H2_DpXXsy8/s72-c/eclipse_filter_awt_0.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-8737472068721753288</id><published>2011-10-04T13:34:00.000-07:00</published><updated>2011-10-04T13:34:32.964-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Music From A Single Line Of C-Code</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="480" src="http://www.youtube.com/embed/GtQdIYUtAHg" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.motherboard.tv/2011/9/29/minimalism-worship-these-sweet-loops-were-made-with-only-one-line-of-code?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+Motherboard+%28MOTHERBOARD%29"&gt;Now there are coders experimenting with “oneliners,” programs of around 16 bytes in size that accomplish what they need to in a single line of C. By running the code through an 8 kHz audio channel, demoscener viznut and others discovered these raw loops of entrancingly garbled computer music.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-8737472068721753288?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/8737472068721753288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/music-from-single-line-of-c-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8737472068721753288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8737472068721753288'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/music-from-single-line-of-c-code.html' title='Music From A Single Line Of C-Code'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/GtQdIYUtAHg/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-4999394198026341939</id><published>2011-10-04T10:28:00.000-07:00</published><updated>2011-10-16T06:01:30.387-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mushroom'/><category scheme='http://www.blogger.com/atom/ns#' term='vegetarian'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Cooking: Common Puffball (Flaschenstäubling)</title><content type='html'>This mushroom is one I collected never before. The wood is full of this little ones and it would be a shame to leaf them out.&amp;nbsp;It is a good edible mushroom when young and insde homogeneous and white.&lt;br /&gt;You can fry it with onions or use it in a soup.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-iFJjcZ4Eq8E/Tos-JpJ02iI/AAAAAAAAACk/eHqyN37xv-g/s1600/flaschenstaubling_01_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-iFJjcZ4Eq8E/Tos-JpJ02iI/AAAAAAAAACk/eHqyN37xv-g/s320/flaschenstaubling_01_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MurapPM2eLE/Tos-OVGtnAI/AAAAAAAAACo/7hDqlwPTMXo/s1600/flaschenstaubling_auf_brett_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-MurapPM2eLE/Tos-OVGtnAI/AAAAAAAAACo/7hDqlwPTMXo/s320/flaschenstaubling_auf_brett_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-haQEcCckg1E/Tos-UwgV9CI/AAAAAAAAACs/HQsiYqGxu4Y/s1600/flaschenstaubling_geschnitten_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://4.bp.blogspot.com/-haQEcCckg1E/Tos-UwgV9CI/AAAAAAAAACs/HQsiYqGxu4Y/s320/flaschenstaubling_geschnitten_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PCb8paDQoIE/Tos-aUjWghI/AAAAAAAAACw/54dCAwUSHM0/s1600/flaschenstaubling_gebraten_w600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-PCb8paDQoIE/Tos-aUjWghI/AAAAAAAAACw/54dCAwUSHM0/s320/flaschenstaubling_gebraten_w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Synonyms: Lycoperdon perlatum, common puffball, warted puffball, gem-studded puffball or devil's snuff-box&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-4999394198026341939?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/4999394198026341939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/cooking-common-puffball.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4999394198026341939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4999394198026341939'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/10/cooking-common-puffball.html' title='Cooking: Common Puffball (Flaschenstäubling)'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-iFJjcZ4Eq8E/Tos-JpJ02iI/AAAAAAAAACk/eHqyN37xv-g/s72-c/flaschenstaubling_01_w600.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-2502608704891228012</id><published>2011-09-30T13:25:00.000-07:00</published><updated>2011-10-02T12:24:25.781-07:00</updated><title type='text'>Quick SQL Reference</title><content type='html'>I know SQL very well, the idea of the basic operations and how I can combine them to achive on a higher level nearly everyting I need. But I have a bad memory about the exact syntax. Allways asking me how do I have to write the UPDATE statement?&lt;br /&gt;This Post is a quick lookup of the SQL-Syntax.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;colgroup&gt;  &lt;col width="140"&gt;&lt;/col&gt;  &lt;col width="400"&gt;&lt;/col&gt; &lt;/colgroup&gt; &lt;thead&gt;&lt;tr&gt;   &lt;th&gt;key&lt;/th&gt;   &lt;th&gt;example&lt;/th&gt;  &lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;CREATE TABLE&lt;/td&gt;  &lt;td&gt;CREATE TABLE table_name ('column1' NVARCHAR(32), &lt;br /&gt;&lt;br /&gt;'column2' NUMBER, ... )&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;DROP TABLE&lt;/td&gt;  &lt;td&gt;DROP TABLE table_name&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;TRUNCATE TABLE&lt;/td&gt;  &lt;td&gt;TRUNCATE TABLE table_name&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;INSERT INTO&lt;/td&gt;  &lt;td&gt;INSERT INTO table_name(column1, column2, ...) &lt;br /&gt;&lt;br /&gt;VALUES(value1, value2, ...) &lt;br /&gt;WHERE ...&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;UPDATE&lt;/td&gt;  &lt;td&gt;UPDATE table_name &lt;br /&gt;SET column1=value1 &lt;br /&gt;WHERE&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;DELETE FROM&lt;/td&gt;  &lt;td&gt;DELETE FROM table_name &lt;br /&gt;WHERE ...&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Data Types&lt;/b&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm#i54330"&gt;Oracle&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.6/en/data-types.html"&gt;MySQL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Editors&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/datatools/"&gt;Eclipse Data Tools Platform (DTP)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.sqlexplorer.org/"&gt;Eclipse SQL Explorer&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-2502608704891228012?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/2502608704891228012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/quick-sql-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/2502608704891228012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/2502608704891228012'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/quick-sql-reference.html' title='Quick SQL Reference'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-590991904498516991</id><published>2011-09-30T07:37:00.000-07:00</published><updated>2011-09-30T15:26:22.553-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>How To Change @Author In Eclipse Templates</title><content type='html'>I have the problem of working with one project on multiple computers with different system user names.&lt;br /&gt;This ends up in inconsisten javadoc comments where the tag @author get mixed up with all the system user names.&lt;br /&gt;&lt;br /&gt;There are two solutions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Change the system user name localy for the virtual machine Eclipse is running on.&lt;/b&gt;&lt;br /&gt;This is the quick and dirty method, but it works globally.&lt;br /&gt;&lt;br /&gt;Open your &lt;i&gt;eclipse.ini&lt;/i&gt; file and add the following line after &lt;i&gt;-vmargs&lt;/i&gt;:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;-Duser.name = your name&lt;/i&gt; &lt;br /&gt;&lt;br /&gt;The dirty part is that it overrides the user.name property which is used by some plugins that need to know the system user name you logged into the underlying OS. This could break them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Change the templates in Eclipse&lt;/b&gt;&lt;br /&gt;This hardcodes your user name into all the templates you want to change your name. But the templates are ex-, and importable. Define it once use it everywhere.&lt;br /&gt;I know 2 templates with @author so far.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2.1 New Type Comment Template&lt;/b&gt;&lt;br /&gt;Window -&amp;gt; Preferences -&amp;gt; Java -&amp;gt; Code Style -&amp;gt; Code Templates -&amp;gt; Comments -&amp;gt; Types&lt;br /&gt;Press 'Edit...'&lt;br /&gt;Change &amp;nbsp;&lt;i&gt;@author ${user}&lt;/i&gt; &amp;nbsp;to &amp;nbsp;&lt;i&gt;@author your name&lt;/i&gt;&lt;br /&gt;If the Dialog is closed you can check the check box 'automatically add comments for new methods and types'.&lt;br /&gt;&lt;br /&gt;Here you have the option to configure project specific templates. There is a link in the upper right corner 'Configure Project Specific Settings'.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2.2 @author Template&lt;/b&gt;&lt;br /&gt;Window -&amp;gt; Preferences -&amp;gt; Java -&amp;gt; Editor -&amp;gt; Templates&lt;br /&gt;Select in the list the template with the name '@author' .&lt;br /&gt;Press 'Edit...'&lt;br /&gt;Change &amp;nbsp;&lt;i&gt;@author ${user}&lt;/i&gt; &amp;nbsp;to &amp;nbsp;&lt;i&gt;@author your name&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-590991904498516991?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/590991904498516991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-change-author-in-eclipse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/590991904498516991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/590991904498516991'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-change-author-in-eclipse.html' title='How To Change @Author In Eclipse Templates'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-5285679288637197540</id><published>2011-09-27T09:54:00.000-07:00</published><updated>2011-09-27T13:11:21.948-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='RCP'/><title type='text'>JFace: A Viewer For Composites</title><content type='html'>JFace comes along with these nice Viewers. They build up the next layer ontop of the standard widgets. You are setting you business objects into a Viewer and it knows from its &lt;i&gt;Label&lt;/i&gt;- and &lt;i&gt;ContentProvider &lt;/i&gt;how to handle them. &lt;br /&gt;&lt;br /&gt;A &lt;i&gt;Table &lt;/i&gt;got its &lt;i&gt;TableViewer &lt;/i&gt;a &lt;i&gt;Tree &lt;/i&gt;its &lt;i&gt;TreeViewer&lt;/i&gt;, ...&lt;br /&gt;Wouldn't it bee nice to have such a &lt;i&gt;Viewer &lt;/i&gt;for&amp;nbsp;&lt;i&gt;Composites&lt;/i&gt;?&lt;br /&gt;You stuff you business object into it like a &lt;i&gt;Person&lt;/i&gt; object&amp;nbsp;and it knows how to display it. The next time you stuff a &lt;i&gt;Project&lt;/i&gt; object&lt;i&gt;&amp;nbsp;&lt;/i&gt;into it and you see an UI representation of it.&lt;br /&gt;&lt;br /&gt;If you like the idea, have a look at my classes&lt;i&gt;&amp;nbsp;&lt;/i&gt;and read further.&lt;br /&gt;Viewer: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/jface/viewers/CompositeViewer.java"&gt;CompositeViewer&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;ContentProvider: &amp;nbsp;&lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/jface/viewers/ICompositeProvider.java"&gt;ICompositeProvider&lt;/a&gt;&lt;br /&gt;LabelProvider: &amp;nbsp; &amp;nbsp; Your Composites that draws the UI for the business object.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; They have to implement&amp;nbsp;the interface &lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/widgets/IInput.java"&gt;IInput&lt;/a&gt;&amp;nbsp;or extends the&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class &lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/widgets/CompositeInput.java"&gt;CompositeInput&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to use the CompositeViewer:&lt;br /&gt;&lt;br /&gt;Instantiate it and give it a size, because it is empty.&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; compViewer = new CompositeViewer(parent, SWT.BORDER);  &lt;br /&gt; compViewer.setCompositeProvider(new CompositeProviderPersonProject());  &lt;br /&gt; compViewer.setLayoutData(createGridDataForInputFields(200, 200));  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The &lt;i&gt;ICompositeContentProvider &lt;/i&gt;implementation looks like this.&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; public class CompositeProviderPersonProject implements ICompositeProvider {  &lt;br /&gt;      @Override  &lt;br /&gt;      public Class&amp;lt;?&amp;gt; getCompositeClass(Object o) {  &lt;br /&gt;           if(o.getClass() == Person.class) {  &lt;br /&gt;                return CompositePerson.class;  &lt;br /&gt;           }  &lt;br /&gt;           if(o.getClass() == Project.class) {  &lt;br /&gt;                return CompositeProject.class;  &lt;br /&gt;           }  &lt;br /&gt;           return null;  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If you place a &lt;i&gt;Person &lt;/i&gt;object.&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; compViewer.setInput(new Person("strange", "optics", 35, 'M'));  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-EezDtmV7eAY/ToH_fBlvYZI/AAAAAAAAACc/DeiOBADPGMA/s1600/CompositeViewerPerson.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-EezDtmV7eAY/ToH_fBlvYZI/AAAAAAAAACc/DeiOBADPGMA/s1600/CompositeViewerPerson.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;If you place a &lt;i&gt;Project &lt;/i&gt;object.&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; compViewer.setInput(new Project("Strangewt", "More programming convinience!"));  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xV7eHirO73E/ToH_kQWTn2I/AAAAAAAAACg/jmnOSbe6b8o/s1600/CompositeViewerProject.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-xV7eHirO73E/ToH_kQWTn2I/AAAAAAAAACg/jmnOSbe6b8o/s1600/CompositeViewerProject.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-5285679288637197540?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/5285679288637197540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/jface-viewer-for-composites.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5285679288637197540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/5285679288637197540'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/jface-viewer-for-composites.html' title='JFace: A Viewer For Composites'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-EezDtmV7eAY/ToH_fBlvYZI/AAAAAAAAACc/DeiOBADPGMA/s72-c/CompositeViewerPerson.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-8833227114688886436</id><published>2011-09-26T12:10:00.000-07:00</published><updated>2011-10-04T13:18:30.192-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='RCP'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>SWT: More Convenience Please</title><content type='html'>Are you bored like me writing tons of code for simple formular oriented UI's?&lt;br /&gt;SWT forces us to write more lines of code and specify more parameters than necessary.&lt;br /&gt;Here is one simple example:&lt;br /&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; Label label = new Label(parent, SWT.NONE);  &lt;br /&gt; label.setText("labelname");  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;First questions that come up are:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Why do I have to specify allways the style parameter when it is in 99.9% of all cases &lt;i&gt;SWT.NONE&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Why do I have to create a reference 'label' and set the text of the &lt;i&gt;Label&lt;/i&gt; in a second line and not in the constructor.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The guys from SWT missed out the chance to make there classes convenient with one or two more&amp;nbsp;constructors for every widget. Next code snippet shows the minimum constructor for the &lt;i&gt;Label &lt;/i&gt;class.&lt;br /&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; new Label(parent, "labelname");  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So we have to do something. A convenient method is the answer. Look how efficient the code is. We save more than half of the key strokes.&lt;br /&gt;The idea is actually using the factory method pattern from the Gof (Gang of Four) in a not so narrow sense.&lt;br /&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; createLabel(parent, "labelname");  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here a more complex example. This is a typical task for the UI. A label and text field, multiline textfield where the label is on top of its column and another multiline textfield with two labels. First could be the name an the second an explanation.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/--Zldd3VuUKA/ToDMizPBJ5I/AAAAAAAAACY/nNkFZ4EakD4/s1600/CompositeBase.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/--Zldd3VuUKA/ToDMizPBJ5I/AAAAAAAAACY/nNkFZ4EakD4/s1600/CompositeBase.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The usual code:&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; Group group0 = new Group(parent, SWT.NONE);  &lt;br /&gt; group0.setText("group0");  &lt;br /&gt; group0.setLayout( new GridLayout(2, false));  &lt;br /&gt; group0.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));&lt;br /&gt;  &lt;br /&gt; Label label0 = new Label(group0, SWT.NONE);  &lt;br /&gt; label0.setText("label0");  &lt;br /&gt; Text text0 = new Text(group0, SWT.BORDER);  &lt;br /&gt; text0.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));&lt;br /&gt;  &lt;br /&gt; Label label1 = new Label(group0, SWT.NONE);  &lt;br /&gt; label1.setText("label1");  &lt;br /&gt; label1.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));  &lt;br /&gt; Text text1 = new Text(group0, SWT.V_SCROLL | SWT.MULTI | SWT.WRAP | SWT.BORDER);  &lt;br /&gt; GridData gd1 = new GridData(SWT.FILL, SWT.CENTER, true, false);  &lt;br /&gt; gd1.heightHint = 50;  &lt;br /&gt; text1.setLayoutData(gd1);&lt;br /&gt;  &lt;br /&gt; Label label2 = new Label(group0, SWT.NONE);  &lt;br /&gt; label2.setText("label2");  &lt;br /&gt; label2.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));  &lt;br /&gt; Text text2 = new Text(group0, SWT.V_SCROLL | SWT.MULTI | SWT.WRAP | SWT.BORDER);  &lt;br /&gt; GridData gd2 = new GridData(SWT.FILL, SWT.CENTER, true, false);  &lt;br /&gt; gd2.heightHint = 50;  &lt;br /&gt; gd2.verticalSpan = 2;  &lt;br /&gt; text2.setLayoutData(gd2);  &lt;br /&gt; Label label3 = new Label(group0, SWT.NONE);  &lt;br /&gt; label3.setText("label3");  &lt;br /&gt; label3.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The convenient code:&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; Group group1 = createGroup(parent, "group1", 2);&lt;br /&gt;  &lt;br /&gt; createLabel(group1, "label0");  &lt;br /&gt; createText(group1);  &lt;br /&gt; &lt;br /&gt; createLabelTop(group1, "label1");  &lt;br /&gt; createTextField(group1, 0, 50);  &lt;br /&gt; &lt;br /&gt; createLabelTop(group1, "label2");  &lt;br /&gt; createTextField(group1, 0, 50, 1, 2);  &lt;br /&gt; createLabelTop(group1, "label3");  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For this purpose I created &lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/widgets/CompositeBase.java"&gt;CompositeBase&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/widgets/GroupBase.java"&gt;GroupBase&lt;/a&gt;&amp;nbsp;classes to extend from. If you just want to have the create methods use the &lt;a href="http://code.google.com/p/strangewt/source/browse/trunk/org.strangewt/src/org/strangewt/widgets/WidgetHelper.java"&gt;WidgetHelper&lt;/a&gt;. &lt;br /&gt;The WidgetHelper implements everything as static methods. With a static import for this class, you don't have to prefix every method with the class name.&lt;br /&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 static org.strangewt.widgets.WidgetHelper.*;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;But be aware, Eclipse breaks down a static import when using 'organise imports' Ctrl + Shift + O.&lt;br /&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/09/best-of-short-cuts-for-eclipse-ctrl.html#organiseimports"&gt;To fix this problem read this&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-8833227114688886436?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/8833227114688886436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/swt-more-convenience-please.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8833227114688886436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8833227114688886436'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/swt-more-convenience-please.html' title='SWT: More Convenience Please'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/--Zldd3VuUKA/ToDMizPBJ5I/AAAAAAAAACY/nNkFZ4EakD4/s72-c/CompositeBase.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-6221387577060363308</id><published>2011-09-23T13:20:00.000-07:00</published><updated>2011-09-23T13:28:26.360-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='RCP'/><title type='text'>Eclipse RCP: All My Registries</title><content type='html'>Using SWT you have to care about your operating system resources such as fonts, colors and images.&lt;br /&gt;Fortunately JFace provides you with a set of registries, for every resource one &lt;i&gt;FontRegistry&lt;/i&gt;, &lt;i&gt;ColorRegistry &lt;/i&gt;and &lt;i&gt;ImageRegistry&lt;/i&gt;. The resources are created lazily when they get accessed and are disposed automatically when the display is disposed.&lt;br /&gt;There are global registries but to avoid conflicting keys you should use private instances.&lt;br /&gt;&lt;br /&gt;Here one Example of the usage of an ImageRegistry:&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; ImageRegistry imgReg = new ImageRegistry();  &lt;br /&gt; imgReg.put("avatar", ImageDescriptor.createFromURL(  &lt;br /&gt;    FileLocator.find(bundle, new Path("icons/avatar.jpg"), null)));  &lt;br /&gt; Image avatar = imgReg.get("avatar");  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You have to instantiate the registry locally, if you want to use it somewhere else you have to make a singleton for it.&lt;br /&gt;The metod &lt;i&gt;put(String key, ImageDescriptor descriptor)&lt;/i&gt;&amp;nbsp;takes an &lt;i&gt;ImageDescriptor &lt;/i&gt;as an argument, but your image files are normally located in your plugin. You have to get the bundle for the location.&lt;br /&gt;Lot of stuff for just a picture.&lt;br /&gt;&lt;br /&gt;Wouldn't it be more easy to have just one singleton for all the registries with lots of convenient methods that take care of alle the specialities like the location of your files?&lt;br /&gt;&lt;br /&gt;Have a look at my &lt;i&gt;Registries&lt;/i&gt; class:&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.strangewt.jface.resource;&lt;br /&gt;/**  &lt;br /&gt;  * Manages all Registries from JFace. &amp;lt;br&amp;gt;  &lt;br /&gt;  * - ColorRegistry &amp;lt;br&amp;gt;  &lt;br /&gt;  * - FontRegistry &amp;lt;br&amp;gt;  &lt;br /&gt;  * - ImageRegistry &amp;lt;br&amp;gt;  &lt;br /&gt;  * First use must be after the &amp;lt;code&amp;gt;Display&amp;lt;/code&amp;gt; has been created, this can  &lt;br /&gt;  * be usually done in the method &amp;lt;code&amp;gt;IApplication.start()&amp;lt;/code&amp;gt; of the  &lt;br /&gt;  * RCP-Bundles. Afterwards you can set up all your colors, fonts and images by  &lt;br /&gt;  * passing over a derived Object from the &amp;lt;code&amp;gt;IRegistriesConfiguration&amp;lt;/code&amp;gt;  &lt;br /&gt;  * interface.  &lt;br /&gt;  */  &lt;br /&gt; public class Registries {  &lt;br /&gt;      protected static ColorRegistry colorReg;  &lt;br /&gt;      protected static FontRegistry fontReg;  &lt;br /&gt;      protected static ImageRegistry imgReg;  &lt;br /&gt;      private static Bundle bundle;  &lt;br /&gt;      private static Registries instance;  &lt;br /&gt;      private Registries() {  &lt;br /&gt;           colorReg = new ColorRegistry();  &lt;br /&gt;           fontReg = new FontRegistry();  &lt;br /&gt;           imgReg = new ImageRegistry();  &lt;br /&gt;      }  &lt;br /&gt;      /**  &lt;br /&gt;       * Is used to determine the root folder of the application. Get the bundle  &lt;br /&gt;       * from &amp;lt;code&amp;gt;Activator.getDefault().getBundle()&amp;lt;/code&amp;gt;  &lt;br /&gt;       */  &lt;br /&gt;      public static Registries getInstance(Bundle bundle) {  &lt;br /&gt;           Registries.bundle = bundle;  &lt;br /&gt;           return getInstance();  &lt;br /&gt;      }  &lt;br /&gt;      public static Registries getInstance() {  &lt;br /&gt;           if (instance == null) {  &lt;br /&gt;                instance = new Registries();  &lt;br /&gt;           }  &lt;br /&gt;           return instance;  &lt;br /&gt;      }  &lt;br /&gt;      public Registries init(IRegistriesConfiguration configurator) {  &lt;br /&gt;           configurator.configure(this);  &lt;br /&gt;           return this;  &lt;br /&gt;      }  &lt;br /&gt;      /**  &lt;br /&gt;       * @param path  &lt;br /&gt;       *      for example icons/background.jpg  &lt;br /&gt;       */  &lt;br /&gt;      public void putImage(String key, String path) {  &lt;br /&gt;           imgReg.put(key, ImageDescriptor.createFromURL(FileLocator.find(bundle,  &lt;br /&gt;                     new Path(path), null)));  &lt;br /&gt;      }  &lt;br /&gt;      public void putImage(String key, Image image) {  &lt;br /&gt;           imgReg.put(key, image);  &lt;br /&gt;      }  &lt;br /&gt;      public Image getImage(String key) {  &lt;br /&gt;           return imgReg.get(key);  &lt;br /&gt;      }  &lt;br /&gt;      public ImageDescriptor getImageDescriptor(String key) {  &lt;br /&gt;           return imgReg.getDescriptor(key);  &lt;br /&gt;      }  &lt;br /&gt;      public void putColor(String symbolicName, int red, int green, int blue) {&lt;br /&gt;           colorReg.put(symbolicName, new RGB(red, green, blue));&lt;br /&gt;      }&lt;br /&gt;      public void putColor(String symbolicName, RGB colorData) {  &lt;br /&gt;           colorReg.put(symbolicName, colorData);  &lt;br /&gt;      }  &lt;br /&gt;      /**  &lt;br /&gt;       * @param hexColorStr  &lt;br /&gt;       *      "00FF00"  &lt;br /&gt;       */  &lt;br /&gt;      public void putColor(String symbolicName, String hexColorStr) {  &lt;br /&gt;           Integer colorValue = Integer.parseInt(hexColorStr, 16);  &lt;br /&gt;           int red = (colorValue &amp;amp; 0xFF0000) &amp;gt;&amp;gt; 16;  &lt;br /&gt;           int green = (colorValue &amp;amp; 0x00FF00) &amp;gt;&amp;gt; 8;  &lt;br /&gt;           int blue = (colorValue &amp;amp; 0x0000FF);  &lt;br /&gt;           putColor(symbolicName, new RGB(red, green, blue));  &lt;br /&gt;      }  &lt;br /&gt;      public Color getColor(String key) {  &lt;br /&gt;           return colorReg.get(key);  &lt;br /&gt;      }  &lt;br /&gt;      /**  &lt;br /&gt;       * Looks up the registry if there is a color for the key. If not, a new  &lt;br /&gt;       * color is instanciated from the hex-representation.  &lt;br /&gt;       */  &lt;br /&gt;      public Color getColor(String key, String hexColorStr) {  &lt;br /&gt;           Color color = colorReg.get(key);  &lt;br /&gt;           if (color == null) {  &lt;br /&gt;                putColor(key, hexColorStr);  &lt;br /&gt;                color = colorReg.get(key);  &lt;br /&gt;           }  &lt;br /&gt;           return color;  &lt;br /&gt;      }  &lt;br /&gt;      public String getColorAsHex(String key) {  &lt;br /&gt;           String hexColorStr = null;  &lt;br /&gt;           Color color = getColor(key);  &lt;br /&gt;           if (color != null) {  &lt;br /&gt;                hexColorStr = toHex(color.getRGB());  &lt;br /&gt;           }  &lt;br /&gt;           return hexColorStr;  &lt;br /&gt;      }  &lt;br /&gt;      /**  &lt;br /&gt;       * Converts the color of an &amp;lt;code&amp;gt;RGB&amp;lt;/code&amp;gt; object into his hex values. &amp;lt;br&amp;gt;  &lt;br /&gt;       * RGB(0,255,0) -&amp;gt; "00FF00"  &lt;br /&gt;       */  &lt;br /&gt;      public String toHex(RGB rgb) {  &lt;br /&gt;           String hexColorStr = Integer.toHexString((rgb.red &amp;lt;&amp;lt; 16)  &lt;br /&gt;                     + (rgb.green &amp;lt;&amp;lt; 8) + rgb.blue);  &lt;br /&gt;           if (hexColorStr.length() == 4) {  &lt;br /&gt;                hexColorStr = "00" + hexColorStr;  &lt;br /&gt;           } else if (hexColorStr.length() == 2) {  &lt;br /&gt;                hexColorStr = "0000" + hexColorStr;  &lt;br /&gt;           }  &lt;br /&gt;           return hexColorStr;  &lt;br /&gt;      }  &lt;br /&gt;      public void putFont(String symbolicName, FontData fontData) {&lt;br /&gt;           fontReg.put(symbolicName, new FontData[] {fontData});&lt;br /&gt;      }&lt;br /&gt;      public void putFont(String symbolicName, FontData fontData[]) {  &lt;br /&gt;           fontReg.put(symbolicName, fontData);  &lt;br /&gt;      }  &lt;br /&gt;      public Font getFont(String key) {  &lt;br /&gt;           return fontReg.get(key);  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The configuration interface:&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.strangewt.jface.resource;  &lt;br /&gt; public interface IRegistriesConfiguration {  &lt;br /&gt;      /**  &lt;br /&gt;       * Gets passed over to the &amp;lt;code&amp;gt;Registries&amp;lt;/code&amp;gt; where it is used to  &lt;br /&gt;       * configure it self. Typical content: &amp;lt;br&amp;gt;  &lt;br /&gt;       * mr.putColor("active element", new RGB(0, 255, 0)); &amp;lt;br&amp;gt;  &lt;br /&gt;       * mr.putImage("dialog.header", "icons/background.jpg"); &amp;lt;br&amp;gt;  &lt;br /&gt;       * mr.putFont("view.headline", new FontData[] { new FontData("Tahoma", 10,  &lt;br /&gt;       * SWT.BOLD) });  &lt;br /&gt;       */  &lt;br /&gt;      public void configure(Registries registries);  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;To use it, you have to derive the interface and define your resources. Look how easy it is to put an image into the registry.&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; public class DemoRegistriesConfiguration implements IRegistriesConfiguration {  &lt;br /&gt;      @Override  &lt;br /&gt;      public void configure(Registries r) {  &lt;br /&gt;           r.putColor("red", 255, 0, 0);  &lt;br /&gt;           r.putImage("avatar", "/icons/avatar_strangeoptics.jpg");  &lt;br /&gt;           r.putFont("courier_bold", new FontData("Courier",10,SWT.BOLD));  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Then you have to instantiat the Registries class. Best location in the Aplication.start() method right after the Display is created.&lt;br /&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;Display display = PlatformUI.createDisplay();  &lt;br /&gt;Registries.getInstance(Activator.getDefault().getBundle()).init(&lt;br /&gt;new DemoRegistriesConfiguration());  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now you can use the image everywhere in your code.&lt;br /&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; Registries.getInstance().getImage("avatar")  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The source code is available in my svn repository at &lt;a href="http://code.google.com/p/strangewt/"&gt;google code&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-6221387577060363308?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/6221387577060363308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/eclipse-rcp-all-my-registries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6221387577060363308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6221387577060363308'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/eclipse-rcp-all-my-registries.html' title='Eclipse RCP: All My Registries'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-4066607740640789595</id><published>2011-09-21T13:25:00.000-07:00</published><updated>2011-09-21T13:27:34.582-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>How To Make An In-Page-Link</title><content type='html'>Linking from one web page to another is the fabric the web is made of. But sometimes this is to coars. Sometimes your informations are on just one page but heavily interrelated.&lt;br /&gt;Thinking of a table of contents for a closed topic you don't want to split up into single pages because every chapter is in the size of a couple of lines.&lt;br /&gt;&lt;br /&gt;The solution are in page links. There are two ways of doing this. The old anchor way or the new xhtml compliant way.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Old stuff first&lt;/b&gt;&lt;br /&gt;This is not recommended anymore because not all browsers support the anchors anymore.&lt;br /&gt;Place the anchor:&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; &amp;lt;a name="headline1"&amp;gt;This Is About Deprecated Anchors&amp;lt;/a&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Place the Link:&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; &amp;lt;a href="#headline1"&amp;gt;Anchors&amp;lt;/a&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;New XHTML Compliant&lt;/b&gt;&lt;br /&gt;Target:&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; &amp;lt;div id="headline2"&amp;gt;  &lt;br /&gt;    The New Way To Code In-Page-Links  &lt;br /&gt; &amp;lt;/div&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Link:&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; &amp;lt;a href="#headline2"&amp;gt;the new way&amp;lt;/a&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Link from another web page:&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;a href="anotherwebpage.html#headline2"&amp;gt;the new way&amp;lt;/a&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-4066607740640789595?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/4066607740640789595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-make-in-page-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4066607740640789595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4066607740640789595'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-make-in-page-link.html' title='How To Make An In-Page-Link'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-36924223667400433</id><published>2011-09-21T12:11:00.000-07:00</published><updated>2011-10-08T15:12:25.844-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Getting Started With Android: Part3 - User Interface</title><content type='html'>In this part I will show you how the UI is build up.&lt;br /&gt;&lt;br /&gt;You have two options, declarativ or programatic. Both have there benefits and drawbacks, in some cases it is impossible to declare it. But your first and preferred option should be the declarativ way.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Declarativ&lt;/span&gt;&lt;br /&gt;Benefits:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Clean separation of logic and UI&lt;/li&gt;&lt;li&gt;Usage of the visual designer.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The UI is declared in a XML layout file. All the layout files of an application are stored in the &lt;i&gt;res/layouts&lt;/i&gt; folder.&lt;br /&gt;The default layout file that gets created for every new application is called &lt;i&gt;main.xml&lt;/i&gt;.&lt;br /&gt;Lets have a look into ours. If you double click on the file in the resource tree, the visual designer will open up. It takes some time but you have a nice graphical representation of it.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Txj1UAFrO30/Tnowxth_dQI/AAAAAAAAACU/Rnq79FzlchQ/s1600/visual+designer.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="184" src="http://4.bp.blogspot.com/-Txj1UAFrO30/Tnowxth_dQI/AAAAAAAAACU/Rnq79FzlchQ/s320/visual+designer.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;For the moment we are more interested in the plain xml. Switch the bottom tabs from 'Graphical Layout' to 'main.xml'.&lt;br /&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; &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;  &lt;br /&gt; &amp;lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  &lt;br /&gt;   android:orientation="vertical"  &lt;br /&gt;   android:layout_width="fill_parent"  &lt;br /&gt;   android:layout_height="fill_parent"  &lt;br /&gt;   &amp;gt;  &lt;br /&gt;      &amp;lt;TextView   &lt;br /&gt;        android:layout_width="fill_parent"   &lt;br /&gt;        android:layout_height="wrap_content"   &lt;br /&gt;        android:text="@string/hello"  &lt;br /&gt;        /&amp;gt;  &lt;br /&gt; &amp;lt;/LinearLayout&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Layouts&lt;/b&gt;&lt;br /&gt;&lt;i&gt;LinearLayout&lt;/i&gt; is a layout type. There are a lot of layout types like:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;LinearLayout&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;RelativeLayout&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;FrameLayout&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;TableLayout&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Layouts are containers for other &lt;i&gt;Views &lt;/i&gt;that arange their child &lt;i&gt;Views&lt;/i&gt;&amp;nbsp;in different ways.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Views&lt;/b&gt;&lt;br /&gt;TextView is a class that derives from &lt;i&gt;View&lt;/i&gt;. &lt;i&gt;Views&lt;/i&gt;&amp;nbsp;are the basic classes for the UI. Even Layouts are derived from &lt;i&gt;View&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TextView&lt;/li&gt;&lt;li&gt;ImageView&lt;/li&gt;&lt;li&gt;Button&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;To assign a layout to an &lt;i&gt;Activity &lt;/i&gt;we have a look into our &lt;i&gt;HelloWorldActivity &lt;/i&gt;from Part2. We find the callback method &lt;i&gt;onCreate(). T&lt;/i&gt;hat is called from the &lt;i&gt;Activity &lt;/i&gt;at the time it changes from the state Create to Running. This happens exactly once in the life cycle of every &lt;i&gt;Activity&lt;/i&gt;.&lt;br /&gt;Here we initialize our &lt;i&gt;Activity&lt;/i&gt;.&lt;br /&gt;In line 4 we tell the Activity that it should inflate from the resources the R.layouts.main layout.&lt;br /&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;1:  @Override  &lt;br /&gt;2:  public void onCreate(Bundle savedInstanceState) {  &lt;br /&gt;3:      super.onCreate(savedInstanceState);  &lt;br /&gt;4:      setContentView(R.layout.main);  &lt;br /&gt;5:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;To get access to the inflated Views the &lt;i&gt;View &lt;/i&gt;must have an id. Go to the layout and add &lt;i&gt;android:id="@+id/text1" &lt;/i&gt;to the tag of the &lt;i&gt;TextView&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;&lt;pre style="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; &amp;lt;TextView android:id="@+id/text1"  &lt;br /&gt;        android:layout_width="fill_parent"   &lt;br /&gt;        android:layout_height="wrap_content"   &lt;br /&gt;        android:text="@string/hello"  &lt;br /&gt;        /&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now you can use the method&lt;i&gt; findViewById()&lt;/i&gt; to obtain the instance of your desired view.&lt;br /&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; TextView textView = (TextView)findViewById(R.id.text1);  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Programatic&lt;/span&gt;&lt;br /&gt;Benefits:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Allows you to build up dynamic UIs like a month view of a callendar&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The same UI as above looks coded like this.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;   public void onCreate(Bundle savedInstanceState) {  &lt;br /&gt;     super.onCreate(savedInstanceState);  &lt;br /&gt; //    setContentView(R.layout.main);  &lt;br /&gt;&lt;br /&gt;     LinearLayout layout = new LinearLayout(this);  &lt;br /&gt;     layout.setLayoutParams(new LayoutParams(&lt;br /&gt;          LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));  &lt;br /&gt;&lt;br /&gt;     TextView textView = new TextView(this);  &lt;br /&gt;     textView.setText("Hello World, HelloWorldActivity!");  &lt;br /&gt;     textView.setLayoutParams(new LayoutParams(&lt;br /&gt;          LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));  &lt;br /&gt;&lt;br /&gt;     layout.addView(textView);  &lt;br /&gt;     setContentView(layout);  &lt;br /&gt;   }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;As you can see, the layout parameter are lengthy and the code completion for the parameters that you have in the xml layout file is missing.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part0-why.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part3-user.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-36924223667400433?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/36924223667400433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part3-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/36924223667400433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/36924223667400433'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part3-user.html' title='Getting Started With Android: Part3 - User Interface'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Txj1UAFrO30/Tnowxth_dQI/AAAAAAAAACU/Rnq79FzlchQ/s72-c/visual+designer.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-197057706934405242</id><published>2011-09-20T12:16:00.000-07:00</published><updated>2011-09-20T12:17:40.230-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Productivity'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>How To Open Chrome With A Set Of Tabs</title><content type='html'>If you are like me you want to open your browser and getting a specific task done. Here are two examples.&lt;br /&gt;1. I want to research on some topics and aggregate the result in a document. Therefore I need open a tab with wikipedia and one with google docs.&lt;br /&gt;2. Or I want to write a new post in my blog. Therefore I need 4 tabs one with the dashboard of the blog, one for the blog itself, google docs for my research/outline and a dictionary.&lt;br /&gt;&lt;br /&gt;Wouldn't it be nice to open up the browser with the tabs for a special task opend? No boring searching and clicking all the bookmarks!&lt;br /&gt;&lt;br /&gt;The solution ist to start chrome with the parameter --homepage &amp;lt;url&amp;gt;&lt;br /&gt;&lt;br /&gt;To do this, go to the chrom icon on your desktop. Right click and make a short cut. Rename it like your task, in my case 'blogging'.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Y6tHMJgKdxc/Tnjk2Ms7W8I/AAAAAAAAACM/i_l44DK3jP8/s1600/3_chrome_icons.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-Y6tHMJgKdxc/Tnjk2Ms7W8I/AAAAAAAAACM/i_l44DK3jP8/s1600/3_chrome_icons.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Right click on one and choose preferences.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Jq8Fz5L_RZE/TnjjkMmoJXI/AAAAAAAAACI/uv3H_DastcE/s1600/eigenschaften.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-Jq8Fz5L_RZE/TnjjkMmoJXI/AAAAAAAAACI/uv3H_DastcE/s1600/eigenschaften.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Go to the property 'target' and add at the end of the line the argument.&lt;br /&gt;It should look like this:&lt;br /&gt;&lt;br /&gt;C:\Users\work\AppData\Local\Google\Chrome\Application\chrome.exe --homepage http://www.blogger.com/stats2.g?blogID=2438166163329174006 http://strangeoptics.blogspot.com/ https://docs.google.com/?hl=de&amp;amp;tab=wo&amp;amp;authuser=0#home http://dict.leo.org/ende?lp=ende&amp;amp;la&lt;br /&gt;&lt;br /&gt;You can add as much websites as you want, separated by a blank.&lt;br /&gt;&lt;br /&gt;Links to the guys from Chrom:&lt;br /&gt;&lt;a href="http://www.chromium.org/developers/how-tos/run-chromium-with-flags"&gt;The Chromium Projects - Run Chromium with switches&lt;/a&gt;&lt;br /&gt;&lt;a href="http://peter.sh/experiments/chromium-command-line-switches/"&gt;List of chromium command line switches&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-197057706934405242?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/197057706934405242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-open-chrome-with-set-of-tabs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/197057706934405242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/197057706934405242'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-open-chrome-with-set-of-tabs.html' title='How To Open Chrome With A Set Of Tabs'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Y6tHMJgKdxc/Tnjk2Ms7W8I/AAAAAAAAACM/i_l44DK3jP8/s72-c/3_chrome_icons.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7986964616264237293</id><published>2011-09-20T10:37:00.000-07:00</published><updated>2011-09-30T12:43:47.842-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vegetarian'/><category scheme='http://www.blogger.com/atom/ns#' term='recipe'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Potato-Egg-Salat</title><content type='html'>There are a million of potato salat recipes but this is one of my favorites.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-DVOiN3nRzgA/TnjJEkr9fmI/AAAAAAAAACA/6kZASH4Idbw/s1600/potatoeggsalat-ingridiens-w600.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://2.bp.blogspot.com/-DVOiN3nRzgA/TnjJEkr9fmI/AAAAAAAAACA/6kZASH4Idbw/s320/potatoeggsalat-ingridiens-w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-QXNpNVS79BQ/TnjOx2dYF-I/AAAAAAAAACE/Tr7PVY3xWYo/s1600/potatoeggsalat-finish-w600.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-QXNpNVS79BQ/TnjOx2dYF-I/AAAAAAAAACE/Tr7PVY3xWYo/s320/potatoeggsalat-finish-w600.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ingrediens:&lt;/b&gt; 2 Persons&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="100"&gt;250 g&lt;/td&gt;  &lt;td&gt;potatoes, sliced&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;2 &lt;/td&gt;  &lt;td&gt;green onion, sliced&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;2 &lt;/td&gt;  &lt;td&gt;pickeld cucumber, diced&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;6 &lt;/td&gt;  &lt;td&gt;radish, diced&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;2&lt;/td&gt;  &lt;td&gt;boiled eggs, diced&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;some&lt;/td&gt;  &lt;td&gt;chive&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Dressing:&lt;/b&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="100"&gt;1 Tbsp&lt;/td&gt;  &lt;td&gt;oil&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;150 g &lt;/td&gt;  &lt;td&gt;yoghurt&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;1 Tbsp &lt;/td&gt;  &lt;td&gt;lemon juice&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;1 Tbsp &lt;/td&gt;  &lt;td&gt;vinegar or pickeld cucumber juice&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;1 teaspoon &lt;/td&gt;  &lt;td&gt;sugar&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;salt, pepper&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Preparation:&lt;/b&gt;&lt;br /&gt;Put all ingrediens&amp;nbsp;together in a bowl.&lt;br /&gt;Mix all dressing ingidiends together and pour it over the salat and stir it.&lt;br /&gt;Leave it in the fridge for half an houre until the dressing is soaked in.&lt;br /&gt;Serve cold.&lt;br /&gt;&lt;br /&gt;&lt;b:if cond="data:blog.pageType == &amp;quot;item&amp;quot;"&gt;&lt;br /&gt;&lt;a href="javascript:window.print()"&gt;Print this post&lt;/a&gt;&lt;br /&gt;&lt;/b:if&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7986964616264237293?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7986964616264237293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/potato-egg-salat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7986964616264237293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7986964616264237293'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/potato-egg-salat.html' title='Potato-Egg-Salat'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-DVOiN3nRzgA/TnjJEkr9fmI/AAAAAAAAACA/6kZASH4Idbw/s72-c/potatoeggsalat-ingridiens-w600.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-6064268896187883735</id><published>2011-09-17T01:57:00.000-07:00</published><updated>2011-09-28T10:30:01.538-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Productivity'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Best Of Short Cuts For Eclipse: Ctrl + Shift + L</title><content type='html'>These are my most important short cuts after 8 years of busy java coding.&lt;br /&gt;Increase your productivity and impress your coworker.&lt;br /&gt;&lt;br /&gt;I will show you the &lt;a href="http://www.blogger.com/post-edit.g?blogID=2438166163329174006&amp;amp;postID=6064268896187883735#predefined"&gt; predefined &lt;/a&gt; short cuts, how to define &lt;a href="http://www.blogger.com/post-edit.g?blogID=2438166163329174006&amp;amp;postID=6064268896187883735#custom"&gt;your own&lt;/a&gt; and the way to &lt;a href="http://www.blogger.com/post-edit.g?blogID=2438166163329174006&amp;amp;postID=6064268896187883735#reuse"&gt;reuse&lt;/a&gt; them in all your eclipse IDE's.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" id="predefined" style="font-size: large;"&gt;Predefined Bindings&lt;/span&gt;&lt;br /&gt;You can find an official overview of the predifined short cuts by clicking under Help -&amp;gt; Key Assist or more apropriate with the following short cut Ctrl + Shift + L.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Changing the code:&lt;/b&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="200"&gt;Ctrl + D&lt;/td&gt;  &lt;td&gt;Delete Line&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Alt + Up/Down&lt;/td&gt;  &lt;td&gt;Duplicate Lines&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Alt + Up/Down&lt;/td&gt;  &lt;td&gt;Move Lines&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Alt + Shift + R&lt;/td&gt;  &lt;td&gt;Rename - Refactoring&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Z &lt;/td&gt;  &lt;td&gt;Undo&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Y&lt;/td&gt;  &lt;td&gt;Redo&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Shift + O &lt;/td&gt;  &lt;td&gt;Organise Imports&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Shift + F &lt;/td&gt;  &lt;td&gt;Format&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Space &lt;/td&gt;  &lt;td&gt;Content Assist&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + 7 &lt;/td&gt;  &lt;td&gt;Toggle Comment&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Navigating the code:&lt;/b&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="200"&gt;F3&lt;/td&gt;  &lt;td&gt;Open Declaration&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + mouse over&lt;/td&gt;  &lt;td&gt;Open Declaration, (Super) Implementation &lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl+T&lt;/td&gt;  &lt;td&gt;Quick Hierarchy (like above without a mouse)&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;F4&lt;/td&gt;  &lt;td&gt;Type Hierarchy&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Shift + T&lt;/td&gt;  &lt;td&gt;Open Type&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + K&lt;/td&gt;  &lt;td&gt;Find Next&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Shift + K&lt;/td&gt;  &lt;td&gt;Find Previous&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Alt + Left&lt;/td&gt;  &lt;td&gt;Backward History&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Alt + Right&lt;/td&gt;  &lt;td&gt;Foreward History&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl + Alt + H&lt;/td&gt;  &lt;td&gt;Open Call Hierachy&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div id="organiseimports"&gt;&lt;b&gt;Organise Imports&lt;/b&gt;&lt;/div&gt;Be aware, it removes static imports like the handy one for junit &lt;br /&gt;import static &lt;i&gt;org.junit.Assert.*;&lt;/i&gt;&lt;br /&gt;There are two solutions:&lt;br /&gt;1. You can fix this by going to Window -&amp;gt; Preferences -&amp;gt; Java -&amp;gt; Code Style -&amp;gt; Organize Imports&lt;br /&gt;There you change in the field 'Number of static imports needed for .*' the number of 99 to 1.&lt;br /&gt;&lt;a href="http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-organize-imports.htm"&gt;This is the number of static import statements that are allowed for static members of the same type before type is used.&lt;/a&gt;&lt;br /&gt;2. Another way is to use the favorites of the content assist function.&lt;br /&gt;Go to Window -&amp;gt; Preferences -&amp;gt; Java -&amp;gt; Editor -&amp;gt; Content Assist -&amp;gt; Favorites.&lt;br /&gt;Enter a 'New Type...' like '&lt;i&gt;org.junit.Assert.*&lt;/i&gt;'.&lt;br /&gt;When you use the next time the auto complete Ctrl + Space the it will propose those static members even if the import is missing.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Format&lt;/b&gt;&lt;br /&gt;You can find the configuration under Window -&amp;gt; Preferences -&amp;gt; Java -&amp;gt; Code Style -&amp;gt; Formatter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" id="custom" style="font-size: large;"&gt;Custom Bindings&lt;/span&gt;&lt;br /&gt;Go to Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Keys&lt;br /&gt;Alt + W  P  'keys'  down  down&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-3Z2twWVyrtw/Tnn6snixzJI/AAAAAAAAACQ/b-_PO4uvymE/s1600/define_key_binding.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="290" src="http://2.bp.blogspot.com/-3Z2twWVyrtw/Tnn6snixzJI/AAAAAAAAACQ/b-_PO4uvymE/s400/define_key_binding.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Here you can look up all available commands and their key binding. Look at the command 'Activate Editor' it has a binding for the key 'F12'. One line above, the command 'About' doesn't got one.&lt;br /&gt;&lt;br /&gt;We will add one binding step by step. In the filter field 'type filter text' type in 'generate'. Now the list shows 5 items. Select the command 'Generate Getters and Setters'.&lt;br /&gt;Go to the 'Binding' field. As you start to press a button it will come up there with a trailing +.&lt;br /&gt;If you press a combination of keys they get conncatenated in the order you pressed them with the +.&lt;br /&gt;For generating getters and setters I would naturaly choose Ctrl+Shift+G.&lt;br /&gt;This will lead to a conflict with the command 'References in Workspace'. Resolve it by choosing another key combination : Ctrl+Shift+S&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Suggested:&lt;/b&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="200"&gt;Ctrl+Shift+S&lt;/td&gt;  &lt;td&gt;Generate Getters an Setters&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Ctrl+Shift+E&lt;/td&gt;  &lt;td&gt;Show In (Package Explorer)&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" id="reuse" style="font-size: large;"&gt;Reuse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Go to File -&amp;gt; Export... -&amp;gt; General -&amp;gt; Preferences.&lt;br /&gt;Choose "Export all" or just "Keys Preferences".&lt;br /&gt;To import them works the same way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-6064268896187883735?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/6064268896187883735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/best-of-short-cuts-for-eclipse-ctrl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6064268896187883735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6064268896187883735'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/best-of-short-cuts-for-eclipse-ctrl.html' title='Best Of Short Cuts For Eclipse: Ctrl + Shift + L'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-3Z2twWVyrtw/Tnn6snixzJI/AAAAAAAAACQ/b-_PO4uvymE/s72-c/define_key_binding.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7497882882286462207</id><published>2011-09-16T15:24:00.000-07:00</published><updated>2011-09-21T12:14:57.825-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Getting Started With Android: Part2 - Hello World</title><content type='html'>In this part I show you how to create a project and to start it either in the emulator or on your phone.&lt;br /&gt;&lt;br /&gt;Click on the new button in the upper left corner.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-kErfWhGxd8I/TnPDfejegKI/AAAAAAAAABk/fxbXlBFKSVM/s1600/new+project+dropdown.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-kErfWhGxd8I/TnPDfejegKI/AAAAAAAAABk/fxbXlBFKSVM/s1600/new+project+dropdown.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the next dialog choose the 'Android Project' wizard.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-CnAjRtbljI4/TnPDkhzc13I/AAAAAAAAABo/YLyewz4LKuU/s1600/new+project+list.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-CnAjRtbljI4/TnPDkhzc13I/AAAAAAAAABo/YLyewz4LKuU/s1600/new+project+list.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now you have to give the Project a name. If you want to use the package name like I do usually, have a look at the Activity name. It is automaticaly derived from the project name but with the first letter in high case.&lt;br /&gt;org.android.helloworld &amp;nbsp;will get&amp;nbsp;Org.android.helloworldActivity.&lt;br /&gt;Fix it by hand or don't use the package as the project name.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Hst7U6EsW0w/TnPDushA0cI/AAAAAAAAABs/ZPnQ9Jq8scw/s1600/new+project+dialog.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-Hst7U6EsW0w/TnPDushA0cI/AAAAAAAAABs/ZPnQ9Jq8scw/s1600/new+project+dialog.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The resulting project structure looks like the following picture. I will tell you later about it.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-OFAHkxEQPOQ/TnPD4wxzzoI/AAAAAAAAABw/MBLsyBwP3ZA/s1600/helloworld+packageexplorer.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-OFAHkxEQPOQ/TnPD4wxzzoI/AAAAAAAAABw/MBLsyBwP3ZA/s1600/helloworld+packageexplorer.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Hit the debugg or run button.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Sm6DCFMWsaI/TnPKC6MFN5I/AAAAAAAAAB0/DOrwtrVYKOc/s1600/debugg+and+launch+buttons.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-Sm6DCFMWsaI/TnPKC6MFN5I/AAAAAAAAAB0/DOrwtrVYKOc/s1600/debugg+and+launch+buttons.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The emulator starts.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-1wKuE2Pu4dU/TnPLSXNFgFI/AAAAAAAAAB4/STTlFxwczc0/s1600/emulator+after+start.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="295" src="http://2.bp.blogspot.com/-1wKuE2Pu4dU/TnPLSXNFgFI/AAAAAAAAAB4/STTlFxwczc0/s320/emulator+after+start.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Drag the locker icon to the right. The screen shows your hello world app.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-JUFHTwwCQnc/TnPL6s8i1vI/AAAAAAAAAB8/qgU62hIaSBk/s1600/emulator+shows+hello+world.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-JUFHTwwCQnc/TnPL6s8i1vI/AAAAAAAAAB8/qgU62hIaSBk/s1600/emulator+shows+hello+world.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Viola your are done.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part0-why.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part3-user.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7497882882286462207?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7497882882286462207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7497882882286462207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7497882882286462207'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html' title='Getting Started With Android: Part2 - Hello World'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-kErfWhGxd8I/TnPDfejegKI/AAAAAAAAABk/fxbXlBFKSVM/s72-c/new+project+dropdown.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-8995093627381125540</id><published>2011-09-14T10:01:00.000-07:00</published><updated>2011-10-02T12:54:05.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vegetarian'/><category scheme='http://www.blogger.com/atom/ns#' term='recipe'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Cooking: Chili Sin Carne</title><content type='html'>This is the vegetarian version of chili con carne.&lt;br /&gt;&lt;br /&gt;Ingridiends:&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="100"&gt;150 g&lt;/td&gt;  &lt;td&gt;&lt;a href="http://en.wikipedia.org/wiki/Spelt"&gt;unripe spelt grains&lt;/a&gt; or just bulgur&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;600 ml&lt;/td&gt;  &lt;td&gt;vegetable stock&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;3 &lt;/td&gt;  &lt;td&gt;onions&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;3 &lt;/td&gt;  &lt;td&gt;cloves garlic&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;800 g &lt;/td&gt;  &lt;td&gt;canned tomatos&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;300 g &lt;/td&gt;  &lt;td&gt;canned corn&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;300 g &lt;/td&gt;  &lt;td&gt;canned kidney beans&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;3 Tbsp &lt;/td&gt;  &lt;td&gt;oil&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;1 teaspoon &lt;/td&gt;  &lt;td&gt;paprika powder&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;2 teaspoons &lt;/td&gt;  &lt;td&gt;tomato purée&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;2 teaspoons &lt;/td&gt;  &lt;td&gt;cummin, grounded&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;1 &lt;/td&gt;  &lt;td&gt;chili&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;2 &lt;/td&gt;  &lt;td&gt;capsicum&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Cook the unripe spelt grains with the vegetable stock for about 30 minutes.&lt;br /&gt;Pour the stock into a bowl and put it aside.&lt;br /&gt;&lt;br /&gt;Chop the onions and the garlic into small pieces. &lt;br /&gt;Heat oil in a deep pan and sauté the onions until soft add the garlic and cook for 2 more minutes.&lt;br /&gt;Dice the capsicum mean while.&lt;br /&gt;Add the grains and fry it for a short time.&lt;br /&gt;Now add the rest, tomato purée, paprika powder, cummin, tomatos, corn and the beans.&lt;br /&gt;Simmer it for 20 minutes.&lt;br /&gt;Add as much of the stock as you like.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #777777; font-family: Arial, Helvetica, Tahoma, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; line-height: 20px;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-8995093627381125540?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/8995093627381125540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/cooking-chili-sin-carne.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8995093627381125540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/8995093627381125540'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/cooking-chili-sin-carne.html' title='Cooking: Chili Sin Carne'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7151948359111735742</id><published>2011-09-12T08:45:00.000-07:00</published><updated>2011-09-13T09:46:51.563-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java: Sorting objects by multiple attributes</title><content type='html'>The best way to do this is by using the ComparatorChain from the &lt;a href="http://commons.apache.org/collections/"&gt;Apache Collections Framework&lt;/a&gt;.&lt;br /&gt;You have to implement for every attribute a Comparator that you add to the Chain in the order you need. Now you can use the chain like a normal Comparator.&lt;br /&gt;Here is how it looks like in code:&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.test.comparator;  &lt;br /&gt; public class Person {  &lt;br /&gt;      public Person(String name, int age) {  &lt;br /&gt;           this.name = name;  &lt;br /&gt;           this.age = age;  &lt;br /&gt;      }  &lt;br /&gt;      public String name;  &lt;br /&gt;      public Integer age;  &lt;br /&gt;      @Override  &lt;br /&gt;      public String toString() {  &lt;br /&gt;           return "[" + name + "|" + age + "]";  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&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.test.comparator;  &lt;br /&gt;   &lt;br /&gt; import java.util.ArrayList;  &lt;br /&gt; import java.util.Collections;  &lt;br /&gt; import java.util.Comparator;  &lt;br /&gt; import java.util.List;  &lt;br /&gt;   &lt;br /&gt; import org.apache.commons.collections.comparators.ComparatorChain;  &lt;br /&gt;   &lt;br /&gt; public class TestComparatorChain {  &lt;br /&gt;      public static void main(String[] args) {  &lt;br /&gt;           List&amp;lt;Person&amp;gt; persons = new ArrayList&amp;lt;Person&amp;gt;();  &lt;br /&gt;           persons.add(new Person("stan", 31));  &lt;br /&gt;           persons.add(new Person("kyle", 22));  &lt;br /&gt;           persons.add(new Person("stan", 11));  &lt;br /&gt;           persons.add(new Person("kyle", 30));  &lt;br /&gt;             &lt;br /&gt;           Comparator&amp;lt;Person&amp;gt; comparatorName = new Comparator&amp;lt;Person&amp;gt;() {  &lt;br /&gt;                @Override  &lt;br /&gt;                public int compare(Person o1, Person o2) {  &lt;br /&gt;                     return o1.name.compareToIgnoreCase(o2.name);  &lt;br /&gt;                }  &lt;br /&gt;           };  &lt;br /&gt;             &lt;br /&gt;           Comparator&amp;lt;Person&amp;gt; comparatorAge = new Comparator&amp;lt;Person&amp;gt;() {  &lt;br /&gt;                @Override  &lt;br /&gt;                public int compare(Person o1, Person o2) {  &lt;br /&gt;                     return o1.age.compareTo(o2.age);  &lt;br /&gt;                }  &lt;br /&gt;           };  &lt;br /&gt;             &lt;br /&gt;           ComparatorChain chain = new ComparatorChain();  &lt;br /&gt;           chain.addComparator(comparatorName);  &lt;br /&gt;           chain.addComparator(comparatorAge);  &lt;br /&gt;             &lt;br /&gt;           System.out.println(persons);  &lt;br /&gt;             &lt;br /&gt;           Collections.sort(persons, chain);  &lt;br /&gt;             &lt;br /&gt;           System.out.println(persons);  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Resulting two lines:&lt;br /&gt;[[stan|31], [kyle|22], [stan|11], [kyle|30]]&lt;br /&gt;[[kyle|22], [kyle|30], [stan|11], [stan|31]]&lt;br /&gt;&lt;br /&gt;The commons-collections-3.2.1.jar is with 575 kb quite big if you only want to use one class of it. Fortunately the class ComparatorChain has no dependencys to other classes of the collections library.&lt;br /&gt;Download it from &lt;a href="http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/comparators/ComparatorChain.java?view=log"&gt;here&lt;/a&gt; and copy it into you project but keep the original package name org.apache.commons.collections.comparators, it helps you later to track back where the class came from.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7151948359111735742?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7151948359111735742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/sorting-objects-by-multiple-attributes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7151948359111735742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7151948359111735742'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/sorting-objects-by-multiple-attributes.html' title='Java: Sorting objects by multiple attributes'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-1079795856254770026</id><published>2011-09-11T12:29:00.000-07:00</published><updated>2011-09-20T13:06:49.144-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='vegetarian'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Vegan Black Metal Chef</title><content type='html'>One of my favorite cooking shows is the "Vegan Black Metal Chef".&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ggSI0k7ueS8/Tm0LpVb6g0I/AAAAAAAAABI/0jeWC8B3wHI/s1600/veganblackmetalchef.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="220" src="http://4.bp.blogspot.com/-ggSI0k7ueS8/Tm0LpVb6g0I/AAAAAAAAABI/0jeWC8B3wHI/s400/veganblackmetalchef.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=aCEQ3OV3uaE"&gt;Vegan Black Metal Chef - Episode 1 - Pad-Thai&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=aCEQ3OV3uaE"&gt;Vegan Black Metal Chef - Episode 2 - Easy Meal Ideas of The Ages&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=XZi1FWqH1nk&amp;amp;feature=related"&gt;Vegan Black Metal Chef - Episode 3 - Tempura de Aspargos e Sushi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=eovuIfeH2k4&amp;amp;feature=related"&gt;Vegan Black Metal Chef - Episode 4 - Hail Seitan&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-1079795856254770026?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/1079795856254770026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/vegan-black-metal-chef.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/1079795856254770026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/1079795856254770026'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/vegan-black-metal-chef.html' title='Vegan Black Metal Chef'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ggSI0k7ueS8/Tm0LpVb6g0I/AAAAAAAAABI/0jeWC8B3wHI/s72-c/veganblackmetalchef.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-2693948072578469194</id><published>2011-09-11T03:18:00.000-07:00</published><updated>2012-02-04T06:36:58.488-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Getting Started With Android: Part1 - The Setup</title><content type='html'>This is a very quick and lazy guide because the process is easy and well documented at the sites of the respective developers. I recommend to read the official installation guides at the time of a second installation to understand all the details that I left out.&lt;br /&gt;&lt;br /&gt;You will need:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Java Development Kit (JDK)&lt;/li&gt;&lt;li&gt;Android Software Develpmet Kit (Android SDK)&lt;/li&gt;&lt;li&gt;Eclipse (IDE)&lt;/li&gt;&lt;li&gt;Android Development Tools (ADT) plugin for Eclipse&lt;/li&gt;&lt;li&gt;Connect Eclipse with the Android SDK&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;1. JDK&lt;br /&gt;Get the latest JDK and start the jdk-7-windows-i586.exe.&lt;br /&gt;Afterwards set the JAVA_HOME environment variable. The path should look like:&lt;br /&gt;c:\Program Files\Java\jdk1.7.0\.&lt;br /&gt;&lt;br /&gt;2. Android SDK&lt;br /&gt;&lt;a href="http://developer.android.com/sdk/index.html"&gt;Get the latest Android SDK&lt;/a&gt;. Use the installer or the binary. However the SDK will endup in a folder on your computer that has no reference to the OS or what so ever. This means, you can place it where ever you want and move it later without losing dependencies you don't know of.&lt;br /&gt;I recommend to put it into a folder like:&lt;br /&gt;c:\Programming\android-sdk.&lt;br /&gt;If you put into the c:\Program Files\... be aware that you have to start the installer with admin rights.&lt;br /&gt;Leave out the version number for the folder name. The SDK can update itself and the folder wouldn’t reflect its truth content.&lt;br /&gt;Start the 'SDK Manager.exe' to open the Manager. If you are in the folder 'Program Files', start it by right click and choose 'As Admin'. &amp;nbsp;It will automatically popup a dialog and ask you to choose from the available SDKs to download. Select all and hit download.&lt;br /&gt;The folder is initially around 60 Mb in size. The downloading takes about 1 hour and will fill you folder up to 1.2 Gb.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Eclipse (IDE)&lt;br /&gt;Get the latest Eclipse. I take the package ‘Eclipse for RCP and RAP Developers’. The file you will get is a zip like eclipse-rcp-indigo-win32.zip. Unpack it where ever you want. It has no installer and you can start it right away.&lt;br /&gt;At the first start the IDE asks you to specify the location of your workbench. I put it always inside the eclipse folder and use a relative path.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-5pUgP2ceu40/TmyMWaH18NI/AAAAAAAAABE/JO3ctQAkqXc/s1600/workbench.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-5pUgP2ceu40/TmyMWaH18NI/AAAAAAAAABE/JO3ctQAkqXc/s1600/workbench.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The benefits are&amp;nbsp;to avoid using the workspace with different IDE versions and I can move the whole project whereever I want in one peace.&lt;br /&gt;&lt;br /&gt;4. ADT&lt;br /&gt;Is a Eclipse plugin and can get obtained in the official Eclipse manner.&lt;br /&gt;Select the Help -&amp;gt; Install new Software...&lt;br /&gt;Click ‘Add...’&lt;br /&gt;Name:    ADT Plugin&lt;br /&gt;Location: https: https://dl-ssl.google.com/android/eclipse/&lt;br /&gt;Select all available plugins. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tIMm0xqk1rk/Tm92ksJ-lII/AAAAAAAAABM/Z5lsYPe4H6w/s1600/ADT+Plugins+Checked.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-tIMm0xqk1rk/Tm92ksJ-lII/AAAAAAAAABM/Z5lsYPe4H6w/s1600/ADT+Plugins+Checked.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Install it and&amp;nbsp;restart the IDE and you should see the following new icon in your coolbar.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-32HYMxuFmsY/Tm-XSL2l-vI/AAAAAAAAABQ/sxc6SRliQYk/s1600/ADT+Icon.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-32HYMxuFmsY/Tm-XSL2l-vI/AAAAAAAAABQ/sxc6SRliQYk/s1600/ADT+Icon.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;5.&amp;nbsp;Connect Eclipse with the Android SDK&lt;br /&gt;Select Window -&amp;gt; Preferences&lt;br /&gt;Click the new Node 'Android'&lt;br /&gt;At the right side you have to specify the path to the Android SDK you have installed in step 2.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-kIjaUTMjNKA/Tm-YP5O5bBI/AAAAAAAAABU/3TnYs8wxwDU/s1600/ADT+in+the+preferences.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://4.bp.blogspot.com/-kIjaUTMjNKA/Tm-YP5O5bBI/AAAAAAAAABU/3TnYs8wxwDU/s400/ADT+in+the+preferences.PNG" width="460" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You should get an error that the 'SDK Platform Tools component is mising' but this is normal, you have to download it first.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/--cnwa5HN8jc/Tm-YrImXb_I/AAAAAAAAABY/WbDF2Z17a-8/s1600/sdk+platform+tools+component+is+missing.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/--cnwa5HN8jc/Tm-YrImXb_I/AAAAAAAAABY/WbDF2Z17a-8/s1600/sdk+platform+tools+component+is+missing.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click the new Button in the coolbar. This will open the 'Android SDK and AVD Manager'.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part0-why.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part3-user.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-2693948072578469194?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/2693948072578469194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/2693948072578469194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/2693948072578469194'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part1.html' title='Getting Started With Android: Part1 - The Setup'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-5pUgP2ceu40/TmyMWaH18NI/AAAAAAAAABE/JO3ctQAkqXc/s72-c/workbench.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-6255850238105002941</id><published>2011-09-10T02:29:00.000-07:00</published><updated>2011-09-12T08:46:19.898-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android: How To Create A ContextMenu</title><content type='html'>I have a &lt;b&gt;custom &lt;/b&gt;View in which I want to show a &lt;b&gt;dynamic&lt;/b&gt; ContextMenu. It was hard to figure out the steps to do because most of the tutorials show only how it works with Views from the framework like the ListView.&lt;br /&gt;The missing part is how my view could trigger the onCreateContextMenu() callback.&lt;br /&gt;&lt;br /&gt;As an overview, here are the steps in pseudo code:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Activity.registerForContextMenu(customView);&lt;/li&gt;&lt;li&gt;CustomView.showContextMenu();&lt;/li&gt;&lt;li&gt;Activity.onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo);&lt;/li&gt;&lt;/ol&gt;This works pretty well only the parameter menuInfo is null.&lt;br /&gt;If the method is invoked by a framework class you will get a class that is derived from&amp;nbsp;ContextMenu.ContextMenuInfo which holds additional information about the caller.&lt;br /&gt;In the case of a ListView the class is called&amp;nbsp;AdapterContextMenuInfo and holds 3 Information.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;calling view&lt;/li&gt;&lt;li&gt;position in the list&lt;/li&gt;&lt;li&gt;id&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Wouldn't it be nice to provide custom MenuInfo from your custom View? As far I havn't found a way.&lt;br /&gt;&lt;br /&gt;The next step is to call the showContextMenu() methode from a onLongClick listener like I described in one Post before.&lt;br /&gt;Unfortunately this is not realy possible under some circumstances.&lt;br /&gt;&lt;br /&gt;If you want to start a context menu with the long click event on a custom view with your own dragging and zooming routines, it is nearly impossible.&lt;br /&gt;The problem is that you have to distinguish between a finger that stays on one place and one in motion until the long click is recognized.&lt;br /&gt;The only way to figure out motion or not is to cache the MotionEvent at ACTION_DOWN time and at ACTION_MOVE time. Than you have to calculate the spacial delta.&lt;br /&gt;But the onLongClick event is triggered microseconds after ACTION_DOWN with no chance ever to get a ACTION_MOVE event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-6255850238105002941?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/6255850238105002941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/android-how-to-create-contextmenu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6255850238105002941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/6255850238105002941'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/android-how-to-create-contextmenu.html' title='Android: How To Create A ContextMenu'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-912704964842115694</id><published>2011-09-09T14:52:00.000-07:00</published><updated>2011-09-21T13:53:03.107-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><title type='text'>How To Post Source Code In A Blog</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: large;"&gt;Sourcecode Formatter&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://codeformatter.blogspot.com/2009/06/about-code-formatter.html"&gt;http://codeformatter.blogspot.com/2009/06/about-code-formatter.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The result looks like this, optional you can format it with line numbers but for the reader there is no easy mechanism to remove them if he wants the lines in his project.&lt;br /&gt;&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; public class Robot {  &lt;br /&gt;      private Gun gun = new Gun();  &lt;br /&gt;      public void killAllHumans() {  &lt;br /&gt;           gun.fire();  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-912704964842115694?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/912704964842115694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-post-source-code-in-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/912704964842115694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/912704964842115694'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/how-to-post-source-code-in-blog.html' title='How To Post Source Code In A Blog'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-1577448671312633249</id><published>2011-09-09T14:21:00.000-07:00</published><updated>2011-09-12T08:46:00.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android: How To Figure Out A Long Click</title><content type='html'>I was looking for a way to recognize a long click on a custom view.&lt;br /&gt;&lt;br /&gt;My first idea was to use the onTouchEvent(MotionEvent event) callback.&lt;br /&gt;The only thing I have to do is to capture the time at the MotionEvent.ACTION_DOWN event and calculate the time difference inbetween an other event. Is it bigger than lets say 1 second it is a long click.&lt;br /&gt;But what could be the next event? ACTION_UP comes whenever. And ACTION_MOVE indicates a gesture like drag but not a long click.&lt;br /&gt;Do I have to implement a Thread?&lt;br /&gt;&lt;br /&gt;The answer is realy easy. There is an official event for the job. You can register the View.OnLongClickListener to every View. &lt;br /&gt;The listener gets either called by a user touch or you can call it programmatically with the performeLongClick() method.&lt;br /&gt;Here comes an example that registers the listener on a button and sets a string into a TextView to have a visual feedback.&lt;br /&gt;&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; button.setOnLongClickListener(new View.OnLongClickListener() {  &lt;br /&gt;      @Override  &lt;br /&gt;      public boolean onLongClick(View v) {  &lt;br /&gt;           textView.setText("long clicked");  &lt;br /&gt;           return true;  &lt;br /&gt;      }  &lt;br /&gt; });  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Caution!&lt;br /&gt;There are two things to keep in mind.&lt;br /&gt;1. If you like me developing a custom view you probably override the onTouchEvent() methode.&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; @Override  &lt;br /&gt; public boolean onTouchEvent(MotionEvent event) {  &lt;br /&gt;      // TODO Auto-generated method stub  &lt;br /&gt;      return super.onTouchEvent(event);  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Don't remove the super.onTouchEvent(event) regardless what you return. It triggers the whole event processing of the parent view. If you leave it out the onLongClick event will never occur. &lt;br /&gt;&lt;br /&gt;2. If you return true with the onLongClick(View v) method you tell the view the click is handled and a registered ContextMenu won't come um.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-1577448671312633249?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/1577448671312633249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/android-how-to-figure-out-long-click.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/1577448671312633249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/1577448671312633249'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/android-how-to-figure-out-long-click.html' title='Android: How To Figure Out A Long Click'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-3570709943633319704</id><published>2011-09-09T11:37:00.000-07:00</published><updated>2011-09-21T12:17:04.460-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Getting Started With Android: Part0 - Why</title><content type='html'>As a java programmer Android is the ultimate platform to develop applications.&lt;br /&gt;It is component based with the ability to reuse lot of stuff one self or other people created.&lt;br /&gt;After desktop application, that are restricted to one place, came the web 2.0 where you can use applications everywhere in the world with an existing computer and Internet connection and finally comes mobile processing power virtually everywhere in your hand.&lt;br /&gt;There are a lot of sensors with standard APIs to interface with like a camera, compass, accelerometer, orientation, …&lt;br /&gt;If you intend to sell an application, put your App into the Market with a minimum of effort and reach million of people.&lt;br /&gt;&lt;br /&gt;The downside is the not so well documented API that gives you headaches for simple things like making the options menu dynamic or using the grapics interface to map touch inputs to scaled or translated objects you draw onto a canvas. The list goes on.&lt;br /&gt;&lt;br /&gt;To share the fun and the tricks I have learned is the reason for this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part0-why.html"&gt;Part0&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part1.html"&gt;Part1&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part2.html"&gt;Part2&lt;/a&gt;&amp;nbsp;&lt;a href="http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part3-user.html"&gt;Part3&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-3570709943633319704?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/3570709943633319704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part0-why.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3570709943633319704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3570709943633319704'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/getting-started-with-android-part0-why.html' title='Getting Started With Android: Part0 - Why'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7315983137508488341</id><published>2011-09-08T15:10:00.000-07:00</published><updated>2011-09-21T09:30:01.009-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><category scheme='http://www.blogger.com/atom/ns#' term='cooking'/><title type='text'>Really Useful Cooking Links</title><content type='html'>&lt;a href="http://www.rezeptewiki.org/wiki/Hauptseite"&gt;&lt;b&gt;Rezepte-Wiki&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;A wiki with lot of recipies that are not only from one person like most of the other recipe sites. Here the recipes get improved by a big community. Here are my &lt;a href="http://www.rezeptewiki.org/wiki/Benutzer:Strangeoptics"&gt;edits&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://simplyrecipes.com/"&gt;Simply Recipes Food and Cooking Blog&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7315983137508488341?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7315983137508488341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/really-useful-cooking-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7315983137508488341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7315983137508488341'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/really-useful-cooking-links.html' title='Really Useful Cooking Links'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-7121688719241240371</id><published>2011-09-08T14:38:00.000-07:00</published><updated>2011-09-20T14:02:26.009-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='microcontroller'/><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><title type='text'>Really Useful Microcontroller related Links</title><content type='html'>&lt;a href="http://hackaday.com/"&gt;hack a day&lt;/a&gt;&lt;br /&gt;The best blog about hardware hacks.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mikrocontroller.net/"&gt;&lt;b&gt;Mikrocontroller.net&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;German site that covers everything about microcontroller. And when I say everyting I mean it. Loads of tutorials and even more forums.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.arduino.cc/"&gt;&lt;b&gt;arduino&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;This is THE prototyping platform for microcontrollers with tons of tutorials.&lt;br /&gt;It has its one Java related programming language that abstracts lots of the complicated stuff for the people that just want to interface with hardware.&lt;br /&gt;And comes with an development environment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-7121688719241240371?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/7121688719241240371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/usefull-microcontroller-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7121688719241240371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/7121688719241240371'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/usefull-microcontroller-links.html' title='Really Useful Microcontroller related Links'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-3648070841650041809</id><published>2011-09-08T08:40:00.000-07:00</published><updated>2011-10-05T12:52:48.416-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><title type='text'>Really Useful Eclipse Links</title><content type='html'>This is a collection of my best links to Eclipse related stuff.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Code / Tutorials&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.vogella.de/"&gt;&lt;b&gt;vogella&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;Most comprehensive tutorials about eclipse topics in the web.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/swt/snippets/"&gt;&lt;b&gt;SWT Snippets&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://wiki.eclipse.org/index.php/JFaceSnippets"&gt;JFace Snippets&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;New Widgets&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://eclipse.org/nebula/"&gt;Nebula Project&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.nattable.org/drupal/"&gt;NatTable&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.pfgrid.com/"&gt;&lt;b&gt;PFGrid-Toolkit&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-3648070841650041809?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/3648070841650041809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/usefull-eclipse-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3648070841650041809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/3648070841650041809'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/usefull-eclipse-links.html' title='Really Useful Eclipse Links'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2438166163329174006.post-4777876198904315984</id><published>2011-09-08T08:18:00.000-07:00</published><updated>2011-09-20T14:01:55.080-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='Links'/><title type='text'>Really Useful Android related Links</title><content type='html'>This is a collection of my best links to Android stuff.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amarino-toolkit.net/"&gt;&lt;b&gt;Amarino&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;The base line is&amp;nbsp;'android meets arduino'. It is a toolkit, consisting of an Android application and an Arduino library which will help you to interface with your phone in a new dimension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2438166163329174006-4777876198904315984?l=strangeoptics.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strangeoptics.blogspot.com/feeds/4777876198904315984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/usefull-android-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4777876198904315984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2438166163329174006/posts/default/4777876198904315984'/><link rel='alternate' type='text/html' href='http://strangeoptics.blogspot.com/2011/09/usefull-android-links.html' title='Really Useful Android related Links'/><author><name>strangeoptics</name><uri>http://www.blogger.com/profile/04893327736921446727</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://3.bp.blogspot.com/-5UixWQ3XjIQ/TmqPEiak2KI/AAAAAAAAAAo/TCE0H-zxy_I/s220/avatar_mexico.jpg'/></author><thr:total>0</thr:total></entry></feed>
