<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='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' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-5053057173658248087</atom:id><lastBuildDate>Tue, 01 May 2012 10:49:44 +0000</lastBuildDate><category>CXF</category><category>WebServices</category><category>Integer</category><category>Drivers</category><category>CSS</category><category>King Quest</category><category>sci</category><category>Hibernate</category><category>Misc</category><category>SCummVM</category><category>Files</category><category>NetBeans</category><category>Log4j</category><category>Java</category><category>sierra</category><category>Matisse</category><category>Templates</category><category>Swing</category><category>PHP</category><category>Games</category><category>Collections</category><category>android</category><category>Audio</category><category>lucasarts</category><category>Code Coverage</category><category>bug-tracking</category><category>FTP</category><category>lucasfilm</category><category>JavaDocs</category><category>Eclipse</category><category>Debugging</category><category>Garbage Collection</category><category>WindowBuilder</category><category>JUnit</category><category>Free</category><category>Dos</category><category>filezilla</category><category>SVN</category><category>agi</category><category>Newbie</category><category>Ant</category><title>ChaiPuter</title><description>Computer Related stuff which occupied me, and now occupies - you  :-)</description><link>http://myblog.chaiware.org/</link><managingEditor>noreply@blogger.com (Chaiavi)</managingEditor><generator>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-9197377322457828021</guid><pubDate>Sun, 12 Feb 2012 22:47:00 +0000</pubDate><atom:updated>2012-02-13T00:47:48.145+02:00</atom:updated><title>The Ultimate Utility Toolset</title><description>&lt;div dir="rtl" style="text-align: right;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;Are you called from time to time to fix friends' /&amp;nbsp;neighbors' /&amp;nbsp;family's computers?&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;Do you then pull your good old collection of cds each one containing a different utility you might need?&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;Well, those days are gone!&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;Today you need only carry a nice 8gb flash drive on your key chain.&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;What will it contain?&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;&lt;/div&gt;&lt;ol dir="ltr" style="text-align: left;"&gt;&lt;li&gt;Download the latest hiren's boot cd (currently 15.1 but it gets updated every now and then) from your favorite torrent site.&lt;/li&gt;&lt;li&gt;Follow &lt;a href="http://www.hiren.info/pages/bootcd-on-usb-disk" target="_blank"&gt;these orders (in the link)&lt;/a&gt; in order to format and make your flash drive bootable. &amp;nbsp;&lt;/li&gt;&lt;li&gt;Copy the contents of the hiren's boot cd into the flash drive (as mentioned in the link above).&lt;/li&gt;&lt;li&gt;You have just created a bootable hiren flash disk (and for those who don't know, hiren's boot disk is the best rescue disk you'll ever need).&lt;/li&gt;&lt;li&gt;Download the&lt;a href="http://portableapps.com/" target="_blank"&gt; portable apps app&lt;/a&gt;, install it on your computer and download every app you find handy. This stage could take some time and could get to 5gb of downloaded no installer freeware.&lt;/li&gt;&lt;li&gt;Add &lt;a href="http://portableappz.blogspot.com/" target="_blank"&gt;needed apps from here&lt;/a&gt; (which aren't included in the original site).&lt;/li&gt;&lt;li&gt;Copy the 5gb portable apps directory into the flash drive.&lt;/li&gt;&lt;li&gt;You now have in your flash drive a very large amount of apps which work out of the box and can be run on every computer even one which doesn't have internet access.&lt;/li&gt;&lt;li&gt;Add your special apps you always keep in your special directory, those apps which are not included on hiren's install nor in the portable apps install.&lt;/li&gt;&lt;li&gt;Throw away the heap of rescue and utility cds you treasured so much.&lt;/li&gt;&lt;/ol&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;After following the above steps, you need to carry only this tiny flash disk (on your key chain?) and you will never get stuck with a scratched cd.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-9197377322457828021?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2012/02/ultimate-utility-toolset.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-8491415583380705200</guid><pubDate>Mon, 30 Jan 2012 03:22:00 +0000</pubDate><atom:updated>2012-05-01T13:49:44.642+03:00</atom:updated><title>How to read Android apk contents</title><description>&lt;div dir="rtl" style="text-align: right;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Lets say you want to read the contents of an android apk file.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Why?&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Maybe it's yours and you want to be sure of the version, maybe you want to see if the code in that apk contains the latest feature you inserted. Or maybe it isn't your code but you want to check something with someone else's code (without breaking any license etc).&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;b&gt;In a&amp;nbsp;nutshell&amp;nbsp;- What are the steps one should take in order to explore an apk file?&lt;/b&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;1. &lt;i&gt;Only read the manifest contents of an apk&lt;/i&gt;:&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Use the following command (make sure you have aapt.exe and the apk file on your path):&lt;br /&gt;aapt dump badging XXYY.apk&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;[Later Edit] 1.5 You want to change some resources of the apk using a nice GUI&lt;br /&gt;Try &lt;a href="http://forum.xda-developers.com/showthread.php?t=890199" target="_blank"&gt;APK Edit&lt;/a&gt;&amp;nbsp;- It will enable you to do the following:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Change icons of your android application.&lt;/li&gt;&lt;li&gt;Change the applications name.&lt;/li&gt;&lt;li&gt;Edit the localized text (Strings.xml) used in applications.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;2. &lt;i&gt;You want to read all of the apk's contents&lt;/i&gt;:&lt;br /&gt;Method A. Use the following tool: &lt;a href="http://code.google.com/p/android-apktool/" target="_blank"&gt;apktool&lt;/a&gt;&amp;nbsp;(apktool d filename.apk) [It will generate .smali files instead of class files though, you can add the "-s" option tag in order to get the classes.dex instead of the *.smali files].&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;(A GUI exists: &lt;a href="http://forum.xda-developers.com/showthread.php?t=1551236" target="_blank"&gt;apktool gui&lt;/a&gt;&amp;nbsp;but it seems buggy, later versions can be found but they aren't localized to English yet - as of the time of editing this post)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Method B.&amp;nbsp;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;* Rename the apk file to .zip (instead of .apk) and extract the contents as you extract a zip file.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;* The contents are yours for the taking now - except for the class files, in order to see the actual java code, use the following tool on the *.dex file: &lt;a href="http://code.google.com/p/dex2jar/" target="_blank"&gt;dex2jar&lt;/a&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;* In order to read the contents of the jar file (containing the java class files) use a decompiling tool: &lt;a href="http://java.decompiler.free.fr/?q=jdgui" target="_blank"&gt;JD-Gui&lt;/a&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Now any apk is open like a book!&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;br /&gt;[Later Edit] I found this super tool which I must recommend: &lt;a href="http://apkmultitool.com/" target="_blank"&gt;Apk Multi Tool&lt;/a&gt;&amp;nbsp;(Previous name was apk manager)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Install this tool&lt;/li&gt;&lt;li&gt;Goto it's directory and copy your apk to the following folder: "place-apk-here-for-modding"&lt;/li&gt;&lt;li&gt;Run it&lt;/li&gt;&lt;li&gt;Click on: 1 (will extract the apk)&lt;/li&gt;&lt;li&gt;Now edit the apk as you wish (change images etc)&lt;/li&gt;&lt;li&gt;Click on 3 to zip it&lt;/li&gt;&lt;li&gt;Click on 4 to sign it.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;That's it - you have just changed a working apk and retained it's signature.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Latest Edit] Some utils which are worth following:&lt;br /&gt;&lt;a href="http://forum.xda-developers.com/showthread.php?t=1461135" target="_blank"&gt;Androidsuite&lt;/a&gt; - Gui which envelopes several command line utils, enables the following:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Decodes and encodes Dex files&lt;/li&gt;&lt;li&gt;Decodes and encodes APK files&lt;/li&gt;&lt;li&gt;Sign unsigned apks&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;(Current version doesn't work for me)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/apkinspector/" target="_blank"&gt;APKInspector&lt;/a&gt; - Gui with so many features, so instead of writing them down I'll send you to this amazing video of theirs:&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=X538N-x3UUY"&gt;http://www.youtube.com/watch?v=X538N-x3UUY&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, the main problem with this tool is that you can install it only on a linux machine and have to install several other dependencies, I'll continue to follow it though and if they will release a windows version (I don't think they ever will though) I will update this post&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-8491415583380705200?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2012/01/how-to-read-android-apk-contents.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-4472885512760269538</guid><pubDate>Wed, 23 Nov 2011 09:35:00 +0000</pubDate><atom:updated>2011-11-23T12:13:24.347+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Eclipse</category><category domain='http://www.blogger.com/atom/ns#'>Swing</category><category domain='http://www.blogger.com/atom/ns#'>WindowBuilder</category><category domain='http://www.blogger.com/atom/ns#'>Matisse</category><title>Eclipse Window Builder VS Netbeans GUI Builder (Matisse)</title><description>&lt;div dir="rtl" style="text-align: right;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Java is a great programming language but it has a big flaw - it's GUI framework sucks!&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;I am talking about building simple client-side applications.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;If you don't want to mess with any web gui framework then you are bound to use swing.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;You can always build swing writing the text and imagining how it will work but any smart programmer will search for a nice Swing GUI builder which will enable him/her to have a WYSIWYG sort of framework to work with.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;There are several options of WYSIWYG frameworks to pick from, the most noticeable till the July (2011) was Netbeans' "Matisse" GUI builder.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;There were others of course but none as free or as good as Matisse.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;The biggest flaw of Matisse is that it doesn't reside on the best IDE out there - eclipse, but it can be found only on netbeans which isn't as good as Eclipse (Doesn't even have a "hover" feature to name one great flaw of netbeans) so if you want to build a GUI supported by good java logic you'll have to run back and fourth between netbeans to eclipse which can cause lots of problems.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;The second major flaw of Matisse is that it just isn't good enough, you place the components on the grid, Matisse then creates an XML with the component's attributes, then generates the java code for the components on the grid. Seems cool, but then you decide you want to add a button somewhere in the form or resize a component - this procedure can cause all of the gui to get mixed up throwing the adjacent components to different places - fixing it can be a pain in the neck.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Even if you managed to place all of the components where they should be but manually changed some of the generated netbeans code - you are in a BIG problem, a problem you might not manage to get out of unless starting all over.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;But you still want to build a nice GUI using java and you still want a good java coding platform with a good WYSIWYG environment, what are your options?&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;A project was opensourced several years ago called myMatisse or maybe it was Matisse4me?&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;The idea was to migrate the Matisse platform into eclipse.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;MyEclipse adopted this GUI builder and implemented into their distribution (which practically means it is the best GUI builder for eclipse).&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;But it never worked so well and it had its bugs.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Then came eclipse's Windows Builder and I fell totally in love!&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;There is no question which is java's best GUI builder framework, well there actually is a question but the answer is crystal clear to me - it is Windows Builder for eclipse.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;It was created by a company and was bought by Google which opensourced it for the good of all and are active contributors to the project.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Last July it was officially released with the eclipse release train as an official eclipse plugin authorized and maintained by them.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;MyEclipse still maintain their old plugin but their official gui builder is Windows Builder now.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;So what is so good about it?&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;1. It resides on Eclipse.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;2. It works! &amp;nbsp;you can add components / resize or anything you want without being afraid your whole form will get mixed up.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;3. It is totally bi-directional, so you can tweak its generated code as much as you want and it will instantly adjust to the changes - understanding them.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;You can add a new component - manually hand coding it and it will understand it all (and display it on the WYSIWYG screen).&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;4. It has no XML files or any other helper files, all of the code is java and it is quite small and optimized.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;These are the most noticeable benefits one gets when using windowbuilder.&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;"&gt;Maybe beauty is in the eyes of the beholder but you have to be blind not to love WindowBuilder.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-4472885512760269538?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2011/11/eclipse-window-builder-vs-netbeans-gui.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-8047201955121811875</guid><pubDate>Sun, 31 Jul 2011 15:30:00 +0000</pubDate><atom:updated>2011-07-31T18:31:34.813+03:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Eclipse</category><category domain='http://www.blogger.com/atom/ns#'>android</category><title>Setting up an Android development environment in a nutshell</title><description>If you want to begin developing for the android platform - which components will you need to install?&lt;br /&gt;&lt;br /&gt;In a nutshell:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install latest JDK&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;http://www.oracle.com/technetwork/java/javase/downloads/index.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Install the latest eclipse IDE "Eclipse IDE for Java Developers"&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;http://www.eclipse.org/downloads/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Install the latest Android SDK&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://developer.android.com/sdk/index.html"&gt;http://developer.android.com/sdk/index.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Run the SDK manager after installation and install all of the packages you might need (retain default packages and add additional ones if need be).&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Install latest ADT (eclipse android plugin)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Run eclipse, choose help --&amp;gt; Install new software&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: #f2f2f2; color: #454545; font-family: monospace; font-size: 13px; line-height: 20px;"&gt;https://dl-ssl.google.com/android/eclipse/&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Configure eclipse and point it to the JDK and to the android SDK.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Have a nice android day &amp;nbsp; :-)&lt;/div&gt;&lt;div&gt;Avi.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-8047201955121811875?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2011/07/setting-up-android-development.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-4648693869810174680</guid><pubDate>Thu, 26 May 2011 11:39:00 +0000</pubDate><atom:updated>2011-05-26T16:04:00.169+03:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>agi</category><category domain='http://www.blogger.com/atom/ns#'>Games</category><category domain='http://www.blogger.com/atom/ns#'>sci</category><category domain='http://www.blogger.com/atom/ns#'>lucasfilm</category><category domain='http://www.blogger.com/atom/ns#'>sierra</category><category domain='http://www.blogger.com/atom/ns#'>SCummVM</category><category domain='http://www.blogger.com/atom/ns#'>lucasarts</category><category domain='http://www.blogger.com/atom/ns#'>android</category><title>SCummVM for Android</title><description>THIS ARTICLE ISN'T LONG!&lt;br /&gt;&lt;br /&gt;-- First section = 3 terms related to this topic briefly explained&lt;br /&gt;-- Second section = Main article - how to install SCummVM on your android (even new androids)&lt;br /&gt;-- Last section = UNIMPORTANT, feel free to skip it, it's only a list of games compatible with your android after installing SCummVM&lt;br /&gt;&lt;br /&gt;&lt;b&gt;-----------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SCummVM &lt;/b&gt;- Lucasarts' gaming engine used for their good old games / quests like Maniac Mansion, Indiana Jones, Monkey Island etc.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AGI &lt;/b&gt;- Sierra's first gaming engine used for their good old quests like King's Quest, Larry quests, Police quests, Space quests.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SCI &lt;/b&gt;- Sierra's second gaming engine used for their newer games (since about 1990), the quests programmed with this engine didn't need the text parser but used the mouse for every action needed during the game.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have an &lt;b&gt;&lt;i&gt;Android &lt;/i&gt;&lt;/b&gt;machine (cell phone, tablet) and want to play any game which uses the above gaming engines (&lt;i&gt;scumm, agi, sci &lt;/i&gt;and other less know engines), you can now play them using this great application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It's not released yet, but if you have an old android operating system (less than version 1.6) you can download an unofficial version from the market.&lt;br /&gt;&lt;br /&gt;If you have a newer version of android (V1.6 and up), you can still use the SCummVM application, but can't download it from the market yet [yet = of May 2011].&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ingredients:&lt;br /&gt;-- Main scummVM apk.&lt;br /&gt;-- Plugins for each engine used (I use the agi, sci &amp;amp; scumm plugins).&lt;br /&gt;-- The actual games (There are about 3 free gamess in the scummVM site, the rest can be bought from ebay / amazon or downloaded using a torrent).&lt;br /&gt;&lt;br /&gt;In order to get the scummvm version which works on your nice and new android, go to the following link which contains the latest apk of the main program and about 20 plugins (I installed only three of them, but feel free to install them all):&lt;br /&gt;&lt;a href="http://buildbot.scummvm.org/snapshots/stable/android-stable-latest.tar.bz2"&gt;Latest Nightly build of the SCummVM for Android&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download the above file, unzip then copy the apks to a folder on your android machine.&lt;br /&gt;&lt;br /&gt;Browse to the location of these apks using the android machine's file rxplorer and install them (start with the main apk, only then continue with the plugins).&lt;br /&gt;&lt;br /&gt;Now that you have it installed, you can copy games which should work on it into any folder on your android machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Start SCummVM, "add game", browse to a game's location, then add it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It will be added to a list.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add all of your games you copied to your machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now click on any game and start playing it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S. If you are unsure about your games - unsure if they will work on scummVM, and you don't want to go over the process of installing it on your android just to find out that your games aren't compatible with it, then I advise you to do as follows:&lt;br /&gt;-- Install SCummVM on your &lt;b&gt;PC&lt;/b&gt;&lt;br /&gt;-- Try running the game on it.&lt;br /&gt;&lt;br /&gt;This is a much simpler process - If the game works on your PC it WILL WORK on your android. (Some of the wonder of a virtual machine).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;-----------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Which games will work on your android after the installation of the above?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LucasArts Game - Company&lt;/b&gt;&lt;br /&gt;Maniac Mansion - for android (any version)&lt;br /&gt;Zak McKracken and the Alien Mindbenders - for android (any version)&lt;br /&gt;Indiana Jones and the Last Crusade - for android (any version)&lt;br /&gt;Loom - for android (any version)&lt;br /&gt;Passport to Adventure - for android (any version)&lt;br /&gt;The Secret of Monkey Island - for android (any version)&lt;br /&gt;Monkey Island 2: LeChuck's Revenge - for android (any version)&lt;br /&gt;Indiana Jones and the Fate of Atlantis - for android (any version)&lt;br /&gt;Day of the Tentacle - for android (any version)&lt;br /&gt;Sam &amp; Max Hit the Road - for android (any version)&lt;br /&gt;Full Throttle - for android (any version)&lt;br /&gt;The Dig - for android (any version)&lt;br /&gt;The Curse of Monkey Island - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Activision Adventure Game - Company&lt;/b&gt;&lt;br /&gt;Leather Goddesses of Phobos 2 - for android (any version)&lt;br /&gt;The Manhole - for android (any version)&lt;br /&gt;Return to Zork - for android (any version)&lt;br /&gt;Rodney's Funscreen - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adventuresoft/Horrorsoft Game - Company&lt;/b&gt;&lt;br /&gt;Elvira - Mistress of the Dark - for android (any version)&lt;br /&gt;Elvira II - The Jaws of Cerberus - for android (any version)&lt;br /&gt;Personal Nightmare - for android (any version)&lt;br /&gt;Simon the Sorcerer 1 - for android (any version)&lt;br /&gt;Simon the Sorcerer 2 - for android (any version)&lt;br /&gt;Simon the Sorcerer's Puzzle Pack - D.I.M.P. - for android (any version)&lt;br /&gt;Simon the Sorcerer's Puzzle Pack - Jumble - for android (any version)&lt;br /&gt;Simon the Sorcerer's Puzzle Pack - NoPatience - for android (any version)&lt;br /&gt;Simon the Sorcerer's Puzzle Pack - Swampy Adventures - for android (any version)&lt;br /&gt;The Feeble Files - for android (any version)&lt;br /&gt;Waxworks - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Coktel Vision Game - Company&lt;/b&gt;&lt;br /&gt;Bargon Attack - for android (any version)&lt;br /&gt;Fascination - for android (any version)&lt;br /&gt;Gobliiins - for android (any version)&lt;br /&gt;Gobliins 2 - for android (any version)&lt;br /&gt;Goblins 3 - for android (any version)&lt;br /&gt;Lost in Time - for android (any version)&lt;br /&gt;Playtoons: Bambou le Sauveur de la Jungle - for android (any version)&lt;br /&gt;The Bizarre Adventures of Woodruff and the Schnibble - for android (any version)&lt;br /&gt;Urban Runner - for android (any version)&lt;br /&gt;Ween: The Prophecy - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Revolution Software Game - Company&lt;/b&gt;&lt;br /&gt;Beneath a Steel Sky - for android (any version)&lt;br /&gt;Broken Sword: The Shadow of the Templars - for android (any version)&lt;br /&gt;Broken Sword II: The Smoking Mirror - for android (any version)&lt;br /&gt;Lure of the Temptress - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sierra AGI Game - Company&lt;/b&gt;&lt;br /&gt;The Black Cauldron - for android (any version)&lt;br /&gt;Gold Rush! - for android (any version)&lt;br /&gt;King's Quest I - for android (any version)&lt;br /&gt;King's Quest II - for android (any version)&lt;br /&gt;King's Quest III - for android (any version)&lt;br /&gt;King's Quest IV - for android (any version)&lt;br /&gt;Leisure Suit Larry in the Land of the Lounge Lizards - for android (any version)&lt;br /&gt;Mixed-Up Mother Goose - for android (any version)&lt;br /&gt;Manhunter 1: New York - for android (any version)&lt;br /&gt;Manhunter 2: San Francisco - for android (any version)&lt;br /&gt;Police Quest I: In Pursuit of the Death Angel - for android (any version)&lt;br /&gt;Space Quest I: The Sarien Encounter - for android (any version)&lt;br /&gt;Space Quest II: Vohaul's Revenge - for android (any version)&lt;br /&gt;Fanmade Games - for android (any version)&lt;br /&gt;Mickey's Space Adventure - for android (any version)&lt;br /&gt;Troll's Tale - for android (any version)&lt;br /&gt;Winnie the Pooh in the Hundred Acre Wood - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sierra SCI Game - Company&lt;/b&gt;&lt;br /&gt;Castle of Dr. Brain (EGA and VGA) - for android (any version)&lt;br /&gt;Codename: ICEMAN - for android (any version)&lt;br /&gt;Conquests of Camelot - for android (any version)&lt;br /&gt;Conquests of the Longbow (EGA and VGA) - for android (any version)&lt;br /&gt;EcoQuest: The Search for Cetus - for android (any version)&lt;br /&gt;EcoQuest 2: Lost Secret of the Rainforest - for android (any version)&lt;br /&gt;Freddy Pharkas: Frontier Pharmacist - for android (any version)&lt;br /&gt;Hoyle's Book of Games 1 - for android (any version)&lt;br /&gt;Hoyle's Book of Games 2 - for android (any version)&lt;br /&gt;Hoyle's Book of Games 3 (EGA and VGA) - for android (any version)&lt;br /&gt;Hoyle Classic Card Games - for android (any version)&lt;br /&gt;Jones in the Fast Lane - for android (any version)&lt;br /&gt;King's Quest I (SCI remake) - for android (any version)&lt;br /&gt;King's Quest IV (SCI version) - for android (any version)&lt;br /&gt;King's Quest V (EGA and VGA) - for android (any version)&lt;br /&gt;King's Quest VI (low and hi res) - for android (any version)&lt;br /&gt;Laura Bow: The Colonel's Bequest - for android (any version)&lt;br /&gt;Laura Bow 2: The Dagger of Amon Ra - for android (any version)&lt;br /&gt;Leisure Suit Larry 1 (SCI remake) (EGA and VGA) - for android (any version)&lt;br /&gt;Leisure Suit Larry 2 - for android (any version)&lt;br /&gt;Leisure Suit Larry 3 - for android (any version)&lt;br /&gt;Leisure Suit Larry 5 (EGA and VGA) - for android (any version)&lt;br /&gt;Leisure Suit Larry 6 (low res) - for android (any version)&lt;br /&gt;Mixed-up Fairy Tales - for android (any version)&lt;br /&gt;Mixed-up Mother Goose - for android (any version)&lt;br /&gt;Pepper's Adventures in Time - for android (any version)&lt;br /&gt;Police Quest 1 (SCI remake) - for android (any version)&lt;br /&gt;Police Quest 2 - for android (any version)&lt;br /&gt;Police Quest 3 (EGA and VGA) - for android (any version)&lt;br /&gt;Quest for Glory 1/Hero's Quest - for android (any version)&lt;br /&gt;Quest for Glory 1 VGA remake - for android (any version)&lt;br /&gt;Quest for Glory 2 - for android (any version)&lt;br /&gt;Quest for Glory 3 - for android (any version)&lt;br /&gt;Slater &amp; Charlie Go Camping - for android (any version)&lt;br /&gt;Space Quest I (SCI remake) (EGA and VGA) - for android (any version)&lt;br /&gt;Space Quest III - for android (any version)&lt;br /&gt;Space Quest IV (EGA and VGA) - for android (any version)&lt;br /&gt;Space Quest V - for android (any version)&lt;br /&gt;The Island of Dr. Brain - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Other Game - Company&lt;/b&gt;&lt;br /&gt;Bud Tucker in Double Trouble - for android (any version)&lt;br /&gt;Cruise for a Corpse - for android (any version)&lt;br /&gt;Discworld - for android (any version)&lt;br /&gt;Discworld II - Missing presumed...!? - for android (any version)&lt;br /&gt;Dragon History - for android (any version)&lt;br /&gt;Drascula: The Vampire Strikes Back - for android (any version)&lt;br /&gt;Flight of the Amazon Queen - for android (any version)&lt;br /&gt;Future Wars - for android (any version)&lt;br /&gt;Hugo's House of Horrors - for android (any version)&lt;br /&gt;Hugo 2: Whodunit? - for android (any version)&lt;br /&gt;Hugo 3: Jungle of Doom - for android (any version)&lt;br /&gt;I Have No Mouth, and I Must Scream - for android (any version)&lt;br /&gt;Inherit the Earth: Quest for the Orb - for android (any version)&lt;br /&gt;Nippon Safes Inc. - for android (any version)&lt;br /&gt;The Legend of Kyrandia - for android (any version)&lt;br /&gt;The Legend of Kyrandia: Book Two: Hand of Fate - for android (any version)&lt;br /&gt;The Legend of Kyrandia: Book Three: Malcolm's Revenge - for android (any version)&lt;br /&gt;The 7th Guest - for android (any version)&lt;br /&gt;TeenAgent - for android (any version)&lt;br /&gt;Toonstruck - for android (any version)&lt;br /&gt;Touche: The Adventures of the Fifth Musketeer - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Humongous Entertainment Game - Company&lt;/b&gt;&lt;br /&gt;Backyard Baseball - for android (any version)&lt;br /&gt;Backyard Baseball 2001 - for android (any version)&lt;br /&gt;Backyard Baseball 2003 - for android (any version)&lt;br /&gt;Backyard Football - for android (any version)&lt;br /&gt;Backyard Football 2002 - for android (any version)&lt;br /&gt;Bear Stormin' - for android (any version)&lt;br /&gt;Big Thinkers First Grade - for android (any version)&lt;br /&gt;Big Thinkers Kindergarten - for android (any version)&lt;br /&gt;Blue's 123 Time Activities - for android (any version)&lt;br /&gt;Blue's ABC Time Activities - for android (any version)&lt;br /&gt;Blue's Art Time Activities - for android (any version)&lt;br /&gt;Blue's Birthday Adventure - for android (any version)&lt;br /&gt;Blue's Reading Time Activities - for android (any version)&lt;br /&gt;Blue's Treasure Hunt - for android (any version)&lt;br /&gt;Fatty Bear's Birthday Surprise - for android (any version)&lt;br /&gt;Fatty Bear's Fun Pack - for android (any version)&lt;br /&gt;Freddi Fish 1: The Case of the Missing Kelp Seeds - for android (any version)&lt;br /&gt;Freddi Fish 2: The Case of the Haunted Schoolhouse - for android (any version)&lt;br /&gt;Freddi Fish 3: The Case of the Stolen Conch Shell - for android (any version)&lt;br /&gt;Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch - for android (any version)&lt;br /&gt;Freddi Fish 5: The Case of the Creature of Coral Cove - for android (any version)&lt;br /&gt;Freddi Fish and Luther's Maze Madness - for android (any version)&lt;br /&gt;Freddi Fish and Luther's Water Worries - for android (any version)&lt;br /&gt;Let's Explore the Airport with Buzzy - for android (any version)&lt;br /&gt;Let's Explore the Farm with Buzzy - for android (any version)&lt;br /&gt;Let's Explore the Jungle with Buzzy - for android (any version)&lt;br /&gt;Pajama Sam: Games to Play on Any Day - for android (any version)&lt;br /&gt;Pajama Sam 1: No Need to Hide When It's Dark Outside - for android (any version)&lt;br /&gt;Pajama Sam 2: Thunder and Lightning Aren't so Frightening - for android (any version)&lt;br /&gt;Pajama Sam 3: You Are What You Eat From Your Head to Your Feet - for android (any version)&lt;br /&gt;Pajama Sam's Lost &amp; Found - for android (any version)&lt;br /&gt;Pajama Sam's Sock Works - for android (any version)&lt;br /&gt;Putt-Putt Enters the Race - for android (any version)&lt;br /&gt;Putt-Putt Goes to the Moon - for android (any version)&lt;br /&gt;Putt-Putt Joins the Circus - for android (any version)&lt;br /&gt;Putt-Putt Joins the Parade - for android (any version)&lt;br /&gt;Putt-Putt Saves the Zoo - for android (any version)&lt;br /&gt;Putt-Putt Travels Through Time - for android (any version)&lt;br /&gt;Putt-Putt and Pep's Balloon-O-Rama - for android (any version)&lt;br /&gt;Putt-Putt and Pep's Dog on a Stick - for android (any version)&lt;br /&gt;Putt-Putt &amp; Fatty Bear's Activity Pack - for android (any version)&lt;br /&gt;Putt-Putt's Fun Pack - for android (any version)&lt;br /&gt;SPY Fox 1: Dry Cereal - for android (any version)&lt;br /&gt;SPY Fox 2: Some Assembly Required - for android (any version)&lt;br /&gt;SPY Fox 3: Operation Ozone - for android (any version)&lt;br /&gt;SPY Fox in Cheese Chase - for android (any version)&lt;br /&gt;SPY Fox in Hold the Mustard - for android (any version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Living Books Game - Company&lt;/b&gt;&lt;br /&gt;Aesop's Fables: The Tortoise and the Hare - for android (any version)&lt;br /&gt;Arthur's Birthday - for android (any version)&lt;br /&gt;Arthur's Teacher Trouble - for android (any version)&lt;br /&gt;Dr. Seuss's ABC - for android (any version)&lt;br /&gt;Green Eggs and Ham - for android (any version)&lt;br /&gt;Harry and the Haunted House - for android (any version)&lt;br /&gt;Just Grandma and Me - for android (any version)&lt;br /&gt;Little Monster at School - for android (any version)&lt;br /&gt;Ruff's Bone - for android (any version)&lt;br /&gt;Sheila Rae, the Brave - for android (any version)&lt;br /&gt;Stellaluna - for android (any version)&lt;br /&gt;The Berenstain Bears Get in a Fight - for android (any version)&lt;br /&gt;The Berenstain Bears in the Dark - for android (any version)&lt;br /&gt;The New Kid on the Block&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-4648693869810174680?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2011/05/scummvm-for-android.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>5</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-7958163705622830855</guid><pubDate>Wed, 18 May 2011 07:04:00 +0000</pubDate><atom:updated>2011-05-18T10:04:34.270+03:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SVN</category><category domain='http://www.blogger.com/atom/ns#'>bug-tracking</category><title>Free SVN</title><description>I have these small java projects I like to work on.&lt;br /&gt;&lt;br /&gt;Mostly I work on them from home, but from time to time I like to work on them using my laptop or if I have an idea while working on other projects, I want to add a feature on work.&lt;br /&gt;&lt;br /&gt;The problem is that the source code is at my house on my main computer, so if I want to work on the code elsewhere, I send the code to myself using my gmail, work on it whereever I want and reupload the code to my main computer.&lt;br /&gt;&lt;br /&gt;Well, that is a pain in the ... neck.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So I got to the conclusion I must use some sort of version control.&lt;br /&gt;&lt;br /&gt;I picked SVN, because that's what we have at work, then installed a SVN server at my house, got a static IP (using dyn-dns) and used my SVN for my java projects.&lt;br /&gt;&lt;br /&gt;It worked.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But it's not the best way working those things out.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First of all, my computer isn't on 24\7&lt;br /&gt;Second - my home computer isn't 100% secured as expected from regular servers.&lt;br /&gt;Third - My computer may crash at any time - then what?&lt;br /&gt;&lt;br /&gt;So I fiigured I should have my code on the cloud.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So I listed my shopping list for a good SVN server I'd like to use and searched the web for it:&lt;br /&gt;&lt;br /&gt;The perfect SVN cloud server will have the following:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Free SVN&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Will include a &lt;b&gt;free bug tracking&lt;/b&gt; system&lt;/li&gt;&lt;li&gt;Will be able to have &lt;b&gt;unlimited projects&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Will be able to have &lt;b&gt;private projects&lt;/b&gt; (not open to the public)&lt;/li&gt;&lt;li&gt;Will have at least &lt;b&gt;100mb&lt;/b&gt; of space&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;That's it!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I started out with google's system.&lt;/div&gt;&lt;div&gt;It's called "google code", and is great in all aspects, except one - it doesn't have private projects, only public ones.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I continued and searched, and although I found about 100 services!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NONE MATCHED MY&amp;nbsp;CRITERIAs&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I got to the conclusion that in order to find something suitable I'll have to dump one of my criterias.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I must have it private, it must be svn, must contain multiple projects and must be free, so the only expendable criteria was a repository synced with a bug tracking system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Even then I found only two candidates (but there might be more):&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;SlikSVN&lt;/li&gt;&lt;li&gt;Assemble&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I preferred sliksvn because assemble had several changes to their free license recently, and I want a stable repository which won't change its conditions.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What about a bug tracking system?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I didn't search for one as thoroughly as searched for a SVN repository.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But found a cute, simple, nice and dirty one which I will stick with for the time being:&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 15px;"&gt;easy-bugs.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px;"&gt;I will keep you posted about those services though,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px;"&gt;Enjoy life and coding,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px;"&gt;Avi.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-7958163705622830855?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2011/05/free-svn.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-3207741406733362000</guid><pubDate>Thu, 09 Dec 2010 11:34:00 +0000</pubDate><atom:updated>2010-12-09T13:34:40.523+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>FTP</category><category domain='http://www.blogger.com/atom/ns#'>filezilla</category><title>Best free FTP program</title><description>There is no debate, if you need a good and free FTP program just run and download filezilla, and don't let anyone else tell you otherwise.&lt;br /&gt;&lt;br /&gt;But what will you do when filezilla fails you?&lt;br /&gt;&lt;br /&gt;Which program will you use?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It seems that most free FTP programs are shitty (sorry for the word - but they really are), but if filezilla isn't a solution try the following next 2 best options (which are reasonable enough even though they are under filezilla's league):&lt;br /&gt;* &lt;a href="http://www.coreftp.com/download.html"&gt;CoreFTP (the free version)&lt;/a&gt;&lt;br /&gt;* &lt;a href="http://www.leechftp.org/"&gt;LeechFTP&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have any other (better?) free ftp program, please add it in the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-3207741406733362000?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2010/12/best-free-ftp-program.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-6301567318613439937</guid><pubDate>Mon, 06 Dec 2010 19:07:00 +0000</pubDate><atom:updated>2010-12-06T21:07:53.652+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Games</category><category domain='http://www.blogger.com/atom/ns#'>King Quest</category><title>King Quest Remakes</title><description>So you want to be king.&lt;br /&gt;&lt;br /&gt;If you ever have that nostalgic mood and want to jump and play those good old king quest games, there is no need for a dosbox and the old text parsing games.&lt;br /&gt;&lt;br /&gt;King Quests 1-4 have beautiful remakes with improved plots and a much better point and click interface.&lt;br /&gt;&lt;br /&gt;Who created them? - fans.&lt;br /&gt;&lt;br /&gt;Where can you find them?&lt;br /&gt;It appears that three different groups had taken on themselves to remake the quests.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.agdinteractive.com/games/games.html"&gt;King Quest 1 &amp;amp; 2 were remade by AGDInteractive&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.infamous-adventures.com/home/index.php?page=games"&gt;King Quest 3 was remade by infamous adventures&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mmgames.org/KQ4/"&gt;King Quest 4 is being remaked by Magic Mirror Games&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-6301567318613439937?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2010/12/king-quest-remakes.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-6705042752878825288</guid><pubDate>Thu, 17 Jun 2010 10:06:00 +0000</pubDate><atom:updated>2010-06-17T13:11:32.209+03:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Hibernate</category><title>Iterate over your whole DB using hibernate</title><description>In this post I'll assume you already have your hibernate object corresponding to your DB schema.&lt;br /&gt;&lt;br /&gt;What will we try to achieve here?&lt;br /&gt;I will iterate all of the DB using hibernate objects, and here is a little java program which will attempt to achieve just that:&lt;br /&gt;&lt;div class="csscode"&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;import org.hibernate.cfg.AnnotationConfiguration;&lt;/div&gt;&lt;div&gt;import org.hibernate.HibernateException;&lt;/div&gt;&lt;div&gt;import org.hibernate.SessionFactory;&lt;/div&gt;&lt;div&gt;import org.hibernate.Session;&lt;/div&gt;&lt;div&gt;import org.hibernate.Query;&lt;/div&gt;&lt;div&gt;import org.hibernate.metadata.ClassMetadata;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import java.util.Map;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/**&lt;/div&gt;&lt;div&gt; * Created by IntelliJ IDEA.&lt;/div&gt;&lt;div&gt; * User: avih&lt;/div&gt;&lt;div&gt; * Date: May 11, 2010&lt;/div&gt;&lt;div&gt; * Time: 7:43:37 AM&lt;/div&gt;&lt;div&gt; */&lt;/div&gt;&lt;div&gt;public class Main {&lt;/div&gt;&lt;div&gt;    private static final SessionFactory ourSessionFactory;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    static {&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            ourSessionFactory = new AnnotationConfiguration().&lt;/div&gt;&lt;div&gt;                    configure("hibernate.cfg.xml").&lt;/div&gt;&lt;div&gt;                    buildSessionFactory();&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        catch (Throwable ex) {&lt;/div&gt;&lt;div&gt;            throw new ExceptionInInitializerError(ex);&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    public static Session getSession() throws HibernateException {&lt;/div&gt;&lt;div&gt;        return ourSessionFactory.openSession();&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    public static void main(final String[] args) throws Exception {&lt;/div&gt;&lt;div&gt;        final Session session = getSession();&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            System.out.println("querying all the managed entities...");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            final Map metadataMap = session.getSessionFactory().getAllClassMetadata();&lt;/div&gt;&lt;div&gt;            for (Object key : metadataMap.keySet()) {&lt;/div&gt;&lt;div&gt;                final ClassMetadata classMetadata = (ClassMetadata) metadataMap.get(key);&lt;/div&gt;&lt;div&gt;                final String entityName = classMetadata.getEntityName();&lt;/div&gt;&lt;div&gt;                final Query query = session.createQuery("from " + entityName);&lt;/div&gt;&lt;div&gt;                System.out.println("executing: " + query.getQueryString());&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                int index = 0;&lt;/div&gt;&lt;div&gt;                for (Object o : query.list()) {&lt;/div&gt;&lt;div&gt;                    index++;&lt;/div&gt;&lt;div&gt;                    //System.out.println("index: " + o);&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;                System.out.println("Contains " + index + " Objects\n");&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        finally {&lt;/div&gt;&lt;div&gt;            session.close();&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-6705042752878825288?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2010/06/iterate-over-your-whole-db-using.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-5050380024527177960</guid><pubDate>Sun, 10 Jan 2010 09:51:00 +0000</pubDate><atom:updated>2010-01-10T11:51:26.129+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>PHP</category><title>The perfect PHP coding environment</title><description>Q: Which tools should one use in order to have the perfect PHP coding environment?&lt;br /&gt;&lt;br /&gt;A:&lt;br /&gt;1. Download XAMPP which contains Apache web server + php + perl + Mysql and much more.&lt;br /&gt;&lt;a href="http://www.apachefriends.org/en/xampp-windows.html"&gt;http://www.apachefriends.org/en/xampp-windows.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Download eclipse PDT (php IDE).&lt;br /&gt;&lt;a href="http://www.eclipse.org/pdt/"&gt;http://www.eclipse.org/pdt/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Install &amp;amp; configure a debugger for PHP (most recommended is Zend's debugger).&lt;br /&gt;&lt;a href="http://www.eclipse.org/pdt/articles/debugger/os-php-eclipse-pdt-debug-pdf.pdf"&gt;http://www.eclipse.org/pdt/articles/debugger/os-php-eclipse-pdt-debug-pdf.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. Install fiddler - a great web debugging proxy.&lt;br /&gt;&lt;a href="http://www.fiddler2.com/fiddler2/"&gt;http://www.fiddler2.com/fiddler2/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. Install wireshark if you have an external component (like an exrternal DB) and you want to sniff the traffic.&lt;br /&gt;&lt;a href="http://www.wireshark.org/"&gt;http://www.wireshark.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6. Configure your fiddler to catch traffic in your localhost (If your DB is internal).&lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2008/12/15/how-to-use-fiddler-on-localhost.aspx"&gt;http://blogs.microsoft.co.il/blogs/shair/archive/2008/12/15/how-to-use-fiddler-on-localhost.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's it,&lt;br /&gt;You've got the tools,&lt;br /&gt;Now it's all about you...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-5050380024527177960?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2010/01/perfect-php-coding-environment.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-971199371311130773</guid><pubDate>Tue, 08 Dec 2009 14:36:00 +0000</pubDate><atom:updated>2009-12-08T16:39:26.295+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Swing</category><category domain='http://www.blogger.com/atom/ns#'>CSS</category><title>Coding java gui using Swing designing it with CSS</title><description>&lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;Building a GUI in java isn't complicated having netbeans as a great Swing gui builder.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;But what if we want to have some of the design left out of the code in a CSS file?&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;As when building a java applet which should blend with a website, out best shot will be to use the same CSS file in the swing code as we use for the website.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;How can we design the GUI components using swing?&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;We will use TK-UI's SwingCSSEngine (which is opensourced).&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;Their documentation can be reached using the following link:&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;a href="http://tk-ui.sourceforge.net/user-guide/cssengine/swingcssengine.html"&gt;http://tk-ui.sourceforge.net/user-guide/cssengine/swingcssengine.html&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;How is it done?&lt;/p&gt;  &lt;ol style="margin-top:0in" start="1" type="1"&gt;  &lt;li class="MsoNormal" style="margin-right:0in;margin-left:.5in;text-align:left;      mso-list:l0 level1 lfo1;tab-stops:list .5in;direction:ltr;unicode-bidi:      embed"&gt;Download the libraries: &lt;a href="http://sourceforge.net/projects/tk-ui/files/org.akrogen.tkui.css.swing/"&gt;http://sourceforge.net/projects/tk-ui/files/org.akrogen.tkui.css.swing/&lt;/a&gt;&lt;/li&gt;  &lt;li class="MsoNormal" style="margin-right:0in;margin-left:.5in;text-align:left;      mso-list:l0 level1 lfo1;tab-stops:list .5in;direction:ltr;unicode-bidi:      embed"&gt;Copy the jar files (also those in their "lib" directory      [excluding the commons if you wish]) into your project's (the swing      project) lib directory.&lt;/li&gt;  &lt;li class="MsoNormal" style="margin-right:0in;margin-left:.5in;text-align:left;      mso-list:l0 level1 lfo1;tab-stops:list .5in;direction:ltr;unicode-bidi:      embed"&gt;In the code before initializing the swing components (a method      which is actually called initComponents() in the netbeans IDE) add the      following code:&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="csscode"&gt;&lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;/* Setting up the CSS styles */&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;// Create Swing CSS Engine&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;CSSEngine engine = new CSSSwingEngineImpl();&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;// Parse style sheet&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;try {&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;// Getting the css from a file&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;InputStream is = class-classNameYouAreRunning.class.getClassLoader().getResource("&lt;b&gt;swing.css&lt;/b&gt;").openStream();&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;engine.parseStyleSheet(is);&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;} catch (IOException e) {&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;e.printStackTrace();&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;}&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;In the above code we assume a file named "swing.css" exists and resides in our classpath.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top:0in" start="1" type="1"&gt;  &lt;li class="MsoNormal" style="margin-right:0in;margin-left:.5in;text-align:left;      mso-list:l0 level1 lfo1;tab-stops:list .5in;direction:ltr;unicode-bidi:      embed"&gt;After the initialization of the swing components (after      initComponents() method in netbeans) add the following code:&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="csscode"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;JFrame frame = this.getFrame();&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;// Apply Styles&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;engine.applyStyles(frame, true);&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"&gt;frame.pack();&lt;/p&gt;  &lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-ansi-language:EN-US;mso-fareast-language:EN-US; mso-bidi-language:HE"&gt;frame.setVisible(true);&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-971199371311130773?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/12/coding-java-gui-using-swing-designing.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-6995894972500405365</guid><pubDate>Tue, 08 Dec 2009 13:18:00 +0000</pubDate><atom:updated>2009-12-08T15:19:49.785+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>WebServices</category><category domain='http://www.blogger.com/atom/ns#'>Log4j</category><title>Log All Your Web-method Calls</title><description>After a good deal of trial-and-error, and delving into the CXF code, I've found a way to get CXF to log every web-method call -- parameters and all.&lt;br /&gt;&lt;br /&gt;Put the following into your Tomcat's log4j.xml:&lt;br /&gt;&lt;br /&gt;&lt;div class="csscode"&gt; &lt;br /&gt;&amp;lt;logger name="org.apache.cxf.service.invoker"&amp;gt; &lt;br /&gt;&amp;lt;level value="trace"&amp;gt;&lt;br /&gt;&amp;lt;/level&amp;gt;&lt;br /&gt;&amp;lt;/logger&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The level should be set to "trace" by default; you won't get ton's of output, just a line (maybe 2) every time a web method is called.  Unfortunately, the line is a bit wordy, as in&lt;br /&gt;&lt;br /&gt;Invoking method public boolean com.company.entities.ws.EntityManagementImpl.login(java.lang.String,java.lang.String,java.lang.String) throws java.io.UnsupportedEncodingException on object com.company.entities.ws.EntityManagementImpl@71e6b with params [CLI, arg2, arg3].&lt;br /&gt;&lt;br /&gt;but it was either use the built in log statement or write a whole interceptor and add it to the chain processing the call.  If we get really annoyed we could always tweak the source and rebuild CXF, but I suggest we first try to live with it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-6995894972500405365?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/12/log-all-your-web-method-calls.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-3909441556840388340</guid><pubDate>Tue, 08 Dec 2009 12:05:00 +0000</pubDate><atom:updated>2009-12-08T14:12:38.982+02:00</atom:updated><title>Java Swing Applet: HowTo</title><description>&lt;span class="Apple-style-span"    style="   font-weight: bold; line-height: 20px;font-family:Verdana, Arial, sans-serif;font-size:13px;color:red;"&gt;This post explains how to take an existing Java Swing application and wrap it as an applet which can then be used on any website.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"    style="   font-weight: bold; line-height: 20px;font-family:Verdana, Arial, sans-serif;font-size:13px;color:red;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;This post assumes the java swing class file (which is run in the original application) to be: FileUploadClientGUIView.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .5in; margin-right: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-align: left; unicode-bidi: embed;"&gt;Create the java applet wrapper as follows:&lt;/li&gt;&lt;/ol&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; &lt;b&gt;packageName&lt;/b&gt;;&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; javax.swing.JApplet;&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; javax.swing.SwingUtilities;&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; &lt;u&gt;AppletStarter&lt;/u&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; JApplet {&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#3f7f5f;"&gt;//Called when this applet is loaded into the browser.&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; init() {&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#3f7f5f;"&gt;//Execute a job on the event-dispatching thread; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; text-indent: .5in; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#3f7f5f;"&gt;//creating this applet's GUI.&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;try&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; {&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;            &lt;/span&gt;SwingUtilities.&lt;i&gt;invokeAndWait&lt;/i&gt;(&lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; Runnable() {&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; run() {&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;                    &lt;/span&gt;createGUI();&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;     &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;           &lt;/span&gt;}&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;            &lt;/span&gt;});&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;} &lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;catch&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; (Exception e) { &lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;            &lt;/span&gt;System.&lt;/span&gt;&lt;i&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#0000c0;"&gt;err&lt;/span&gt;&lt;/i&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;.println(&lt;/span&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#2a00ff;"&gt;"AppletStarter didn't complete successfully"&lt;/span&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;);&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;}&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;private&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#7f0055;"&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; createGUI() {&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#3f7f5f;"&gt;//Create and set up the content pane.&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="mso-tab-count: 1;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background: silver;  Courier New&amp;quot;;  mso-highlight: silver;font-family:&amp;quot;;font-size:11.0pt;color:black;"&gt;FileUploadClientGUIView&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:11.0pt;color:black;"&gt; newContentPane = &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:11.0pt;color:#7f0055;"&gt;new&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:11.0pt;color:black;"&gt; &lt;span style="background: silver; mso-highlight: silver;"&gt;FileUploadClientGUIView&lt;/span&gt;(&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:11.0pt;color:#7f0055;"&gt;new&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:11.0pt;color:black;"&gt; FileUploadClientGUIApp());&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="mso-tab-count: 1;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:#3f7f5f;"&gt;//newContentPane.getRootPane().setOpaque(true); &lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;setContentPane(newContentPane.getRootPane());&lt;span style="mso-spacerun: yes;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; mso-layout-grid-align: none; text-align: left; text-autospace: none; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;}&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;span style=" Courier New&amp;quot;; font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;The only line you should change is the line showing the actual GUI and is bolded out.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="2" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .5in; margin-right: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-align: left; unicode-bidi: embed;"&gt;Jar up the whole application with the wrapper class      included inside. Just change the main-class in the META-INF/MANIFEST.MF      file as follows (to point to the new wrapper class you have just created):&lt;/li&gt;&lt;/ol&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;Main-Class: &lt;b&gt;packageName.&lt;u&gt;AppletStarter&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="3" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .5in; margin-right: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-align: left; unicode-bidi: embed;"&gt;In the HTML / PHP code insert the following lines:&lt;/li&gt;&lt;/ol&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="csscode"&gt;&lt;br /&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&amp;lt;applet code='packageName.AppletStarter '&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL" lang="HE"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;/span&gt;archive = &lt;b&gt;'NameOfJarToRun.jar'&lt;/b&gt;,&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL" lang="HE"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;/span&gt;width = &lt;b&gt;300&lt;/b&gt;,&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL" lang="HE"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;/span&gt;height = &lt;b&gt;260&lt;/b&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt; &lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;/&amp;gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;before the end of the /body tag enter the following line:&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="csscode"&gt;&lt;br /&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span dir="RTL" lang="HE"&gt;&lt;span dir="RTL"&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&amp;lt;script language="JavaScript" src="/js/omi/jsc/s_code_remote.js"&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" dir="LTR" style="direction: ltr; margin-left: .25in; text-align: left; unicode-bidi: embed;"&gt;That's it – your applet now appears on your browser.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-3909441556840388340?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/12/java-swing-applet-howto.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-3256475658716680344</guid><pubDate>Mon, 19 Oct 2009 20:11:00 +0000</pubDate><atom:updated>2009-10-19T22:27:00.153+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Misc</category><category domain='http://www.blogger.com/atom/ns#'>Free</category><title>How to get a brand new laptop in less than an hour</title><description>This isn't my regular stuff I publish.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But I stumbled upon it and I just can't let it go without a post.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, here's the deal, I found this site which earns its living from ads, which just gives brand new laptops for free for whomever signs in!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, what's the catch?&lt;/div&gt;&lt;div&gt;Well, I'm not sure, you see, I have this problem of not living in the USA, so I can't sign in, but you can, so please do, and tell me what one needs to do in order to get that laptop.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As far as I understood - if one signs 40 friends one gets that laptop, no lottery involved.&lt;/div&gt;&lt;div&gt;That's cool, I can sign 40 people in an hour, think of it - getting a laptop after working for an hour. (And I don't mean, creating 40 gmail accounts and signing in each time with a different IP [by restarting the router]).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please check it out and leave a message for all of us.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ohh, by the way, the url is: &lt;a href="http://tinyurl.com/yk696nn"&gt;get a laptop for free&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/5053057173658248087-3256475658716680344?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/10/how-to-get-brand-new-laptop-in-less.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-2224978113699618894</guid><pubDate>Sun, 13 Sep 2009 14:54:00 +0000</pubDate><atom:updated>2009-09-13T17:54:34.267+03:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>JUnit</category><title>Exceptions in JUnit Tests</title><description>&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;"&gt;When an exception is thrown in a unit test, the unit test will fail, giving a red bar - unless there is a try/catch that catches the exception and swallows it quietly.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 13px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;"&gt;Therefore, you should make sure that catching an exception in a unit test is indeed what you really mean to do.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 13px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;"&gt;Should the test really handle the error and continue, perhaps succeeding, or should the test fail, giving a visual indication that something went wrong?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 13px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 13px; line-height: 19px;"&gt;I'd add that when the right behavior of a test case is a thrown Exception, one should add to the @TEST annotation one's expectation.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 13px; line-height: 19px;"&gt;e.g. @Test(expected = NumberFormatException.class)&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/5053057173658248087-2224978113699618894?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/09/exceptions-in-junit-tests.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-8007402895858050660</guid><pubDate>Wed, 13 May 2009 05:52:00 +0000</pubDate><atom:updated>2009-05-13T09:01:39.825+03:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>NetBeans</category><title>False condition comes true?</title><description>&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_-XbcumhS79k/SgphuiETWXI/AAAAAAAAAN0/JKT-1s8gbhU/s1600-h/trueOrFalse.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 292px;" src="http://2.bp.blogspot.com/_-XbcumhS79k/SgphuiETWXI/AAAAAAAAAN0/JKT-1s8gbhU/s400/trueOrFalse.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5335184160620501362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;This is a really weird bug I found in my program.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have an "if" condition, which takes a boolean variable as its condition, the variable's name is bMember.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When I saw unexpected behaviour in my code and decided to debug it I saw the above surprising and un-understandable thing, the debug enters a falsed condition!?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;look at the picture above and see for yourselves.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;by the way, if someone knows why, please post a comment.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Chaiavi&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-8007402895858050660?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/05/false-condition-comes-true.html</link><author>noreply@blogger.com (Chaiavi)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_-XbcumhS79k/SgphuiETWXI/AAAAAAAAAN0/JKT-1s8gbhU/s72-c/trueOrFalse.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-1833837243074902629</guid><pubDate>Mon, 02 Mar 2009 18:38:00 +0000</pubDate><atom:updated>2009-03-02T20:38:45.889+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Dos</category><category domain='http://www.blogger.com/atom/ns#'>Files</category><title>Getting the file names of a given directory as plain text</title><description>&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;At the beginning I searched the web for a freeware which does the job, I didn't even think of paying for this simple job to be done.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;But then I found the simplest of all solution.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Just go to the command prompt (Windows button + R) type in cmd and press enter - you are in the command line view.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Go to the directory from which you want a file list as text.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Then type:&lt;/div&gt;&lt;blockquote&gt;dir /B&lt;br /&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;mark the text and press enter (used as copy in the console view) then paste the filelist from the clipboard anywhere you want.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;If you want the filelist to be in a text file you can shorten the process by executing the following command from the command line console window:&lt;/div&gt;&lt;blockquote&gt;dir /B &amp;gt; filename.txt&lt;br /&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Now the file's list will be in the file you typed (filename.txt).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;A thought: Some functions just don't need any fancy tool for doing them...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-1833837243074902629?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/03/getting-file-names-of-given-directory.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-2145073526425320628</guid><pubDate>Tue, 17 Feb 2009 06:57:00 +0000</pubDate><atom:updated>2009-03-02T14:21:35.290+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>CXF</category><category domain='http://www.blogger.com/atom/ns#'>WebServices</category><title>What does: "Fault occurred while processing" in the client mean? and how do you reveal the real exception?</title><description>I have this CXF client which sometimes throws normal exceptions but some of the other times it throws me a "Fault occurred while processing", well, what does that mean?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you get back a "Fault occurred while processing" it means that a web service threw an unchecked exception.  The CXF framework catches it and puts together a fault message which it sends back to the client.  The client’s stack trace at that point is pretty-much &lt;span style="font-weight: bold;"&gt;irrelevant&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;There may be a way to get CXF to log the server stack trace, but I haven’t found it yet (feel free to comment on the post if you found one).  There may also be a way to stick a handler into the flow to get the exception before constructing the fault message, but I haven’t found that yet either (ditto).&lt;br /&gt;&lt;br /&gt;If a checked-exception is thrown, then the exception – or at least its message – gets sent back to the client where it’s reconstructed and rethrown to be caught by the client.&lt;br /&gt;&lt;br /&gt;Debugging a problem like this, once you can recreate it at will, is simple, as long as you can run the web service in a debugger, so that you can step through the web service and find where the unchecked exception (usually a NullPointerException) is thrown.  Alternatively, you can temporarily surround the code inside the WS with a try/catch and then print the stack when you catch the exception.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-2145073526425320628?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/02/what-does-fault-occurred-while.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-3177253139999523357</guid><pubDate>Mon, 09 Feb 2009 13:52:00 +0000</pubDate><atom:updated>2009-02-09T16:04:22.244+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Swing</category><category domain='http://www.blogger.com/atom/ns#'>NetBeans</category><title>Embed Nimbus's look and feel to your Java programs using Netbeans</title><description>This one gave me a little headache, cause it shouldn't really be an issue, but it turned out to be a non trivial tweak.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What's the story?&lt;/div&gt;&lt;div&gt;I use Netbeans 6.5 and Java 1.6.0_11 and I wanted my gui programs to "wear" the nimbus look and feel.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How should I configure my netbeans gui builder to dress my program with the nimbus l&amp;amp;f?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First thing I needed to configure my current project to use the latest JDK, it used as a default a previous version (1.6.0_07) which doesn't support the nimbus l&amp;amp;f.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First thing was to add the latest jdk to the netbeans platform, go to Tools --&gt; java platform and add the new jdk.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The next task is to add the new jdk to the specific project; project properties --&gt; Libraries and under the Java platform pick the new JDK to run this program. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now that the JDK issue is set, it's time to set the actual L&amp;amp;F: &lt;/div&gt;&lt;div&gt;Project properties --&gt; Application --&gt; Desktop app --&gt; Look &amp;amp; Feel --&gt;&lt;/div&gt;&lt;div&gt;com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's it, compile and run your beatiful program, and pay special attention to those beautiful buttons, scroll bars and tabs.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-3177253139999523357?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/02/embed-nimbuss-look-and-feel-to-your.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-7301515045648107249</guid><pubDate>Sat, 07 Feb 2009 21:03:00 +0000</pubDate><atom:updated>2009-02-07T23:19:37.708+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Ant</category><category domain='http://www.blogger.com/atom/ns#'>Java</category><title>Ant Explorer graphical Ant build tool</title><description>Every serious java developer needs to create or edit some ant building script.&lt;br /&gt;&lt;br /&gt;Eclipse offers nice ant handling features which make the task much easier, eclipse's plugin (which is embeded into eclipse since version 3.1 or so) understands the ant scripting language thus enables not only syntax coloring but also nice mouse hovering which reveals values of properties, variable names which enables finding the source of each variable and also some nice debugging features.&lt;br /&gt;&lt;br /&gt;But, there is one field in which eclipse's ant handling lacks perfection, its in viewing the whole build file in one gaze graphically feature, that feature isn't supported by eclipse.&lt;br /&gt;&lt;br /&gt;Luckily enough, it is supported by YWorks, which created a nice and free util which loads an ant script file and shows it in a beautiful and so very useful way.&lt;br /&gt;&lt;br /&gt;I think that this util (which was released as a standalone as well as an eclipse and idea) is a must for any serious java developer.&lt;br /&gt;&lt;br /&gt;Unluckily, YWorks have removed the util from their site.&lt;br /&gt;&lt;br /&gt;So, here it is to download from my own archive:&lt;br /&gt;&lt;a href="http://blogstorage.chaiware.org/files-1/Antexplorer.V1.03.zip"&gt;As a Standalone&lt;/a&gt;&amp;nbsp;,&lt;br /&gt;&lt;a href="http://blogstorage.chaiware.org/files-1/yWorks_Ant_Explorer_1692_Idea_Plugin.jar"&gt;As an idea plugin.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If any of you have it as an eclipse plugin please, please let me know.&lt;br /&gt;&lt;br /&gt;Chaiavi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-7301515045648107249?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/02/ant-explorer-graphical-ant-build-tool.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-1909096198003164444</guid><pubDate>Thu, 29 Jan 2009 19:49:00 +0000</pubDate><atom:updated>2009-02-10T17:31:44.027+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Drivers</category><title>D-link DU-E100 Driver (USB to Lan)</title><description>Several years ago (at about 2002) I found this store which got stuck with a large amount of these usb to lan cards, so they sold the card for about 6$ a piece; it's not that I needed one, it was just the great price.&lt;br /&gt;&lt;br /&gt;I bought with a friend of mine about 10-20 pieces and sold them for double the price.&lt;br /&gt;&lt;br /&gt;Anyway, I kept one for myself of course, and of course - I didn't use it till... today.&lt;br /&gt;&lt;br /&gt;My Ethernet card stopped working suddenly and I didn't have any access to the internet, I started looking for a solution, till I found this old card - old but useful (I'm writing this post using the same card).&lt;br /&gt;&lt;br /&gt;The problem was finding the driver, although I had the original 1.44 inch disk, it is useless when you don't have any slot to insert it - and no, you can't insert a diskette into a USB port.&lt;br /&gt;So I started looking in the internet, and I found out that D-Link doesn't have the driver on their site, and I couldn't find it anywhere else!&lt;br /&gt;&lt;br /&gt;I didn't have any choice but to take the diskette to my work and copy it a USB flash disk, in order to copy it to my computer so I could write this post.&lt;br /&gt;&lt;br /&gt;Then I thought, If I found it hard to find this driver - maybe others too will find it difficult, why not help them out?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogstorage.chaiware.org/files-1/D-link.DU-E100.zip"&gt;So here's the link to the driver,&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-1909096198003164444?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/01/d-link-du-e100-driver-usb-to-lan.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-2105058875938629010</guid><pubDate>Thu, 15 Jan 2009 10:15:00 +0000</pubDate><atom:updated>2009-01-15T12:18:24.191+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Collections</category><title>Get a feel for what your computer can do</title><description>&lt;span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 13px; line-height: 19px; "&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;When examining performance with an eye to optimization, it's worth developing a feel for how fast typical software operations actually are on modern hardware. That sense will help you know when to look deeper for the real cause of a bottleneck, or when to look elsewhere, or when to mistrust the results that your profiling tools are giving you.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;For instance, I ran the following short bit of code:&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;TreeSet&lt;double&gt; tree = new TreeSet&lt;double&gt;();&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;int found = 0;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;long time = System.currentTimeMillis();&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;System.out.println("add #'s to tree");&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;for (int i = 0; i &lt;&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;long time2 = System.currentTimeMillis();&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;System.out.println("elapsed:  " + (time2 - time));&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;System.out.println("find #'s in tree");&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;for (int i = 0; i &lt;&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;    if (tree.contains(Math.random())) found++;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;long time3 = System.currentTimeMillis();&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;System.out.println("elapsed:  " + (time3 - time2));&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;Here's the output:&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;add #'s to tree&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;elapsed: 8240&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;find #'s in tree&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;elapsed: 5476&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;We see that filling a Java TreeSet with 1M random Doubles (which involves generating the random numbers, creating the Double objects, creating the TreeSet nodes for the objects, finding the correct insertion point in the tree for each object and occasionally rebalancing the tree – not to mention all the memory allocations) took about 8 seconds on my laptop, meaning an average of 8 microseconds for each iteration of the loop.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;Generating a second set of 1M random Doubles and searching among the 1M in the tree for each of them took about 5.5 seconds, or 5.5 microseconds per iteration.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;In short, to make a modern computer break a sweat you have to either be doing a huge number of operations, or operations of huge complexity or – more likely – both and/or waiting for slow system events like network or disk access.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-2105058875938629010?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/01/get-feel-for-what-your-computer-can-do.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-7272201331167790299</guid><pubDate>Wed, 14 Jan 2009 11:42:00 +0000</pubDate><atom:updated>2009-01-14T13:47:02.905+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Collections</category><title>Use Parent/Interface types rather than implementation types</title><description>&lt;span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 13px; line-height: 19px; "&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;If you've got a method that returns, say, a &lt;i&gt;TreeMap&lt;/i&gt; pointer, you can generally declare it to return a &lt;i&gt;Map&lt;/i&gt;; you're unlikely to use a method of&lt;i&gt;TreeMap&lt;/i&gt; that isn't a method of &lt;i&gt;Map&lt;/i&gt; (if there even are such things), so the calling code won't be affected.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;This allows you, though, to change the implementation class to, say, &lt;i&gt;HashMap&lt;/i&gt; without any other code being affected.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;The same goes for parameters passed into a method. In general, only explicitly use the implementation type when creating the instance [i.e.&lt;i&gt;new&lt;/i&gt;()].&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;[&lt;b&gt;NOTE&lt;/b&gt;: There's an issue peculiar to C++ where one must make sure that the implementation class' destructor is virtual, or it won't be executed when one deletes a pointer of the parent-class type.]&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-7272201331167790299?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/01/use-parentinterface-types-rather-than.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-2549582895945643546</guid><pubDate>Tue, 13 Jan 2009 07:13:00 +0000</pubDate><atom:updated>2009-01-14T13:47:35.326+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Collections</category><title>The use of Java Sets</title><description>&lt;div class="MsoNormal"&gt;The &lt;i&gt;Set&lt;/i&gt; interface requires that the underlying  implementation can tell whether two objects added to it are the same, so that  the second can be rejected (a &lt;i&gt;Set&lt;/i&gt; is defined as only containing one copy  of any given object).  Ensuring adherence to this requirement involves both the  &lt;i&gt;Set&lt;/i&gt; implementation and the mechanism by which the objects can be  distinguished from one-another.  The two basic implementations that i use in my code, &lt;i&gt;TreeSet&lt;/i&gt; and &lt;i&gt;HashSet&lt;/i&gt;, handle this in different  ways:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;TreeSets&lt;/i&gt; are ordered b-trees (or something very  similar) of objects.  Because they’re ordered, the objects they contain must  implement the &lt;i&gt;Comparable&lt;/i&gt; interface, or alternatively the &lt;i&gt;TreeSet&lt;/i&gt;  itself may have a &lt;i&gt;Comparator&lt;/i&gt; member; in either case, a &lt;i&gt;compareTo&lt;/i&gt;()  method is called to compare objects to one another.  &lt;i&gt;compareTo&lt;/i&gt;() returns  -1, 0 or 1, depending on whether the first argument is less than, equal to or  greater than the second; this is how the nodes in the tree are ordered, and how  the &lt;i&gt;TreeSet&lt;/i&gt; code can tell when two objects are equal.  You wouldn’t have  noticed this if you’ve only been using &lt;i&gt;TreeSets&lt;/i&gt; to store &lt;i&gt;Strings&lt;/i&gt;,  &lt;i&gt;Integers&lt;/i&gt;, etc. because those classes all implement &lt;i&gt;compareTo&lt;/i&gt;(),  but if you create your own class and try to add instances to a TreeSet without  having defined &lt;i&gt;compareTo&lt;/i&gt;(), you’ll get an exception saying that your  instance can’t be cast to Comparable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;HashSets&lt;/i&gt; are typically unordered, and thus don’t need  the objects they contain to be &lt;i&gt;Comparable&lt;/i&gt;.  What they &lt;i&gt;do&lt;/i&gt; need is  for those objects to implement &lt;i&gt;hashCode&lt;/i&gt;(), which returns an &lt;b&gt;int&lt;/b&gt;  value that the HashSet maps to one of its &lt;i&gt;buckets&lt;/i&gt;, and equals(), which it  uses to compare objects in the same bucket.  Here too, the basic classes like  &lt;i&gt;String&lt;/i&gt; and &lt;i&gt;Integer&lt;/i&gt; have appropriate definitions for these  methods.  Unlike &lt;i&gt;compareTo&lt;/i&gt;(), though, &lt;i&gt;hashCode&lt;/i&gt;() and  &lt;i&gt;equals&lt;/i&gt;() are defined by &lt;i&gt;Object&lt;/i&gt; and thus inherited by any class  that doesn’t overwrite them.  Which brings us – finally – to my reason for  writing this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Object.hashCode&lt;/i&gt;(), at least in the current  implementations of the JVM (1.6), returns a value based on an object’s address, rather  than anything having to do with the object’s contents.  That means that two  objects that are equal according the their class semantics will probably be  placed in different buckets and probably not even compared to one-another.  Even  if they end up in the &lt;i&gt;same&lt;/i&gt; bucket and &lt;i&gt;are&lt;/i&gt; compared, the  &lt;i&gt;Object.equals&lt;/i&gt;() method probably won’t be able to figure out that they’re  really equivalent.  So, not only might you end up with multiple copies of the  same data, you might not be able to find whether a given object is contained in  the HashSet, since the lookup algorithm will have the same problems as  insertion.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;To get around these potential problems (and they’re only  potential – they may never happen in real life) one should add &lt;i&gt;hashCode&lt;/i&gt;() and  &lt;i&gt;equals&lt;/i&gt;() overrides for those data-model classes that get put into  &lt;i&gt;HashSets&lt;/i&gt;.  &lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The real pain in this issue is that you won't be notified if you didn't override those methods, cause they are inherited (non efficiently) from Object.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-2549582895945643546?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2009/01/use-of-java-sets-in-java.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5053057173658248087.post-162614592512919029</guid><pubDate>Tue, 02 Dec 2008 14:33:00 +0000</pubDate><atom:updated>2008-12-04T12:10:27.083+02:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>JUnit</category><category domain='http://www.blogger.com/atom/ns#'>JavaDocs</category><title>JavaDoc tool doesn't export the Method's Javadocs</title><description>My boss wanted me to deliver a full list of all of my JUnit tests I did on my code.&lt;br /&gt;&lt;br /&gt;When he saw my exasperated expression he offered me to just export the test's javadocs and deliver it as a report, well that made me happy :-)&lt;br /&gt;&lt;br /&gt;I've adopted writing javadocs all of the time as a good coding practice, so this task shouldn't have made me any problems, but... it did.&lt;br /&gt;&lt;br /&gt;As you well know, I use Eclipse as my IDE, so I just went to file --&amp;gt; export --&amp;gt; javadoc.&lt;br /&gt;Cool, everything seemed to work like a charm, till I looked at the javadocs - all was documented nicely except for - the method's javadocs, and that is where most of my javadocs are written.&lt;br /&gt;&lt;br /&gt;What was my problem?&lt;br /&gt;I found out that because I use JUnit 4 as my unit testing engine, I must use a @Test annotation, then I write my javadoc, here's my bug, apparently, when the tool sees an annotation it assumes the method's declaration has started, so when it tries exporting javadocs it doesn't look after any annotation it just jumps to the next method - where it finds another annotation and skips forward again.&lt;br /&gt;&lt;br /&gt;So the solution is simple although tedious, I have just to swap the annotation and javadocs location, you on the other hand can write them in the right manner to begin with, and won't encounter the same problem.&lt;br /&gt;&lt;br /&gt;Chaiavi.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5053057173658248087-162614592512919029?l=myblog.chaiware.org' alt='' /&gt;&lt;/div&gt;</description><link>http://myblog.chaiware.org/2008/12/eclipse-doesnt-export-methods-javadocs.html</link><author>noreply@blogger.com (Chaiavi)</author><thr:total>2</thr:total></item></channel></rss>
