<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-23793039</id><updated>2012-02-16T09:29:40.368Z</updated><title type='text'>Open Source Lover</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-23793039.post-7431671387686458654</id><published>2010-09-04T17:54:00.002+01:00</published><updated>2010-09-05T17:09:12.260+01:00</updated><title type='text'>A day at Apple Store</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:arial;font-size:small;"&gt;&lt;h1&gt;&lt;span class="Apple-style-span"  style="font-weight: normal;  font-size:small;"&gt;Today, I decided to spend some time at Covent Garden &lt;a href="http://www.apple.com/uk/"&gt;Apple&lt;/a&gt; store and play with Apple devices. Time to time, I go and try the new toys at Apple store at Regent street, yet I had not been at Covent Garden store before.&lt;/span&gt;&lt;/h1&gt;&lt;p style="margin-bottom: 0cm; "&gt;Covent Garden has a relaxing and fun loving atmosphere with street shows, pubs, market area and night clubs in the area. I guess, that relaxing and exciting feeling also effects the people who comes to shops in the area. So, that may explain, why I felt like quite keen to play with Apple devices at Covent Garden Apple store. It felt like, home, far from rushing to do the things and by having enough space and computers, laptops, Ipods, Iphones(state of art devices of Apple) for everybody, it was quite pleasant environment.&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;I entered from one of the doors to an old and royal looking building where full of Apple gadgets, computers, tools and toys are placed for any body's use. As a person, who does not have Mac experience, first I found it difficult to find out even to scroll in the page without using side toolbars on Macbook. Then, I tried a bit more by hoping that I will find out by myself how to use a Mac OS operating system. But, the inspiration that I waited for last five minutes did not come till a friendly young Apple store assistant came with a kind smile on her face. I guess, she has seen many people like me, who really wanted to prove that he/she is not alien at all to technology, but a  Windows user or Linux user...&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;After spending around 20 minutes showing me and making me try the things on Macbook, I finally started to feel comfortable with Mac as well. At that instant a smile came to my face, it might be more or less the same smile when Apple software engineers packed the final release of Mac OS operating system itself and I guess she was happy to see that, so she had a content, genuine smile on her face too. Afterwards I started to ask more questions regarding usage and compatibility of Windows apps in Mac by asking, if an emulator exists for Mac to run simple exe files which can run os Microsoft operating systems and if I can publish a book and order it pressed to an address as I can do for photo albums and some other questions a bit more in technical depth. By asking help of another store assistant, they provide me my necessary information and answers with patience. So I could answer questions on my mind with their help and maybe, they got some new ideas from my questions to improve the existing functionality.&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;After playing with Macbook, Macbook pro, iMacs, the touch sensitive mouse and sleek aluminium keyboard, which look like items to be shown at modern art gallery rather than in a store, I moved to my favorite devices and probably Apple's favorite devices, which saved Apple than being just another computer manufacturer, to iPods! They are just fantastic! My favorite model is iPod nano, small, light, colorful, aesthetic and with full of features. That small device can play videos, songs, contains fm radio, digital camera and voice record. It may have even more features that I could not discover yet. I had my headphone with me, so I could test the voice quality of that beautiful device. It was just fantastic. As an Ipod touch owner, I wanted to have one Ipod nano as well.&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;While, I was playing with Ipod touches, which are same as mine. A store assistant asked me if I need any help and we had a nice chat regarding, why Apple does no let Adobe Flash applications to be used on iPods and iPhones. After talking a bit more, I noticed actually they do not have acertain explanation for it. They know only as much as another person who follows technology news. Yet, it was visible, they are very much interested in with Apple products. Still, I expected them to know a bit more than that.&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;After spending a bit more time with new iPhone, I moved to upstairs. Apple Covent Garden store has four floors and mainly I spent my time at the entrance floor, where you can grab a Macbook or an iPod or an iMac and start using it. In the second floor, they have face to face facility where you can get a Mac training and make yourself comfortable with Apple products and at the same time they have a special section for kids to play(which I regret now, for not spending some time there) and  Apple genius team to help customers to customize your machine just for you.&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;While I was just about to play with Macbook pro another friendly store assistant came and asked if I need any help. I said yes and asked him, why a home user, who only needs a computer to surf web, watch movie, listen music would buy an Macbook for almost two times price of a normal laptop or even three times price of a netbook, which has same features. As a person, who prefers to buy the things which makes me happy to use them, of course I value, style of Apple devices, user friendliness &amp;amp; security of Mac OS, durability and reliability of Apple products, service quality even after you bought an item from Apple or even before you decided to buy one, how passionate they are when, they are designing their products externally and internally. Yet, I wanted to hear that from a person who works in Apple store. I would be happier at least, if he told me as much as I knew about Apple products(by reading Inside Steve's Brain book, following each new product of Apple and mainly by own personal experience of using Apple devices) in sentences without using “I &lt;b&gt;guess&lt;/b&gt;” or “it &lt;b&gt;can&lt;/b&gt; be because of” blocks. Obviously, when I am asking such a question, I expect an expert answer, rather than a guess. Luckily most of the customers who gets an Apple are there with a positive attitude, as same as me. So my over all experience is quite happy one.&lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;Till, I come Covent Garden Apple store, my favorite company for customer service was Turkish Airlines(Always happy to fly with them!), now, It became two companies in same level. In store, I felt like being between friends and as free as using my own computer, where nobody puts pressure to on you to sell something to you(Just do not move the Macbooks much, alarm is a bit sensetive), instead I had an impression, they were really trying to make me have an enjoyable time in store. &lt;/p&gt;&lt;p style="margin-bottom: 0cm; "&gt;So, Apple store in Covent Garden is a store with full of gadgets or full state of art technology toys and people who are willing and ready to help you. That is indeed very good customer service. If you have chance to pay a visit to London, Apple Covent Garden store, go and experience it yourself!  Have fun! &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-7431671387686458654?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/7431671387686458654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=7431671387686458654&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/7431671387686458654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/7431671387686458654'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2010/09/day-at-apple-store.html' title='A day at Apple Store'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-4844666566243726864</id><published>2009-09-08T14:08:00.031+01:00</published><updated>2009-09-22T09:08:35.666+01:00</updated><title type='text'>Adobe Flex 3</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Hi,&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Recently ( yesterday), I am asked to do a small the Flex Project as part of my initial screening interview. I liked it very much and it was much different than what I imagined.  I had good fun, while i am trying to achieve my homework. It is the turely provides a user friendly and rich web experience for users. With Adobe Flex you can create powerful and astonishing looking web applications easily. I think, this is the future. To see what can be done, check the links at the end of that post.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;So What is Flex ? Traditional web user interface is html + css + javascript output and that has limited ability. Yet, you may still think, google mail interface is amazing. But that impression won't last long after you see flex application. Check this example, &lt;span class="Apple-style-span"  style=" border-collapse: collapse; font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a href="http://techrageo.us/2007/06/19/communicating-charts-with-flex/" target="_blank" style="color: rgb(119, 153, 187); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;http://techrageo.us/2007/06/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a href="http://techrageo.us/2007/06/19/communicating-charts-with-flex/" target="_blank" style="color: rgb(119, 153, 187); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;wbr&gt;19/communicating-charts-with-&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;wbr&gt;&lt;a href="http://techrageo.us/2007/06/19/communicating-charts-with-flex/" target="_blank" style="color: rgb(119, 153, 187); "&gt;flex/&lt;/a&gt;, this example works directly on your browser. Like it ? :). You see how good looking it is. It is like a desktop application working on browser in swf file integrated into html code. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style=" border-collapse: collapse; font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Development of this kind of application is as easy as developing desktop application user interface. I said interface, because flex does not directly interracts with server side. Instead it uses Soap, xml, web services... So When you want to execute a sql query directly on server, you can not do that. Flex is designed as user interface. So  when you want to build an application which interracts with database, you need to have a server which does the biz logic with Java, .Net, Php, C or almost with anything :) that provides a web service interface to Flex, and then use the remote objects to read / write that data from server. &lt;a href="http://livedocs.adobe.com/flex/3/html/help.html?content=data_intro_2.html"&gt;Read more about that&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Code syntax is similar to java. Source code is stored in .mxml files and .as files(.as files are for Action Script files). Mxml have very similar sytax to xhtml. So if you know about xml, xslt, html and Java like language, that means you will learn that very quick. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I have used the &lt;a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3"&gt;Flex Builder 3&lt;/a&gt; to do my small project. Which you can download it from internet and it is free for 60 days for Trial use. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I found &lt;a href="http://livedocs.adobe.com/flex/"&gt;a lots of documentation&lt;/a&gt; and there are&lt;a href="http://www.adobe.com/products/flex/"&gt; tons of examples&lt;/a&gt; on the net. Seems like it is used much more than i thought before.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;As an abosulte beginner,  I am requested to the following things.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=" border-collapse: collapse;  "&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;We would like from you to create small application that reads data from server&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; (Note: when solving the issue, do not use Flex Charting to show graphs).&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style=" border-collapse: collapse;  "&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;Data are available at URL: ! &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Sorry, I can not give you the url but i will give you the php file which I put on my own web server ( simply setup wamp or phptriad to have php, mysql, apache server set and than put a php file which returns a json format string)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;br /&gt;communication protocol is JSON.&lt;br /&gt;&lt;br /&gt;After calling URL, server should return dates array with time in variable:&lt;br /&gt;timeList.&lt;br /&gt;&lt;br /&gt;Use this array as input to show graph that shows dependency of time on record count per hour / minute, etc.&lt;br /&gt;&lt;br /&gt;- results write into data grid&lt;br /&gt;- show charts, that will show all records on one chart with one-day granularity (that means column chart, where each column represents one day)&lt;br /&gt;- bonus: when clicking any row in data-grid, the appropriate column will change its color&lt;br /&gt;&lt;br /&gt;Appropriately comment the source, pack it and send it back to me the results.&lt;br /&gt;&lt;br /&gt;Please use latest Adobe Flex 3&lt;br /&gt;&lt;br /&gt;You can download data and put to your own server. The main purpose is just to send the data in JSON format.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" border-collapse: collapse;  "&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Enjoy.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;That is another good example for using DataGrid and Charts.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" border-collapse: collapse;  "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a href="http://techrageo.us/2007/06/19/communicating-charts-with-flex/" target="_blank" style="color: rgb(119, 153, 187); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;http://techrageo.us/2007/06/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a href="http://techrageo.us/2007/06/19/communicating-charts-with-flex/" target="_blank" style="color: rgb(119, 153, 187); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;wbr&gt;19/communicating-charts-with-&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a href="http://techrageo.us/2007/06/19/communicating-charts-with-flex/" target="_blank" style="color: rgb(119, 153, 187); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;wbr&gt;flex/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Note: Because of (useless) blogger, I can not post here the whole code. It deletes the tags. So Please have a look at the link and the code and above and steal the bit you need from my code :).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Here is the Code.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;Note: Page has data grid and a chart. Their data providers are dpDGDate and dpChtTime. So set them on flex builder on their properties are add line to set their provider to the code.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;import mx.messaging.SubscriptionInfo;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;import mx.binding.utils.BindingUtils;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;import com.adobe.serialization.json.JSON;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            import flash.events.*;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            import flash.net.*;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            import mx.collections.ArrayCollection;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;[Bindable]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;private var timeArr:Array;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;[Bindable]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private var dpDGDate:ArrayCollection;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;[Bindable]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private var dpChtTime:ArrayCollection;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private var prevSelectedColumn:DisplayObject;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * This function will be called when Run button is pressed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will read the Json formatted data.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            public function run():void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var loader:URLLoader = new URLLoader();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var request:URLRequest = new URLRequest(); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                configureListeners(loader);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                // Requesting Data from server.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                request.url = "http://localhost/json.php";               &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                loader.load(request);                                  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will assign eventHandlers to methods.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param dispatcher IEventDispatcher&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function configureListeners(dispatcher:IEventDispatcher):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                dispatcher.addEventListener(Event.COMPLETE, completeHandler);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                dispatcher.addEventListener(Event.OPEN, openHandler);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will be called when call is completed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will create Json object and will call function to set data providers. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event Event&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function completeHandler(event:Event):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {               &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    var tempLoader:URLLoader = URLLoader(event.target);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    var obj:Object = JSON.decode(tempLoader.data);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    setDataProviders(obj);                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                                   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                catch (error:Error)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    trace("completeHandler: " + error.toString());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will be called when handler is open&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will create Json object and will call function to set data providers. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event Event&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function openHandler(event:Event):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                trace("openHandler: " + event);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function to get information about progress &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event ProgressEvent&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function progressHandler(event:ProgressEvent):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function is called when Security Error is returned &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event SecurityErrorEvent&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function securityErrorHandler(event:SecurityErrorEvent):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                trace("securityErrorHandler: " + event);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function to get information about HTTP Status &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event HTTPStatusEvent&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function httpStatusHandler(event:HTTPStatusEvent):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                trace("httpStatusHandler: " + event);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function is called when Security Error is returned &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event IOErrorEvent&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function ioErrorHandler(event:IOErrorEvent):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                trace("ioErrorHandler: " + event);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;          /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will get the array data from json object, which will be used as dataProvider for DataGrid &amp;amp; Chart.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param obj Json Object, which is donwloaded from server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function setDataProviders(obj:Object):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {               &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;timeArr = obj.timeList;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    timeArr.sort();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    setDataProviderForDataGrid();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    setDataProviderForChart();                                 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                catch (error:Error)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    trace("setDataProviderForDataGrid: " + error.toString());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }                                                           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will get the array data, which will be used as dataProvider for DataGrid.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function setDataProviderForDataGrid():void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {               &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;dpDGDate = new ArrayCollection(timeArr);                                 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                catch (error:Error)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    trace("setDataProviderForDataGrid: " + error.toString());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will get the array data, which will be used as dataProvider for Chart.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will group the data by date and will get the count&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Hopefully it will do it correct :D. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function setDataProviderForChart():void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {                            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if (timeArr.length &gt; 0){                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var arrDays:Array = [];                  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var ln:uint = timeArr.length;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var count:uint = 0;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var str:String = timeArr[0].toString().substr(0,10); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;for(var i:uint; i &lt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                                           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if (timeArr[i].toString().substr(0,10) == str){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;count++;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if(i == ln -1){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  var obj:Object = {Day:str, Count:count};&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  arrDays.push(obj);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  trace("Day: "+ str +", Count: "+ count.toString());   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}else{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var obj:Object = {Day:str, Count:count};&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;arrDays.push(obj);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;trace("Day: "+ str +", Count: "+ count.toString());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;count = 1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;str = timeArr[i].toString().substr(0,10);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;dpChtTime = new ArrayCollection(arrDays);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;trace("DataProvider Dynamic: " + dpChtTime.toString());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                catch (error:Error)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                    trace("setDataProviderForChart: " + error.toString());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                }         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;           /*            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Function will highlight the column on chart&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * Makes a costly seach in Array Collection and find the index of column&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            * @param event&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The click event&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            */             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            private function dataGridClick(event:Event):void{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var str:String = event.currentTarget.selectedItem.toString();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;str = str.substr(0,10);            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var ind:int = -1; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var arr:Array = dpChtTime.toArray();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;for( var i:uint; i &lt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;var o:Object = arr[i];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if (o.Day == str){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ind = i + 1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if (ind != -1){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;barHighlight("chtTime", ind);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;trace("dataGridClick selected row content : " + event.currentTarget.selectedItem.toString() + " " + str + " Index:" + ind);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;/*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;* This function will highlight a column/bar in a column/bar chart&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;* @param barName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The name/id of the bar/column chart&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;* @param barIndex&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The position of the column you want to highlight&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;*/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;private function barHighlight( barName:String, barIndex:int ):void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if (prevSelectedColumn)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;prevSelectedColumn.alpha = .8;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;prevSelectedColumn.filters = [];  //remove the glow filter &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;prevSelectedColumn = this[barName].series[0].getChildAt( barIndex ); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if (prevSelectedColumn)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;prevSelectedColumn.alpha = 1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;prevSelectedColumn.filters = [new GlowFilter(), new DropShadowFilter()];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}              &lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;  "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;And here is the part of php file(&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; "&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;json.php&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;).Note: Write between php tags. Bloggers somehow deletes the tags.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;echo '{"tg_flash": null, "timeList": ["2007-06-22 18:02:13", "2007-06-22 22:45:00", "2007-06-23 10:18:35", "2007-06-23 10:41:35", "2007-06-23 10:43:26", "2007-06-23 10:43:45", "2007-06-23 10:45:08", "2007-06-23 10:45:28", "2007-06-23 11:17:52", "2007-06-23 13:13:08", "2007-06-23 13:36:14", "2007-06-24 09:14:04", "2007-06-24 11:42:45", "2007-06-24 18:22:13", "2007-07-01 02:58:25", "2007-07-01 03:03:18", "2007-06-27 15:18:46", "2007-06-27 13:07:24", "2007-06-27 13:08:00", "2007-06-27 13:08:42", "2007-06-27 13:08:48", "2007-06-27 13:10:27", "2007-06-27 13:10:58", "2007-06-27 13:11:03", "2007-06-27 13:11:21", "2007-06-27 13:12:12", "2007-06-27 13:12:42", "2007-06-27 13:13:21", "2007-06-27 13:13:34", "2007-06-27 13:13:35", "2007-06-27 13:13:41", "2007-06-27 13:13:49", "2007-06-27 13:13:59", "2007-06-27 13:14:37", "2007-06-27 13:14:38", "2007-06-27 13:14:46", "2007-06-27 13:15:28", "2007-06-27 13:16:14", "2007-06-27 13:16:15", "2007-06-27 13:17:21", "2007-06-27 13:18:25", "2007-06-27 13:19:15", "2007-06-27 13:19:44", "2007-06-27 13:20:06", "2007-06-27 13:20:19", "2007-06-27 13:21:12", "2007-06-27 13:21:19", "2007-06-27 13:21:54", "2007-06-27 13:22:08", "2007-06-27 13:23:39", "2007-06-27 13:23:52", "2007-06-27 13:24:02", "2007-06-27 13:24:30", "2007-06-27 13:25:08", "2007-06-27 13:27:05", "2007-06-27 13:28:32", "2007-06-27 13:28:32", "2007-06-27 13:28:42", "2007-06-27 13:29:45", "2007-06-27 13:30:10", "2007-06-27 13:30:17", "2007-06-27 13:30:41", "2007-06-27 13:30:42", "2007-06-27 13:30:51", "2007-06-27 13:31:26", "2007-06-27 13:31:34", "2007-06-27 13:32:46", "2007-06-27 13:33:27", "2007-06-27 13:33:40", "2007-06-27 13:33:57", "2007-06-27 13:34:07", "2007-06-27 13:34:16", "2007-06-27 13:35:04", "2007-06-27 13:35:16", "2007-06-27 13:35:38", "2007-06-27 13:36:07", "2007-06-27 13:36:20", "2007-06-27 13:36:26", "2007-06-27 13:36:40", "2007-06-27 13:37:35", "2007-06-27 13:37:55", "2007-06-27 13:38:45", "2007-06-27 13:39:46", "2007-06-27 13:40:19", "2007-06-27 13:40:25", "2007-06-27 13:40:37", "2007-06-27 13:41:18", "2007-06-27 13:41:31", "2007-06-27 13:41:56", "2007-06-27 13:41:57", "2007-06-27 13:42:55", "2007-06-27 13:42:56", "2007-06-27 13:44:12", "2007-06-27 13:44:37", "2007-06-27 13:45:34", "2007-06-27 13:45:35", "2007-06-27 13:45:43", "2007-06-27 13:46:39", "2007-06-27 13:46:40", "2007-06-27 13:46:47", "2007-06-27 13:47:21", "2007-06-27 13:49:18", "2007-06-27 13:49:26", "2007-06-27 13:50:29", "2007-06-27 13:51:06", "2007-06-27 13:52:09", "2007-06-27 13:53:07", "2007-06-27 13:53:58", "2007-06-27 13:54:45", "2007-06-27 13:54:59", "2007-06-27 13:56:29", "2007-06-27 13:56:36", "2007-06-27 13:56:37", "2007-06-27 13:56:44", "2007-06-27 13:56:49", "2007-06-27 13:56:50", "2007-06-27 13:56:52", "2007-06-27 13:57:19", "2007-06-27 13:57:40", "2007-06-27 13:57:47", "2007-06-27 13:57:53", "2007-06-27 13:58:06", "2007-06-27 13:58:27", "2007-06-27 13:58:37", "2007-06-27 13:59:09", "2007-06-27 13:59:44", "2007-06-27 13:59:46", "2007-06-27 13:59:54", "2007-06-27 14:00:42", "2007-06-27 14:01:29", "2007-06-27 14:01:42", "2007-06-27 14:01:46", "2007-06-27 14:03:32", "2007-06-27 14:04:08", "2007-06-27 14:04:47", "2007-06-27 14:05:35", "2007-06-27 14:07:36", "2007-06-27 14:08:05", "2007-06-27 14:08:33", "2007-06-27 14:08:39", "2007-06-27 14:09:31", "2007-06-27 14:09:39", "2007-06-27 14:10:26", "2007-06-27 14:10:46", "2007-06-27 14:10:50", "2007-06-27 14:10:56", "2007-06-27 14:10:58", "2007-06-27 20:43:35", "2007-06-27 20:43:45", "2007-06-27 20:43:48", "2007-06-27 20:44:01", "2007-06-27 20:44:26", "2007-06-27 20:45:08", "2007-06-27 20:45:15", "2007-06-27 20:46:53", "2007-06-27 20:49:12", "2007-06-27 20:50:39", "2007-06-27 20:51:08", "2007-06-27 20:52:01", "2007-06-27 20:52:39", "2007-06-27 20:53:07", "2007-06-27 20:53:31", "2009-01-28 18:03:35", "2009-02-08 14:16:04", "2009-05-11 18:57:16", "2009-05-11 19:16:21"]}';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'times new roman';color:#CC9933;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;And here is the result when you run.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_cOtyOFydhww/SqZbYJMF9XI/AAAAAAAAApE/lCd_heswDpo/s1600-h/JsonResultBeforeRunClick.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 161px;" src="http://2.bp.blogspot.com/_cOtyOFydhww/SqZbYJMF9XI/AAAAAAAAApE/lCd_heswDpo/s320/JsonResultBeforeRunClick.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5379087275282265458" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;After clicking the run button.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_cOtyOFydhww/SqZfxNIp0iI/AAAAAAAAApU/eWsLemLpPeQ/s1600-h/JsonResultAfterRunClick.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 195px;" src="http://2.bp.blogspot.com/_cOtyOFydhww/SqZfxNIp0iI/AAAAAAAAApU/eWsLemLpPeQ/s400/JsonResultAfterRunClick.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5379092103884821026" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I think, it is very user friendly and very enjoyable to work with Flex ;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;More to read..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ten things to correct about Flash and it's ability.&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.adobe.com/devnet/flex/articles/ten_misconceptions.html"&gt;http://www.adobe.com/devnet/flex/articles/ten_misconceptions.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Flex Language reference&lt;/div&gt;&lt;div&gt;&lt;a href="http://livedocs.adobe.com/flex/3/langref/"&gt;http://livedocs.adobe.com/flex/3/langref/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Flex for Java developers&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.adobe.com/devnet/flex/articles/flex_java_eseminar.html"&gt;http://www.adobe.com/devnet/flex/articles/flex_java_eseminar.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Spring Powered Flex&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.springsource.org/spring-flex"&gt;http://www.springsource.org/spring-flex&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And more about Flex and Java&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.adobe.com/devnet/flex/flex_java.html"&gt;http://www.adobe.com/devnet/flex/flex_java.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And more about Flex :) Interesting articles&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.jamesward.com/blog/flex-and-java-resources/"&gt;http://www.jamesward.com/blog/flex-and-java-resources/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I loved that one - 11 mins to create a Flex app.&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.adobe.com/products/flex/media/flexapp/"&gt;http://www.adobe.com/products/flex/media/flexapp/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Google uses Flex too ( SAP and Oracle too :D )&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.google.com/finance?catid=us-66529330"&gt;http://www.google.com/finance?catid=us-66529330&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And here is a company which does amazing apps with Flex &lt;/div&gt;&lt;div&gt;&lt;a href="http://www.atollon.com/"&gt;http://www.atollon.com/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How about that amazing example - open source component&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.jamesward.com/blog/2008/09/03/thinking-in-flex-with-bruce-eckel/"&gt;http://www.jamesward.com/blog/2008/09/03/thinking-in-flex-with-bruce-eckel/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is new with Flex 3&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.adobe.com/devnet/flex/articles/flex3_whatsnew.html"&gt;http://www.adobe.com/devnet/flex/articles/flex3_whatsnew.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style=""&gt;Some other nice web portals with Flex&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://miniusa.com/?#/build/configurator/mini_conv-m"&gt;http://miniusa.com/?#/build/configurator/mini_conv-m&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.sliderocket.com/"&gt;http://www.sliderocket.com/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://aviary.com/"&gt;http://aviary.com/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://buzzword.acrobat.com/"&gt;https://buzzword.acrobat.com/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.intelisea.com/demo/demo.htm"&gt;http://www.intelisea.com/demo/demo.htm&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://desktop.ebay.com/" style="text-decoration: none;"&gt;http://desktop.ebay.com/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.deriden.com.tr/"&gt;http://www.deriden.com.tr/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And of course &lt;a href="http://flex.org/"&gt;http://flex.org/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Quick Start&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.adobe.com/devnet/flex/quickstart/defining_data_models/"&gt;http://www.adobe.com/devnet/flex/quickstart/defining_data_models/&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-4844666566243726864?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/4844666566243726864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=4844666566243726864&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4844666566243726864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4844666566243726864'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2009/09/adobe-flex-3.html' title='Adobe Flex 3'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_cOtyOFydhww/SqZbYJMF9XI/AAAAAAAAApE/lCd_heswDpo/s72-c/JsonResultBeforeRunClick.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-6713574557833576022</id><published>2009-01-20T23:44:00.011Z</published><updated>2010-12-17T14:46:38.634Z</updated><title type='text'>Nesneye Yönelimli Programlama Nedir ? Object Oriented Programming Guide for Turkish Speaking Developers</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;This post will be in Turkish, because there are too many good resources tell about OOP in English and there is a need to write one for Turkish Developers. If you are keen to read about OOP programming in English, I strongly suggest to read from Java Tutorial from Sun web site.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/docs/books/tutorial/java/javaOO/index.html" target="_blank"&gt;http://java.sun.com/docs/&lt;wbr&gt;books/tutorial/java/javaOO/&lt;wbr&gt;index.html&lt;/a&gt;,&lt;br /&gt;&lt;a href="http://java.sun.com/docs/books/tutorial/java/concepts/index.html" target="_blank"&gt;http://java.sun.com/docs/&lt;wbr&gt;books/tutorial/java/concepts/&lt;wbr&gt;index.html&lt;/a&gt;&lt;br /&gt;  and&lt;br /&gt;&lt;a href="http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html" target="_blank"&gt;http://java.sun.com/docs/&lt;wbr&gt;books/tutorial/java/javaOO/&lt;wbr&gt;accesscontrol.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A nice summary about Java OOP Concept&lt;br /&gt;&lt;a href="http://www.cis.upenn.edu/%7Ematuszek/cit591-2002/Pages/o-o-concepts.html"&gt;http://www.cis.upenn.edu/~matuszek/cit591-2002/Pages/o-o-concepts.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A nice site tells about OO Design Patterns&lt;br /&gt;&lt;a href="http://www.oodesign.com/"&gt;http://www.oodesign.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Turkish Bit...&lt;br /&gt;&lt;br /&gt;Yazim ve imla hatalari icin simdiden ozur dilerim...&lt;br /&gt;&lt;br /&gt;Google Traslate Turkce destegi vermeye basladi zannedersem.  Yukarida ki linkleri, google translatte ceviripde kullanabilirsiniz.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Nesneye Yonelimli Programlama&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Programlamaya baslayan bir cok kisinin duydugu ve ogrenmek istedigi nesneye yonelim programlamayi (Object Oriented Programming, OOP kisacasi) bu yazidan sonra ogreneciginizi umuyorum.&lt;br /&gt;&lt;br /&gt;Bu yazidaki ornekleri Java programlama diline gore anlatacagim. Sizde aynisini yapmak isterseniz, &lt;a href="http://www.netbeans.org/downloads/index.html" target="_blank"&gt;Netbeans Ide&lt;/a&gt; indirmeniz baslamak icin yeterli olacaktir.&lt;br /&gt;&lt;br /&gt;Aslinda basit ve temel birsey olmasina ragmen okullarda niye ogretilmedigini yada ogretilemedigine pek anlam veremiyorum ama yinede madem ki bu yaziyi okuyorsunuz, demek ki ogrenmek niyetindesiniz ve simdiden kendinizi yari yariya ogrenmis sayabilirsiniz.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Nedir Nesneye Yonelimli Programlama ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Nesneye yonelimli programlamayi anlamak icin once nesneyi anlamak gerekir. Nesne, kendisi ile alakali veriyi ve bunlari isleyen methodlari icinde barindiran bellekteki yapidir.&lt;br /&gt;&lt;br /&gt;Sinif ise, nesneyi olusturacak ozellikleri belirleyen kodtur.&lt;br /&gt;Nesne ile sinifi bir mimarin plani ve bu planin vucuda gelmis hali, yani bina olarakta dusunebilirsiniz.&lt;br /&gt;&lt;br /&gt;Nesneye yonelimli programlama, ilgili method, degisken ve sabitleri bir sinif icinde toplayarak, benzer bir islev gerektiren kod yazilmasi gerektiginde var olan sinifi kullanarak kod tekrari yapmadan yada en az kod tekrari yaparak yeni sinifin yazilmasini saglayan, farkli islevleri ve veriyi kendi siniflarinda gruplayarak kod yazma duzenidir. Tam olmadi ama :), ben orneklerle dilimin dondugunce anlattikca ve siz uyguladikca anlayacaginiz umuyorum.&lt;br /&gt;&lt;br /&gt;VB, Pascal, Asp, Php ( nesneye yonelimli olmayan, maglum artik PHP de nesneye yonelimli, java kopyasi garip dil :D ) bir dil de program yazanlarin genelde yapilan sey, konuyla alakali methodlari(Procedure veya Function) ayri ayri dosyalarda yazarlar ve bu methodlara tekrar ihtiyac duyduklarinda bunlari diger sayfadan cagirip, icindeki methodlari kullanirlar. Yada hepsini ayni dosyada yazarlar.&lt;br /&gt;&lt;br /&gt;Ornek : Php de formdan girilen datanin zararli karakterlerinin degistirilmesi veya arindirilmasi icin (ornegin) guvenlik.php adinda icinde yazmis oldugunuz replace kodlarinin yer aldigi methodu yazmakta oldugunuz php dosyasina include etmeniz ve o methodu kullanmaniz gibi.&lt;br /&gt;&lt;br /&gt;Yada pascalda uzuuuunnnnnn bir unit yazmaniz ve konuyla ilgili herseyin yer aldigi bir pas doyasinda isinizi bir suru method yardimi ile halletmeniz gibi.&lt;br /&gt;&lt;br /&gt;Durumu bir ornekle aciklayalim,&lt;br /&gt;&lt;br /&gt;Ornegin bir magaza otomasyonu sistemi yaziyorsunuz ve bir musteri kaydi yapacaksiniz. Ama once gelen veriyi guvenlik suzgecinden gecirmek istiyorsunuz, ardindan da butun bu verileri database de bir tabloya yazmalisiniz.&lt;br /&gt;&lt;br /&gt;Nasil yapardiniz ?&lt;br /&gt;&lt;br /&gt;Formdan veriler geldi, hepsini tek tek aldiginiz global degiskenlere atadiniz, ardindan ilgili methodu cagirdiniz musteri verilerini temizledi.&lt;br /&gt;&lt;br /&gt;Database e yazicaksiniz fakat, musteri tablosu ile gelen verileriniz arasinda fark var. Ornegin tabloda isim adinda bir kolon var ve icerigi, isim ve soyismin birlesiminden olusuyor, ve adres kolunuda formdan gelen, bina no, sokak, sehir ulke ve posta kodu bilgilerinden olusuyor. Yani 2 ayri method da bunlar icin yazmaniz lazim ki bu bilgileri uygun formatta tabloya yazabilin.&lt;br /&gt;&lt;br /&gt;Simdi bu yukarida ki ornege bakarak akliniza soyle bir kod blogu geliyor olmasi lazim (bazi durumlarda, ayni sey bir kac farkli sekilde yapilabilir)&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Global degiskenler&lt;/u&gt;&lt;br /&gt;isim&lt;br /&gt;soyisim&lt;br /&gt;adres&lt;br /&gt;bina no&lt;br /&gt;sokak&lt;br /&gt;sehir&lt;br /&gt;ulke&lt;br /&gt;posta kodu&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Methodlar&lt;/u&gt;&lt;br /&gt;musteriFormParametleriniOkuVeG&lt;div&gt;lobalDegiskenlereYaz&lt;br /&gt;musteriVerileriniGuvenlikKontr&lt;wbr&gt;olundenGecir&lt;br /&gt;musteriIsimSoyisimBeraberDondu&lt;wbr&gt;r&lt;br /&gt;musteriAdresiniTekSatirHalinde&lt;wbr&gt;Dondur&lt;br /&gt; musteriBilgileriniDatabaseYaz&lt;br /&gt;&lt;br /&gt;{ tabii bunun gibi methodlarla yazmayip hepsini tek bir dosyada sanki tek methodmus gibi satir satir da yazip mukemmel bir corba yapabilirsiniz }&lt;br /&gt;&lt;br /&gt;Bu ornekten gordugumuz, guvenlik isleminin, database e kayit isleminin tek bir dosyada yer almasi. Yani demek istedigim birbiriyle direk alakasi olmayan methodlarin ayni dosyada yer almasi ve musteri ile ilgili temel islemlerin ( ismin veya adresin tek satir olarak alinmasinin ) methodlarla yapilmasi.&lt;br /&gt;&lt;br /&gt;Boyle bir kod yazmak yerine OOP kullanarak acaba bu kodu daha duzenli nasil yazabilirdik ?&lt;br /&gt;&lt;br /&gt;Bir Musteri sinifi yazardik, icinde daha onceki ornekte global variable olarka tanimladigimiz degiskenler olurdu.&lt;br /&gt;&lt;br /&gt;Bir Guvenlik sinifi yazardik, guvenlik islemleri icin methodlarini icinde barindirirdi. Bizim guvenlik kontrol methoduna parametre olarak verecegimiz musteri nesnesinin degiskenlerini guvenli olanlari ile degistirip bize yollardi.&lt;br /&gt;&lt;br /&gt;Bir DatabaseKontrol sinifi yazardik, musterinin, database den okunup musteri nesnesine yuklenmesi yada musterinin database yazilmasini saglayan methodlari icerirdi.&lt;br /&gt;&lt;br /&gt;ve butun bunlari hepsini birbirine baglayacak bir MusteriKontrol sinifi yazardik. Bu sinifta, yeni musteri kaydi gibi bir methodu olur, bu method formdan gelen verileri yeni olusturulan Musteri nesnesine yukler, ardindan guvenlik nesnesinin ilgili methoduna  gonderirdi, gelen guvenli Musteri nesnesini de DatabaseKontrol nesnesinin ilgili kayit methoduna yollar database e kaydi saglanirdi.&lt;br /&gt;&lt;br /&gt;Yani islem basamaklari soyle olucakti.&lt;br /&gt;1-MusteriKontrol Yeni Kayit methodunu cagir. {Bundan sonraki islemler Yeni Kayit methodu icinde oluyor}&lt;br /&gt;2-Musteri nesnesi yarat&lt;br /&gt;3-Musteri nesnesini formdan gelen verilerle yukle&lt;br /&gt;  4-Guvenlik nesnesi yarat&lt;br /&gt;5-Guvenlik nesnesinin musteri guvenlik kontrol methoduna musteri nesnesini guvenlik kontrolu icin yolla&lt;br /&gt;6-Geri gelen temiz musteriyi Yeni olusturdugun Database Kontrol nesnesinin kayit methoduna yolla ve kaydet.&lt;br /&gt;&lt;br /&gt;Burada yaptigimiz sey, ilgili methodlari ve verileri tek bir cati altinda toplayarak, anlasilmasi ve ileride degistirilmesi daha kolay bir kod yazmis olduk.&lt;br /&gt;&lt;br /&gt;Guvenlik kontrolu ile alakali methodlar tek bir sinif altinda. Database ile ile ilgili olanlar tek bir sinif altinda yer aldi.&lt;br /&gt;&lt;br /&gt;Bu ornek her ne kadar basit olsada, ayni musterinin kaydinin guncellenmesi, silinmesi ve aranmasi durumlarini goz onunde bulundurup, nesneye yonelimli kod ve nesnelerle ne kadar daha anlasilir ve duzenli kod yazabileceginiz hakkinda birazda olsa fikir vermis oldugunu umarim. Ileride temel OOP presiplerini aciklarken verecegim kod ornekleri ile birlikte daha iyi anlayacaginizi umuyorum.&lt;br /&gt;&lt;br /&gt;Bir ornekte soyle olsun,&lt;br /&gt;&lt;br /&gt;Bir programiniz var ve bu programda 30 tane formunuz var, her form acildiginda database formun acilis anini form adiyla birlikte yazmaniz gerekiyor. Bunu nasil yaparsiniz ?&lt;br /&gt;&lt;br /&gt;Yanitlar.&lt;br /&gt;&lt;br /&gt;1- 30 formunda onLoad olayina (onLoad formun acildiginda cagirilan method oldugunu var sayiyorum) kod yazarim, boylece istenen veriyi database e kayit ederim.&lt;br /&gt;&lt;br /&gt;2- 1 Formun onLoad olayina (onLoad formun acildiginda cagirilan method oldugunu var sayiyorum) kod yazarim, diger 29 formuda bu formdan turetirim, boylece istenen veriyi database e kayit ederim.&lt;br /&gt;&lt;br /&gt;2. Yontemde cok daha az kod yazicaksiniz ve mantikli gibi. Ya peki bazi formlarda form adiyla birlikte hangi kullanicinin formu actigini yazmak istersek ? bunu nasil yapariz ?&lt;br /&gt;&lt;br /&gt;Iste burada 2. yontemde kullanilan nesneye yonelimli programlamadan fazlasini kullanmamiz gerekecek. Peki nasil yapariz bunu?&lt;br /&gt;&lt;br /&gt;Bu durumda yapmaniz gereken, bir method eklemek, mesela textOnLoad. Bu method size acilista database yazicaginiz veriyi dondurecek ve bu methodu da onLoad methodunda cagiracaksiniz. Farkli yazi yazmanin gereken formlarda, ana formdan gelen textOnLoad methodunun icerigini degistireceksiniz.&lt;br /&gt;&lt;br /&gt;Simdi sira geldi bunlari nasil yapariz.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Nesneye Yonelimli Programlamanin Temel Prensipleri &lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Nesneye yonelimli programlamada uc ana prensip vardir. Bunlar, &lt;b&gt;Inheritance&lt;/b&gt; ( Miras alma ), &lt;b&gt;Encapsulation&lt;/b&gt; ( yapilan asil islemi gizleme ), &lt;b&gt;Polymorphism&lt;/b&gt; ( cok sekillilik ).&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Nedir Inheritance?&lt;br /&gt;&lt;br /&gt;&lt;/u&gt;Turkceye, miras alma olarak cevirebiliriz. Ve bunuda javada ki &lt;b&gt;extends&lt;/b&gt; kelimesi ile yapariz. Javada siniflar baska bir siniftan (class) yada bir arayuzden ( interface ) miras alinabilir.&lt;br /&gt;&lt;br /&gt;Soyle dusunun, binanin mimari bir planini yaptiniz ama bu plandan okulda olur hastahane de olabilir. Daha sonra bu planin bir fotokopisini cektiniz ve buna hastahane olmasi icin gerekli diger oda ve alanlari eklediniz ve Hastahane plani oldu. Baska bir gunde ayni ana plandan bir fotokopi daha cektiniz ve okul icin gerekli oda ve alanlari ekleyip Okul plani olusturdunuz. Isin guzel tarafi her seferinde sifirdan baslamadiniz, var olan ozellikleri kullanip ustune eklediniz yani ana plandan miras alarak diger planlari olusturdunuz.&lt;br /&gt;&lt;br /&gt;Miras almadaki tek kisitlama, sinifin private olarak tanimlanmis uyeleri alt sinif tarafindan gorulemezler. Simdi Private da ne demek ?&lt;br /&gt;&lt;br /&gt;Nesneye yonelimli dillerde gorunurluk alanini belirleyen nesne ozellikleri vardir. Bunlar &lt;b&gt;Public&lt;/b&gt;, &lt;b&gt;Protected&lt;/b&gt;, &lt;b&gt;Default&lt;/b&gt; ve &lt;b&gt;Private&lt;/b&gt; tir.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Public&lt;/b&gt; nesne ve methodlar, her yerden gorulebilinir. Yani , ayni siniftan, alt siniftan, ayni alan adinda ki siniflardan ve hatta diger alan adlarindan.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Protected&lt;/b&gt; nesne ve methodlar, ayni siniftan, alt siniftan, ayni alan ayni alan adinda ki siniflardan gorulebilinir.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default&lt;/b&gt; yani nesneleri veya methodlari hicbir gorunurluk ozelligi tanimladan yazmissaniz, ayni siniftan,  ayni alan ayni alan adinda ki siniflardan gorulebilinir.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Private&lt;/b&gt; nesne ve methodlar, sadece ayni sinif icinden gorulebilinir.&lt;br /&gt;&lt;br /&gt;Simdi bir ornekle durumu daha anlasilir yapalim. Ornegin bir kargo firmasi icin hacim hesabi yapan bir program yapicaksiniz. Cisimler farkli sekillerde ve renklerde gelebilir, mesela kare, dikdortgen yada kure seklinde. Sizden istenen, size verilen cismin boyutlarina gore hacmini, hesaplamaniz, rengini ve agirligini da hesaba katarak fiyat cikarmaniz.&lt;br /&gt;&lt;br /&gt;Bunun icin yapmaniz gereken tum cisimlerde ortak yanlari iceren bir Cisim sinifi yazmaniz. Ve diger kare, dikdortgen ve kure siniflarini bu siniftan turetmeniz.&lt;br /&gt;&lt;br /&gt;Cisim sinifi Java kodu:&lt;br /&gt;&lt;i&gt;public class Cisim {&lt;br /&gt;&lt;br /&gt; protected String renk = "Kirmizi";&lt;br /&gt;&lt;br /&gt; public Cisim(){}&lt;br /&gt;&lt;br /&gt; public Cisim(String renk){&lt;br /&gt;     if (renk.length() &gt; 0)&lt;br /&gt;          this.renk = renk;&lt;br /&gt; }  &lt;br /&gt;&lt;br /&gt; public String hacimHesapla(){&lt;br /&gt;     return renk + " renkli cisim hacim hesabi yapildi";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;      Cisim cisim1 = new Cisim("Gok yuzu mavisi");&lt;br /&gt;     System.out.println( cisim1.hacimHesapla() );&lt;br /&gt;&lt;br /&gt;     Cisim cisim2 = new Cisim();&lt;br /&gt;     System.out.println( cisim2.hacimHesapla() );&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Programi calistirdiginiz da size soyle bir cikti vericek.&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Gok yuzu mavisi renkli cisim hacim hesabi yapildi&lt;br /&gt;Kirmizi renkli cisim hacim hesabi yapildi&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;Simdide kare sinifini yazalim ve onun hesabini yapalim.&lt;br /&gt;&lt;br /&gt;Egerki kare sinifini Cisim sinifinda miras alirsam onun bir kopyasini yapmis olurum.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Kare extends Cisim{&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;&lt;/i&gt;&lt;i&gt;        // Dikkat edin burada kareye renk belirtmiyoruz, Bu karenin rengi Cisim sinifindan geliyor&lt;br /&gt;    // Cisim sinifinda renk degiskenin baslangic degeri kirmizi oldugu icin Kare sinifida bunu miras aliyor&lt;/i&gt;&lt;br /&gt;&lt;i&gt;        Kare cisim = new Kare();&lt;br /&gt;     System.out.println( cisim.hacimHesapla() );&lt;br /&gt; }&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Calistirdigim da soyle bir cikti verir.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Kirmizi renkli cisim hacim hesabi yapildi&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Tabii ki bizim istedigimiz Cisim sinifini bire bir kullanmak degil, onun yerine onun hacimHesapla metodunu kareye gore uyarlamak.&lt;br /&gt;&lt;br /&gt;Bunu icin yapacagimiz basit. hacimHesapla sinifini gelistiricez/degistiricez. Nesneye yonelim programalada buna &lt;b&gt;Override&lt;/b&gt; deniyor. Yani Ana siniftan miras alinan methodun cocuk sinifta degistirilmesi.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Override Method&lt;/b&gt; ana siniftaki method ile ayni ozelliklere sahip olmali, yani ayni sayida ve tipte argumentlar almali. Egerki sadece method adi ayni fakat aldigi argument sayisi ve tipleri farkli ise bu &lt;b&gt;Overload &lt;/b&gt;method olur.&lt;br /&gt;&lt;br /&gt;Override ve Overload methodlari nesneye yonelimli programlamaya &lt;b&gt;Polymorphism&lt;/b&gt; yanini katarlar.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Nedir Polymorphism ?&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;Polymorphism, ayni turdeki nesnelerin farkli ozellikler gostermesidir. Asagidaki ornekte goreceginiz gibi, hacimHesapla methodu Cisim sinifinda farkli, Kare sinifinda farkli calismaktadir.&lt;br /&gt;&lt;br /&gt;Kare ornegi ile bunu gorelim.&lt;br /&gt;&lt;br /&gt;Kare sinifi Java kodu:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Kare extends Cisim{&lt;br /&gt; // Constructorlar miras alinmadigi icin tekrardan yaziyoruz&lt;br /&gt; public Kare(){}&lt;br /&gt;&lt;br /&gt; // Constructorlar miras alinmadigi icin tekrardan yaziyoruz&lt;br /&gt; public Kare(String renk){&lt;br /&gt;     this.renk = renk;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; // bu bir override method, ana sinifta ki method yerine bunu gormek istiyoruz&lt;br /&gt; public String hacimHesapla(){&lt;br /&gt;     return renk + " renkli karenin hacim hesabi yapildi";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; //bu bir overload method, ayni isimde farkli parametreler de methodlar&lt;br /&gt; public String hacimHesapla(int kenarUzunlugu, int yukselik){&lt;br /&gt;     return renk + " Karenin hacmi = " + Integer.toString(&lt;/i&gt;&lt;i&gt;kenarUzunlugu * &lt;/i&gt;&lt;i&gt;kenarUzunlugu * yukselik);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     Kare cisim = new Kare();&lt;br /&gt;     System.out.println( cisim.hacimHesapla(2, 2));&lt;br /&gt;     System.out.println( cisim.hacimHesapla());&lt;br /&gt;&lt;br /&gt;     Kare cisim1 = new Kare("Yesil");&lt;br /&gt;     System.out.println( cisim1.hacimHesapla(4, 6));&lt;br /&gt;     System.out.println( cisim1.hacimHesapla());&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Kare yi calistirdiginizda ekran ciktisi su olucak.&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Kirmizi Karenin hacmi = 4&lt;br /&gt;Kirmizi renkli karenin hacim hesabi yapildi&lt;br /&gt;Yesil Karenin hacmi = 24&lt;br /&gt;Yesil renkli karenin hacim hesabi yapildi&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Bu konulari daha iyi anlamak icinse, Dikdortgen ve Kure siniflarini Cisim sinifinda miras alarak olusturunuz ve hacimHesapla methodunu gerektigi sekilde degistiriniz.&lt;br /&gt;&lt;br /&gt;Cisim sinifindaki methodlari ve degiskenleri farkli gorunurluk alanlaridan tanimlayip Kare ve sizin yeni olusturacaginiz siniflarda kullanmayi deneyiniz.&lt;br /&gt;&lt;br /&gt;Mesela renk degiskenini private tanimlayip Kare sinifini derlemeye calisiniz. Calismadigini gorur ve sasirirsaniz lutfen yukarida ki gorunurluk alan belirleyici ozellikleri tekrardan okuyunuz(Public, Protected, Default, Private).&lt;br /&gt;&lt;br /&gt;Buraya kadar &lt;b&gt;Class Inheritance&lt;/b&gt; (siniftan miras alma) ve &lt;b&gt;Polymorphism&lt;/b&gt; i gordunuz. &lt;b&gt;Interface Inheritance&lt;/b&gt; (arayuzden miras alma ) a gecmeden once, &lt;b&gt;Abstract Class&lt;/b&gt; tan bahsedelim.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Nedir Abstract Class ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Abstract siniflar sadece miras almak icin kullanilirlar ve nesne haline getirelemezler. Var olus amaclari, bir kac ayri sinif icin bir sablon sinif olusturmaktir. Abstract sinif en az bir abstract method icermek zorundadir. Abstract method, turetilen her sinifta, O sinif icin ozellikle yazilmasi gereken methoddur.&lt;br /&gt;&lt;br /&gt;Ornegin yukarida ki ornekte, kargo programinda hicbir zaman Cisim sinifi kullanilmayacak, onun yerine Cisim sinifindan turetilmis Kare, Kure, Dikdortgen vb. siniflar yer alicak. Kare sinifinin hacimHesapla methodunu kure icin kullanamiyacaginiza gore, demek ki kure icin ayriyetten yazmaniz gerekecek hacimHesapla methodunu.&lt;br /&gt;Bu durumda Cisim sinifi bir sablon olarak kullanilmis olur ve Abstract olarak tanimlanabilir. ve hacimHesapla methodu abstract tanimlanabilir, boylece Cisim sinifindan tureyen her sinif kendi hacimHesapla method kodunu yazmak zorunda kalirlar.&lt;br /&gt;&lt;br /&gt;Abstract Cisim sinifi Java kodu:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;//Abstract Sinif, nesne olusturalamaz&lt;br /&gt;public abstract class Cisim {&lt;br /&gt;&lt;br /&gt; protected String renk = "Kirmizi";&lt;br /&gt;&lt;br /&gt; public Cisim(){}&lt;br /&gt;&lt;br /&gt; public Cisim(String renk){&lt;br /&gt;     if (renk.length() &gt; 0)&lt;br /&gt;         this.renk = renk;&lt;br /&gt; }  &lt;br /&gt;&lt;br /&gt; //abstract method, her turetilen sinifta tekrar yazilmak zorundadir.&lt;br /&gt; public abstract String hacimHesapla();&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Diger siniflarda bir degisme olmadi cunku, zaten hacimHesapla methodunu biz ihtiyacimiz geregi tekrar yazmis idik.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Class Inheritance&lt;/b&gt;  &lt;b&gt;Final Class&lt;/b&gt; lardan mumkun olmaz. Java programlama dilinde &lt;b&gt;Final&lt;/b&gt; kelimesi bir sinifin onune gelirse, bu siniftan turetilemez, eger bir methodun onune gelirse. o method turetilen siniflarda degistirlemez yani override yapilamaz.&lt;br /&gt;&lt;br /&gt;Final Class ornegi Java kodu:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;//Final class Kare, bu siniftan turetilemez.&lt;br /&gt;public final class Kare extends Cisim{&lt;br /&gt; // Constructorlar miras alinmadigi icin tekrardan yaziyoruz&lt;br /&gt; public Kare(){}&lt;br /&gt;&lt;br /&gt; // Constructorlar miras alinmadigi icin tekrardan yaziyoruz&lt;br /&gt; public Kare(String renk){&lt;br /&gt;     this.renk = renk;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; // bu bir override method, ana sinifta ki method yerine bunu gormek istiyoruz&lt;br /&gt; public final String hacimHesapla(){&lt;br /&gt;     return renk + " renkli karenin hacim hesabi yapildi";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; //bu bir overload method, ayni isimde farkli parametreler de methodlar&lt;br /&gt; public String hacimHesapla(int kenarUzunlugu, int yukselik){&lt;br /&gt;     return renk + " Karenin hacmi = " + Integer.toString(&lt;/i&gt;&lt;i&gt;kenarUzunlugu * &lt;/i&gt;&lt;i&gt;kenarUzunlugu * yukselik);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     Kare cisim = new Kare();&lt;br /&gt;     System.out.println( cisim.hacimHesapla(2, 2));&lt;br /&gt;     System.out.println( cisim.hacimHesapla());&lt;br /&gt;&lt;br /&gt;     Kare cisim1 = new Kare("Yesil");&lt;br /&gt;     System.out.println( cisim1.hacimHesapla(4, 6));&lt;br /&gt;     System.out.println( cisim1.hacimHesapla());&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Kare sinifi Final Class olarak tanimlanmistir ve bu siniftan baska sinif turetilemez.&lt;br /&gt;&lt;br /&gt;Simdi gelelim bu Cisimlerin boyutuna gore nasil ucret hesaplayacagimiza. Bunun icinde bir kargo sinifi yazicaz ve bunun fiyatHesapla methodu olucak. fiyatHesapla methodu kendine arguman olarak verilen Cisim nesnesinin hacimHesapla methodunu cagiracak, cismin boyutuna gore fiyat hesapliyacak.&lt;br /&gt;&lt;br /&gt;Bunun icin Cisim ve Kare siniflarini biraz degistiriyoruz. hacimHesapla methodu bize sayi dondursun ve bizde bu sayiya gore fiyat belirleyecegiz.&lt;br /&gt;&lt;br /&gt;Cisim sinifi Java kodu :&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;//Abstract Sinif, nesne olusturalamaz&lt;br /&gt;public abstract class Cisim {&lt;br /&gt;&lt;br /&gt; protected String renk = "Kirmizi";&lt;br /&gt;&lt;br /&gt; public Cisim(){}&lt;br /&gt;&lt;br /&gt; public Cisim(String renk){&lt;br /&gt;     if (renk.length() &gt; 0)&lt;br /&gt;         this.renk = renk;&lt;br /&gt; }  &lt;br /&gt;&lt;br /&gt; //abstract method, her turetilen sinifta tekrar yazilmak zorundadir.&lt;br /&gt; public abstract int hacimHesapla();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;Kare sinifi Java kodu :&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;//Final class Kare, bu siniftan turetilemez.&lt;br /&gt;public final class Kare extends Cisim{&lt;br /&gt;&lt;br /&gt; // Constructorlar miras alinmadigi icin tekrardan yaziyoruz&lt;br /&gt; private int kenarUzunlugu = 0;&lt;br /&gt; private int yukseklik = 0;&lt;br /&gt;&lt;br /&gt; public Kare(int kenarUzunlugu, int yukseklik){&lt;br /&gt;     this.kenarUzunlugu = kenarUzunlugu;&lt;br /&gt;     this.yukseklik = yukseklik;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public int hacimHesapla(){&lt;br /&gt;     return kenarUzunlugu * kenarUzunlugu * yukseklik;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     Kare cisim = new Kare(2, 2);&lt;br /&gt;     System.out.println( cisim.hacimHesapla());&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;DikDortgen sinifi Java kodu:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class DikDortgen extends Cisim{&lt;br /&gt;&lt;br /&gt;private int kenarAUzunlugu = 0;&lt;br /&gt;private int kenarBUzunlugu = 0;&lt;br /&gt;private int yukselik = 0;&lt;br /&gt;&lt;br /&gt;public DikDortgen (int kenarAUzunlugu,int kenarBUzunlugu, int yukseklik) {&lt;br /&gt;  this.kenarAUzunlugu = kenarAUzunlugu;&lt;br /&gt;  this.kenarBUzunlugu = kenarBUzunlugu;&lt;br /&gt;  this.yukselik = yukseklik;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; public int hacimHesapla(){&lt;br /&gt;     return kenarAUzunlugu * kenarBUzunlugu * yukselik;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     DikDortgen cisim = new DikDortgen(2,4,2);&lt;br /&gt;     System.out.println( cisim.hacimHesapla());&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Kargo sinifi Java kodu :&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Kargo {&lt;br /&gt;&lt;br /&gt; // Cisim sinifindan turemis herhangi bir nesne argument olarak gelebilir.&lt;br /&gt;// Cunku Cisim sinifindan turemis her nesnenin hacimHesapla methodu olmasi bir zorunluluk&lt;br /&gt; public String fiyatHesapla(Cisim cisim){&lt;br /&gt;     if (cisim.hacimHesapla() &gt; 20){&lt;br /&gt;         return "Buyuk Cisim Fiyati kullanilacak";&lt;br /&gt;     } else {&lt;br /&gt;         return "Kucuk Cisim Fiyati kullanilacak";&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     Kargo kargo = new Kargo();&lt;br /&gt;     Kare kare = new Kare (2, 4);&lt;br /&gt;     System.out.println(kargo.&lt;wbr&gt;fiyatHesapla(kare));&lt;br /&gt; &lt;br /&gt;     DikDortgen dikDortgen = new DikDortgen (2,5,4);&lt;br /&gt;     System.out.println(kargo.&lt;wbr&gt;fiyatHesapla(dikDortgen));&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;Calistirdiginiz da soyle bir cikti alicaksiniz.&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Kucuk Cisim Fiyati kullanilacak&lt;br /&gt;Buyuk Cisim Fiyati kullanilacak&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Iste size &lt;b&gt;Polymoprhism&lt;/b&gt; , fiyatHesapla methodu hem karenin hem dikdortgenin fiyatini hesapliyabiliyor. Bu Kare sinifininda, DikDortgen sinifininda Cisim sinifindan turemis olmasi sayesinde mumkun oluyor.&lt;br /&gt;&lt;br /&gt;Kare sinifinda extends Cisim kelimelerini silip calistirmayi denerseniz, Kargo sinifin fiyatHesapla methodunu Kare sinifindan bir nesne ile cagiramazsiniz.&lt;br /&gt;&lt;i&gt;        Kargo kargo = new Kargo();&lt;br /&gt;     Kare kare = new Kare (2, 4);&lt;br /&gt;&lt;b&gt;        System.out.println(&lt;u&gt;kargo.&lt;wbr&gt;fiyatHesapla(kare)&lt;/u&gt;);&lt;/b&gt; // Bu satir hata vericektir.&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;i&gt; &lt;/i&gt;&lt;b&gt;Interface Inheritance Nedir ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Interface ler sadece method signature ve sabitlere sahip, kodun uygulama kismini icermiyen nesneye yonelimli programlama nesneleridir. Ve icerdigi methodlar ile birbirinden farkli yada benzer siniflar arasinda benzerlik kurmak icin kullanilir. Herhangi bir sinifa uygulanabilirler, siniflarin turedikleri ana sinifin bir onemi yoktur.&lt;br /&gt;&lt;br /&gt;Eger ki sinif bir binanin plani ise, &lt;b&gt;Interface&lt;/b&gt; (arayuz) de bi planinin uymasi gereken kurallar listesidir.&lt;br /&gt;&lt;br /&gt;Egerki siniflariniz icin bir sablona ihtiyaciniz var ve sablondaki &lt;u&gt;her&lt;/u&gt; methodun turetilen her sinifta tekrar yazilmasi gerekiyorsa &lt;b&gt;Abstract Class &lt;/b&gt;kullanmak yerine &lt;b&gt;Interface&lt;/b&gt; kullanabilirsiniz.&lt;br /&gt;&lt;br /&gt;Inteface Inheritance in, Abstract Class Inheritance cok benzesede temel fark, siniftan miras alirken, ana sinif sadece bir tane olabilir ( Java dilinde ) fakat arayuzden miras alirken istediginiz kadar arayuz tanimlayabilirsiniz.&lt;br /&gt;&lt;br /&gt;Class Inheritance ile Cisim sinifinda turetilerek olusturalan, Kare ve Dikdortgen cisimlerinin ortak noktasi her ikisinin de ayni ana siniftan turemis olmasi ve haliyle ana sinifin ozelliklerine(method, sabit, degisken) sahip olmalaridir. Bunun bize sagladigi faydayi Kargo sinifin fiyatHesapla methodunda gorduk.&lt;br /&gt;&lt;br /&gt;Fiyat hesapla methoduna herhangi bir Cisim sinifi turevini parametre olarak yollayabilirsiniz, Cunku Cisim sinifindan turemis olan her sinifin hacimHesapla methodu olacaktir.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Peki Interface Inheritance i nerede kullanicaz ?&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Ornegin Kargo ile Kare ve DikDortgen cisimlerin fiyatlarini hesaplayabiliyoruz ya peki bir Panda yi kargo ile gondermek istesek onun kargo fiyatini nasil hesaplariz :) ? Diyelim ki Panda da Hayvan sinifinda turemis olsun. O zaman Pandayi Cisim sinifindan turetemeyiz ve bu durumda fiyatHesapla methoduna parametre olarakta gonderemeyiz.&lt;br /&gt;&lt;br /&gt;Iste bu gibi farkli siniflardan turemis nesneleri ortak ozelliklerle ayni turden mis gibi kullanmaniz gereken durumlarda Interface Inheritance i kullanabilirsiniz.&lt;br /&gt;&lt;br /&gt;Bu durumda, Cisim ve Hayvan sinifinda tureyen, Kare, DikDortgen ve Panda siniflarini ortak bir ozellikler saglayacak KargoNesnesini Interface ini yazar ve bu Interface i siniflarimiza uygulariz ( Implement ), yada siniflarimizin turedigi ana sinifa uygulamamiz yeterli olur.&lt;br /&gt;&lt;br /&gt;KargoNesnesi Interface Java kodu:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public interface KargoNesnesi {&lt;br /&gt;&lt;br /&gt; public int hacimHesapla();&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Kargo fiyati hesabi icin gerekli ortak ozellik hacimHesapla methodu oldugu icin bunu Interface de tanimladik.&lt;br /&gt;&lt;br /&gt;Cisim sinifi Java kodu:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;//Abstract Sinif, nesne olusturalamaz&lt;br /&gt;public abstract class Cisim &lt;u&gt;implements KargoNesnesi&lt;/u&gt; {&lt;br /&gt;&lt;br /&gt; protected String renk = "Kirmizi";&lt;br /&gt;&lt;br /&gt; public Cisim(){}&lt;br /&gt;&lt;br /&gt; public Cisim(String renk){&lt;br /&gt;     if (renk.length() &gt; 0)&lt;br /&gt;         this.renk = renk;&lt;br /&gt; }  &lt;br /&gt;&lt;br /&gt; //abstract method, her turetilen sinifta tekrar yazilmak zorundadir.&lt;br /&gt; //ayni zamanda KargoNesnesi interface icinde bu methodu yaziyoruz&lt;br /&gt; public abstract int hacimHesapla();&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Fark ettiyseniz Cisim nesnesi artik KargoNesnesi turunde. Cisim nesnesinden tureyen her sinifta hem Cisim nesnesinin hemde KargoNesnesinin bir turu.&lt;br /&gt;&lt;br /&gt;Kare sinifi Java kodu:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;//Final class Kare, bu siniftan turetilemez.&lt;br /&gt;public final class Kare extends Cisim{&lt;br /&gt;&lt;br /&gt; // Constructorlar miras alinmadigi icin tekrardan yaziyoruz&lt;br /&gt; private int kenarUzunlugu = 0;&lt;br /&gt; private int yukseklik = 0;&lt;br /&gt;&lt;br /&gt; public Kare(int kenarUzunlugu, int yukseklik){&lt;br /&gt;     this.kenarUzunlugu = kenarUzunlugu;&lt;br /&gt;     this.yukseklik = yukseklik;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; //Cisim sinifi hacimHesapla methodunu override ediyoruz&lt;br /&gt;&lt;u&gt; //KargoNesnesi hacimHesapla methodunu yazmis oluyoruz&lt;/u&gt;&lt;br /&gt; public int hacimHesapla(){&lt;br /&gt;     return kenarUzunlugu * kenarUzunlugu * yukseklik;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     Kare cisim = new Kare(2, 2);&lt;br /&gt;     System.out.println( cisim.hacimHesapla());&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Simdi de gelelim Hayvan sinifinda turemis olan Panda Sinifina,&lt;br /&gt;&lt;br /&gt;Hayvan sinifi Java kodu:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Hayvan {&lt;br /&gt;&lt;br /&gt; public String yemekYe(){&lt;br /&gt;     return "Yemek yiyor";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public String nefesAl(){&lt;br /&gt;     return "nefes aliyor";&lt;br /&gt; }&lt;br /&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Bu sinifin, ne Cisim sinifi nede KargoNesnesi Interface i ile bir alakasi yok.&lt;br /&gt;&lt;br /&gt;Panda sinifi Java kodu:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Panda extends Hayvan &lt;u&gt;implements KargoNesnesi&lt;/u&gt;{&lt;br /&gt;&lt;br /&gt; // KargoNesnesi hacipHesapla metodu&lt;br /&gt; public int hacimHesapla() {&lt;br /&gt;     return 100;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;Panda sinifi KargoNesnesi turunde ve buda Kargo sinifi fiyatHesapla methodunda kullanilmasina olanak sagliyor.&lt;br /&gt;&lt;br /&gt;Kargo sinifi Java Kodu :&lt;br /&gt;&lt;br /&gt;&lt;i&gt;/*&lt;br /&gt;* Beyhan Meyrali Nesneye Yonelimli Programala Yazisi&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Kargo {&lt;br /&gt;&lt;br /&gt; //Dikkat edin &lt;b&gt;parametre turu artik KargoNesnesi&lt;/b&gt; Interface tipinde&lt;br /&gt; //Yani KargoNesnesi Interface in den tureyen her sinif parameter olabilir&lt;br /&gt; public String fiyatHesapla(&lt;b&gt;KargoNesnesi&lt;/b&gt; cisim){&lt;br /&gt;     if (cisim.hacimHesapla() &gt; 20){&lt;br /&gt;         return "Buyuk Cisim Fiyati kullanilacak";&lt;br /&gt;     } else {&lt;br /&gt;         return "Kucuk Cisim Fiyati kullanilacak";&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     Kargo kargo = new Kargo();&lt;br /&gt;     Kare kare = new Kare (2, 4);&lt;br /&gt;     System.out.println(kargo.fiyatHesapla(kare));&lt;br /&gt; &lt;br /&gt;     DikDortgen dikDortgen = new DikDortgen (2,5,4);&lt;br /&gt;     System.out.println(kargo.fiyatHesapla(dikDortgen));&lt;br /&gt;&lt;br /&gt;     Panda panda = new Panda();&lt;br /&gt;     System.out.println(panda.yemekYe());&lt;br /&gt;     System.out.println(panda.nefesAl());&lt;br /&gt;     //Kargo Fiyati belirliyoruz !&lt;br /&gt;     System.out.println(&lt;b&gt;kargo.fiyatHesapla(panda)&lt;/b&gt;);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Ne kadar guzel degil mi, birbiriyle alakasi olmayan nesneleri ortak bir tur altinda bulusturduk ve tek bir fiyatHesapla methodu ile istedigimizi yaptik.&lt;br /&gt;&lt;br /&gt;Panda sinifinda implements KargoNesnesi kodunu silip derlemeyi deneyin. Hata alicaksiniz cunku Panda nesnesi artik bir KargoNesnesi turu olmayacagi icin Kargo sinifi fiyat hesapla methoduna parametre olarak gonderilemez. Cunku fiyatHesapla methodu parametre turu KargoNesnesi tipinde olmak zorundadir.&lt;br /&gt;&lt;br /&gt;Panda sinifinda sadece hacimHesapla methodunu silerek derlemeyi deneyin, yine calismayacaktir cunku implemente ettigi KargoNesnesi methodlarini icermek zorundadir.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Peki Class Inheritance mi Interface Inheritance mi ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Bu neye ihtiyaciniz oldugna gore degisir. Ortak ozellikleri(method, sabit, degisken) ana siniftan almaniz gereken durumlarda Class Inheritance tercih edebilirsiniz, bu sayede turetilen her sinifin ana sinif ozelliklerine sahip olacaktir.&lt;br /&gt;&lt;br /&gt;Yada yukarida gordugunuz ornekte ki gibi, ortak ozellikleri olmayan siniflari ayni tur gibi kullanmaniz gereken durumlarda yada bu siniflara ortak ozellik katmaniz gereken durumlarda Interface Inheritance i kullanabilirsiniz.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Encapsulation nedir ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Kimi durumlarda sinifinizin degiskenlerine yada bazi methodlarina disaridan(farkli siniflardan) direkt ulasilmasini istemeyebilirsiniz. Cunku bu method veya degiskenlerin direk ulasilmasi programda hatalara neden oluyor olabilir.&lt;br /&gt;&lt;br /&gt;Ornegin topla islemi yapan bir nesne dusunun, ve bu nesnenin 2 degiskeni olsun, sayi1 bir ve sayi2. Yalniz siz bu sayi1 ve sayi2 inin sifir girildigi durumlarda siz sayi1 ve sayi2 degerlerini 1 olarak degistirmek istiyorsunuz.&lt;br /&gt;&lt;br /&gt;Eger ki sayi1 ve sayi2 degiskenlerini private disinda tanimlarsaniz bunlar diger siniflardan gorulebilir ve bunlara deger atama sirasinda sizin kontorolunuz disina cikmis olurlar. Bu sebeple bu sayilara deger atama islemini gizlemeniz gerekir.&lt;br /&gt;&lt;br /&gt;Bur durumda yapacaginiz sey basit, sayi1 ve sayi2 yi private tanimlayacaksiniz. Onlarin deger atamalarini methodlarla yapacaksiniz, ve bu methodlar icinde de eger sayi 0 ise degerini 1 olarak atayacaksiniz. Boylece sayi degerlerinizin sizin kontrolunuz disinda degistirilmesini engellemis olursunuz.&lt;br /&gt;&lt;br /&gt;Ayni ornegi formdan gelen verilerin degerlerinin database girilmeden once temizlenmesi icinde kullanabilirsiniz.&lt;br /&gt;&lt;br /&gt;Toplama sinifi Java kodu:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;public class Toplama {&lt;br /&gt; //private degiskenler sadece aynis sinif icinde gorulebilir olduklari icin&lt;br /&gt; //diger siniflarin islem yapmalari icin&lt;br /&gt; //private olmayan methodlari kullanmalari gerekir&lt;br /&gt; private int sayi1;&lt;br /&gt; private int sayi2;&lt;br /&gt;&lt;br /&gt; public void setSayi1(int sayi1) {&lt;br /&gt;     if (sayi1 == 0){&lt;br /&gt;         this.sayi1 = 1;&lt;br /&gt;     }else{&lt;br /&gt;         this.sayi1 = sayi1;&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void setSayi2(int sayi2) {&lt;br /&gt;     if (sayi2 == 0){&lt;br /&gt;         this.sayi2 = 1;&lt;br /&gt;     }else{&lt;br /&gt;         this.sayi2 = sayi2;&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public int topla(){&lt;br /&gt;     return sayi1 + sayi2;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Diger siniflar, sayi1 ve sayi2 degiskenlerinin degerlerini ancak setSayi1 ve setSayi2 methodlarini kullanarak degistirebilirler. Buda bize sayi1 ve sayi2 degiskenleri uzerinde yapilan islemi gizlememizi ve bu sayilara direkt erisimi engellememiz saglar. Yani &lt;b&gt;Encapsulation&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Toplama sinifi kullanan Matematik sinifi degiskenleri private degildir. Haliyle direk erisimi aciktirlar. Matematik sinifinda Encapsulation kullanilmamistir.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;package ooplessons;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author Beyhan Meyrali&lt;br /&gt;*/&lt;br /&gt;public class Matematik {&lt;br /&gt;//Public degiskenler, her yerden gorunur olduklari icin&lt;br /&gt;//degerleri disaridan degistirelebilinir&lt;br /&gt;public int sayi1 = 4;&lt;br /&gt;public int sayi2 = 10;&lt;br /&gt;&lt;br /&gt;public Matematik(){&lt;br /&gt;   System.out.println("Matematik Sinifi Olusturuldu");&lt;br /&gt;}&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt; Matematik mat1 = new Matematik();&lt;br /&gt; Toplama toplama = new Toplama();&lt;br /&gt; toplama.setSayi1(mat1.sayi1);&lt;br /&gt; toplama.setSayi2(mat1.sayi2);&lt;br /&gt; System.out.println("Sonuc :" + &lt;u&gt;toplama.topla()&lt;/u&gt;);&lt;br /&gt;&lt;br /&gt; //Public degiskenler direk erisime aciktir. Istenilen deger atanabilinir.&lt;br /&gt;&lt;b&gt;    mat1.sayi2 = 0;&lt;/b&gt;&lt;br /&gt; toplama.setSayi1(mat1.sayi1);&lt;br /&gt; toplama.setSayi2(mat1.sayi2);&lt;br /&gt; System.out.println("Sonuc :" + &lt;u&gt;toplama.topla()&lt;/u&gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Calistirdinizda ekrana soyle bir cikti gelicek,&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Matematik Sinifi Olusturuldu&lt;br /&gt;Sonuc :14&lt;br /&gt;Sonuc :5&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Gordugunuz gibi ikinci toplama isleminin sonucu 4 degil 5 tir. Neden diye soruyorsaniz Encapsulation Nedir i bir daha okuyun.&lt;br /&gt;&lt;br /&gt;Dort aksamdir hazirlamis oldugum bu yazi, umarim size faydali olmustur. Bu yazida ogrendiklerinizi orneklerle pekistirmenizi tavsiye ederim.&lt;br /&gt;&lt;br /&gt;Turkiye de ki yazilim gelistirme ve yazilim ile ugrasan gelistiricilerin en iyilerle mucadele edecek seviyede, hatta en iyi olmasi dilegiyle.&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-6713574557833576022?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/6713574557833576022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=6713574557833576022&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/6713574557833576022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/6713574557833576022'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2009/01/object-oriented-programming-guide-for.html' title='Nesneye Yönelimli Programlama Nedir ? Object Oriented Programming Guide for Turkish Speaking Developers'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-4712533391754990539</id><published>2009-01-17T21:22:00.007Z</published><updated>2009-01-28T11:33:18.515Z</updated><title type='text'>A general talk about technology</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ubuntupocketguide.com/download.html"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 116px; height: 117px;" src="http://www.ubuntupocketguide.com/images/ubuntu-badge.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I love Ubuntu ! :)&lt;br /&gt;&lt;br /&gt;I have done something nice and setup &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu Linux&lt;/a&gt; on my laptop ( &lt;a href="http://www.asuslaptop.co.uk/"&gt;Asus with web cam&lt;/a&gt; ). With a small search on the Internet i found whatever i need. So far so happy.&lt;br /&gt;&lt;br /&gt;I was using MS Windows XP Pro, but then i fed up with its problems, like slowing down after sometime you using it. Software problems, viruses, freezing problems. It made me so uncomfortable to use it and i need to do something for that.&lt;br /&gt;&lt;br /&gt;I have kept my all important data in one drive and during the setup i have removed all other partions and created single partion for Ubuntu.&lt;br /&gt;&lt;br /&gt;When I setup i had a small booting problem but then i started it in the safe mode or recovery option. Since then it works all fine. Here is a &lt;a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;taxonomyName=Operating+Systems&amp;amp;articleId=9126621&amp;amp;taxonomyId=89&amp;amp;pageNumber=1"&gt;guide how to setup Ubuntu&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I could not make working my web cam, maybe i did not try enough. I setup Skype, works perfect. But you need to do some settings to make it work :), it does not find correct audio device settings.&lt;br /&gt;I setup aMSN, works same as MSN Live Messenger.&lt;br /&gt;For music, Rhythmbox and TunaPie for internet radio. As a browser Firefox of course. And my favorite IDE Netbeans. That is all what i need and i am more than happy with other extra software than i can use. And here is a link, which tells about &lt;a href="http://www.pcworld.com/businesscenter/article/143396-1/linux_replacements_for_your_favorite_windows_apps.html"&gt;Linux Replacements for your favorite softwares.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Configuration requires very little knowledge, you can setup everything with Synaptic Package Manager by simple writing the topic and system shows you required software as well. So with a simple click you will get whatever you need.&lt;br /&gt;Works perfect for Divx and watching movies. DVD writer, office all free and works perfect.&lt;br /&gt;Thanks a lot to Ubuntu team for their efforts. Excellent operating system. And of course to all other developers who spent effort to create those products as well.It even found my Wifi card and networks automatically, same as windows and no effort is required.&lt;br /&gt;&lt;br /&gt;If you really need MS again, you can setup &lt;a href="http://www.virtualbox.org/"&gt;virtual box&lt;/a&gt; and setup windows there and use it.&lt;br /&gt;&lt;br /&gt;It shows updates automatically and the best bit, works really fast. I really enjoy using it. So do something nice and try it, with live cd or with virtual box on your other OS.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ubuntupocketguide.com/"&gt;And here is a guide for Ubuntu !  http://www.ubuntupocketguide.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Other thing that I want to mention is mobile technology and software development. I should admit, Apple App store is an excellent idea, and it is leading a huge market for mobile computer/phones. But ofcourse other companies like Nokia and Windows mobile platform would do more to catch it by developing their on software development kits. So it seems like it will end up with a lot of options and many things to learn or choose just one of them and work on that. But another problem is here, who knows who will be leading the mobile computer market in 5 years time. Google Android ? Apple ? Nokia ? Palm ? Blackberry ? Who ?&lt;br /&gt;&lt;br /&gt;If Steve Jobs was leading Apple, I could imagine, they would be probably biggest in the market in the future as well. But now it is a bit unknown.&lt;br /&gt;&lt;br /&gt;And last thing to mention, I regret that i bought a Blackberry rather than keeping my old Sony Ericsson k750i and buying an Ipod Touch instead. Iphone / Ipod touch is the only mobile devices gives you perfect user experience, a lots of software choices and a perfect mobile computer with a proper OS on it.&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-4712533391754990539?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/4712533391754990539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=4712533391754990539&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4712533391754990539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4712533391754990539'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2009/01/general-talk-about-technology.html' title='A general talk about technology'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-1019593449334828547</id><published>2008-12-22T21:58:00.013Z</published><updated>2008-12-27T18:04:35.752Z</updated><title type='text'>Summary for Patterns of Enterprise Application Architecture</title><content type='html'>&lt;span style="font-size:130%;"&gt;Summary for Patterns of Enterprise Application Architecture&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That post will be the summary of Martin Fowler's book and my ideas included. I write that post because I thought a summary will be useful remember the name of the patterns and what they are used for.&lt;br /&gt;&lt;br /&gt;If you are a developer or a person who needs to communicate with developers, it is better if you know about patterns as much as you can because that will give you a better understanding about the topic that you are talking about.&lt;br /&gt;&lt;br /&gt;That will be a small summary which will contain very basic information about them, to understand them I strongly suggest you to read the book or please check the examples on the Internet. I think &lt;a href="http://www.wikipedia.org/" target="_blank"&gt;Wikipedia&lt;/a&gt; has most of them.&lt;br /&gt;&lt;br /&gt;Name of the book is &lt;span style="font-size:130%;"&gt;Patterns of Enterprise Application Architecture&lt;/span&gt; author is &lt;a href="http://www.martinfowler.com/" target="_blank"&gt;Martin Fowler&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Sorry for spelling mistakes if there are any.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size:130%;"&gt;1.Layering&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;For me Layering is, grouping your related logic together and linking different groups to each other with interfaces. Like keeping your database operations in separated layer than domain logic layer. Or another common example is &lt;a href="http://en.wikipedia.org/wiki/OSI_model" target="_blank"&gt;network layers&lt;/a&gt;. Each layer has its own responsibility and in most of cases you can develop your application without knowing about other layer.&lt;br /&gt;&lt;br /&gt;So Here are the benefits of Layering; Provides loose coupling, level of Encapsulation, Standardization and depending on design positive or negative performance effects.&lt;br /&gt;&lt;br /&gt;Depending on application's complexity, number of layers may change. For example a simple application may contain them all in one method. Adding more layers will add complexity to your application.&lt;br /&gt;&lt;br /&gt;Obviously, separating your layers into different methods/ classes/ packages is a good idea, which will let you to read your code easier and easier to maintain.&lt;br /&gt;&lt;br /&gt;By layering your application, you can change different bits of your application with minimum change on other bits. Lets say you want to add another interface. You had a rich client and now you want to add a web interface, so just change the interface layer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A) Three Principal layers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Presentation Layer&lt;/b&gt;: This is the layer that user use to interact with software. For example, menu that you see when you want to use an ATM. That can be made of an html page, console command line or text based menu (remember the first mobile phones).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Domain Logic Layer&lt;/b&gt;: This is the actual layer, which does the important bit. If you think an ATM, when you insert your card, it will be asking you password and once you enter password it will try to connect to database system to confirm your password, in that bit domain logic will be doing some logic behind, like checking your password, if it is not correct, counting your attempts to enter password etc.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Data Source Layer:&lt;/b&gt; That is the layer, which holds the data/information. It can be in many formats, like a database, a text file.&lt;br /&gt;&lt;br /&gt;Next thing to mention is logical layers inside of that layers mentioned above. And pattern options you can follow while you are creating those layers, where to keep that layers( distributed systems ) and performance effects on software.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size:130%;"&gt;2.Presentation Layer Patterns&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank"&gt;Model View Controller&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;Model = Biz Logic(DB Transactions, Code which handles complex  operations).&lt;br /&gt;View = User interface(Web page, which has links and forms, buttons etc).&lt;br /&gt;Controller = ? :).&lt;br /&gt;&lt;br /&gt;Controller is the one, which maps the user interface to related biz logic. When you send a data from a form, it decides which object ( part of biz logic ) should handle its input and then after data is processed, which page should displayed back to user.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Page Controller&lt;/b&gt;&lt;br /&gt;Used on static pages. Each web page has its own controller. Each link has its own document on server. Page controller might be on same page with its view. Imagine a web site that has built with JSP or PHP or ASP. Whenever you click a web link, it goes to corresponding link and information is processed in the same and then view decision is made by same page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Front Controller&lt;/b&gt;&lt;br /&gt;Compare tp Page Controller, Front controller is complexer. It handles all requests for web site. It is most of time a class rather than a server page and decides which command to call to process request and commands are not aware of web pages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Template View&lt;/b&gt;&lt;br /&gt;In template view, you put your dynamic code bits(lets say your php code which reads user data from server) in html code and at run time that code bits read the actual data from server and writes it there. So your design time web page looks different than run time.&lt;br /&gt;For example, When you log on to gmail, you see your email address on the right corner but when i log on i see my own email.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Transform View&lt;/b&gt;&lt;br /&gt;Transform view is the view, which creates html output from your data or server input. Mostly used with xml and xslt. Imagine, you are using a web service from another web page, which returns xml format data to show weather report and you need to show it for web users. So you need to process that xml data to html output.&lt;br /&gt;That is possible to create it with &lt;a href="http://www.sitepoint.com/article/transform-php-xslt/3/" target="_blank"&gt;PHP&lt;/a&gt; or &lt;a href="http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96621/adx05xsj.htm" target="_blank"&gt;Java&lt;/a&gt; etc.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Two Step View&lt;/b&gt;&lt;br /&gt;Two step view, transform data to html in two steps. Imagine you get a data from a web service for 20 countries and but u just want to show only one of them. Then you process your xml data to another xml format which is more suitable for your xslt and then your xslt creates your output.&lt;br /&gt;Imagine a code something like&lt;br /&gt;&lt;pre&gt;&lt;a href="http://nida.se/patterns/poeaa/htmlRenderer.html" target="_blank"&gt;&lt;span style="font-family:times new roman,serif;font-size:85%;"&gt;XsltProcessor processor = new TwoStepXsltProcessor("album2.&lt;wbr&gt;xsl", "second.xsl");&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: The link above has exactly the same example as the one in Martin Fowler's book.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Application Controller&lt;br /&gt;&lt;/b&gt;Application controller is similar mechanism with MVC input controller.It is used to decided which command or view to be called for which request. Usually you will see the screens in certain order but some of them will appear under some certain conditions or screens depended on earlier inputs.&lt;br /&gt;&lt;br /&gt;My personally idea is best to use MVC style architecture for view, which gives you minimum headache. Like Struts for Java. Or Spring Framework has its own MVC.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size:130%;"&gt;3.Domain Layer Patterns&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;Domain Logic Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Transaction Script&lt;/b&gt;&lt;br /&gt;Transaction Script organizes all biz logic and database logic in a single procedure which may contain sub procedures. Imagine you want to register a new user to system and you pass the values and to procedure from a web form and same procedure handles the values and calls database and writes the values.&lt;br /&gt;That can be useful for very basic applications.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Domain Model&lt;/b&gt;&lt;br /&gt;When complexity of application increases you will require better way of handling your objects and database operations. Like loading objects to memory or not loading existing objects, but then you need to know which object is in memory and if it is changed or if it is still in the memory :).&lt;br /&gt;While writing your classes, you need to know what kind of members and responsibilities you should add to a class. You may end up having transaction scripts.&lt;br /&gt;While loading from database, how to load them, if the data is coming from a distributed system etc. So you will need to use some other patterns to help you to create Domain Model.Depending on the size of the application you are working on, you may require a Data mapper for database operations or for simpler applications Active Record can be used.&lt;br /&gt;With the domain logic, you will require to implement Object Relational Patterns, which are mentioned below.&lt;br /&gt;That pattern is used for projects which has mid level or above complexity. Obviously working in a project that will use domain model will be great fun.&lt;br /&gt;&lt;br /&gt;With Aspect Oriented Programming, I am sure it will be even more fun ;).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Table Module&lt;/b&gt;&lt;br /&gt;Table Module Organizes domain logic with one class per table or view or query, and single instance of class contains various procedures to process the data.&lt;br /&gt;Table Module is usually used with Table Gateway or Record set.&lt;br /&gt;You may see that in MS .Net applications.&lt;br /&gt;Table Module does not support some of OOP features, therefore for you may need to use Domain Model for complex situations.&lt;br /&gt;It is easier to work with Table Module with relational databases.&lt;br /&gt;As same as domain model, you will require some other patterns to manage you objects in memory, data in database obviously some concurrency patterns to check correctness of your data.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Service Layer&lt;/b&gt;&lt;br /&gt;Defines an application's boundary with a layer of services that establishes a set of available operations and coordinates the application's response in each applications.&lt;br /&gt;By adding a service layer to application, you create a middle layer which will coordinate interaction between different interfaces and Domain Logic. That will provide encapsulation for your domain logic.&lt;br /&gt;A simple example will be, lets say you want to you want to do your banking operations from your mobile and sometimes from web page. Instead of creating different biz classes for those interfaces, you can create a web service, which gets the required data and returns xml format response. In that way you will minimize code duplications.&lt;br /&gt;Another example in the book is using, POJOs or Stateless beans or EJBs. I believe in the near future EJBs will be replaced with Web services.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;Object-Relational Behavioural Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Unit of Work&lt;br /&gt;&lt;/b&gt;Unit of work keeps track of state of objects in the memory.&lt;br /&gt;Calling database for each data operation can be expensive, if your application makes to many calls; instead, you can make your changes on objects in memory and submit your changed objects data together or with less calls as much as possible.(As I mentioned in Domain Model ) To do that you will need to know state of your objects to decide which ones to write or to delete from database. So you need to know if they are new ones, or changed ones or if they are deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Identity Map&lt;/b&gt;&lt;br /&gt;Ensures that each object gets loaded only once by keeping every loaded object in the map. So prevents inconsistent write to database.&lt;br /&gt;An old proverb from book "a man with two watches never knows what time it is".&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Lazy Load&lt;/b&gt;&lt;br /&gt;An object does not contain all of the data you need but knows how to get it. Save time and resources.&lt;br /&gt;Very simple example, You have a web page which shows the employees name and their departments. when you click on a particular employee it will show you the employee details and his work history etc. Obviously you do not want to load all employee information till user clicks an employee record. So application only creates the employee object with it is uid and employee name and department. But when you click on an employee record it will read all required information for that employee object and it will load it.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;Object-Relational Structural Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Identity Field&lt;/b&gt;&lt;br /&gt;Saves a database ID field in an object to maintain identity between object in memory and database row.&lt;br /&gt;One to One Relationship.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Foreign Key Mapping&lt;/b&gt;&lt;br /&gt;Maps an association between objects to a foreign key reference between tables. Lets say you want save an record object which is linked to an album object. Obviously changes to album objects effects its records. Imagine I am deleting an album, all records linked to that album needs to be deleted as well.&lt;br /&gt;One to Many Relationship.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Association Table Mapping&lt;/b&gt;&lt;br /&gt;Saves an association as a table with foreign keys to the tables that are linked by the association.&lt;br /&gt;Many to Many Relationship.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dependent Mapping&lt;/b&gt;&lt;br /&gt;Has one class perform the database mapping for a child class.&lt;br /&gt;Some of the objects naturally appear in the context of another object and they are not referenced by any&lt;br /&gt;other table. So you can save that objects with their par rents mapper.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Embedded Value&lt;/b&gt;&lt;br /&gt;Many small objects make sense in OO system, may not make sense in as a table in database. So Embedded Value maps an object into several fields of another object's table. For example employee salary, you would not create a currency table which contains employee salaries amount and their currency types. Instead you would add them as 2 other columns as part of employee table. Would you ? would not you :D ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Serialized LOB&lt;/b&gt;&lt;br /&gt;Saves a graph of objects by serializing them into a single large object (LOB), which it stores in a database field. (Check BLOB or CLOB). That is used on network communication or to store an object with its state and use it in the future sometime.&lt;br /&gt;In these days, usually XML format is used for that.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Single Table Inheritance&lt;/b&gt;&lt;br /&gt;Relational database do not support inheritance, so when mapping your objects you need to find a way of saving them. Single table inheritance, uses a single table which contains all fields for all sub types and sub types only uses the columns/fields those are related to them.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Class Table Inheritance&lt;/b&gt;&lt;br /&gt;Represents an inheritance hierarchy of classes with one table for each class. Tennis player has a table for itself, basketball player has a table for itself and there is a table called player which contains common fields for both player types. So tennis player uses player table and tennis player table to store data.&lt;br /&gt;I do not like that ! You need to manage two tables to load one object data.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Concrete Table Inheritance&lt;/b&gt;&lt;br /&gt;Represents an inheritance hierarchy of classes with one table for each concrete class. Tennis player has a table for itself, basketball player has it has a table for itself. All data related to tennis player object are stored in tennis player table.&lt;br /&gt;Since we are talking about inheritance and relational database does not support that, each change to main class ( player class ) you need to make changes to each player table on database.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Inheritance Mappers&lt;/b&gt;&lt;br /&gt;A structure to organize database mappers to handle inheritance hierarchies. You need to minimize the amount of code to save and load the data to database. And you need to manage Super class - Sub class loading and saving. Those can be done by inheritance mapper.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;Object-Relational Metadata Mapping Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Metadata Mapping&lt;/b&gt;&lt;br /&gt;Holds details of object-relational mapping in metadata. A meta data mapping allows developers to define mappings in simple tabular form so data can be processed by generic code.&lt;br /&gt;Check  JPA ;).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query Object&lt;/b&gt;&lt;br /&gt;An object represents a database query. Mainly used for developers who are not familiar with SQL or with the database schema that they are working on. Instead of writing SQL, that query class help them to create SQL queries by using Query object methods.&lt;br /&gt;That pattern requires Domain model + Data Mapper + Meta Data Mapping. So you can encapsulate database schema, supporting multiple databases, supporting multiple schemes and provides query optimization.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Repository&lt;/b&gt;&lt;br /&gt;Repository is similar with Query Object. That is another layer between domain objects and database access (Data Mapper) code. If you have a system which uses Data Mapper, it can be worth to create a Repository Layer to construct queries, so developers can work purely in Object Orientated way, just with working object and without worrying about database operations.&lt;br /&gt;In that way Domain layer is not aware of Data Source Layer.&lt;br /&gt;&lt;br /&gt;In Repository, client creates a criteria object specifying characteristics of the object that they want to return from the query.&lt;br /&gt;&lt;br /&gt;Imagine, you are asking for an employee object, first that goes repository, repository creates the criteria and checks with Objects in memory (Unit of Work), if it can not be found there loads from database and its dependants.&lt;br /&gt;&lt;br /&gt;Note: Query Object and Repository are complex patterns to write, there are commercial tools for that purpose.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;b&gt;4.Data Source Architectural Patterns&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Table Data Gateway&lt;/b&gt;&lt;br /&gt;Table Data Gateway is simple interface, which is usually stateless and its role is to push data back and forth with its several methods to find, update, delete and insert data.&lt;br /&gt;One instance handles all rows in table. Table Data Gateway works well with Table Module.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Row Data Gateway&lt;/b&gt;&lt;br /&gt;Row Data Gateway handles single row in table. For each row a new instance is created. Row Data Gateway contains only data access logic, it does NOT contain any Domain Logic and works well with Transaction Script. With Metadata Mapping, It can be used for creating automatically built database access code.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; Active Record&lt;/b&gt;&lt;br /&gt;Active Record object wraps a row in table or view, encapsulates the database access and adds Domain Logic on that data. Only difference between Active Record and Row Data Gateway, it contains some Domain Logic. Or You can say, Active Record object is a Domain Logic object which also contain data access logic.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Data Mapper&lt;/b&gt;&lt;br /&gt;Layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself.&lt;br /&gt;Data Mapper isolates different layers from each other, Biz Logic layer does not know about Data Source Layer. So that provides you independent development and testing.&lt;br /&gt;Simplest Data Mapper would do mapping field to field base between class and table. But since we are talking about Enterprise applications, things would require more than that. So you may need to use, Identity Map, Unit of Work and Repository.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;Mapping to Relational Database&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Architectural Patterns&lt;/b&gt;&lt;br /&gt;That is mainly organizing interaction between Data Source and Domain Logic, separating your Data Source access code than your Domain Logic code. If you are doing something simple or close to mid level, you may prefer to use Table Data Gateway, Row Data Gateway, Active Record and Transaction Script Patterns. Obviously you can use all of them or some of them together, important point is to provide required functionality with well organized code.&lt;br /&gt;If you are doing something complex, you will require Domain Model with Data Mappers to minimize repetitive code and to create an isolation between layers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Behavioural Problem&lt;br /&gt;&lt;/b&gt;The Behavioural Problem is how to get the various objects to load and save themselves to the database. Obviously you can do this by using Active Record object in simple cases.&lt;br /&gt;If you load bunch of objects into memory, you should keep track of them, you need to know which ones are already in memory ( Identity Map ), Which ones are changed ( Unit of Work ). And to increase the performance you will require Lazy Load of Objects.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reading in Data&lt;/b&gt;&lt;br /&gt;That is about when to load data and how much data to load. Obviously that will depend on pattern you are using. You can may use wrapper methods for sql, like &lt;i&gt;find(id)&lt;/i&gt;. if your database interactions are table based, you can combine find methods with insert and update methods. If your pattern is suitable you may try to load multiple rows data at once or multiple table data by using joins. ( Note: If you are not using right code to create joins, or if you are using more than 4 joins it may create performance problems rather than performance benefits). And also you should be careful about when you are loading objects, some of your objects might be in memory but not in database, therefore you should prefer to load them at the beginning.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Structural Mapping Patterns&lt;/b&gt;&lt;br /&gt;This is about linking objects in memory and linking tables to each other by using, Identity Field, Foreign Key Mapping, Association Table Mapping, Dependent Mapping, Embedded Value, Serialized LOB, Single Table Inheritance, Class Table Inheritance, Concrete Table Inheritance, Inheritance Mappers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Building the Mapping&lt;/b&gt;&lt;br /&gt;If you are building your own database schema and have up to mid level complexity, then you may use Transaction Script or Table Module design. And you can use Row Data Gateway or Table Data Gateway to separate logic.&lt;br /&gt;If complexity is higher better to create Domain Model and use it with Data Mapper or Active Record which is less complex.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Using Metadata&lt;/b&gt;&lt;br /&gt;Metadata Mapping Pattern enables us to use Generics classes to do mapping between columns in Database to fields in object based on metadata file, which is usually a xml file.&lt;br /&gt;By using Metadata you can create Query Object to create SQL statements automatically and on top of them you can create a Repository to hide Database from View. In that way, any queries made by Query Objects can retrieve objects from Memory or from Database by using Repository and the best Developers would not need to worry about that at all.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Database Connection&lt;/b&gt;&lt;br /&gt;Database connection is required whenever you need a data source interaction. And it might be expensive to create new connection each time. therefore you can use a connection pool, retrieve a connection whenever you need, do your work in a transaction, whenever you are done commit the transaction or rollback it and leave the connection back to the pool. Transaction management can be done with Unit of Work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;b&gt;5.Others&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;u&gt;&lt;b&gt;Distribution Strategies &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;Key thing is not to distribute if you can. Because even if they are on same physical machine, connection would be slower. Remote calls are expensive !&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Allure of Distributed Objects&lt;/b&gt;&lt;br /&gt;My understanding from Martin Fowler's comment, distributing components of application provides Transparency but also creates a bad effect on performance.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Remote and Local Interfaces&lt;br /&gt;&lt;/b&gt;A procedure call with in a process is very fast. A procedure call in different two process is slower and if one of the process is running on another machine, it will be even slower.&lt;br /&gt;Local Interface is best if it is fine grained, but same thing is not true for Remote Interface, because of cost of the remote calls. Therefore coarse grained interface is the best for remote interface.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt; Where You Have to Distribute&lt;br /&gt;&lt;/b&gt;You may need to distribute, if you are using client and server business software, server based application and database system, web server system and application server system, because of vendor differences and some other situations those you have no other option.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Distribution Patterns&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Remote Facade&lt;br /&gt;&lt;/b&gt;Provides a coarse-grained facade on fine-grained objects to improve efficiency over a network. Instead of making calls for each single object or piece of data, you make a call which keeps the related objects (or/and objects or data might be used together with requested data) in same response from remote system and by using the Remote Facade you will be separating them later to related objects. So in that way, you still can have your fine-grained objects and good performance.&lt;br /&gt;Note: Session Facade and Remote Facade is used for same thing but Remote Facade should not contain any logic, just the data. Session Facade may contain logic.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Data Transfer Objects&lt;br /&gt;&lt;/b&gt;Data Transfer Object is a serialized object which contains more data than remote system requires by holding more than one single object. Use a Data Transfer Object whenever you need to transfer multiple items of data between two process in single method. XML and DOM can be used for that as well. Most common example for DTO is Record Set.&lt;br /&gt; Usually DTOs are mutable, so each layer makes its change to data and passes it to next layer.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;u&gt;&lt;b&gt;Concurrency&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Concurrency Problems&lt;/b&gt;&lt;br /&gt;When multiple threads or process manipulating same data, you may have concurrency problems. You may have Lost Updates or/and inconsistent reads.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Execution Context&lt;/b&gt;&lt;br /&gt;Whenever a process occurs in a system, it occurs in context and usually in more than one. Two important ones, Request and Session. And two important terms from operating systems are Process and Threads. One Process may have many threads, those share the same memory. Threads support multiple requests.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Isolation and Immutability&lt;/b&gt;&lt;br /&gt;Isolation is a way to solve to concurrency problem by letting only one active agent to access to same piece of data.&lt;br /&gt;Another way is to make your data Immutable, so it can not be changed by other processes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Optimistic and Pessimistic Concurrency Control&lt;/b&gt;&lt;br /&gt;by using Optimistic Lock, to users of data can read and make a copy of it freely, whoever finishes first updates its changes to data and when second one wants to update its change, it gets a error message and needs to read data again and needs make changes one more time.&lt;br /&gt;Suggestion: Add version column on your table and whenever you are updating check your version number with the database and if it is same update it and increase one more the the version number.&lt;br /&gt;&lt;br /&gt;by using Pessimistic whoever starts using data has all control and others needs to do wait to anything till first one completes its task. Example: Select for update statements.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; Transactions&lt;/b&gt;&lt;br /&gt;Primary tool for handling concurrency in enterprise applications. Think about and ATM transaction, till you get the money out of the ATM machine, your amount of money in your account value will be same.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ACID&lt;/b&gt;&lt;br /&gt;Atomicity, each step in the sequence of actions performed within the boundaries of a transaction must be completed successfully or all should be roll back.&lt;br /&gt;Consistency, A system's resource must be in a consistent state, from beginning to end of transaction.&lt;br /&gt;Isolation, Result of a transaction should not be visible to any other transaction till it commits successfully.&lt;br /&gt;Durability, Any result of a committed transaction must be made permanent.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Patterns of Offline Concurrency Control&lt;/b&gt;&lt;br /&gt;If you can avoid dealing with concurrency, you should ! :). So if there is a framework which deals with it, let it to do its job. If not, you can use, Optimistic Offline Lock, Pessimistic Offline Lock, Coarse-Grained Lock, Implicit Lock.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Application Server Concurrency&lt;br /&gt;&lt;/b&gt;That is&lt;b&gt; &lt;/b&gt;the process concurrency of application server itself. That is very complicated as well, but an application developer does not need to worry about that unless you are using Thread-Per-Request.&lt;br /&gt;Application Server does not deal with Transactions but with locks and synchronization blocks, which is so complicated.&lt;br /&gt;To handle multi threading, Application servers uses, Process-Per-Session,each session runs its own process, which uses a lots of resources but provides complete isolation from other processes.&lt;br /&gt;Process-Per-Request, uses approach of pooled process-per-request, which will use many fewer process for a given number of requests, that will use less system resources than process-per-session and will provide a good isolation.&lt;br /&gt;Thread-Per-Request, each request is handled by a single thread within a process. Threads use much fewer server resources than a process, you can handle more requests with less hardware. But in that way there is no isolation between threads and thread in process can touch the data.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;u&gt;&lt;b&gt;Offline Concurrency Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Optimistic Offline Lock&lt;/b&gt;&lt;br /&gt;Prevents conflicts between concurrent business transactions by detecting a conflict and rolling back the transaction. Most common way is using version number for record.&lt;br /&gt;I have seen applications which stores the first state of data and uses that data in where clause to compare its current state in data source. Use it when chance of having conflict is low.&lt;br /&gt;Note: It is suggested to have check methods during your business transaction to control if you have a conflict or not. Otherwise conflict will be checked at the end you may need to roll back all your changes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; Pessimistic Offline Lock&lt;/b&gt;&lt;br /&gt;Prevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access the data. You may use following lock types, Exclusive Read Lock, Exclusive Write Lock and Read/Write Lock.&lt;br /&gt;Use it the chance of having conflict is high.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Coarse-Grained Lock&lt;/b&gt;&lt;br /&gt;Locks a set of related object with a single lock.&lt;br /&gt;You can use, Shared Optimistic Offline Lock, having each item in a group share same version.&lt;br /&gt;Shared Pessimistic Offline Lock, each member of the group share some sort of lockable token.&lt;br /&gt;Root Lock, define a aggregate as a cluster of associated objects that we treat as a unit for data changes and a has a single point of contention.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; Implicit Lock&lt;/b&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;Allows framework or Layer supertype code to acquire offline locks. Best example I can think about that is  AOP with Spring.&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;Session State&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;The Value of Statelessness&lt;/b&gt;&lt;br /&gt;An object does not retain state between requests. An object which you would not care the data inside after you use it once.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Session State&lt;/b&gt;&lt;br /&gt;The data which you need to keep, since start of business transaction till the end. Imagine Amazon web page, and that you are doing your shopping, each item you bought is added to your Session. You can store your Session States on the client with cookies(Client Session State) or on the Server Memory (Server Session State) or on a server-side storage( Database Session State)&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;u&gt;&lt;b&gt;Session State Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;Client Session State&lt;/b&gt;&lt;br /&gt;You can store your information on URL, on a hidden field in html page or in a cookie in clients file system. But problem is those will be visible to client as well. So you should not keep any sensitive data.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;   Server Session State&lt;/b&gt;&lt;br /&gt;Keeps the session state on a server in serialized form. You can keep in the server's memory or you can save it as a Xml file on server file system or you can write it as a serialized object to blob field in database.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Database Session State&lt;/b&gt;&lt;br /&gt;Stores session data as committed data in database by creating tables to store your session state with some columns used as a flag. Whenever you need session information read it from database and save back after you finish it.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Base Patterns&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Gateway&lt;/b&gt;&lt;br /&gt;An object that encapsulates access to an external system or resource. It is a very simple wrapper pattern. Create a simple API for your external resource usage and use the Gateway to translate to the external source.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mapper&lt;/b&gt;&lt;br /&gt;An Object that setups a communication between to independent objects. When you want to isolate two layers and make them independent than each other. For example, a Data Mapper, seperates Data Source and Domain Logic.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Layer Supertype&lt;/b&gt;&lt;br /&gt;A type that acts as the SuperType for all types in its layer. You just need to create a super class which contains common object behaviour for other objects. and use that class to create other sub classes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Separated Interface&lt;/b&gt;&lt;br /&gt;Defines an interface in a separate package from its implementation. That is used for reducing dependency between layers. An it is a good plug point for Gateway.&lt;br /&gt;Use Separated Interface if you want to break a dependency or you want to have multiple independent implementations.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Registry&lt;/b&gt;&lt;br /&gt;A well-known object that other objects can use to find common objects and services. When you want to find an object, you usually start with another object that has association to it and use the association to navigate it. But in some cases you may not have an object to start with it but you have the ID of your object. There are different scopes for data, so you you need to know if you will be using Process-Scoped Registry(Singleton) or Thread-Scoped Registry( Getting db connection, Registry.getDBConnection()).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Value Object&lt;/b&gt;&lt;br /&gt;A small simple object, like money or a date range, whose equality is not based on identity. They are not primitive types like integer but you treat them as they are. And you pass them by value instead of by reference(Immutable).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Money&lt;/b&gt;&lt;br /&gt;Represent a monetary value. For example money object may contain amount and currency fields and methods to do its calculations. Since the topic is money, calculation becomes very sensitive. Especially when you need to round the pennies. Imagine you need to divide a payment to 2 equal parts, 333.333 pound to 2 separated payments. So You may need to add difference to last bit or give a percentage to split pennies etc.Book has some good examples to make correct calculations, So I suggest you to check it on the Internet with examples.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Special Case&lt;/b&gt;&lt;br /&gt;A sub class that provide special behaviour for particular cases. That is used for dealing with null values which creates run time error or infinity values for numbers. Instead you will create a null type of the object, which returns some harmless values.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Plugin&lt;/b&gt;&lt;br /&gt;Links classes during configuration rather than compilation. Used with Separated Interface and usually its a text file. Imagine you want to do unit testing for your code and you want to use test database, instead of changing connection values from code and redeploy the code, you can use Plugin which tells the test database name and other connection information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Service Stub&lt;/b&gt;&lt;br /&gt;Removes dependence upon problematic services during testing. Mainly you will use it when you want to test your application code without calling third party service, because that service might down or slow responding. So what you do is you are using a Gateway + Separated Interface + Plugin + a class you wrote to return some values, pretends that its the web service.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;   Record Set&lt;/b&gt;&lt;br /&gt;Memory representation of tabular data. Record Set is something you would get it from your vendor like MS &lt;a href="http://ado.net/" target="_blank"&gt;ADO.NET&lt;/a&gt; and JDBC. Result Set looks exactly like a database query and it can work disconnected by using internal Unit of Work. Many UI tools can be dependent on Record Set(Especially when you are creating MS .Net Applications or Delphi Rich Client Applications).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Factory_method_pattern" target="_blank"&gt;&lt;b&gt;Factory Method Pattern&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;Factory Method Pattern deals with object creation, depending on parameters you have passed to it, it will create and return different objects which are sub typed from same super type. That will be very useful when you expect an interface but you are not sure what you will get exactly.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Observer Pattern&lt;/b&gt;&lt;br /&gt;The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object maintains a list of its dependents and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Finally, &lt;/b&gt;I have completed the summary :), after spending more than 15 hours by reading and writing the book ( total 5 days ). Writing that article helped me to understand the patterns better and how they can be used together.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;With in the current software I am working at work, we are using Data Mapper, Unit of Work, Identity Map, Active Record, Record Set and Observer Patterns. &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-1019593449334828547?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/1019593449334828547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=1019593449334828547&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/1019593449334828547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/1019593449334828547'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/summary-for-patterns-of-enterprise.html' title='Summary for Patterns of Enterprise Application Architecture'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-221313022974036248</id><published>2008-12-19T12:53:00.004Z</published><updated>2009-01-30T15:01:25.641Z</updated><title type='text'>Apple and IPhone Mobile Application Market</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Recently i was reading some articles and it seems like there will be a huge requirement on Mobile Application Development. Especially after new touch screen mobile phones like IPhone.&lt;br /&gt;&lt;br /&gt;With &lt;a href="http://java.sun.com/products/wsa/"&gt;JSR - 172 API&lt;/a&gt;, Now it is possible to write web service clients for your mobile and with new mini computer like mobile phones, it is possible to do whatever u can on a normal computer. Today's mobile market is exploding and it seems like that will be much more bigger with new mobile web service, new hardware and online music store + online app stores.&lt;br /&gt;&lt;br /&gt;Apple's online app store has more than 12.000 apps on it and more than 300 million downloads have been done so far. That should give you some idea, what is going on with mobile market.&lt;br /&gt;&lt;br /&gt;{Good to read}&lt;br /&gt;Mobile Market &lt;a href="http://www.clickz.com/3632155"&gt;http://www.clickz.com/3632155 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;{Good to read}&lt;br /&gt;Web Development for Mobile &lt;a href="http://www.technewsworld.com/story/65949.html"&gt;http://www.technewsworld.com/story/65949.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And Apple application market... &lt;a href="http://www.businessweek.com/magazine/content/09_04/b4117074590934.htm?chan=top+news_top+news+index+-+temp_news+%2B+analysis"&gt;http://www.businessweek.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Obviously there are many things to do on top of existing ones and for the people who are willing to be involved, &lt;a href="http://developer.apple.com/iphone/"&gt;Apple provides SDK&lt;/a&gt; and examples as well.&lt;br /&gt;&lt;br /&gt;{Programming}&lt;br /&gt;I have seen very nice Ajax example, which tells the efficient way of using Ajax, XML data and javascript.&lt;br /&gt;&lt;a href="http://developer.apple.com/webapps/articles/optimizingajax.html"&gt;http://developer.apple.com/webapps/articles/optimizingajax.html&lt;/a&gt;&lt;br /&gt;That is also a nice example to learn, how to use, OO PHP, PHP XML Parser, Ajax + HTML + Javascript to create html output from a XML File.&lt;br /&gt;&lt;br /&gt;I believe, in the near feature you will be able to run the same application on mobile phones that you developed for pc environment.&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-221313022974036248?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/221313022974036248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=221313022974036248&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/221313022974036248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/221313022974036248'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/apple-and-iphone-mobile-application.html' title='Apple and IPhone Mobile Application Market'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-4266439474307688755</id><published>2008-12-15T16:28:00.002Z</published><updated>2008-12-23T14:17:18.352Z</updated><title type='text'>MS way of Software Development</title><content type='html'>&lt;div&gt;If you have seen the tutorials of netbeans, you will see how easy it is to create a java web service.&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.netbeans.org/kb/61/websvc/gs-axis.html"&gt;http://www.netbeans.org/kb/61/websvc/gs-axis.html&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.netbeans.org/kb/"&gt;Netbeans Knowledge Base&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And here is the MS way of doing things, almost same as the Java netbeans, just seems a bit easier with  different names.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href="http://searchwindevelopment.techtarget.com/sDefinition/0,,sid8_gci1189840,00.html"&gt;http://searchwindevelopment.techtarget.com/sDefinition/0,,sid8_gci1189840,00.html &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"Windows Workflow Foundation (WF or WinWF) is Microsoft's programming model for building workflow-enabled applications in the Windows operating system. It includes a namespace, a workflow engine and design tools that can be used with Visual Studio .NET. Windows Workflow Foundation covers both system and human workflows and it can be used with both client and serverversions of Windows.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Windows Workflow Foundation is one of the four main products inMicrosoft's.NET Framework 3.0, previously known as WinFX. The other three are the Windows Presentation Foundation (WPF), the Windows Communication Foundation (WCF), and the Windows CardSpace. The .NET 3.0 suite is due to be released around the same time as Windows Vista, Microsoft's upcoming update to its Windows operating system. .Net 3.0 can also be used with Windows XP and the Windows 2003 Server."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From MSDN&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"What is WCF ?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Windows Communication Foundation (WCF) provides a unified framework for rapidly building service-oriented applications that makes it easy to build and consume secure, reliable, and transacted Web services. It unifies the capabilities in ASMX, WSE, Remoting, COM+, and MSMQ; therefore developers need to learn only one programming model."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check that video, how is to write a web service with VS2008 ( it is also easy to write it with Java by using Netbeans, almost same thing, just different names )&lt;/div&gt;&lt;div&gt;&lt;a href="http://channel9.msdn.com/posts/cliff.simpkins/Endpoint-Screencasts-Creating-Your-First-WCF-Service"&gt;http://channel9.msdn.com/posts/cliff.simpkins/Endpoint-Screencasts-Creating-Your-First-WCF-Service&lt;/a&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;Video Tutorials &lt;a href="http://social.msdn.microsoft.com/content/en-us/msft/netframework/wcf/screencasts"&gt;http://social.msdn.microsoft.com/content/en-us/msft/netframework/wcf/screencasts &lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Here is a site that is pretty cool in terms of getting you up to speed with asp.net and web services:&lt;br /&gt;&lt;a href="http://quickstarts.asp.net/QuickStartv20/default.aspx"&gt;http://quickstarts.asp.net/QuickStartv20/default.aspx&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-4266439474307688755?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/4266439474307688755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=4266439474307688755&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4266439474307688755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4266439474307688755'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/ms-way-of-software-development.html' title='MS way of Software Development'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-5999494362412340301</id><published>2008-12-14T13:23:00.001Z</published><updated>2008-12-14T13:30:50.462Z</updated><title type='text'>One of my projects  -  Easy Finder</title><content type='html'>Easy finder is a java tool to find all links you are looking for in search engines, at once. Lets say that you want to get all java thread pdfs documents those found by search engines,here is an easy option for you...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://easyfinderweb.blogspot.com"&gt;http://easyfinderweb.blogspot.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A basic java multithreading example. It has desktop version and web + ajax version. That is very good example to show how to convert a desktop application to a web application by using the existing java functionality from desktop application. And also URL parsing, searching urls in a web page and grouping them in a single vector with multiple threads etc.&lt;br /&gt;&lt;br /&gt;Power of Java ! :)&lt;a href="http://sourceforge.net/projects/easyfinder/"&gt;&lt;br /&gt;&lt;br /&gt;http://sourceforge.net/projects/easyfinder/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have a look at both codes and here is the working example for web from my web server.&lt;br /&gt;&lt;a href="http://85.105.224.159:8180/Easy_Finder_Web/"&gt;http://85.105.224.159:8180/Easy_Finder_Web/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, i believe that should give you some ideas about how to write a nice web service by using inputs from many sites. lets say you want to write a news engine, go and check your favorite news sites and create a singe output.&lt;br /&gt;&lt;br /&gt;Or a central web job search portal etc...&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-5999494362412340301?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/5999494362412340301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=5999494362412340301&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/5999494362412340301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/5999494362412340301'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/one-of-my-projects-easy-finder.html' title='One of my projects  -  Easy Finder'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-4453396005610907286</id><published>2008-12-14T13:04:00.000Z</published><updated>2008-12-14T13:17:59.041Z</updated><title type='text'>Good to read</title><content type='html'>Architectural, Technological and Performance Issues in Enterprise Applications&lt;br /&gt;&lt;a href="http://www.waset.org/pwaset/v21/v21-40.pdf"&gt;http://www.waset.org/pwaset/v21/v21-40.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is a document which tells about O notation, which is a mathematical function to calculate efficiency of code.&lt;br /&gt;&lt;a href="http://staff.fcps.net/jlreed/CS2Files/11.2%20Complexity%20Analysis.pps" target="_blank"&gt;http://staff.fcps.net/jlreed/&lt;wbr&gt;CS2Files/11.2%20Complexity%&lt;wbr&gt;20Analysis.pps&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Java Design Patterns&lt;br /&gt;&lt;a href="http://www.freejavaguide.com/java-design-patterns.pdf"&gt;http://www.freejavaguide.com/java-design-patterns.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Reference for UML Diagrams&lt;br /&gt;&lt;a href="http://www.agilemodeling.com/artifacts/"&gt;http://www.agilemodeling.com/artifacts/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Power of Java, Java 5 feautures. Impressive !&lt;br /&gt;&lt;a href="http://developers.sun.com/learning/javaoneonline/2006/tools/TS-3361.pdf"&gt;http://developers.sun.com/learning/javaoneonline/2006/tools/TS-3361.pdf&lt;/a&gt;&lt;br /&gt;Tutorial for that &lt;a href="http://java.sun.com/javaee/5/docs/tutorial/doc/"&gt;http://java.sun.com/javaee/5/docs/tutorial/doc/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This book is a must!!! "Patterns of Enterprise Application Architecture" by Martin Fowler&lt;br /&gt;There is info here &lt;a href="http://martinfowler.com/books.html" target="_blank"&gt;http://martinfowler.com/books.&lt;wbr&gt;html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Part of our discussion with R. Dingle about that book&lt;br /&gt;"The Domain Model is the pattern I was particularly interested in, because if I am right this is the proper way to implement an enterprise-class object-oriented business layer. The Domain Model is the most effort but I was not too interested in compromising the design.&lt;br /&gt;&lt;br /&gt;There is some mention of it here &lt;a href="http://martinfowler.com/eaaCatalog/domainModel.html" target="_blank"&gt;http://martinfowler.com/&lt;wbr&gt;eaaCatalog/domainModel.html&lt;/a&gt; and it is pretty well covered in general on O-O design sites with many related discussions about different implementations &lt;a href="http://www.expojo.com/exposedDomainModel.htm" target="_blank"&gt;http://www.expojo.com/&lt;wbr&gt;exposedDomainModel.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically, I want to be able to implement a proper business model with object persistence and no need to write code unnecessarily, I want to get the job done and get paid! There are frameworks out there that must be close to the final solution but I haven't investigated them sufficiently, such as hibernate. The money isn't in creating the development framework but creating the business application that adds value.&lt;br /&gt;&lt;br /&gt;On this subject, if you aren't careful you can end up with what is known as an Anemic Domain Model, which looks like a proper business model but isn't with all the overhead! This is usually implemented by procedural developers who don't really understand object-orientation. I can tell you that although Landmark has a clearly defined layered architecture you quickly discover that the Business Logic Layer doesn't really contain much business logic. The Landmark business logic is implemented in the user interface and the database and the layers in between (USL/BLL/DAL - User Services Layer/Business Logic Layer/Data Access Layer) mainly pass information from the UI to the database and back.&lt;br /&gt;&lt;br /&gt;This can be explained by the fact that a lot of these people used to be procedural programmers and have implemented Landmark using the same style just in a different language, Delphi. &lt;a href="http://www.martinfowler.com/bliki/AnemicDomainModel.html" target="_blank"&gt;http://www.martinfowler.com/&lt;wbr&gt;bliki/AnemicDomainModel.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All good stuff!"&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-4453396005610907286?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/4453396005610907286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=4453396005610907286&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4453396005610907286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4453396005610907286'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/good-to-read.html' title='Good to read'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-3539562401806807218</id><published>2008-12-14T12:40:00.000Z</published><updated>2008-12-14T12:59:01.010Z</updated><title type='text'>Learning Spring Framework</title><content type='html'>At the moment i am trying to learn spring framework and after spending one week, i think i have basic idea about it and here are the links to share with you.&lt;br /&gt;&lt;br /&gt;I bought Craig Wall's Spring in Action Second Edition and here is the example chapter for you about key feauture of Spring framework, Dependency Injection and Aspect Oriented Programming.&lt;a href="http://www.manning.com/walls3/sample-ch01.pdf"&gt;http://www.manning.com/walls3/sample-ch01.pdf&lt;/a&gt;&lt;br /&gt;Once you understand what is DI and AOP, you respect to people who created Spring Framework.&lt;br /&gt;&lt;br /&gt;And here is another sample chapter about Spring MVC&lt;br /&gt;&lt;a href="http://www.manning.com/walls3/sample-ch13.pdf"&gt;http://www.manning.com/walls3/sample-ch13.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Following document should help you to understand AOP side, last pages of slide. It may help to undrestand DI as well. &lt;a href="http://java.celeritas.com/docs/Spring-Framework.pdf"&gt;http://java.celeritas.com/docs/Spring-Framework.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And good examples to understand DI.&lt;br /&gt;&lt;a href="http://www.javapassion.com/j2ee/index.html#Spring_Framework"&gt;http://www.javapassion.com/j2ee/index.html#Spring_Framework&lt;/a&gt;&lt;br /&gt;click here to &lt;a href="http://www.javapassion.com/handsonlabs/4911_springhelloworld.zip"&gt;download the example file and have a look at the examples, it makes it clear how DI works.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A nice article for JPA and Spring altough, I did not like DB2 to at all. And example did not work at the end but still it will give u the idea.&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-spring2/j-spring2-pdf.pdf"&gt;https://www6.software.ibm.com/developerworks/education/j-spring2/j-spring2-pdf.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some other Articles about Spring and other frameworks&lt;br /&gt;Introductuion to Spring&lt;br /&gt;&lt;a href="http://www.javabeat.net/articles/71-introduction-to-spring-web-framework-1.html" target="_blank"&gt;http://www.javabeat.net/&lt;wbr&gt;articles/71-introduction-to-&lt;wbr&gt;spring-web-framework-1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Introduction to Hibernate (ORM)&lt;br /&gt;&lt;a href="http://www.javabeat.net/articles/7-hibernate-ormobjectrelational-framework-an-introdu-1.html" target="_blank"&gt;http://www.javabeat.net/&lt;wbr&gt;articles/7-hibernate-&lt;wbr&gt;ormobjectrelational-framework-&lt;wbr&gt;an-introdu-1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Integrating Spring and Hibernate&lt;br /&gt;&lt;a href="http://www.javabeat.net/articles/42-integrating-spring-framework-with-hibernate-orm-framewo-1.html" target="_blank"&gt;http://www.javabeat.net/&lt;wbr&gt;articles/42-integrating-&lt;wbr&gt;spring-framework-with-&lt;wbr&gt;hibernate-orm-framewo-1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Developing Application with Spring Framework&lt;br /&gt;&lt;a href="http://static.springframework.org/docs/Spring-MVC-step-by-step/"&gt;http://static.springframework.org/docs/Spring-MVC-step-by-step/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-3539562401806807218?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/3539562401806807218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=3539562401806807218&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/3539562401806807218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/3539562401806807218'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/learning-spring-framework.html' title='Learning Spring Framework'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-3682385197412183703</id><published>2008-12-14T12:19:00.003Z</published><updated>2008-12-14T13:02:38.683Z</updated><title type='text'>Php and Web Services</title><content type='html'>After a interview offer from one of the world's leading technology companies, i started to look for what can be done with php, how good is php to create a big enterprise web application.&lt;br /&gt;&lt;br /&gt;If you ask me, php is bad copy of java. Many things implemented to php is copied from other technologies.  And its oop is not as good as java. it is more difficult to write and makes less sense to me.&lt;br /&gt;Anyway after saying some bad words about php, if you try to compare it a bit with java ee platform , u will see it can do many things in a smillar way.&lt;br /&gt;&lt;br /&gt;Recently i wanted to see, if it is possible to write web services with php and how, here is the answer for that. I have choosen some good links and have a look and surprise urself.&lt;br /&gt;&lt;br /&gt;Before that,  an article about Web Service Market and its future.&lt;br /&gt;&lt;a href="http://www.internetnews.com/dev-news/article.php/3413161"&gt;http://www.internetnews.com/dev-news/article.php/3413161&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Developing PHP Web Services&lt;br /&gt;&lt;a href="http://www.onlamp.com/pub/a/php/2007/07/26/php-web-services.html?page=1" target="_blank"&gt;http://www.onlamp.com/pub/a/&lt;wbr&gt;php/2007/07/26/php-web-&lt;wbr&gt;services.html?page=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PHP Web Services without SOAP&lt;br /&gt;&lt;a href="http://www.onlamp.com/pub/a/php/2003/10/30/amazon_rest.html" target="_blank"&gt;http://www.onlamp.com/pub/a/&lt;wbr&gt;php/2003/10/30/amazon_rest.&lt;wbr&gt;html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://devzone.zend.com/article/3246-The-value-of-Web-services-for-PHP" target="_blank"&gt;http://devzone.zend.com/&lt;wbr&gt;article/3246-The-value-of-Web-&lt;wbr&gt;services-for-PHP&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And even transform views.&lt;br /&gt;&lt;a href="http://www.sitepoint.com/article/transform-php-xslt/3/" target="_blank"&gt;http://www.sitepoint.com/&lt;wbr&gt;article/transform-php-xslt/3/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are asking yourself what is transform view or what else is available, here is a link for you.&lt;br /&gt;&lt;a href="http://www.phpwact.org/pattern/transform_view"&gt;http://www.phpwact.org/pattern/transform_view&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.phpwact.org/pattern/template_view"&gt;http://www.phpwact.org/pattern/template_view&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-3682385197412183703?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/3682385197412183703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=3682385197412183703&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/3682385197412183703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/3682385197412183703'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2008/12/php-and-web-services.html' title='Php and Web Services'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-8643521358926779176</id><published>2007-11-10T15:46:00.003Z</published><updated>2009-03-26T13:34:19.131Z</updated><title type='text'>Ajax - Php - JS - Css Example ...</title><content type='html'>Note: Server is down till Monday, Examples zip file will be available on monday...&lt;br /&gt;&lt;br /&gt;That is the web chat that i was writing till i found flaschat on the internet.&lt;br /&gt;&lt;br /&gt;I think that is very good example to show usage of object orianted php, Ajax, javascript, document object model and css.&lt;br /&gt;&lt;br /&gt;Enjoy !&lt;br /&gt;&lt;br /&gt;What is Ajax ?&lt;br /&gt;&lt;br /&gt;What is Ajax ? Simply it is a technic, which lets you to load any part of page , without loading whole page.&lt;br /&gt;&lt;br /&gt;What you need ?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.wampserver.com/en/download.php" target="_blank"&gt;http://www.wampserver.com/en/&lt;wbr&gt;download.php&lt;/a&gt; Windows + Apache + Mysql + Php&lt;br /&gt;Wamp Server is regularly updated, which gives you chance to work with latest feautures of its combination.&lt;br /&gt;&lt;br /&gt;and setup them.&lt;br /&gt;&lt;br /&gt;- Download the example codes.&lt;br /&gt;&lt;br /&gt;Unzip folder into your wamp server's apache root directory , use DBStructure.sql to create tables for application.You can use phpmyadmin for that and you can reach it by writing http://localhost/phpmyadmin to your favorite browser.&lt;br /&gt;&lt;br /&gt;Note: Create mysql users to connect db, you can find the user name and password in db folder.&lt;br /&gt;&lt;br /&gt;- Read about Ajax from w3schools.&lt;br /&gt;&lt;br /&gt;- Read about javascript and have a look at the examples.&lt;br /&gt;&lt;br /&gt;- Read about DOM.&lt;br /&gt;&lt;br /&gt;- Use www.php.net to understand the php functions.&lt;br /&gt;&lt;br /&gt;Well , hope that helps ! Now it is up to you to learn Ajax quick or not.&lt;br /&gt;&lt;br /&gt;Basic example to understand Ajax is &lt;a href="http://www.w3schools.com/php/php_ajax_poll.asp"&gt;http://www.w3schools.com/php/php_ajax_poll.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And another good example from Apple Developer web site,&lt;br /&gt;Very nice Ajax example, which tells the efficient way of using Ajax, XML data and javascript.&lt;br /&gt;&lt;a href="http://developer.apple.com/webapps/articles/optimizingajax.html"&gt;http://developer.apple.com/webapps/articles/optimizingajax.html&lt;/a&gt;&lt;br /&gt;That is also a nice example to learn, how to use, OO PHP, PHP XML Parser, Ajax + HTML + Javascript to create html output from a XML File.&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-8643521358926779176?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/8643521358926779176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=8643521358926779176&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/8643521358926779176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/8643521358926779176'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2007/11/ajax-php-js-css-example.html' title='Ajax - Php - JS - Css Example ...'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-1591578525658384821</id><published>2007-06-21T23:26:00.000+01:00</published><updated>2007-06-21T23:50:22.470+01:00</updated><title type='text'>Sms Sender via computer... (SMSEngine)</title><content type='html'>Here is another open source java application which lets you to send many sms to many different phones by one click from ur computer and it uses ur mobile phone as a modem.&lt;br /&gt;&lt;br /&gt;If you wonder how to you use,&lt;br /&gt;- java look and feels,&lt;br /&gt;- log4j java logger&lt;br /&gt;- property files&lt;br /&gt;- controlling mobile phone from ur computer&lt;br /&gt;- reading data from database&lt;br /&gt;- reading text from a file&lt;br /&gt;- sending command line paramaters to java application&lt;br /&gt;- running application from a batch file with parameters&lt;br /&gt;&lt;br /&gt;here you are. &lt;a href="http://sourceforge.net/projects/smsengine"&gt;http://sourceforge.net/projects/smsengine&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I am adding read me file of the project to give u an idea.&lt;br /&gt;&lt;br /&gt;You can use that project class and integrate it into your web application to create sms sender web portal.&lt;br /&gt;&lt;br /&gt;SMSengine 2.1.1 + Console + DB Mode :)&lt;br /&gt;------------------&lt;br /&gt;&lt;br /&gt;What is that Application ?&lt;br /&gt;--------------------------&lt;br /&gt; Imagine it is xmas time and u need to send a lots of sms to people and maybe&lt;br /&gt;same sms to many people or different sms to each person.You can simply write all the sms&lt;br /&gt;in your pc and send them by this application.&lt;br /&gt;This is will be the last version of application, i will do bug fixes :) , no worries ;) .&lt;br /&gt;&lt;br /&gt;With this version of SMSEngine, you can get the load the message/receivers from a database by using a SQL query&lt;br /&gt;or by giving table and column name to load; you can send the messages by using Swing GUI or from the console mode&lt;br /&gt;by passing the parameters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pre-requirments&lt;br /&gt;---------------&lt;br /&gt;* JRE 1.5 or higher (Napkin Look and Feel Requires)&lt;br /&gt;* Your phone needs to be connected to pc ( you check it by using hyper terminal )&lt;br /&gt; + Your phone's modem driver needs to be loaded.You can check under control panel/fax-modem&lt;br /&gt;   Incase : If you dont have your phone's driver , you can try to load xp standart driver.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to setup ?&lt;br /&gt;--------------&lt;br /&gt;1- Unzip the zip file to somewhere.&lt;br /&gt;2- Copy the dll files into your %jre%/bin (If you download the application with source dlls will be in dist folder)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to run in Graphical Mode ?&lt;br /&gt;-------------------------------&lt;br /&gt; run SMSEngineGraphMode.cmd&lt;br /&gt;&lt;br /&gt; or&lt;br /&gt;&lt;br /&gt; Other ways to run this application from the command line without Ant, try(I assume u unzip to c:\SMSEngine):&lt;br /&gt; java -jar "C:\SMSEngine\SMSEngine1.0.0.jar"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; If you have many JREs :)&lt;br /&gt; ------------------------&lt;br /&gt; You can run as&lt;br /&gt; c:\Program Files\Java\jre1.5.0_08\bin\java -jar "C:\SMSEngine\SMSEngine-1-1-1+Console.jar"&lt;br /&gt;&lt;br /&gt; If your JRE location is "d:\jdk1.5.0_06\jre" use the following command (I assume you are in the same folder with jar folder)&lt;br /&gt; d:\jdk1.5.0_06\jre\bin\java -jar "SMSEngine-1-1-1+Console.jar"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to run in Console Mode ?&lt;br /&gt;-------------------------------&lt;br /&gt;&lt;br /&gt; run SMSEngineConsoleMode.cmd  (Please change the parameters as u wish otherwise u will send me a sms :))&lt;br /&gt;&lt;br /&gt; or&lt;br /&gt;&lt;br /&gt; If your JRE location is "d:\jdk1.5.0_06\jre" use the following command (I assume you are in the same folder with jar folder)&lt;br /&gt; d:\jdk1.5.0_06\jre\bin\java -jar "SMSEngine-1-1-1+Console.jar" -c -m hellowwww -r 00447772863346,+447772863346,07772863346&lt;br /&gt;&lt;br /&gt; Note : Difference between Console mode startup and Graph mode startuo is -c parameter.&lt;br /&gt;&lt;br /&gt; Console Mode Commands:&lt;br /&gt; ----------------------&lt;br /&gt;                 -m   : message   , usage: -m 'this is my message'&lt;br /&gt;                 -r   : recievers , usage: -r '004477728633XX' or -r '004477728633XX','077728633XX','053634565XX'&lt;br /&gt;                 -mf  : message from file , usage: -mf 'c:\\SMSFolder\\message01.txt'&lt;br /&gt;                 -mdb : message from database , usage: -mdb , application will try to read the parameters from property file.&lt;br /&gt;                 -rf  : receivers from file , usage: -rf 'c:\\SMSFolder\\recievers01.txt'&lt;br /&gt;                 -rdb : receivers from database , usage: -rdb , application will try to read the parameters from property file.              &lt;br /&gt;             &lt;br /&gt;                 -h or -help : shows the argument list&lt;br /&gt;             &lt;br /&gt;                 Note : If you are a Windows user please use \\\\ instead \\&lt;br /&gt;             &lt;br /&gt;                 Enjoy :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How/from where does application gets the GSM Device, logger settings and default/console mode database conn parameters?&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;If you open the jar file with winzip or winrar or whatever :), then you will see 3 property files.&lt;br /&gt;You can easily change them with a text editor and add back to jar file.&lt;br /&gt;&lt;br /&gt;Note : if you are changing log4j.properties for windows environment please use \\ instead of \.&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-1591578525658384821?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://sourceforge.net/projects/smsengine' title='Sms Sender via computer... (SMSEngine)'/><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/1591578525658384821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=1591578525658384821&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/1591578525658384821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/1591578525658384821'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2007/06/sms-sender-via-computer-smsengine.html' title='Sms Sender via computer... (SMSEngine)'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-8065036081696324696</id><published>2007-06-14T23:19:00.000+01:00</published><updated>2007-06-14T23:32:26.925+01:00</updated><title type='text'>Java Architecture for XML Binding (JAXB) - How to read xml data by using java</title><content type='html'>&lt;span style="font-size:100%;"&gt;So what is JAXB ? Simply jaxb is easy way to reach the xml document content by using set and get methods  of jaxb object.&lt;br /&gt;&lt;br /&gt;You provide the xml document and xsd schema and then u can simply use jaxb object, you can reach the elements by using set and get methods.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Here you can read about JAXB and see examples on &lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/"&gt;http://java.sun.com/developer/technicalArticles/WebServices/jaxb/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Enjoy !&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-8065036081696324696?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/8065036081696324696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=8065036081696324696&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/8065036081696324696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/8065036081696324696'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2007/06/java-architecture-for-xml-binding-jaxb.html' title='Java Architecture for XML Binding (JAXB) - How to read xml data by using java'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-4205142721817190728</id><published>2007-06-14T01:38:00.000+01:00</published><updated>2007-06-14T01:53:42.676+01:00</updated><title type='text'>How to unescape html code which is in xml file</title><content type='html'>Lets say u have a html code in xml and u need to unescape it , how  ?&lt;br /&gt;&lt;br /&gt;by changing &lt;span style="font-style: italic;"&gt;xsl:output method="xml" &lt;/span&gt;to html &lt;span style="font-style: italic;"&gt;&lt;xsl:output method="html"&gt; &lt;/xsl:output&gt;&lt;/span&gt;and using &lt;span style="font-style: italic;"&gt;disable-output-escaping="yes" &lt;/span&gt;? try it, it may work with you but did not work with me and i used javascript for that.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Example xml&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;data&gt;&lt;/data&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_cOtyOFydhww/RnCRZZzjpTI/AAAAAAAAAAU/qDS05jFBun4/s1600-h/exXml.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_cOtyOFydhww/RnCRZZzjpTI/AAAAAAAAAAU/qDS05jFBun4/s320/exXml.JPG" alt="" id="BLOGGER_PHOTO_ID_5075716645656438066" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;data&gt;&lt;/data&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the javascript way,&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cOtyOFydhww/RnCQM5zjpSI/AAAAAAAAAAM/3S2XQUmxzW0/s1600-h/htmlUnescape.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_cOtyOFydhww/RnCQM5zjpSI/AAAAAAAAAAM/3S2XQUmxzW0/s320/htmlUnescape.JPG" alt="" id="BLOGGER_PHOTO_ID_5075715331396445474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-4205142721817190728?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/4205142721817190728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=4205142721817190728&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4205142721817190728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/4205142721817190728'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2007/06/how-to-unescape-html-code-which-is-in.html' title='How to unescape html code which is in xml file'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_cOtyOFydhww/RnCRZZzjpTI/AAAAAAAAAAU/qDS05jFBun4/s72-c/exXml.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-115435953179281135</id><published>2006-07-31T16:24:00.000+01:00</published><updated>2007-06-14T23:35:16.428+01:00</updated><title type='text'>AJAX</title><content type='html'>What is Ajax ? Simply it is a technic, which lets you to load any part of page , without loading whole page.&lt;br /&gt;&lt;br /&gt;See thee Example :  &lt;a href="http://www.w3schools.com/php/php_ajax_poll.asp" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;http://www.w3schools.com/php&lt;wbr&gt;/php_ajax_poll.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Easiest way to learn Ajax. &lt;a href="http://www.w3schools.com/ajax/ajax_intro.asp"&gt;http://www.w3schools.com/ajax/ajax_intro.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Working Ajax example, &lt;a href="http://zbk.110mb.com/about.php"&gt;http://zbk.110mb.com/about.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are using ajax you should know how to change html document element content by using javascript.&lt;br /&gt;&lt;br /&gt;Here is the link that u are looking for &lt;a href="http://www.w3schools.com/js/js_examples_3.asp"&gt;http://www.w3schools.com/js/js_examples_3.asp.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;some more links about Ajax &lt;a href="http://www.javapassion.com/ajaxcodecamp/"&gt;http://www.javapassion.com/ajaxcodecamp/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-115435953179281135?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/115435953179281135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=115435953179281135&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/115435953179281135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/115435953179281135'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/07/ajax.html' title='AJAX'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114476091683498749</id><published>2006-04-11T14:06:00.000+01:00</published><updated>2006-04-11T14:08:36.963+01:00</updated><title type='text'>Using Java DB in Desktop Applications</title><content type='html'>By John O'Conner, March 2006     &lt;br /&gt;&lt;br /&gt;Articles Index&lt;br /&gt;&lt;br /&gt;Sun Microsystems recently announced that it is distributing and supporting Java DB based on the 100 percent Java technology, open-source Apache Derby database. Derby was previously available under its earlier name, Cloudscape, from its former owners: Cloudscape, Informix, and IBM. IBM donated the Derby product source code to the Apache Foundation as an open-source project. Sun, IBM, other companies, and individuals have been actively involved in development of the relational database as part of the Apache Derby community. Sun distributes Java DB in many of its products, including the Sun Java Enterprise System and the Sun Java System Application Server. The NetBeans integrated development environment (IDE) 5.0 also supports Java DB.&lt;br /&gt;&lt;br /&gt;Java DB is lightweight at 2 megabytes and embeddable within desktop Java technology applications. Desktop applications can now access powerful database storage with triggers, stored procedures, and support for SQL, Java DataBase Connectivity (JDBC) software, and Java Platform, Enterprise Edition (Java EE, formerly referred to as J2EE), all embedded within the same Java virtual machine (JVM).*&lt;br /&gt;&lt;br /&gt;This article describes how to download, install, integrate, and deploy Java DB within desktop Java technology applications. A demo application called Address Book demonstrates how to work with Java DB as an embedded database.&lt;br /&gt;Contents&lt;br /&gt; &lt;br /&gt;-  Creating the Address Book Demo&lt;br /&gt;-  Installing Java DB&lt;br /&gt;-  Integrating Java DB With NetBeans IDE 5.0&lt;br /&gt;-  Loading the Database Driver&lt;br /&gt;-  Connecting to the Java DB Database&lt;br /&gt;-  Creating the Database&lt;br /&gt;-  Using the Database&lt;br /&gt;-  Deploying Your Application&lt;br /&gt;-  Summary&lt;br /&gt; &lt;br /&gt;&lt;a href='http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javadb/' target='_blank'&gt;More&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114476091683498749?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114476091683498749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114476091683498749&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114476091683498749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114476091683498749'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/04/using-java-db-in-desktop-applications.html' title='Using Java DB in Desktop Applications'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114476068568249605</id><published>2006-04-11T14:03:00.000+01:00</published><updated>2006-04-11T14:04:45.910+01:00</updated><title type='text'>Real Time For Validation Using AJAX</title><content type='html'>Articles Index&lt;br /&gt;&lt;br /&gt;Editor's Note: This article is taken from the The Java BluePrints Solutions Catalog, a new project from the Java BluePrints program. The Java BluePrints program consists of a set of guidelines and best practices, as well as small applications to illustrate these guidelines on both the J2EE 1.4 and 1.5 platforms.&lt;br /&gt;&lt;br /&gt;If you've ever entered form data on the Internet, you've likely encountered cases where server-side processing is used to validate that the data meets a specified set of criteria. JavaScript may be used on the client-side to validate the format of simple data such as email addresses, phone numbers, dates, or credit card numbers. However, client-side processing is limited in that it cannot apply business rules or access server-side data sources to perform that validation.&lt;br /&gt;&lt;br /&gt;Consider some of the following use-cases:&lt;br /&gt;&lt;br /&gt;* You need to validate whether a user name has already been registered when creating an online account&lt;br /&gt;* You need to validate a serial number or coupon code that requires special business logic&lt;br /&gt;* You need to validate data in conjunction with real-time data that exists on the server or database&lt;br /&gt;&lt;br /&gt;Traditional web applications require that the form data be posted to the server. This is followed by some sort of back-end processing of that data, and finally an HTML page refresh that yields the results of the post. However, this strategy can be distracting to the end user, especially in cases where a single form field is invalid and the user has to re-enter a large set of form data. Hence, the problem becomes:&lt;br /&gt;&lt;br /&gt;Problem: "How do you validate form data requiring server-side logic without refreshing the HTML page?"&lt;br /&gt;&lt;br /&gt;Using Asynchronous JavaScript and XML (AJAX) interactions, data may be validated in near real-time as the user types the data in an HTML form. In this case, form data is validated asynchronously, which allows the HTML page to continue processing events while the form data is being validated by a server-side component in the background. If the form data does not match what is required by the server-side logic, the user knows immediately and can change it without having to refresh the HTML page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/J2EE/AJAX/RealtimeValidation/" target="blank"&gt;More&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114476068568249605?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114476068568249605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114476068568249605&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114476068568249605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114476068568249605'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/04/real-time-for-validation-using-ajax.html' title='Real Time For Validation Using AJAX'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114466013509221949</id><published>2006-04-10T10:05:00.000+01:00</published><updated>2006-04-10T10:09:09.170+01:00</updated><title type='text'>Some J2ME Info</title><content type='html'>My Way : Java --  &gt; &lt;span style="font-weight: bold;"&gt;J2EE&lt;/span&gt; -- &gt; J2ME -- &gt; My Business&lt;br /&gt;&lt;br /&gt;http://www.troobloo.com/tech/j2me.shtml&lt;br /&gt;&lt;br /&gt;http://www.javaworld.com/javaworld/jw-10-2002/jw-1018-wireless.html&lt;br /&gt;&lt;br /&gt;http://dev2dev.bea.com/pub/a/2005/02/wlw_ext_mobileaware.html?page=last#thread&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114466013509221949?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114466013509221949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114466013509221949&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114466013509221949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114466013509221949'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/04/some-j2me-info.html' title='Some J2ME Info'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114441196228411618</id><published>2006-04-07T13:09:00.000+01:00</published><updated>2006-04-07T13:12:42.530+01:00</updated><title type='text'>Some Links</title><content type='html'>http://java.sun.com/j2se/1.4.2/docs/api/&lt;br /&gt;http://homepages.uel.ac.uk/D.Bowden/&lt;br /&gt;http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic&lt;br /&gt;http://www.allapplabs.com/glossary/volatile.htm&lt;br /&gt;http://www.unix.org.ua/orelly/java-ent/ebeans/ch01_03.htm&lt;br /&gt;http://java.sun.com/developer/technicalArticles/J2EE/Intro/&lt;br /&gt;http://www.javaworld.com/javaworld/jw-08-2000/jw-0825-ejbrestrict.html&lt;br /&gt;http://www.google.co.in/search?hl=en&amp;q=ejb+architecture&amp;amp;meta=&lt;br /&gt;http://openejb.org/Download&lt;br /&gt;http://www.tusc.com.au/tutorial/html/&lt;br /&gt;http://www.ibiblio.org/xml/slides/xmloneaustin2001/xmlandjava/&lt;br /&gt;http://ant.apache.org/manual/index.html&lt;br /&gt;http://www.tusc.com.au/tutorial/html/&lt;br /&gt;http://www.roseindia.net/webservices/buildingsimplewebservice.shtml&lt;br /&gt;http://ant.apache.org/manual/index.html&lt;br /&gt;http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/struts/index.html&lt;br /&gt;http://www.myeclipseide.com/ContentExpress-display-ceid-67.html&lt;br /&gt;&lt;br /&gt;by Puspamitra Mishra&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114441196228411618?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114441196228411618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114441196228411618&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114441196228411618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114441196228411618'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/04/some-links.html' title='Some Links'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114206870489564769</id><published>2006-03-11T09:15:00.000Z</published><updated>2006-03-11T09:18:25.270Z</updated><title type='text'>Java XML Parsers</title><content type='html'>&lt;img src="http://www.devx.com/assets/dropcaps/3591.gif" /&gt;he XML parser world is a dynamic one. As standards change, the parsers change as well--XML parsers are becoming more sophisticated. For most programming projects, the parser, at minimum, must support DOM Level 2, SAX 2, XSLT, and Namespaces. All the parsers discussed here provide these capabilities; however, there are distinct differences in performance, reliability, and conformance to standards. In this article, I'll compare the latest parsers from Sun, Oracle, and the Apache Software Foundation.&lt;br /&gt;&lt;br /&gt;&lt;a href='http://www.devx.com/xml/Article/16921' target='_blank'&gt;More :) ..&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;a href='http://www-128.ibm.com/developerworks/xml/library/x-jaxp1.html' target='_blank'&gt;&lt;br /&gt;Sun's Java API for XML Parsing, Version 1.1&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;a href='http://xerces.apache.org/xerces2-j/' target='_blank'&gt;Xerces2 ..&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;a href='http://java.sun.com/xml/' target='_blank'&gt;Sunny Way ..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114206870489564769?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114206870489564769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114206870489564769&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114206870489564769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114206870489564769'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/03/java-xml-parsers.html' title='Java XML Parsers'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114199279951554194</id><published>2006-03-10T12:12:00.000Z</published><updated>2006-03-11T08:52:33.510Z</updated><title type='text'>XML and Transact SQL</title><content type='html'>I think it is important to know that powerfull technologies.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oreilly.com/catalog/wintrnssql/chapter/ch01.html#23334" target="_blank"&gt;What is Transact SQL (I have just read that as a story of history :))&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.quest-pipelines.com/newsletter-v3/0302_D.htm"&gt;Article About how to use transact sql to create XML output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_oview_4pcx.asp"&gt;Accessing and Changing Relational Data Overview&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsql/ac_xml1_022c.asp"&gt;XML and Internet Support Overview&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;XML is powerful part of dynamic web applications.Just a simple example, lets say that you have a lot of customers and you need to share different data with them.This time you can use xml files.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;&lt;b&gt;See Also&lt;/b&gt;&lt;/h5&gt; &lt;span id="LinKs"&gt; &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/xmlsql/ac_xml1_8e7t.asp"&gt;Using IIS Virtual Directory Management for SQL Server Utility&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/xmlsql/ac_xml1_59m4.asp"&gt;Accessing SQL Server Using HTTP&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/xmlsql/ac_mschema_5cfn.asp"&gt;Creating XML Views Using Annotated XDR Schemas&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/xmlsql/ac_mschema_3gab.asp"&gt;Using XPath Queries&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/xmlsql/ac_openxml_759d.asp"&gt;Retrieving and Writing XML Data&lt;/a&gt;&lt;/p&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114199279951554194?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114199279951554194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114199279951554194&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114199279951554194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114199279951554194'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/03/xml-and-transact-sql.html' title='XML and Transact SQL'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114198838730709997</id><published>2006-03-10T10:57:00.000Z</published><updated>2006-03-10T11:03:36.256Z</updated><title type='text'>Why Java ?</title><content type='html'>&lt;h2&gt;&lt;strong&gt;101 Reasons Why Java is Better than .NET (Reloaded)&lt;/strong&gt;&lt;/h2&gt;  &lt;p&gt; This is the 2004 edition. The original 2003 edition can be found &lt;a href="http://www.manageability.org/blog/why%20java/"&gt;by browsing these articles&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt; The original edition was put together using a blogging system, this edition is now based on a Wiki system. Hopefully, the comments and contributions will be richer this time. &lt;/p&gt;  &lt;p&gt; The list is structured such that all 101 entries can be viewed on a single page (unlike the original!). Each entry would be accompanied by a "sound bite" that bests captures the intent of the entry (if you got a good one, please let me know!). Each entry is also a link that you can navigate to examine more details and supporting information. At this time there is no particularly reason for the ordering and that will change at a later date (so please don't cite the entries number when you make an external comment!).&lt;/p&gt;  &lt;p&gt; For an easy to remember url to link to this list and all future editions use &lt;a href="http://one.manageability.org"&gt;one.manageability.org&lt;/a&gt; .  Feel free to post this url in response to articles and posts falsely promoting the benefits of .NET.&lt;/p&gt;  &lt;p&gt; Finally, for those who unfortunately have legacy .NET deployments, here a series of articles that will help you &lt;a href="http://www-106.ibm.com/developerworks/library/j-roadmap.html"&gt;migrate to a superior Java platform&lt;/a&gt; .&lt;br /&gt;&lt;/p&gt; &lt;p&gt;More: &lt;br /&gt;&lt;a  href='http://www.manageability.org/manageabilityWiki/WhyJavaIsBetterThanDotNet' target='_blank'&gt;&lt;br /&gt;WhyJavaIsBetterThanDotNet&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114198838730709997?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114198838730709997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114198838730709997&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114198838730709997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114198838730709997'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/03/why-java.html' title='Why Java ?'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114198660456632667</id><published>2006-03-10T10:28:00.000Z</published><updated>2006-03-10T10:34:33.263Z</updated><title type='text'>Java FAQ</title><content type='html'>• At the beginning of each class, specify the author name and give the description&lt;br /&gt;as to what the class does.&lt;br /&gt;&lt;br /&gt;• For each method, specify its functionality and parameters it takes, return&lt;br /&gt;type and exceptions handled.&lt;br /&gt;&lt;br /&gt;• While importing classes, import only the class and not the whole package.&lt;br /&gt;&lt;br /&gt;• For variable names, give long descriptive and complete names…like&lt;br /&gt;getAllScheduleDetails…&lt;br /&gt;&lt;br /&gt;• Before each block, insert comment describing the functionality of that&lt;br /&gt;block and also why it is done.&lt;br /&gt;&lt;br /&gt;• After each block, leave a blank line.&lt;br /&gt;&lt;br /&gt;• For assignments and comparison, use a space in between…like a =&lt;br /&gt;4…&lt;br /&gt;&lt;br /&gt;• While accessing database columns from tables, using get &amp; set methods,&lt;br /&gt;don’t use numbers…instead use column names.&lt;br /&gt;&lt;br /&gt;• Within a block, a column cannot be accessed twice using get methods two&lt;br /&gt;times…instead take the value in a variable and use it twice.&lt;br /&gt;&lt;br /&gt;• The first thing a JVM does when it loads a class is check that the first&lt;br /&gt;four bytes are (in hex) CA FE BA BE. This is called the “Magic Number”.&lt;br /&gt;If the class file is corrupted, then JVM throws out the exception as “Bad&lt;br /&gt;Magic Number”. To avoid this, always transfer the class files in binary&lt;br /&gt;mode and not in the text or ASCII mode.&lt;br /&gt;&lt;br /&gt;• Since constructors are never inherited and so will never have the opportunity&lt;br /&gt;to be overridden, final should not be used in case of a constructor.&lt;br /&gt;&lt;br /&gt;• When we execute a file using Runtime.exec(), it returns a process. We&lt;br /&gt;should close all the streams associated with that process and then destroy that&lt;br /&gt;process. Otherwise, it gives “Too many open files” exception.&lt;br /&gt;&lt;br /&gt;• The difference between abstract class and interface is that – any&lt;br /&gt;class can extend only one abstract class, but can implement many interfaces.&lt;br /&gt;&lt;br /&gt;• Object1 == Object2 returns true, only when both the objects are stored&lt;br /&gt;in the same address.&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; I've got problems with the Socket class (network)&lt;br /&gt;&lt;br /&gt;I've got problems with the Socket class. I use it inside an applet (I've&lt;br /&gt;&lt;br /&gt;written a small chatbox). I have code like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Socket s = new Socket("192.168.0.4", 13780);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When the server I'm connecting to is on the same machine as the client, it&lt;br /&gt;works.&lt;br /&gt;&lt;br /&gt;When the server is an other machine, both NS and IE give an error message like:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Security:Can't connect to 192.168.0.4 with origin ''&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Does anyone know how I can fix this??&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The standard security concept for an applet is the 'sandbox'. An applet&lt;br /&gt;can't talk&lt;br /&gt;&lt;br /&gt;outside it's memory space, can't talk to any files at all, and cannot talk to&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;anything on the internet except the same machine that it's 'parent'&lt;br /&gt;&lt;br /&gt;HTML page originated from. So your applet can never talk to 192.168.0.4&lt;br /&gt;&lt;br /&gt;unless the HTML came from 192.168.0.4&lt;br /&gt;&lt;br /&gt;How do I view the error output from my Java applets in IE?&lt;br /&gt;&lt;br /&gt;Answer: The file windows\Java\Javalog.txt contains info about the last Applet&lt;br /&gt;loaded in IE.&lt;br /&gt;&lt;br /&gt;All the System.out messages and exception information is stored here when Java&lt;br /&gt;Logging&lt;br /&gt;&lt;br /&gt;is enabled in IE. To enable Java Logging start IE and select View/Options/Advanced.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select "Enable Java Logging" check box click OK. Restart IE.&lt;br /&gt;&lt;br /&gt;In NT4 the file in C:\WINNT\Java&lt;br /&gt;&lt;br /&gt;Is there a way to reduce the amount of time that it takes to download an applet?&lt;br /&gt;&lt;br /&gt;Answer: There is a way to reduce the amount of time an applet takes to download.&lt;br /&gt;What ever classes the Java applet is refering, you cluster them in a JAR file&lt;br /&gt;with the help of JAR utility that comes with the JDK version. Check out the&lt;br /&gt;help for the options of that utility and make a ".jar" file out of&lt;br /&gt;the applets refered classes and images and other relevent data which you want&lt;br /&gt;to load. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Use the archive option of the applet tag and assign the .jar file: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;applet code="xyz.class" archieve="pqr.jar" width=100&lt;br /&gt;height=100&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/applet&amp;gt;&lt;br /&gt;&lt;br /&gt;When I reload my applet my hidden canvas is shown directly! why?&lt;br /&gt;&lt;br /&gt;Answer: Put mycanvas.setVisible (false); in Start() rather than init()...&lt;br /&gt;&lt;br /&gt;I want to be able to print debugging text messages during the whole applet's&lt;br /&gt;lifetime. Is there an easy way to do that???&lt;br /&gt;&lt;br /&gt;Q: I'm a beginner in java. Right now i am doing an applet and i want to&lt;br /&gt;&lt;br /&gt;write messages to the browser window for debugging purposes i.e. to&lt;br /&gt;&lt;br /&gt;follow how the applet executes. Like when i'm developing an C++&lt;br /&gt;&lt;br /&gt;application i usually use lots of "couts" to check values and the&lt;br /&gt;&lt;br /&gt;programs behavior. Is there an easy way to do things like that when&lt;br /&gt;&lt;br /&gt;making a Java applet? For me it seems like everything happens in a&lt;br /&gt;&lt;br /&gt;function called "paint(graphics g)" and that function is only called&lt;br /&gt;at&lt;br /&gt;&lt;br /&gt;the beginning of the applet start. I want to be able to print text&lt;br /&gt;&lt;br /&gt;messages during the whole applet's lifetime. Is there an easy way to do&lt;br /&gt;&lt;br /&gt;that???&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: you'd be better off doing a&lt;br /&gt;&lt;br /&gt;System.out.println("the value is " + whateverValue);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This will show up in the java console. to see it in ie5, do View-&amp;gt;Java Console,&lt;br /&gt;and in netscape4.7, do Communicator-&amp;gt;Tools-&amp;gt;Java Console and it will pop&lt;br /&gt;up the java console window.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you are doing it in appletviewer from dos, it will show up in the dos window&lt;br /&gt;you used to call appletviewer.&lt;br /&gt;&lt;br /&gt;What are restrictions for applet?&lt;br /&gt;&lt;br /&gt;Q: What are applets prevented from doing?&lt;br /&gt;&lt;br /&gt;Answer: In general, applets loaded over the net are prevented from reading and&lt;br /&gt;&lt;br /&gt;writing files on the client file system, and from making network connections&lt;br /&gt;&lt;br /&gt;except to the originating host.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In addition, applets loaded over the net are prevented from starting other&lt;br /&gt;&lt;br /&gt;programs on the client. Applets loaded over the net are also not allowed to&lt;br /&gt;&lt;br /&gt;load libraries, or to define native method calls. If an applet could define&lt;br /&gt;&lt;br /&gt;native method calls, that would give the applet direct access to the&lt;br /&gt;&lt;br /&gt;underlying computer.&lt;br /&gt;&lt;br /&gt;Q: I am writing an applet that will use images. I would like to ship out the&lt;br /&gt;images using a jar file that contains all the images that the applet is going&lt;br /&gt;to use. I have seen a piece of code that does that in the past, but I don't&lt;br /&gt;remember where. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: by David Risner The following is from:&lt;br /&gt;&lt;br /&gt;http://developer.netscape.com/docs/technote/java/getresource/getresource.html&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import java.applet.*;&lt;br /&gt;&lt;br /&gt;import java.awt.*;&lt;br /&gt;&lt;br /&gt;import java.io.*; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public class ResourceDemoApplet extends Applet {&lt;br /&gt;&lt;br /&gt;Image m_image; &lt;/p&gt;&lt;br /&gt;&lt;p&gt; public void init() {&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;InputStream in = getClass().getResourceAsStream("my.gif");&lt;br /&gt;&lt;br /&gt;if (in == null) {&lt;br /&gt;&lt;br /&gt;System.err.println("Image not found.");&lt;br /&gt;&lt;br /&gt;return;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;byte[] buffer = new byte[in.available()];&lt;br /&gt;&lt;br /&gt;in.read(buffer);&lt;br /&gt;&lt;br /&gt;m_image = Toolkit.getDefaultToolkit().createImage(buffer);&lt;br /&gt;&lt;br /&gt;} catch (java.io.IOException e) {&lt;br /&gt;&lt;br /&gt;System.err.println("Unable to read image.");&lt;br /&gt;&lt;br /&gt;e.printStackTrace();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;} &lt;/p&gt;&lt;br /&gt;&lt;p&gt; public void paint(Graphics g) {&lt;br /&gt;&lt;br /&gt;if (m_image == null)&lt;br /&gt;&lt;br /&gt;return; &lt;/p&gt;&lt;br /&gt;&lt;p&gt; Dimension d = getSize();&lt;br /&gt;&lt;br /&gt;g.drawImage(m_image, 0, 0, d.width, d.height, Color.white, this);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I have made an applet in vJ++ which I have to sign. Is there any tool to do&lt;br /&gt;it (both signing and cabbing)..?&lt;br /&gt;&lt;br /&gt;Answer: Signing and archive files are two of the biggest bothers in Java. Everyone&lt;br /&gt;&lt;br /&gt;uses a different system. A good place to start is:&lt;br /&gt;&lt;br /&gt;http://www.suitable.com/Doc_CodeSigning.shtml&lt;br /&gt;&lt;br /&gt;One of the other bothers is that the unsigned window warning can't be removed&lt;br /&gt;by&lt;br /&gt;&lt;br /&gt;signing an applet for Internet Explorer for Macintosh. And while I am on the&lt;br /&gt;&lt;br /&gt;subject, the Windows Netscape 4.x system has a bunch of privilege calls:&lt;br /&gt;&lt;br /&gt;http://developer.netscape.com/docs/manuals/signedobj/capsapi.html&lt;br /&gt;&lt;br /&gt;and you need under most circumstances to make Microsoft specific calls too,&lt;br /&gt;&lt;br /&gt;detailed in links from:&lt;br /&gt;&lt;br /&gt;http://www.microsoft.com/java/security/&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Going through all this will make you want to curse. Unfortunately it is&lt;br /&gt;&lt;br /&gt;hard to pick a convincing scapegoat. It is true that Microsoft chose an&lt;br /&gt;&lt;br /&gt;entirely nonstandard CAB system, but it produces archives that are about 40%&lt;br /&gt;&lt;br /&gt;smaller than JAR files. Signing archive files is a perfect microcosm of the&lt;br /&gt;&lt;br /&gt;"freedom to innovate" controversy. Microsoft has done a better job&lt;br /&gt;but taken&lt;br /&gt;&lt;br /&gt;away predictability and uniformity. If the Java standards were not controlled&lt;br /&gt;&lt;br /&gt;entirely by Sun, a Microsoft competitor, perhaps everyone would be using smaller&lt;br /&gt;&lt;br /&gt;archive files by now.&lt;br /&gt;&lt;br /&gt;by Mickey Segal&lt;br /&gt;&lt;br /&gt;Q: Why do I get message like “wrong magic number” when I am trying&lt;br /&gt;to run applet? What is a magic number?&lt;br /&gt;&lt;br /&gt;Answer: The first thing a JVM does when it loads a class is check that the first&lt;br /&gt;four bytes are (in hex) CA FE BA BE. This is the "magic number" and&lt;br /&gt;thats why you are getting that error, you are trying to load a file that isnt&lt;br /&gt;a class and so the class loader in the JVM is throwing out that exception.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Make sure you transfer the class files to site in binary mode, rather than&lt;br /&gt;text or ASCII mode.&lt;br /&gt;&lt;br /&gt;An error from the browser saying "cannot start applet ... bad magic number"&lt;br /&gt;usually means that one of the class files on the server is corrupted. '&lt;br /&gt;&lt;br /&gt;Replace your class binary files on the web server; clean up the cache of your&lt;br /&gt;browser, and reload your applet.&lt;br /&gt;&lt;br /&gt;Q: I want to use more fonts in my applet... say for example Arial... which is&lt;br /&gt;not avilable in the present jdk package...&lt;br /&gt;&lt;br /&gt;How can i deal with it?&lt;br /&gt;&lt;br /&gt;Answer: import java.awt.Toolkit;&lt;br /&gt;&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;Toolkit tools : new Toolkit();&lt;br /&gt;&lt;br /&gt;String[] fontList = tools.getFontList();&lt;br /&gt;&lt;br /&gt;Q: How can I slow down my applet?&lt;br /&gt;&lt;br /&gt;I have a game applet that is running too fast on newer systems that have high-end&lt;br /&gt;video cards. Its easy enough to slow down the game by having it sleep between&lt;br /&gt;thread cycles, but I need to be able to&lt;br /&gt;&lt;br /&gt;determine how fast a users machine is before I determine how long to sleep for.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I have been muddling through the documentation but cannot find any calls that&lt;br /&gt;will tell my applet what the users configuration is as regards to CPU speed&lt;br /&gt;and other components they may have on their system.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Simple create a new Date (), then perform a standard lengthy operation&lt;br /&gt;on the order of something that takes about one second on your machine, like&lt;br /&gt;a long loop, then create another new Date() and compare it to the first. If&lt;br /&gt;it takes 1/2 of the time compared to your machine, then the CPU is probably&lt;br /&gt;about 2 times faster. if it takes 3 times the duration compared to your machine,&lt;br /&gt;the CPU is probably 1/3 as fast as yours.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Do this dynamically, and it might help with speed changes when there's lots&lt;br /&gt;of action happening as well - unless this issue is already being dealt with&lt;br /&gt;using threads, that is.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;by Max Polk&lt;br /&gt;&lt;br /&gt;Q: Why I see applet in applet viewer and do not in a browser?&lt;br /&gt;&lt;br /&gt;When i try to view my applet on a web page i get the error&lt;/p&gt;&lt;br /&gt;&lt;p&gt;java.lang.NoSuchMethodError: java/lang/Double: method&lt;br /&gt;&lt;br /&gt;parseDouble(Ljava/lang/String;)D not found&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Which is weird as it compiles fine on Borland and with the JDK using applet&lt;br /&gt;viewer&lt;br /&gt;&lt;br /&gt;Anyone have any ideas what is going wrong?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The parseDouble method was only added to Java in JDK 1.2&lt;br /&gt;&lt;br /&gt;Browsers typically only support Java 1.1&lt;br /&gt;&lt;br /&gt;If you have the JRE installed, you can run Java 1.2 applets. But you must also&lt;br /&gt;change the HTML code that embeds the applet. Check javasoft.com. I believe they&lt;br /&gt;have a program which will automatically change the &amp;lt;APPLET&amp;gt; tag to &amp;lt;EMBED&amp;gt;&lt;br /&gt;and add whatever else is needed. It's been a while since I've done applets but&lt;br /&gt;I do remember running across a similar problem.&lt;br /&gt;&lt;br /&gt;Q: In my applet I have a bunch of gif's in my JAR file. When I try to access&lt;br /&gt;a gif using:&lt;br /&gt;&lt;br /&gt;Image img = getImage(getCodeBase(), "image.gif");&lt;/p&gt;&lt;br /&gt;&lt;p&gt;everything works fine under Microsoft Internet Explorer but it does not under&lt;br /&gt;Netscape and appletviewer. Of course I do not have any gifs in my CodeBase directory&lt;br /&gt;on server.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Any idea why?????&lt;br /&gt;&lt;br /&gt;Answer: Because this is not how you access resources in a Jar file. You need&lt;br /&gt;to use getResourceAsStream if you want to access GIFs from Netscape. Look at:&lt;br /&gt;&lt;br /&gt;http://developer.iplanet.com/docs/technote/java/getresource/getresource.html&lt;br /&gt;&lt;br /&gt;for example code. This same code will work in Sun's Appletviewer.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;David Risner&lt;br /&gt;&lt;br /&gt;http://david.risner.org/&lt;br /&gt;&lt;br /&gt;Q: How to get JVM version in Internet Explorer?&lt;br /&gt;&lt;br /&gt;Q: When you open the Java Console through internet explorer, it prints the following&lt;br /&gt;useful line at the top:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Microsoft (R) VM for Java, 5.0 Release 5.0.0.3318&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We would like to be able to obtain the above String (or atleast the 5.0.0.3318&lt;br /&gt;part of it) through a Java Applet / Javascript at runtime.&lt;br /&gt;&lt;br /&gt;Does anyone know of any handy methods that allow access to this String ? I've&lt;br /&gt;looked in all the System.properties, but it wasn't there. Is it stored in the&lt;br /&gt;user's registry anywhere ?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: just for Microsoft't VM!&lt;br /&gt;&lt;br /&gt;try :&lt;/p&gt;&lt;br /&gt;&lt;p&gt;class test{&lt;br /&gt;&lt;br /&gt;public static void main(String[] args){&lt;br /&gt;&lt;br /&gt;String build;&lt;br /&gt;&lt;br /&gt;build=com.ms.util.SystemVersionManager.getVMVersion().getProperty ("BuildIncrement");&lt;br /&gt;&lt;br /&gt;System.out.println("Using build "+build);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Real Gagnon from Quebec, Canada&lt;br /&gt;&lt;br /&gt;* Looking for code code snippets ? Visit Real's How-to&lt;br /&gt;&lt;br /&gt;* http://www.rgagnon.com/howto.html&lt;br /&gt;&lt;br /&gt;Q: I wonder if there is a way to find out if a button in an applet has been&lt;br /&gt;clicked, no matter which of the buttons in an applet it might be.&lt;br /&gt;&lt;br /&gt;Of course I can write, with a particular button (if event.target==button1) but&lt;br /&gt;maybe there is a syntax that looks more or less like this (it is an imaginary&lt;br /&gt;code just to show what I would like to do)&lt;br /&gt;&lt;br /&gt;(if.event.target.ComponentType==Button) etc.&lt;br /&gt;&lt;br /&gt;I tried a lot of things with getClass but none of them worked&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Have your applet implement the ActionListener interface, and have every&lt;br /&gt;button that's instantiated add the applet as an ActionListener. Then, inside&lt;br /&gt;of your applet, have the following method:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public void actionPerformed(ActionEvent event) {&lt;br /&gt;&lt;br /&gt;// check to see if the source of the event was a button&lt;br /&gt;&lt;br /&gt;if(event.getSource() instanceof Button) {&lt;br /&gt;&lt;br /&gt;// do whatever it is you want to do with buttons...&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Darryl L. Pierce Visit &amp;lt;http://welcome.to/mcpierce&amp;gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Q: Has anyone ever tried anything like this or am I asking for trouble trying&lt;br /&gt;to write a program like this?....&lt;br /&gt;&lt;br /&gt;I plan to use JBuilder to create a Java GUI that will use Perl to invoke system&lt;br /&gt;calls.&lt;br /&gt;&lt;br /&gt;The GUI will be run in Windows(NT) while the system calls will be invoked in&lt;br /&gt;Unix.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Sure, why not? Seems to me it should be quite doable. Use Java code&lt;br /&gt;to build the GUI and&lt;br /&gt;&lt;br /&gt;cross the network (for instance using RMI), then invoke the Perl interpreter&lt;br /&gt;as an external process, or possibly use JPerl (see http://www.perl.com/CPAN-local/authors/id/S/SB/SBALA/&lt;br /&gt;) from there. Or use a different distributed objects architecture to connect&lt;br /&gt;Java and Perl objects over the network...&lt;br /&gt;&lt;br /&gt;About serialization...&lt;br /&gt;&lt;br /&gt;Q: If I have a class that implements the Serializable interface, but it has&lt;br /&gt;member variables which reference objects that do not implement the Serializable&lt;br /&gt;interface, it appears that I can't serialize an instance of the class. I keep&lt;br /&gt;getting:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;java.io.NotSerializableException&lt;/p&gt;&lt;br /&gt;&lt;p&gt;for one of the objects referenced by a member variable.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Am I correct, or am I just missing something. Also, if anyone knows a work-around&lt;br /&gt;to serialize non-serializable objects, I'd like to hear about it. Unfortunately,&lt;br /&gt;I have no control over the classes I'm trying to serialize, so I tried putting&lt;br /&gt;a serializable wrapper around them , but that didn't work.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Do you really need to serialize those members of your class which aren't&lt;br /&gt;serializable? In other words, make them private:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;class Foo implements Serializable {&lt;br /&gt;&lt;br /&gt;private Bar bar;&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Do you *need* to maintain the state of the 'bar' variable when serializing/deserializing&lt;br /&gt;Foo? If not, simply declare 'bar' as 'transient' and it will be ingored during&lt;br /&gt;serialization.&lt;br /&gt;&lt;br /&gt;RMI versus Socket communication I&lt;br /&gt;&lt;br /&gt;Q: I wish to get Java talking to C++ across a network.&lt;br /&gt;&lt;br /&gt;Does anyone have any thoughts in terms of performance, ease of development etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in :&lt;br /&gt;&lt;br /&gt;Wrapping the C++ side with JNI and using RMI for the communications.&lt;br /&gt;&lt;br /&gt;versus&lt;br /&gt;&lt;br /&gt;Writing sockets code and communicating via http?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: It depends of what kind of application you're writing but l think about&lt;br /&gt;&lt;br /&gt;the following :&lt;/p&gt;&lt;br /&gt;&lt;p&gt;- with RMI you can have remote REFERENCE instead of having to transfer all&lt;br /&gt;the object through the network. The object has just to implement Remote. So&lt;br /&gt;it spare bandwith and is good for performance. This is impossible to do if you&lt;br /&gt;do through a socket connection, you've to send the all object.&lt;br /&gt;&lt;br /&gt;- You've not to take in charge the serialization (which could be not so easy&lt;br /&gt;depending of your object structure), neither the connections, etc... All of&lt;br /&gt;that is taken in charge by RMI.&lt;br /&gt;&lt;br /&gt;- the performance are GOOD (even a bit more than that)&lt;br /&gt;&lt;br /&gt;three good points to use RMI, isn't it?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The difficulty added by RMI is the configuration of both client and server&lt;br /&gt;(distribution of stubs, rmiregistry, what's happen if firewall). Depending of&lt;br /&gt;the environment all of that can be either easy or complicate.&lt;br /&gt;&lt;br /&gt;But once that all of that is in place you can extend your application&lt;br /&gt;&lt;br /&gt;easily, so it's much more flexible and scalable.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If your needs are small perhaps that you could do your own connection system&lt;br /&gt;(but for me it's less scalable and more bandwith consuming and so less performant).&lt;br /&gt;&lt;br /&gt;by François Malgrève&lt;br /&gt;&lt;br /&gt;RMI versus Socket communication II&lt;br /&gt;&lt;br /&gt;Q: I wish to get Java talking to C++ across a network.&lt;br /&gt;&lt;br /&gt;Does anyone have any thoughts in terms of performance, ease of development etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in :&lt;br /&gt;&lt;br /&gt;Wrapping the C++ side with JNI and using RMI for the communications.&lt;br /&gt;&lt;br /&gt;versus&lt;br /&gt;&lt;br /&gt;Writing sockets code and communicating via http?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;see please first part of answer in yesterday's tip.&lt;br /&gt;&lt;br /&gt;Answer2: I have done both. If your communication scenarios are diverse and could&lt;br /&gt;keep changing, using a remote technology like RMI can help. If the operations&lt;br /&gt;are few and/or not likely to change you can save the JNI complexity. Not that&lt;br /&gt;it is really hard it just can be fun keeping the JNI code in sinc with the C++&lt;br /&gt;code.&lt;br /&gt;&lt;br /&gt;by Bret Hansen&lt;br /&gt;&lt;br /&gt;Q: I need to communicate some data (string) from a Java Applet to an other ASP&lt;br /&gt;page in the same frameset. I would like to avoid a server roundtrip and do it&lt;br /&gt;all with JavaScript if possible.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Therefore I would like to call some javascript from a Java Applet. It looks&lt;br /&gt;like it is not possible without a netscape package. Is that true? Is there a&lt;br /&gt;simple implementation of the same functionality (source code) which I could&lt;br /&gt;incorporate in my applet?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Those Netscape packages are part of the current VM of both Microsoft&lt;br /&gt;IE 4+ and Netscape 4+. So, by adding the MAYSCRIPT tag to your Applet declaration,&lt;br /&gt;in the Java code you can obtain a handle to the document and call functions&lt;br /&gt;in it.&lt;br /&gt;&lt;br /&gt;by Tom Hall&lt;br /&gt;&lt;br /&gt;Q: I'm researching methods by which one JVM can interact with another JVM, which&lt;br /&gt;is running on the same machine.&lt;br /&gt;&lt;br /&gt;I know that there are various network models, which can be applied if a JVM&lt;br /&gt;needs to talk to another one across a network, but in addition to these (which&lt;br /&gt;could I guess be applied to JVMs on the same machine) I wondered if you knew&lt;br /&gt;of a system of JVM communication that requires less system resources, where&lt;br /&gt;the JVMs are both running on the same system.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: CORBA, RMI, HTTP, sockets....&lt;br /&gt;&lt;br /&gt;But if you have no TCP/IP stack on your platform, so for Windows it could be&lt;br /&gt;clipboard...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;by dmitry&lt;br /&gt;&lt;br /&gt;Q: I have a question about sending a reference to the object via the socket...&lt;br /&gt;&lt;br /&gt;I have a question about sending a reference to the object via the socket. Two&lt;br /&gt;threads are communicating via sockets running on the same machine. I don't need&lt;br /&gt;to send the whole object, but I need to send just&lt;br /&gt;&lt;br /&gt;a reference.&lt;br /&gt;&lt;br /&gt;Does anyone knows how to do that?&lt;br /&gt;&lt;br /&gt;Answer: Reference to an Object? A reference is only valid within the same memory&lt;br /&gt;space! If you want to be able to invoke methods on an object remotely, then&lt;br /&gt;you will need to use a remote technology like RMI, CORBA, or some such.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;by Bret Hansen&lt;br /&gt;&lt;br /&gt;: Is it possible to choose a directory path instead of a file path in a&lt;br /&gt;&lt;br /&gt;swing FileChooser dialog box?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Assume you have instance chooser of type JFileChooser, invoke...&lt;br /&gt;&lt;br /&gt;chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);&lt;br /&gt;&lt;br /&gt;Q: Does anyone know the way to retrieve the path from where has&lt;br /&gt;&lt;br /&gt;been loaded the main class of an application, not the path from&lt;br /&gt;&lt;br /&gt;where has been launched the virtual machine? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Please use something like this:&lt;br /&gt;&lt;br /&gt;path = System.getProperty("user.dir");&lt;br /&gt;&lt;br /&gt;Q: How to erase the content of (text) file without create/open file again (only&lt;br /&gt;do "new FileOutputStream(...)" once)?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Try java.io.RandomAccessFile.setLength(0) if you're using JDK 1.2 or&lt;br /&gt;&lt;br /&gt;higher.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you don't have to keep the file, it may be easier to use&lt;br /&gt;&lt;br /&gt;java.io.File.delete().&lt;br /&gt;&lt;br /&gt;Q: When creating a new file, is it possible to control whether or not an existing&lt;br /&gt;file with the same name is/is not overwritten? I haven't been able to answer&lt;br /&gt;this by looking at the java.io api&lt;br /&gt;&lt;br /&gt;Answer: There is a method in File to atomically create a new file which will&lt;br /&gt;fail if the file exists... You can use this to try creating the file, and if&lt;br /&gt;it exists already don't ever open the FileOutputStream to write contents.&lt;br /&gt;&lt;br /&gt;Q: Do exist Compound Files in Java?&lt;br /&gt;&lt;br /&gt;Microsoft has made an API where you can have a whole "virtual" filesystem&lt;br /&gt;inside a single file on the real filesystem. I think they call it Compound Files&lt;br /&gt;- I have also heard about the concept under the name of Structured Storage.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Do any of you know if something like that exists in a Java-library? I have&lt;br /&gt;to work for all platforms! (It can of cause be implemented with the use of Compound&lt;br /&gt;Files in its Windows implementation)&lt;br /&gt;&lt;br /&gt;Answer: jar files are essentially the same.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Have a look at java.util.jar.JarFile&lt;/p&gt;&lt;br /&gt;&lt;p&gt;by Bret Hansen&lt;br /&gt;&lt;br /&gt;Q: Is it possible to redirect the System.out.println to a file?&lt;br /&gt;&lt;br /&gt;Answer: Connect a PrintStream to the file, and then call System.setOut (PrintStream&lt;br /&gt;out) that reassigns the "standard" output stream.&lt;br /&gt;&lt;br /&gt;Q: Could some kind person please tell me how to save the object as a file so&lt;br /&gt;as the same program can load it again?&lt;br /&gt;&lt;br /&gt;Answer: try this program. It saves obect into file:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import java.io.File;&lt;br /&gt;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;&lt;br /&gt;import java.io.ObjectOutputStream;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public class Save{&lt;br /&gt;&lt;br /&gt;public void saveMyObject(String filename, Object obj) {&lt;br /&gt;&lt;br /&gt;File myFile = new File(filename);&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;FileOutputStream fileOutStr = new FileOutputStream(myFile);&lt;br /&gt;&lt;br /&gt;ObjectOutputStream outStr = new ObjectOutputStream(fileOutStr);&lt;br /&gt;&lt;br /&gt;outStr.writeObject(obj);&lt;br /&gt;&lt;br /&gt;outStr.close();&lt;br /&gt;&lt;br /&gt;}catch (IOException e){&lt;br /&gt;&lt;br /&gt;System.out.println("?!!!!!!");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main (String args[]) {&lt;br /&gt;&lt;br /&gt;Save s = new Save();&lt;br /&gt;&lt;br /&gt;Object myObject = new Object();&lt;br /&gt;&lt;br /&gt;String test = "test";&lt;br /&gt;&lt;br /&gt;myObject = (Object)test;&lt;br /&gt;&lt;br /&gt;s.saveMyObject("myfile", myObject);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you open myfile you will see that this object includes our string "test"&lt;br /&gt;&lt;br /&gt;In the same manner you can read this object from file...&lt;br /&gt;&lt;br /&gt;Q: Can anyone write me a short method that lets me know what files are in a&lt;br /&gt;particular directory?&lt;br /&gt;&lt;br /&gt;For example, I want to know that directory, d:/temp/aaa, has files a.txt, b.java,&lt;br /&gt;b.class.&lt;br /&gt;&lt;br /&gt;Also related to this, how do I find out what folders I have?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Thanks in advance.&lt;br /&gt;&lt;br /&gt;Answer: use our program as a base and add checking for the files and directories&lt;br /&gt;you need to find!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;here it is:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import java.io.File;&lt;br /&gt;&lt;br /&gt;public class Save{&lt;br /&gt;&lt;br /&gt;public void showDirectoryList() {&lt;br /&gt;&lt;br /&gt;File dir = new File("d:/temp/aaa");&lt;br /&gt;&lt;br /&gt;File[] list = dir.listFiles();&lt;br /&gt;&lt;br /&gt;for (int i=0; i&amp;lt;list.length; i++) {&lt;br /&gt;&lt;br /&gt;if (list[i].isFile()) {&lt;br /&gt;&lt;br /&gt;System.out.println("File "+list[i].getName());&lt;br /&gt;&lt;br /&gt;} else if (list[i].isDirectory()) {&lt;br /&gt;&lt;br /&gt;System.out.println("Directory "+list[i].getName());&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main (String args[]) {&lt;br /&gt;&lt;br /&gt;Save s = new Save();&lt;br /&gt;&lt;br /&gt;s.showDirectoryList();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Q: How do I delete a file in Java? I have programmed a Java application that&lt;br /&gt;needs to delete a file, but I couldn't find anything on the topic.&lt;br /&gt;&lt;br /&gt;Answer: in java.io.File there is delete&lt;br /&gt;&lt;br /&gt;public boolean delete()&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Deletes the file or directory denoted by this abstract pathname. If this pathname&lt;br /&gt;denotes a directory, then the directory must be empty in order to be deleted.&lt;br /&gt;Create a new File object representing the file, and then use the delete () method.&lt;br /&gt;If you use the Microsoft JVM, make sure the file is not shared before you delete&lt;br /&gt;it, otherwise that will not work (the delete () method returns "false").&lt;br /&gt;&lt;br /&gt;Q: I need to read C:\test.doc for example and store it somewhere for my future&lt;br /&gt;use. I don't know anything about security. Part 1&lt;br /&gt;&lt;br /&gt;Answer: If you want to read a file on the local file system in an applet, you&lt;br /&gt;are going to digitally sign the applet, and the user of the applet is going&lt;br /&gt;to indicate trust in the signature. How you go about this depends on a number&lt;br /&gt;of questions, like:&lt;br /&gt;&lt;br /&gt;In which browser(s) will the users be running the applet?&lt;br /&gt;&lt;br /&gt;Will a Java plug-in be installed in the browser?&lt;br /&gt;&lt;br /&gt;Can the user install a plug-in?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Here are a few tips on some of the sticky points of signing applets...&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you are using the jar signing tools that come with the JDK, you'll find&lt;br /&gt;that they will only work with the Java plug-in. Netscape and Microsoft IE don't&lt;br /&gt;salute the Sun way of signing applets.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you can rely on your users to install the Java plug in, you can sign applets&lt;br /&gt;using the JDK 1.1.X javakey command. You will also have to have them import&lt;br /&gt;your certificate into their 'identitydb.obj' file in their home directory, and&lt;br /&gt;mark it as trusted. If importing the certificate is too much to ask, and it&lt;br /&gt;usually is, you could create an 'identitydb.obj' containing the certificate,&lt;br /&gt;already marked as trusted, and have them download this to their home directory.&lt;br /&gt;Be careful not to distribute the 'identitydb.obj' that you used to sign the&lt;br /&gt;jar, since that would allow anyone to sign code as you!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;JDK1.2.X works in a similar way, but the 'javakey' command has been replaced&lt;br /&gt;by 'jarsigner' and 'keytool'. In addition, 1.2 adds granularity to the security&lt;br /&gt;model, so that you can assign privileges outside of the sandbox via a policy&lt;br /&gt;file. For example you could allow an applet to read files, but not write them.&lt;br /&gt;JDK 1.1.X security is kind of an all or nothing proposition.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you can't count on the Plugin being there, but you know your users will&lt;br /&gt;be using Netscape, you can sign use the Netscape signtool. Netscape's signtool&lt;br /&gt;is a little different than Sun's. With Netscape's, you put all of your class&lt;br /&gt;files into a directory, like signdir, and then run something like this:&lt;br /&gt;&lt;br /&gt;./signtool -k MyCert -Z MyApplet.jar signdir&lt;br /&gt;&lt;br /&gt;The 'MyApplet.jar' file will be created, and, of course, you would already have&lt;br /&gt;to have MyCert in your security database. You can generate a test certificate&lt;br /&gt;through signtool, but it's only good for a couple of months.&lt;br /&gt;&lt;br /&gt;Joe Morrogh - Excite@Home - The Leader in Broadband http://home.com/faster&lt;br /&gt;&lt;br /&gt;Q: I need to read C:\test.doc for example and store it somewhere for my future&lt;br /&gt;use. I don't know anything about security. Part 2, Part 1 was published yesterday&lt;br /&gt;&lt;br /&gt;Answer: I think they want you to go out and buy a cert from Verisign or Thawte,&lt;br /&gt;etc. You can also generate your own signing certificate through openSSL, or&lt;br /&gt;some other package, but, if you do, you'll need to have them import it into&lt;br /&gt;their database as a trusted signer. This can be done with a simple Perl script&lt;br /&gt;which sends the certificate with a header of:&lt;br /&gt;&lt;br /&gt;"Content-Type: application/x-x509-ca-cert"&lt;br /&gt;&lt;br /&gt;You must also add some code to your applet to use the Netscape way of signing.&lt;br /&gt;You can download the file 'capsapi_classes.zip' from Netscape. This file contains&lt;br /&gt;the Netscape Capabilities API. Basically, all you need to do is import the package&lt;br /&gt;and enable privileges as you need them. It is important to enable privileges&lt;br /&gt;in the same method (ie. same frame stack)&lt;br /&gt;&lt;br /&gt;in which you are going to use them. You cannot just enable all the privileges&lt;br /&gt;you need in the init method of your applet. The code looks something like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import netscape.security.*;&lt;br /&gt;&lt;br /&gt;public void MyMethod() {&lt;/p&gt;&lt;br /&gt;&lt;p&gt; try {&lt;br /&gt;&lt;br /&gt;PrivilegeManager.enablePrivilege("UniversalFileRead");&lt;br /&gt;&lt;br /&gt;FileInputStream fis = new FileInputStream("myfile");&lt;br /&gt;&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;&lt;br /&gt;System.out.println(e);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;} // end MyMethod&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You'll need to add 'capsapi_classes.zip' to the archive attribute of your applet&lt;br /&gt;tag. I also believe it is possible to grant privileges to a codebase in Netscape&lt;br /&gt;without signing. This is done by editing the 'prefs.js' file on the client.&lt;br /&gt;Obviously, this is not possible on the internet, but, for an intranet environment,&lt;br /&gt;this could be a solution. Anyway, when an applet tries to enable a privilege,&lt;br /&gt;the Netscape browser will pop up a window asking the user if they wish to grant&lt;br /&gt;the privilege. This decision can be persistent.&lt;br /&gt;&lt;br /&gt;The user can manage the privileges they have granted by clicking on the padlock&lt;br /&gt;icon in the bottom left corner of their browser window, and selecting the "Java/JavaScript"&lt;br /&gt;section.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If your users may be using Microsoft IE as well as Netscape, you'll have to&lt;br /&gt;learn the Microsoft security API. I haven't done this yet, but I believe it&lt;br /&gt;is possible to code an applet so that it will work in either browser.&lt;br /&gt;&lt;br /&gt;Another alternative is to code different versions of the applet, and build the&lt;br /&gt;page containing the applet dynamically, based on the "User-Agent".&lt;br /&gt;I have found that it is possible in IE to grant universal privileges to an applet,&lt;br /&gt;even if it is not signed, but I sure wouldn't recommend doing that.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Joe Morrogh - Excite@Home - The Leader in Broadband http://home.com/faster&lt;br /&gt;&lt;br /&gt;Q: Is there any method like writeLine()?&lt;br /&gt;&lt;br /&gt;Answer: For writing text to files, you can use a FileWriter; for binary data,&lt;br /&gt;use a FileOutputStream. Both are in the java.io package. Have a look in the&lt;br /&gt;docs, all you need is there. Oh, you might want to wrap your writer/outputstream&lt;br /&gt;in a buffered one for more efficiency. Something like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;FileWriter fw = new FileWriter("D:\temp\test.txt");&lt;br /&gt;&lt;br /&gt;BufferedWriter bw = new BufferedWriter(fw);&lt;br /&gt;&lt;br /&gt;bw.write("Some text on the first line");&lt;br /&gt;&lt;br /&gt;bw.newLine(); // have the Writer insert the newline&lt;br /&gt;&lt;br /&gt;bw.write("Some more text, followed by an explicit newline\n");&lt;br /&gt;&lt;br /&gt;bw.close();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Note, that while \n will probably work, newLine() inserts the platform's own&lt;br /&gt;line separator (ie, \r on Mac, \r\n on Windows, \n on *nix). HTH, Michiel&lt;/p&gt;&lt;br /&gt;&lt;p&gt; Q: Is JavaScript same as Java?&lt;br /&gt;&lt;br /&gt;Answer: NO! An Amazingly large number of people, including many web designers,&lt;br /&gt;don't understand the difference between Java and JavaScript. Briefly it can&lt;br /&gt;be summed up as follows: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Java was developed by Sun Microsystems. Java is a full-fledged object-oriented&lt;br /&gt;programming language. It can be used to create standalone applications and applet.&lt;br /&gt;Applets are downloaded as separate files to your browser alongside an HTML document,&lt;br /&gt;and provide an infinite variety of added functionality to the Web site you are&lt;br /&gt;visiting. The displayed results of applets can appear to be embedded in an HTML&lt;br /&gt;page (e.g., the scrolling banner message that is so common on Java-enhanced&lt;br /&gt;sites), but the Java code arrives as a separate file. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;JavaScript on the other hand was developed by Netscape, is a smaller and simpler&lt;br /&gt;scripting language that does not create applets or standalone applications.&lt;br /&gt;In its most common form today, JavaScript resides inside HTML documents, and&lt;br /&gt;can provide levels of interactivity far beyond typically flat HTML pages --&lt;br /&gt;without the need for server-based CGI (Common Gateway Interface) programs. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Some server software, such as Netscape's SuiteSpot, lets web application developers&lt;br /&gt;write CGI programs in a server-side version of JavaScript. Both client-side&lt;br /&gt;and server-side JavaScript share the same core JavaScript language, but each&lt;br /&gt;side deals with different kinds of objects. Client-side objects are predominantly&lt;br /&gt;the components of an HTML web page (e.g., forms, text boxes, buttons). Server-side&lt;br /&gt;objects are those that facilitate the handling of requests that come from clients,&lt;br /&gt;as well as connectivity to databases.&lt;br /&gt;&lt;br /&gt;Q: I will be thankful if anyone tells me why JVM is called virtual machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer: JVM is called a virtual machine because there is no real hardware which&lt;br /&gt;interprets the byte code. If you have done any assembly programming for any&lt;br /&gt;microprocessor/microcontroller you will able to understand this. A microprocessor&lt;br /&gt;has builtin instruction set to interpret the assemly code. Similarly the JVM&lt;br /&gt;is similar to a microprocessor in the sense it has its own instruction set but&lt;br /&gt;it implemented in software. That is why it is called a virtual machine!&lt;br /&gt;&lt;br /&gt;Q: How do we exchange data between Java and JavaScript and vice-versa?&lt;br /&gt;&lt;br /&gt;Answer: Public variable and methods of Java Applet are visible to a HTML document.&lt;br /&gt;So using JavaScript you can access the public variables and public functions.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The syntax is: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;var some_var = document.appletname.variable_name&lt;/p&gt;&lt;br /&gt;&lt;p&gt;With this you will get the value of the variable variable_name in your JavaScript&lt;br /&gt;variable some_var.&lt;br /&gt;&lt;br /&gt;Q: Why we can not declare constructor as final ?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The keyword final when dealing with methods means the method cannot&lt;br /&gt;be overridden.&lt;br /&gt;&lt;br /&gt;Becuase constructors are never inherited and so will never have the oportunity&lt;br /&gt;to be overridden, final would have no meaning to a constructor.&lt;br /&gt;&lt;br /&gt;Q: How to prevent disassembling class ? If I develop a commercial product, I&lt;br /&gt;don't want to give my sources to a JAD user...&lt;br /&gt;&lt;br /&gt;Answer: There are three basic options:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A) Use an obfuscator (which will prevent casual disassembly, but may not stop&lt;br /&gt;determined reverse-engineers)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;B) Use a client-server solution. The important code runs on a server controlled&lt;br /&gt;by you, and the user never sees the bytecode at all.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;C) Make all your customers sign a legal contract promising not to disassemble&lt;br /&gt;the code, or they have to pay a huge fine.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;P.S: JAD is extremelly easy to use Java Decompiler program written by Pavel&lt;br /&gt;Kouznetsov&lt;br /&gt;&lt;br /&gt;Q: Does anyone do this &amp; if so do you have a bat file which swaps between&lt;br /&gt;different JVM'es? Do I have to reboot NT once I change the path?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Yes you can. Just change the PATH environment variable in a DOS in&lt;br /&gt;WIN95-98 (command promt in NT) session, and in THAT session (and that session&lt;br /&gt;only), the version specified&lt;br /&gt;&lt;br /&gt;will be used. To change it permanently you have to reboot.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Or you can consider using development tools like VCafe, JBuilder, VisualAge,&lt;br /&gt;etc. They usually have the function to set which JVM/Compiler to use. If you&lt;br /&gt;change the variable (in NT) in the Control Panel, System, you do not have to&lt;br /&gt;reboot.&lt;br /&gt;&lt;br /&gt;Using Batchfiles will not work as a switch, however, since the variables are&lt;br /&gt;only valid during that batch session, so you would have to remain in that session&lt;br /&gt;and execute your command-line commands there to use the changed variables.&lt;br /&gt;&lt;br /&gt;Q: Do I need to include all JAR files in CLASSPATH?&lt;br /&gt;&lt;br /&gt;When you say java classpath = /directory1;. helloWorld do all *.jars in /directory1&lt;br /&gt;get included? I have seen mixed behavior (sometimes they got included, sometimes&lt;br /&gt;not) with different jdk&lt;br /&gt;&lt;br /&gt;installations (NT, Solaris, 1.2.2, and 1.3). I can't find any definitive answer&lt;br /&gt;to the question anywhere. Thanks in advance.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: .JAR files are not included when you just specify the path to a directory.&lt;br /&gt;You must explicitly call out each .jar and .zip file as part of your classpath.&lt;br /&gt;It's a pain but you just gotta do it. I have not worked with 1.3 yet, so maybe&lt;br /&gt;they've changed something there, but if you follow this rule it will always&lt;br /&gt;work, regardless of the version.&lt;br /&gt;&lt;br /&gt;The one exception to this rule is the /jre/lib/ext directory. This special directory&lt;br /&gt;is scanned when the JVM boots up and any .jar archives found in it are automatically&lt;br /&gt;added to the classpath. This is the only way that .jar files may be added to&lt;br /&gt;the classpath without explicitly listing them.&lt;br /&gt;&lt;br /&gt;Q: How can I launch external applications from a Java application?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I mean what is the method that i got to invoke when i get an event like mouseclick&lt;br /&gt;to launch another application like photoshop or any other one???&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Runtime.getRuntime().exec("notepad.exe");&lt;/p&gt;&lt;br /&gt;&lt;p&gt;that will launch notepad from withing a java app.&lt;br /&gt;&lt;br /&gt;Q: In Java, does exist a function like sprintf in C ?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: http://www.efd.lth.se/~d93hb/java/printf/index.html a free Java version&lt;br /&gt;of fprintf(), printf() and sprintf() - hb.format package&lt;br /&gt;&lt;br /&gt;Q: Is there free tool for automatic drawing the UML diagram from a java source?&lt;br /&gt;(LINUX)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: JVision generates UML from java source. The Linux version is free for&lt;br /&gt;non-commercial use.&lt;br /&gt;&lt;br /&gt;See http://www.object-insight.com&lt;br /&gt;&lt;br /&gt;Q: If I declare an array of an objects, say Dogs, is that memory taken when&lt;br /&gt;I create the array or when I create the objects in the aray when I declare this&lt;br /&gt;array: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Dog[] dog = new Dog[100];&lt;/p&gt;&lt;br /&gt;&lt;p&gt;or does it take the memory when I actually create the Dogs in the array eg:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;for(int i = 0;i&amp;lt;dog.length;i++)dog[i] = new Dog();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The statement above is actually two-fold. It is the declaration and&lt;br /&gt;initialisation of the array. Dog[] dog is the declaration, and all this does&lt;br /&gt;is declare a variable of type Dog[], currently pointing to null.&lt;br /&gt;&lt;br /&gt;You then initialise the array with new Dog[100], which will create 100 elements&lt;br /&gt;in the array, all of them referencing null.&lt;br /&gt;&lt;br /&gt;It is important to realise that the elements of an array are not actually objects,&lt;br /&gt;they only reference objects which exist elsewhere in memory. When you actually&lt;br /&gt;create the Dog objects with new Dog(), these objects are created somewhere in&lt;br /&gt;memory and the elements in the array now point to these objects.&lt;br /&gt;&lt;br /&gt;Pedant point:&lt;br /&gt;&lt;br /&gt;Nothing ever points to null. It is a constant that represents the value of a&lt;br /&gt;reference variable that is not a pointer to some object new Dog[100] creates&lt;br /&gt;an array of 100 null Dog references.&lt;br /&gt;&lt;br /&gt;Q: How do I return more than one value using the return command?&lt;br /&gt;&lt;br /&gt;Answer: You could make a new object/class that contains these two values and&lt;br /&gt;&lt;br /&gt;return it. For example:&lt;br /&gt;&lt;br /&gt;Define an object like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;class MyObj {&lt;br /&gt;&lt;br /&gt;public int myInt;&lt;br /&gt;&lt;br /&gt;public double myDouble;&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Then, in your method create one of these, set the corresponding values,&lt;br /&gt;&lt;br /&gt;and return it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;MyObj yourMethod() {&lt;br /&gt;&lt;br /&gt;MyObj obj = new MyObj()&lt;br /&gt;&lt;br /&gt;obj.myInt = 20;&lt;br /&gt;&lt;br /&gt;obj.myDouble = 1.0003&lt;br /&gt;&lt;br /&gt;return obj;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Q: How can I round a number to specified precision?&lt;br /&gt;&lt;br /&gt;I have a double field that I would like to round to 2 places of precision, however,&lt;br /&gt;it&lt;br /&gt;&lt;br /&gt;seems like the documentation on the round function only rounds to&lt;br /&gt;&lt;br /&gt;closest integers. So that I would not be able say .3658585859 = .37 as&lt;br /&gt;&lt;br /&gt;I would like.&lt;br /&gt;&lt;br /&gt;Answer: can you scale the number up and then down again when you are finished?&lt;br /&gt;&lt;br /&gt;e.g. 0.3658585859 * 100 = 36.58585859&lt;br /&gt;&lt;br /&gt;round(36.58585859) = 37&lt;br /&gt;&lt;br /&gt;37 / 100 = 0.37&lt;br /&gt;&lt;br /&gt;Q: How can you tell if an integer is odd or even?&lt;br /&gt;&lt;br /&gt;I know an even number is divisible by 2 but I'm thinking then how can I detect&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if a resulting number after dividing 2 ints has a remainder?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Basically the method is simple, if a variable contains an odd number&lt;br /&gt;&lt;br /&gt;I want to return the value 'zero', and on the other hand if the&lt;br /&gt;&lt;br /&gt;variable contains an even number I want to return the value 'one'.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Check out the % (modulus) operator, it computes the remainder.&lt;br /&gt;&lt;br /&gt;public int modMethod(int div){&lt;br /&gt;&lt;br /&gt;if(div%2==0){&lt;br /&gt;&lt;br /&gt;return 1;&lt;br /&gt;&lt;br /&gt;} else{&lt;br /&gt;&lt;br /&gt;return 0;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I'm having trouble figuring out how to convert characters to their ASCII value&lt;br /&gt;in java&lt;br /&gt;&lt;br /&gt;Q: I'm having trouble figuring out how to convert characters to their ASCII&lt;br /&gt;&lt;br /&gt;value in java. Is there a class like NumberFormat that will do it?&lt;br /&gt;&lt;br /&gt;Answer: I can't see any problem here:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;char ch = 'A'; // character 'A'&lt;br /&gt;&lt;br /&gt;int i = (int)ch; // ASCII value for 'A' (=&amp;gt;65)&lt;br /&gt;&lt;br /&gt;Yes. And just be aware that ASCII only runs from 0 through 127. Anything&lt;br /&gt;&lt;br /&gt;higher needs to be addressed differently, since Java is using Unicode values.&lt;br /&gt;&lt;br /&gt;Q: How do I use object serializtion for an object that has other objects&lt;br /&gt;&lt;br /&gt;as data member? Do both the class need to implement serialize?&lt;br /&gt;&lt;br /&gt;How about static data?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;class A{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class B{&lt;br /&gt;&lt;br /&gt;public A a;&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Answer: Both the object and all the object references it contains need to belong&lt;br /&gt;to classes that implement Serializable.&lt;br /&gt;&lt;br /&gt;Static and transient fields are not serialized. For more, see,&lt;br /&gt;&lt;br /&gt;http://java.sun.com/docs/books/tutorial/essential/io/serialization.html&lt;br /&gt;&lt;br /&gt;I recently learned a bit about "inner classes" but this seems to be&lt;br /&gt;different...&lt;br /&gt;&lt;br /&gt;Q: I'm a bit new to Java programming so bear with me. My employer bought a&lt;br /&gt;&lt;br /&gt;package of java graphics library programs to support some chart applets&lt;br /&gt;&lt;br /&gt;we want to create. We have the source code. I'm trying to create a jar&lt;br /&gt;&lt;br /&gt;file with all the files I need to run the applet. When I currently run&lt;br /&gt;&lt;br /&gt;the applet, the browser java tool says that it can't find&lt;br /&gt;&lt;br /&gt;"TextComponent$1.class". I recently learned a bit about "inner&lt;br /&gt;classes"&lt;br /&gt;&lt;br /&gt;but this seems to be different. The "TextComponent.java" file does&lt;br /&gt;&lt;br /&gt;contain some inner classes, but not a class called "1". I'm confused.&lt;br /&gt;&lt;br /&gt;Is this an inner class? Or is it something else. Any help would be&lt;br /&gt;&lt;br /&gt;appreciated. Thanks...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The TextComponent$1.class is the first anonymous class defined in&lt;br /&gt;&lt;br /&gt;TextComponent.java. Since nested (inner) classes are compiled to their own&lt;br /&gt;&lt;br /&gt;.class file, they needed unique names. The javac compiler is just creating a&lt;br /&gt;&lt;br /&gt;unique file name for an anonymous nested class.&lt;br /&gt;&lt;br /&gt;Hi there, does anybody know a good source of design patterns written in JAVA&lt;br /&gt;?&lt;br /&gt;&lt;br /&gt;Answer: A pretty good (free to download) book.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;http://www.patterndepot.com/put/8/JavaPatterns.htm&lt;br /&gt;&lt;br /&gt;Q: Whats the difference between the two: System.err. and System.out? When should&lt;br /&gt;we use System.err?&lt;br /&gt;&lt;br /&gt;Answer1: System.out leads the output to the standard output stream (normally&lt;br /&gt;mapped to your console screen), System.err leads the output to the standard&lt;br /&gt;error stream (by default the console, too). the standard output should be used&lt;br /&gt;for regular program output, the standard error for errormessages. If you start&lt;br /&gt;your console program regularly both message types will appear on your screen.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But you may redirect both streams to different destinations (e.g. files), e.g.&lt;br /&gt;if you want to create an error log file where you don't want to be the regualr&lt;br /&gt;output in.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;On an UNIX you may redirect the output as follows:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;java yourprog.class &amp;gt;output.log 2&amp;gt;error.log&lt;/p&gt;&lt;br /&gt;&lt;p&gt;this causes your regular output (using System.out) to be stored in output.log&lt;br /&gt;and your error messages (using System.err) to be stored in error.log&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: System.err is a "special" pipe that usually is directed&lt;br /&gt;to the standard consolle. You can redirect the System.out with the normal pipe&lt;br /&gt;control (| or &amp;gt;), but System.err no. If you want to put both the "normal"&lt;br /&gt;output and the "error" output to a file you must use the special redirect&lt;br /&gt;2&amp;gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This allow you to send normal messages into a file or in the /null black hole,&lt;br /&gt;but still receive the error messages on the console.&lt;br /&gt;&lt;br /&gt;What is the essential difference between an abstract class and an interface?&lt;br /&gt;What dictates the choice of one over the other?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: You can only extend one class (abstract or not) whereas you can always&lt;br /&gt;implement one or more interfaces. Interfaces are Java's way to support multiple&lt;br /&gt;inheritance.&lt;br /&gt;&lt;br /&gt;Does anyone know how could I get the size of an Enumeration object? The API&lt;br /&gt;for Enumeration only contains getNext() and next().&lt;br /&gt;&lt;br /&gt;Answer: You can't. Theoretically, some classes that implement Enumeration may&lt;br /&gt;also provide some way to get a size, but you'd have to know about the more specific&lt;br /&gt;run-time type and cast to it... and none of the standard java.util Collections&lt;br /&gt;classes nor Vector or such provide these methods in their Enumeration implementations.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: by Nicolas Delbing and Victor Vishnyakov&lt;/p&gt;&lt;br /&gt;&lt;p&gt;you can make your own class like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import java.util.*;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public class MyEnumeration{&lt;br /&gt;&lt;br /&gt;int size;&lt;br /&gt;&lt;br /&gt;int index = 0;&lt;br /&gt;&lt;br /&gt;Enumeration e;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public MyEnumeration(Vector v){&lt;br /&gt;&lt;br /&gt;size = v.size();&lt;br /&gt;&lt;br /&gt;e = v.elements();&lt;br /&gt;&lt;br /&gt;index = 0;&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public boolean hasMoreElements(){&lt;br /&gt;&lt;br /&gt;return e.hasMoreElements();&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public Object nextElement(){&lt;br /&gt;&lt;br /&gt;index++;&lt;br /&gt;&lt;br /&gt;return e.nextElement();&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public int size(){&lt;br /&gt;&lt;br /&gt;return size;&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public int getIndex(){&lt;br /&gt;&lt;br /&gt;return index;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Is there a way to provide values for a Vector in the source code, analogous&lt;br /&gt;to array initializers?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The Vector class constuctors take no arguments other than Collection&lt;br /&gt;(since JDK 1.2), which is abstract, and since a Vector is a structure whose&lt;br /&gt;size can change dynamically, it's contents can only be initialaized through&lt;br /&gt;member methods.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;answered by Mike Lundy&lt;br /&gt;&lt;br /&gt;I understand that bitwise operations change the 0/1 bits of a number. Question&lt;br /&gt;is why?&lt;br /&gt;&lt;br /&gt;I suppose it's interesting that you can manipulate numbers this way, but I can't&lt;br /&gt;think of a practical use for doing that.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Can anyone help me understand when are bitwise operations used and why you&lt;br /&gt;would use them?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Bitwise manipulation is often used where memory consumption is critical,&lt;br /&gt;and a piece of information may be encoded in less that one byte, for instance.&lt;br /&gt;In communication software and protocols, information may be interpreted as a&lt;br /&gt;stream of bits where the information is encoded at the bit-level, and you use&lt;br /&gt;bitwise manipulation to extract the pieces of information encoded in the bytes.&lt;br /&gt;There are other situations where bitwise manipulation is used, as well.&lt;br /&gt;&lt;br /&gt;by Greger Ohlson&lt;br /&gt;&lt;br /&gt;How would I add a help file to a java application?&lt;br /&gt;&lt;br /&gt;Would it have to be platform specific, or is there a Java api for making help&lt;br /&gt;files?&lt;br /&gt;&lt;br /&gt;If so, what is it? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: See JavaHelp at http://www.javasoft.com/products/javahelp/&lt;br /&gt;&lt;br /&gt;you create HTML pages for the main text, and add some XML files for a hierarchical&lt;br /&gt;table of contents and a map from TOC tags to relative URLs giving document locations.&lt;br /&gt;&lt;br /&gt;What is a Just-In-Time(JIT) compiler?&lt;br /&gt;&lt;br /&gt;Answer: It is a JVM that compiles Java instructions (called bytecode) into native&lt;br /&gt;machine instructions at run time and then uses this compiled native code when&lt;br /&gt;the corresponding Java code is needed. This eliminates the constant overhead&lt;br /&gt;of interpretation which tradition first generation JVM's used.&lt;br /&gt;&lt;br /&gt;A: by Dave Lee&lt;br /&gt;&lt;br /&gt;Is there a collection object like the hashmap or hashtable that stores values&lt;br /&gt;in an ordered path? Vector does this but i need the key/value functionality.&lt;br /&gt;hashmaps do not guarantee the order of the objects.&lt;br /&gt;&lt;br /&gt;Answer: Take a look at java.util.TreeMap.&lt;br /&gt;&lt;br /&gt;Red-Black tree based implementation of the SortedMap interface. This class guarantees&lt;br /&gt;that the map will be in ascending key order, sorted according to the natural&lt;br /&gt;order for the key's class (see Comparable), or by the comparator provided at&lt;br /&gt;creation time, depending on which constructor is used.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Note that this implementation is not synchronized. If multiple threads access&lt;br /&gt;a map concurrently, and at least one of the threads modifies the map structurally,&lt;br /&gt;it must be synchronized externally.&lt;br /&gt;&lt;br /&gt;Most people asked why there is an error, but my question id why this is NOT&lt;br /&gt;an error&lt;br /&gt;&lt;br /&gt;please see first part in yesterday's tip..&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: Yes, char is indeed a 16-bit value. However, the actual answer is&lt;br /&gt;in the Java&lt;br /&gt;&lt;br /&gt;Language Specification, section 5.6.2, which is at the following URL:&lt;br /&gt;&lt;br /&gt;http://java.sun.com/docs/books/jls/second_edition/html/conversions.doc.html#170983&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In summary, the char is automagically promoted to a double. No explicit cast&lt;br /&gt;is&lt;br /&gt;&lt;br /&gt;necessary since the language rules say that it gets "promoted" to&lt;br /&gt;a double&lt;br /&gt;&lt;br /&gt;by John O'Conner&lt;br /&gt;&lt;br /&gt;Why cannot I cast from double to java.lang.Object?&lt;br /&gt;&lt;br /&gt;Q: I'm trying to build a vector, however, one of the objects that I'm passing&lt;br /&gt;to the vector is of type double. How do I cast the double as an object so that&lt;br /&gt;I may insert the value into a vector? Does this make sense? Here is the following&lt;br /&gt;snippet of code I was trying to use:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;myVector.add (1, (Object)myDouble);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Of course when I try to compile I get the following message:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Invalid cast from double to java.lang.Object&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Could someone please explain why? I realize that Object is the mother of all&lt;br /&gt;objects and therefore ANY reference data type "is an" Object. So therefore&lt;br /&gt;I shouldn't have to cast the double, right? Help, I'm a beginner!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: A double is not a reference type, but a primitive one. Hence, it doesn't&lt;br /&gt;inherit from Object (or anything else, for that matter). To put primitives (byte,&lt;br /&gt;short, int, long, float, double, boolean, char) into something that requires&lt;br /&gt;an Object, use Java's wrapper classes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The wrapper classes are Double, Integer, Long, Boolean, etc., and are basically&lt;br /&gt;an object "wrapped" around a primitive type. You make a Double object&lt;br /&gt;by:&lt;br /&gt;&lt;br /&gt;Double d = new Double (myDouble);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;and to get the actual value back,&lt;/p&gt;&lt;br /&gt;&lt;p&gt;double z = d.doubleValue();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It works the same way for all the rest of the primitive/wrapper pairs.&lt;br /&gt;&lt;br /&gt;by Trevor Hill&lt;br /&gt;&lt;br /&gt;Q: == and equals ()... These two still make me confuse a lot of time.&lt;br /&gt;&lt;br /&gt;Can somebody give me some thumb rule or explain it to me?&lt;br /&gt;&lt;br /&gt;Answer: When you use == with a primitive -int, double, char, ... you are checking&lt;br /&gt;that the values are identical. But if you use == with an object, you are checking&lt;br /&gt;that the 2 objects are stored at the same address. In other words the references&lt;br /&gt;pointing to the same object...&lt;br /&gt;&lt;br /&gt;Method equals () is different.&lt;br /&gt;&lt;br /&gt;It is the same as ==, if it isn't overriden by the object class.&lt;br /&gt;&lt;br /&gt;Many classes override the method equals (). In this case this method will check&lt;br /&gt;that content of the object is the same or not, not addresses.&lt;br /&gt;&lt;br /&gt;Q: Why do I get message like “wrong magic number” when I am trying&lt;br /&gt;to run applet? What is magic number?&lt;br /&gt;&lt;br /&gt;Answer: The first thing a JVM does when it loads a class is check that the first&lt;br /&gt;four bytes are (in hex) CA FE BA BE. This is the "magic number" and&lt;br /&gt;thats why you are getting that error, you are trying to load a file that isnt&lt;br /&gt;a class and so the class loader in the JVM is throwing out that exception.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Make sure you transfer the class files to site in binary mode, rather than&lt;br /&gt;text or ASCII mode.&lt;br /&gt;&lt;br /&gt;An error from the browser saying "cannot start applet ... bad magic number"&lt;br /&gt;usually means that one of the class files on the server is corrupted. '&lt;br /&gt;&lt;br /&gt;Replace your class binary files on the web server; clean up the cache of your&lt;br /&gt;browser, and reload your applet.&lt;br /&gt;&lt;br /&gt;Q: In java, I found a lot of methods, which let you enter a line (read (), readLine&lt;br /&gt;() e.c.t). They all wait until return is pressed, and then start providing you&lt;br /&gt;the information.&lt;br /&gt;&lt;br /&gt;Does anyone know if there is a read method available whit the desired behaviour,&lt;br /&gt;i.e. which doesn't wait for return being pressed?&lt;br /&gt;&lt;br /&gt;Answer: Java does not provide it, the terminal itself waits until return is&lt;br /&gt;pressed before sending the entered line to Java.&lt;br /&gt;&lt;br /&gt;You need to use some platform specific mechanism to change the terminal settings.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: Can I pass a function as a parameter in Java? If so, how?&lt;br /&gt;&lt;br /&gt;Answer: No, you cannot. But you can pass an object with method and then just&lt;br /&gt;use this method like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;myFunction (object); // object has method useMyMethod(){ do smth here...}&lt;br /&gt;&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;somewhere in another place where use this function..&lt;br /&gt;&lt;br /&gt;object.useMyMethod();&lt;br /&gt;&lt;br /&gt;Q: is there a mod (x, y) function that returns the remainder when x is divided&lt;br /&gt;by y? Something equivalent to fmod(x,y) in C?&lt;br /&gt;&lt;br /&gt;Answer: a = x%y;&lt;br /&gt;&lt;br /&gt;What is difference capacity() and size() methods for vector?&lt;br /&gt;&lt;br /&gt;Q: What is difference between &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public final int capacity()&lt;br /&gt;&lt;br /&gt;Returns the current capacity of this vector.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;and &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public final int size()&lt;br /&gt;&lt;br /&gt;Returns the number of components in this vector.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: please read this method: ensureCapacity&lt;br /&gt;&lt;br /&gt;public final synchronized void ensureCapacity(int minCapacity)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Increases the capacity of this vector, if necessary, to ensure that it can&lt;br /&gt;hold at least the number of components specified by the minimum capacity argument.&lt;br /&gt;&lt;br /&gt;Parameters:&lt;br /&gt;&lt;br /&gt;minCapacity - the desired minimum capacity.&lt;br /&gt;&lt;br /&gt;What're the differences between classpath and import in the java application?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Do I need to have the package in the classpath first before importing in a java&lt;br /&gt;application or need not?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Classpath is an environment variable of your OS, you have to set it&lt;br /&gt;(or better: Java sets it) to tell Java where to search for classes.&lt;br /&gt;&lt;br /&gt;You use import in a program to let Java search for the specified classes within&lt;br /&gt;the classpath. This implies that the package must be in the classpath.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Stephan Effelsberg&lt;br /&gt;&lt;br /&gt;Q: What is difference between Iterator and Enumeration?&lt;br /&gt;&lt;br /&gt;Answer: from http://java.sun.com/docs/books/tutorial/collections/interfaces/collection.html&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The object returned by the iterator method deserves special mention. It is&lt;br /&gt;an Iterator, which is very similar to an Enumeration, but differs in two respects:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Iterator allows the caller to remove elements from the underlying collection&lt;br /&gt;during the iteration with well-defined semantics.&lt;br /&gt;&lt;br /&gt;Method names have been improved.&lt;br /&gt;&lt;br /&gt;The first point is important: There was no safe way to remove elements from&lt;br /&gt;a collection while traversing it with an Enumeration. The semantics of this&lt;br /&gt;operation were ill-defined, and differed from implementation to implementation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Iterator interface is shown below: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public interface Iterator {&lt;br /&gt;&lt;br /&gt;boolean hasNext();&lt;br /&gt;&lt;br /&gt;Object next();&lt;br /&gt;&lt;br /&gt;void remove(); // Optional&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The hasNext method is identical in function to Enumeration.hasMoreElements,&lt;br /&gt;and the next method is identical in function to Enumeration.nextElement. The&lt;br /&gt;remove method removes from the underlying Collection the last element that was&lt;br /&gt;returned by next. The remove method may be called only once per call to next,&lt;br /&gt;and throws an exception if this condition is violated. Note that Iterator.remove&lt;br /&gt;is the only safe way to modify a collection during iteration; the behavior is&lt;br /&gt;unspecified if the underlying collection is modified in any other way while&lt;br /&gt;the iteration is in progress.&lt;br /&gt;&lt;br /&gt;The following snippet shows you how to use an Iterator to filter a Collection,&lt;br /&gt;that is, to traverse the collection, removing every element that does not satisfy&lt;br /&gt;some condition: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;static void filter(Collection c) {&lt;br /&gt;&lt;br /&gt;for (Iterator i = c.iterator(); i.hasNext(); )&lt;br /&gt;&lt;br /&gt;if (!cond(i.next()))&lt;br /&gt;&lt;br /&gt;i.remove();&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Two things should be kept in mind when looking at this simple piece of code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The code is polymorphic: it works for any Collection that supports element removal,&lt;br /&gt;regardless of implementation. That's how easy it is to write a polymorphic algorithm&lt;br /&gt;under the collections framework!&lt;br /&gt;&lt;br /&gt;It would have been impossible to write this using Enumeration instead of Iterator,&lt;br /&gt;because there's no safe way to remove an element from a collection while traversing&lt;br /&gt;it with an Enumeration.&lt;br /&gt;&lt;br /&gt;How can I find the first dimension length of the 2-dimenstions array? I have&lt;br /&gt;use the array[].length but it does not work, how can I solve this problem? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Java doesn't really have "multidimensional arrays", only&lt;br /&gt;arrays of arrays. So try: array[0].length and you will get this dimension.&lt;br /&gt;&lt;br /&gt;I guess what I'm asking is "Is java.util.Hashtable thread safe?"&lt;br /&gt;&lt;br /&gt;Q: It's been a while since I've used hashtables for anything significant, but&lt;br /&gt;I seem to recall the get() and put() methods being synchronized.&lt;br /&gt;&lt;br /&gt;The JavaDocs don't reflect this. They simply say that the class Hashtable is&lt;br /&gt;synchronized. What can I assume? If several threads access the hashtable at&lt;br /&gt;the same time (assuming they are not modifying the same entry), the operations&lt;br /&gt;will succeed, right? I guess what I'm asking is "Is java.util.Hashtable&lt;br /&gt;thread safe?"&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: That is right! It is recommendable, if you have questions like these,&lt;br /&gt;always look&lt;br /&gt;&lt;br /&gt;at source for the api, it's freely available.&lt;br /&gt;&lt;br /&gt;Q: I try to copy an object of my own using the clone() method from java.lang.Object,&lt;br /&gt;but this is a protected method so I can't use it. Is there some other way to&lt;br /&gt;get my objective of duplicating an arbitrary object?&lt;br /&gt;&lt;br /&gt;Answer: If you want to clone your object, you need to make it cloneable. To&lt;br /&gt;achieve this, you need to do two things:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. implement the interface Cloneable&lt;/p&gt;&lt;br /&gt;&lt;p&gt;2. override the method clone(), so that it&lt;br /&gt;&lt;br /&gt;a. becomes public&lt;br /&gt;&lt;br /&gt;b. calls super.clone()&lt;br /&gt;&lt;br /&gt;c. if necessary, clones any members, or&lt;br /&gt;&lt;br /&gt;d. if a member can't be cloned, creates a new instance.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Simple example:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public MyClass implements Cloneable {&lt;br /&gt;&lt;br /&gt;int someNumber;&lt;br /&gt;&lt;br /&gt;String someString;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public Object clone() {&lt;br /&gt;&lt;br /&gt;// primitives and Strings are no&lt;br /&gt;&lt;br /&gt;// problem&lt;br /&gt;&lt;br /&gt;return super.clone();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In this case the method clone() of the class MyClass returns a new instance&lt;br /&gt;of&lt;br /&gt;&lt;br /&gt;MyClass, where all members have exactly the same value. That means, the object&lt;br /&gt;&lt;br /&gt;reference 'someString' points to the same object. This is called a shallow&lt;br /&gt;&lt;br /&gt;copy. In many cases this is no problem. Strings are immutable and you do not&lt;br /&gt;&lt;br /&gt;need a new copy. But if you need new copies of members, you have to do it in&lt;br /&gt;&lt;br /&gt;the clone() method. Here is another simple example:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;public class SomeMember implements Cloneable {&lt;br /&gt;&lt;br /&gt;long someLong;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public Object clone() {&lt;br /&gt;&lt;br /&gt;return super.clone();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public AnotherClass extends MyClass {&lt;br /&gt;&lt;br /&gt;SomeMember someMember;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public Object clone() {&lt;br /&gt;&lt;br /&gt;AnotherClass ac = (AnotherClass)(super.clone());&lt;br /&gt;&lt;br /&gt;if (someMember != null) {&lt;br /&gt;&lt;br /&gt;ac.someMember = (SomeMember)(someMember.clone());&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return ac;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Note that the class AnotherClass, that extends MyClass, automatically becomes&lt;br /&gt;Cloneable, because MyClass is Cloneable.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Also note, that super.clone() always returns an Object of the type of the actual&lt;br /&gt;object, although the superclass doesn't know anything about that sub class.&lt;br /&gt;The reason is, that Object.clone() is a native method, which just allocates&lt;br /&gt;new memory for the new object and copies the bytes to that memory. Native code&lt;br /&gt;has it's own ways of finding out which type to return ;-)&lt;br /&gt;&lt;br /&gt;by Karl Schmidt&lt;br /&gt;&lt;br /&gt;I was just wondering about the usefulness of Interfaces...&lt;br /&gt;&lt;br /&gt;Q: I was just wondering about the usefulness of Interfaces. I was under the&lt;br /&gt;impression that interfaces could be used to perform multiple inheritance. But&lt;br /&gt;an interface only declares a method - in a very abstract way.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A class that implements an interface needs to define its own implementation&lt;br /&gt;of a certain method. What is the use of having an interface when nothing is&lt;br /&gt;being gained...?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: If two classes implements the same interface, you can get a reference&lt;br /&gt;to the interface instead of the effective class without bother what class are&lt;br /&gt;you managing.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This is very useful in RMI (for example) or in any condition when you have&lt;br /&gt;to take an object without knowing exactly his class, but only the interface&lt;br /&gt;that it implement.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For example:&lt;br /&gt;&lt;br /&gt;public void recurseList( List l )&lt;/p&gt;&lt;br /&gt;&lt;p&gt;the generic List ensure that you can use every List for this method (ArrayList,&lt;br /&gt;AbstractList, Vector...), so your calling method can be:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;ArrayList l = new ArrayList(); or&lt;br /&gt;&lt;br /&gt;Vector l = new Vector();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;recurseList( l );&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Without any problem.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;by Davide Bianchi&lt;br /&gt;&lt;br /&gt;Q: I propose that Java should allow multiple inheritance if...&lt;br /&gt;&lt;br /&gt;Everyone knows the potential problem with multiple inheritance is when you run&lt;br /&gt;into the problem of having two instances of a grand parent super class.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For example:&lt;br /&gt;&lt;br /&gt;class A extends D {int i; }&lt;br /&gt;&lt;br /&gt;class B extends D {int i; }&lt;br /&gt;&lt;br /&gt;class C extends A,B {}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Potentially, you could have two copies of D for each instance of C.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;However, I propose that Java should allow multiple inheritance if there are&lt;br /&gt;no instance variables associated with the abstracts that the base class is extending.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;abstract class A { public setX(); public setY(); public setAll() {setX ();&lt;br /&gt;setY(); }&lt;br /&gt;&lt;br /&gt;abstract class B { public setC(); public setD(); public setBoth()&lt;br /&gt;&lt;br /&gt;{setC(); setD(); }&lt;/p&gt;&lt;br /&gt;&lt;p&gt;class C extends A,B {}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You won't have two instances of some grandfather class, since A and B doesn't&lt;br /&gt;have instances variables.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I hope the next versions of Java explores this issue.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Answer: It does. They're called interfaces:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;interface A { public void setX(); public void setY(); public void setAll();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;interface B { public void setC(); public void setD(); public void setBoth();&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;interface C extends A,B {};&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public abstract class D implements C {&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;jim&lt;br /&gt;&lt;br /&gt;Q: I got a problem with an array/vector...&lt;br /&gt;&lt;br /&gt;I got a problem with an array/vector.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;my class contains a member:&lt;br /&gt;&lt;br /&gt;static Vector quad[][];&lt;br /&gt;&lt;br /&gt;....&lt;/p&gt;&lt;br /&gt;&lt;p&gt;in my constructor I got:&lt;br /&gt;&lt;br /&gt;Vector quad[][] = new Vector[row][col];&lt;br /&gt;&lt;br /&gt;for (int i = 0; i &amp;lt; row; i++){&lt;br /&gt;&lt;br /&gt;for (int j = 0; j &amp;lt; col; j++){&lt;br /&gt;&lt;br /&gt;quad[i][j] = new Vector (0,1);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// row and col are int between (10..50) -- it's a big I know, but that&lt;br /&gt;&lt;br /&gt;might not be the problem&lt;/p&gt;&lt;br /&gt;&lt;p&gt;My PROBLEM (and I don't know what to do, really), I can't access quad[x][y]&lt;br /&gt;outside of the constructor!!!! Within the constructor I've got full access on&lt;br /&gt;quad[x][x]. Java (1.2) returns a NullPointerException on any method except within&lt;br /&gt;the constructor!!!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What's my fault!???&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: I guess you shouldn't write Vector here:&lt;br /&gt;&lt;br /&gt;Vector quad[][] = new Vector[row][col];&lt;br /&gt;&lt;br /&gt;so, the correct variant may be:&lt;br /&gt;&lt;br /&gt;quad[][] = new Vector[row][col];&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I guess You just overridden your static variable with one defined in your constructor:&lt;br /&gt;&lt;br /&gt;Vector quad[][].&lt;br /&gt;&lt;br /&gt;Thus, you're initializing NOT your class-scope static variable but your constructor-scope&lt;br /&gt;quad. It's not reachable outside the constructor. And as for static quad, it&lt;br /&gt;has never been initialized! And a first reference to it causes NullPointerException.&lt;br /&gt;I guess. I hope I'm right :)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Xao Rom&lt;br /&gt;&lt;br /&gt;Is there a way to know from class X which class called the method foo()?&lt;br /&gt;&lt;br /&gt;If class A and class B are calling a method foo() on class X, is there a way&lt;br /&gt;to know from class X which class called the method foo() (they can be either&lt;br /&gt;A or B). I know that this can be done by capturing the stack trace and examining&lt;br /&gt;it, but that solution looks expensive as I have to create a new Throwable object&lt;br /&gt;every time and capture stack trace (And I do this quite frequently).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Is there any other elegant solution to do this, any help and direction&lt;br /&gt;&lt;br /&gt;is appreciated.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Pass a reference to the class to the foo() method.&lt;br /&gt;&lt;br /&gt;foo(Object x){&lt;br /&gt;&lt;br /&gt;System.out.println(x.getClass());&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;should do it.&lt;br /&gt;&lt;br /&gt;Why does this simple application never exit?&lt;br /&gt;&lt;br /&gt;public class UIQuitTest {&lt;br /&gt;&lt;br /&gt;public static void main (String[] args) {&lt;br /&gt;&lt;br /&gt;java.awt.Frame f = new java.awt.Frame();&lt;br /&gt;&lt;br /&gt;f.dispose();&lt;br /&gt;&lt;br /&gt;f = null;&lt;br /&gt;&lt;br /&gt;} // end of main ()&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The application above never quits, is it a bug or a (mis)feature? Win98, JRE&lt;br /&gt;1.3.0&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: By creating an AWT object, you now have started the AWT thread. In&lt;br /&gt;order to end the application now, you have to do a System.exit(0) that will&lt;br /&gt;kill all non-daemon threads, including the AWT thread.&lt;br /&gt;&lt;br /&gt;Q: Is it possible to stop an object from being created during construction?&lt;br /&gt;&lt;br /&gt;For example if an error occurs inside the constructor (e.g. the parameters pass&lt;br /&gt;in were invalid) and I wanted to stop an object being created would it be possible&lt;br /&gt;to return null rather than a reference to a new object. (I know the term return&lt;br /&gt;is technically correct in this case but you know what I mean).&lt;br /&gt;&lt;br /&gt;Basically, is it possible to cancel object creation?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Yes, have the constructor throw an exception. Formally, an object _will_&lt;br /&gt;be created (since the constructor is a method invoked after the actual method&lt;br /&gt;creation), but nothing useful will be returned to the program, and the dead&lt;br /&gt;object will be later reclaimed by Garbage Collector.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But the clean way is as another reply suggests, that you leave calls to the&lt;br /&gt;constructor to a static factory method which can check the parameters and return&lt;br /&gt;null when needed.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Note that a constructor - or any method in general - throwing an exception&lt;br /&gt;will not "return null", but will leave the "assign target"&lt;br /&gt;as it was.&lt;br /&gt;&lt;br /&gt;Tor Iver Wilhelmsen&lt;br /&gt;&lt;br /&gt;Q: What does mean "volatile"?&lt;br /&gt;&lt;br /&gt;Q: For the past couple of hours, I've seen quite a few set of codes that has&lt;br /&gt;the _volatile_ keyword.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;E.g.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;private volatile somethingsomething....&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What does it mean?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: See JLS 2nd Edition, which just came out last year, still mentions&lt;br /&gt;it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#36930&lt;/p&gt;&lt;br /&gt;&lt;p&gt;"A field may be declared volatile, in which case a thread must reconcile&lt;br /&gt;its working copy of the field with the master copy every time it accesses the&lt;br /&gt;variable. Moreover, operations on the master copies of one or more volatile&lt;br /&gt;variables on behalf of a thread are performed by the main memory in exactly&lt;br /&gt;the order that the thread requested."&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Seems just like the idea in C++ and appears still to me present in the language.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Synchronization certainly has it place in many applications, that doesn't mean&lt;br /&gt;that volatile is not longer used or part of the language.&lt;br /&gt;&lt;br /&gt;Paul Hill&lt;br /&gt;&lt;br /&gt;Q: If some method is deprecated does it mean that one get a chance not to find&lt;br /&gt;this method in some Java version?&lt;br /&gt;&lt;br /&gt;Answer: It means it *may* be dropped in a future version, but chances are it's&lt;br /&gt;still there. I'm not sure I've seen any deprecated features actually being removed&lt;br /&gt;from an API yet - often they're turned into no-ops first, if they're dangerous.&lt;br /&gt;&lt;br /&gt;Jon Skeet - http://www.pobox.com/~skeet&lt;br /&gt;&lt;br /&gt;this advice first was published on comp.lang.java.programmer&lt;br /&gt;&lt;br /&gt;Q: suppose I put a file a.txt in package com.xyz and the try access it like&lt;br /&gt;following. Will it work? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;import com.xyz.*;&lt;br /&gt;&lt;br /&gt;public class Hello{&lt;br /&gt;&lt;br /&gt;File f = new File("a.txt");&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;it is not working for me. Is there any workaround?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Answer: If the source and the text file are in the jar file, then you access&lt;br /&gt;the file by:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;URL fileURL = getClass().getResource("file.txt");&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You can then read the file by using a reader (or whatever you choose),&lt;br /&gt;&lt;br /&gt;e.g.:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;_istream = new BufferedReader( new&lt;br /&gt;&lt;br /&gt;InputStreamReader(fileURL.openStream()) );&lt;br /&gt;&lt;br /&gt;j o h n e w e b e r&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Or, simpler&lt;br /&gt;&lt;br /&gt;getClass().getResourcesAsStream("file.txt"), but you must be sure&lt;br /&gt;that&lt;br /&gt;&lt;br /&gt;file is in the same directory ( package ) as your class, otherwise you&lt;br /&gt;&lt;br /&gt;need play with getClassLoader().getResourceAsStream( &amp;lt;path&amp;gt;"/file.txt"&lt;br /&gt;);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Oleg&lt;br /&gt;&lt;br /&gt;How can I minimise "Flicker" in animation? Solution 1:&lt;br /&gt;&lt;br /&gt;Answer: Solution 1: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Override update() : Flickering in animation occurs because default update()&lt;br /&gt;method clears the screen of any existing contents and then calls paint(). To&lt;br /&gt;reduce flickering, therefore, override update(). Here is how just add the following&lt;br /&gt;code to your applet: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public void update(Graphics g) {&lt;br /&gt;&lt;br /&gt;paint(g);&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What the update is now doing is just calling paint() and not clearing it, a&lt;br /&gt;further refinement to the above will be to override update() method and painting&lt;br /&gt;only the region where the changes are taking place. Here is how: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public void update(Graphics g) {&lt;br /&gt;&lt;br /&gt;g.clipRect(x, y, w, h);&lt;br /&gt;&lt;br /&gt;paint(g);&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Solution 2 will be described tomorrow&lt;br /&gt;&lt;br /&gt;How can I minimise "Flicker" in animation? Solution 2:&lt;br /&gt;&lt;br /&gt;Solution 1 was described in our tip yesterday&lt;br /&gt;&lt;br /&gt;Solution 2: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Use double-buffering : double buffering is the process of doing all your drawing&lt;br /&gt;to an offscreen and then displaying the entire screen at once. It is called&lt;br /&gt;double buffering because there are two drawing buffers and you switch between&lt;br /&gt;them. Use double buffering only if the above solution alone does not work. The&lt;br /&gt;following code snippet describes how to do it. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Image offscreenImage;&lt;br /&gt;&lt;br /&gt;Graphics offscreenGraphics;&lt;br /&gt;&lt;br /&gt;offscreenImage = createImage(size().width, size().height);&lt;br /&gt;&lt;br /&gt;offscreenGraphics = offscreenImage.getGraphics();&lt;br /&gt;&lt;br /&gt;offscreenGraphics.drawImage(img, 10, 10, this);&lt;br /&gt;&lt;br /&gt;g.drawImage(offscreenImage, 0, 0, this);&lt;br /&gt;&lt;br /&gt;The following app works fine, but when I start it, I cannot close it using the&lt;br /&gt;X at the right top of the form...&lt;br /&gt;&lt;br /&gt;Q: Please help me on the following. I'm just starting to use java (JDK1.3).&lt;br /&gt;The&lt;br /&gt;&lt;br /&gt;following app works fine, but when I start it, I cannot close it using the X&lt;br /&gt;&lt;br /&gt;at the right top of the form. What should I add to fix this problem? The&lt;br /&gt;&lt;br /&gt;source is shown below.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import java.awt.*;&lt;br /&gt;&lt;br /&gt;import java.awt.event.*;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public class MyApplication extends Frame{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;Frame f = new Frame("MyApp");&lt;br /&gt;&lt;br /&gt;f.setLayout(new FlowLayout());&lt;br /&gt;&lt;br /&gt;f.add(new Button("A"));&lt;br /&gt;&lt;br /&gt;f.setVisible(true);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: You should add a listener to handle the closing of the window when&lt;br /&gt;the X&lt;br /&gt;&lt;br /&gt;box gets clicked on.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;f.addWindowListener(new WindowAdapter(){&lt;br /&gt;&lt;br /&gt;public void windowClosing(WindowEvent evt){&lt;br /&gt;&lt;br /&gt;System.exit(0);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;});&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Read on this, and other ways to do it, in the sections dealing with&lt;br /&gt;&lt;br /&gt;event handling, in whichever Java text you are using.&lt;br /&gt;&lt;br /&gt;How can I set a JFrame to be full screen at the start of a program? I want no&lt;br /&gt;borders, no titles and I just want to use the entire screen.&lt;br /&gt;&lt;br /&gt;Answer: Try using JWindow instead, that one can be customized to have no borders&lt;br /&gt;or titles... as for size, I think you can use setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;getDefaultScreenDevice().getDefaultConfiguration().getBounds());&lt;br /&gt;&lt;br /&gt;to fill out the entire screen.&lt;br /&gt;&lt;br /&gt;How can I minimise "Flicker" in animation? Solution 1:&lt;br /&gt;&lt;br /&gt;Answer: Solution 1: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Override update() : Flickering in animation occurs because default update()&lt;br /&gt;method clears the screen of any existing contents and then calls paint(). To&lt;br /&gt;reduce flickering, therefore, override update(). Here is how just add the following&lt;br /&gt;code to your applet: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public void update(Graphics g) {&lt;br /&gt;&lt;br /&gt;paint(g);&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What the update is now doing is just calling paint() and not clearing it, a&lt;br /&gt;further refinement to the above will be to override update() method and painting&lt;br /&gt;only the region where the changes are taking place. Here is how: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;public void update(Graphics g) {&lt;br /&gt;&lt;br /&gt;g.clipRect(x, y, w, h);&lt;br /&gt;&lt;br /&gt;paint(g);&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Solution 2 will be described tomorrow&lt;br /&gt;&lt;br /&gt;How can I minimise "Flicker" in animation? Solution 2:&lt;br /&gt;&lt;br /&gt;Solution 1 was described in our tip yesterday&lt;br /&gt;&lt;br /&gt;Solution 2: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Use double-buffering : double buffering is the process of doing all your drawing&lt;br /&gt;to an offscreen and then displaying the entire screen at once. It is called&lt;br /&gt;double buffering because there are two drawing buffers and you switch between&lt;br /&gt;them. Use double buffering only if the above solution alone does not work. The&lt;br /&gt;following code snippet describes how to do it. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Image offscreenImage;&lt;br /&gt;&lt;br /&gt;Graphics offscreenGraphics;&lt;br /&gt;&lt;br /&gt;offscreenImage = createImage(size().width, size().height);&lt;br /&gt;&lt;br /&gt;offscreenGraphics = offscreenImage.getGraphics();&lt;br /&gt;&lt;br /&gt;offscreenGraphics.drawImage(img, 10, 10, this);&lt;br /&gt;&lt;br /&gt;g.drawImage(offscreenImage, 0, 0, this);&lt;br /&gt;&lt;br /&gt;The following app works fine, but when I start it, I cannot close it using the&lt;br /&gt;X at the right top of the form...&lt;br /&gt;&lt;br /&gt;Q: Please help me on the following. I'm just starting to use java (JDK1.3).&lt;br /&gt;The&lt;br /&gt;&lt;br /&gt;following app works fine, but when I start it, I cannot close it using the X&lt;br /&gt;&lt;br /&gt;at the right top of the form. What should I add to fix this problem? The&lt;br /&gt;&lt;br /&gt;source is shown below.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;import java.awt.*;&lt;br /&gt;&lt;br /&gt;import java.awt.event.*;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public class MyApplication extends Frame{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;Frame f = new Frame("MyApp");&lt;br /&gt;&lt;br /&gt;f.setLayout(new FlowLayout());&lt;br /&gt;&lt;br /&gt;f.add(new Button("A"));&lt;br /&gt;&lt;br /&gt;f.setVisible(true);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: You should add a listener to handle the closing of the window when&lt;br /&gt;the X&lt;br /&gt;&lt;br /&gt;box gets clicked on.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;f.addWindowListener(new WindowAdapter(){&lt;br /&gt;&lt;br /&gt;public void windowClosing(WindowEvent evt){&lt;br /&gt;&lt;br /&gt;System.exit(0);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;});&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Read on this, and other ways to do it, in the sections dealing with&lt;br /&gt;&lt;br /&gt;event handling, in whichever Java text you are using.&lt;br /&gt;&lt;br /&gt;How can I set a JFrame to be full screen at the start of a program? I want no&lt;br /&gt;borders, no titles and I just want to use the entire screen.&lt;br /&gt;&lt;br /&gt;Answer: Try using JWindow instead, that one can be customized to have no borders&lt;br /&gt;or titles... as for size, I think you can use setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;getDefaultScreenDevice().getDefaultConfiguration().getBounds());&lt;br /&gt;&lt;br /&gt;to fill out the entire screen.&lt;br /&gt;&lt;br /&gt;Why can not I mix AWT and Swing?&lt;br /&gt;&lt;br /&gt;Q: Recently, I have been hearing a lot of people from various newsgroups and&lt;br /&gt;website saying, java swing and awt can't be in the same application. They will&lt;br /&gt;not work together and they might produce unexpected results. At the same time,&lt;br /&gt;i don't hear people saying "why" you shouldn't use swing and awt together.&lt;br /&gt;Could someone out there shed some light for me. Is their any logical reason&lt;br /&gt;why we shouldn't mix swing and awt in the same application/applet. If there&lt;br /&gt;is a problem mixing swing and awt... what are the results, what can happen?&lt;br /&gt;I design using IBM's Visual Age for Java 3.0, and I mix swing and awt in the&lt;br /&gt;same application/applet, it works fine when testing in the IDE (I haven't tested&lt;br /&gt;it outside of the IDE yet). If you have tested application/applets outside of&lt;br /&gt;the IDE, please let me know what happened?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: There are fundamental incompatibilities in the way they draw themselves.&lt;br /&gt;&lt;br /&gt;AWT java classes are not "pure" Java classes, they use underlaying&lt;br /&gt;C/C++ native code (dependable on operation system) that can cause different&lt;br /&gt;appearence in different OSs.&lt;br /&gt;&lt;br /&gt;Swing is pure Java implementation and has no native code at all. Swing applications&lt;br /&gt;look the same.&lt;br /&gt;&lt;br /&gt;&amp;gt; If there is a problem mixing swing and awt... what are the results,&lt;br /&gt;&lt;br /&gt;&amp;gt; what can happen? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Some objects drawn on top of others are not properly occluded. This is most&lt;br /&gt;obvious with drop down menus, which have a tendency to stay visible even after&lt;br /&gt;you have selected a menu item. Another problem is that if you use AWT components&lt;br /&gt;on a JTabbedPane they will not disappear when you switch tabs. There are many&lt;br /&gt;similar issues.&lt;br /&gt;&lt;br /&gt;Again about difference between AWT and Swing&lt;br /&gt;&lt;br /&gt;Q: I have a question: What are the architectural differences between Swing and&lt;br /&gt;AWT??&lt;br /&gt;&lt;br /&gt;Answer: by Odd Vinje&lt;br /&gt;&lt;br /&gt;There are no big architectural differences, the class hierarchy is almost the&lt;br /&gt;same. The reason is that Swing is built upon AWT.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The most significant difference is how the components are drawn to the screen.&lt;br /&gt;AWT is so called heavyweight components and have their own viewport which sends&lt;br /&gt;the output to the screen. Swing is ligthweight components and does not write&lt;br /&gt;itself to the screen, but redirect it to the component it builds on. Heavyweight&lt;br /&gt;components also have their own z-ordering. This is the reason why you can't&lt;br /&gt;combine AWT and Swing in the same container. If you do, AWT will always be drawn&lt;br /&gt;on top of the Swing components. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;You can combine AWT and Swing, just don't do it in the same container (e.g.&lt;br /&gt;panel, groupbox, etc.) and don't put a heavyweight component inside a lightweight.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Another difference is that Swing is pure Java, and therefore platform independent.&lt;br /&gt;Swing looks identically on all platforms, while AWT looks different on different&lt;br /&gt;platforms.&lt;br /&gt;&lt;br /&gt;Swing is "lightweight" components. Its graphics primitives are implemented&lt;br /&gt;in 100% Pure Java. How does it draw pixels on screen?&lt;br /&gt;&lt;br /&gt;Does it still rely on any native code to access the frame buffer? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: We mentioned before in our tips that Swing components is 100% pure&lt;br /&gt;Java.&lt;br /&gt;&lt;br /&gt;It isn't fully correctly if we are speaking about containers on which they can&lt;br /&gt;draw. Swing is still based on AWT, and even Swing components must have at least&lt;br /&gt;one heavyweight container. In other words, JFrame, JApplet are *not* lightweight.&lt;br /&gt;&lt;br /&gt;I need to put in a JtextField characters like cyrilic ...&lt;br /&gt;&lt;br /&gt;How can I do this?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: You use the unicode string \u???? corresponding to your character.&lt;br /&gt;&lt;br /&gt;A table of codes can be found at www.unicode.org/charts/&lt;br /&gt;&lt;br /&gt;by Charles Megnin&lt;br /&gt;&lt;br /&gt;Is there any way to accept password from a java application. As it is a password,&lt;br /&gt;IT SHOULD NOT BE SHOWN(ECHOED) WHILE IT IS ENTERED.&lt;br /&gt;&lt;br /&gt;Answer: If you are using swing, you can use JPasswordField, and set your&lt;br /&gt;&lt;br /&gt;echo character.&lt;br /&gt;&lt;br /&gt;by myparu&lt;br /&gt;&lt;br /&gt;How can I change the default icon on application window (java cup) to my own?&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;window.setIconImage(Toolkit.getDefaultToolkit().getImage("image.gif"));&lt;br /&gt;&lt;br /&gt;Q: How can I read a Tab delimited text file into a JList?&lt;br /&gt;&lt;br /&gt;All I need is the first item in each record. I import each line with a BufferedReader.Readline()&lt;br /&gt;and then look at each char with record.substring(n,n+1). How can I check if&lt;br /&gt;the next char is a Tab?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: StringTokenizer st = new StringTokenizer(record, "\t");&lt;br /&gt;&lt;br /&gt;while (st.hasMoreTokens()) {&lt;br /&gt;&lt;br /&gt;String token = st.nextToken();&lt;br /&gt;&lt;br /&gt;// ... do something with the token&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;How do I generate mouse click event but without a real click?&lt;br /&gt;&lt;br /&gt;Q: Could you tell me how I can generate an event (like a mouse click) from a&lt;br /&gt;Java application? (I want generate a mouse click event but without a real click&lt;br /&gt;on the mouse).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: See "simulate keyboard pressing" below: You can use java.awt.Robot"&lt;br /&gt;since java1.3&lt;br /&gt;&lt;br /&gt;Q: Why would anyone use AWT and not Swing today?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: There are several handheld devices that do not have a lot of memory&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;CPU power available, AWT is more suitable for them (Smaller footprint).&lt;br /&gt;&lt;br /&gt;How to set the default memory limit of java virtual machine in a java application?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer1: java -Xms16m -Xmx32m MainClassName&lt;br /&gt;&lt;br /&gt;here: -Xms16m =&amp;gt; 16meg initial memory allocation&lt;br /&gt;&lt;br /&gt;-Xmx32m =&amp;gt; 32meg max memory allocation&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2:Run your Java program with -mx&amp;lt;number&amp;gt; switch like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;java -mx128m ClassName&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This for example will set maximum memory allocation pool to 128MB&lt;br /&gt;&lt;br /&gt;Do the classes in java.util.zip handle password-encrypted zip files? I've looked&lt;br /&gt;through the API, and I don't see any mention of it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: No, they don't. But Zip's built-in encryption isn't safe anyway by&lt;br /&gt;today's standards.&lt;br /&gt;&lt;br /&gt;How do I make java apllication instalable? Q: I have written a Java application&lt;br /&gt;and have the .class files in one location. How do I make it installable? Is&lt;br /&gt;it possible to convert it to an executable file? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer1: just create a batchfile or a .sc file (if on unix)&lt;br /&gt;&lt;br /&gt;Answer2: Or check http://installshield.com/&lt;br /&gt;&lt;br /&gt;They have special edition for Java which lets to write additional interface&lt;br /&gt;for configuring of program parameters during instalation.&lt;br /&gt;&lt;br /&gt;I need to know how to run Multiple JVMs on one machine. As far as I know if&lt;br /&gt;&lt;br /&gt;I run 2 different Java Programs on one machine at the same time, both of&lt;br /&gt;&lt;br /&gt;these programs use the SAME JVM. Is this statement right? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: NO!. Each invocation of the 'java' command creates a new and separate&lt;br /&gt;&lt;br /&gt;JVM, at least in those JVMs based on the Sun code, and getting them to&lt;br /&gt;&lt;br /&gt;cooperate on a shared Java task is not automatic, and definitely non-trivial.&lt;br /&gt;&lt;br /&gt;I am totally confused about the differences between the SDK, JDK and IDE products&lt;br /&gt;&lt;br /&gt;Q: I am brand new to the world of Java and am most interested in learning the&lt;br /&gt;language. However, I am confused about the differences between the SDK, JDK&lt;br /&gt;and IDE products. I have gone to the Sun site and even some of the IDE vendor&lt;br /&gt;sites and I have yet to find something that tells me what the differences are&lt;br /&gt;between the three and which of the three I need to program in Java.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I want to program using some form of IDE but do I need to separately download&lt;br /&gt;and install a SDK and/or JDK? Sun needs to improve their documentation for us&lt;br /&gt;new to the Java environment.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer1: IDE is an acronym for _I_ntegrated _D_evelopment _E_nvironment. These&lt;br /&gt;products are the one stop shops for coding, running and debugging your code.&lt;br /&gt;Often these will include GUI based drag and drop form designers and "wizards"&lt;br /&gt;for the shells of common forms of code (Application, Applet, etc.) JBuilder&lt;br /&gt;is an IDE.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The IDE may stand on its own, or it may act as a front end for a JDK.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;JDK is _J_ava _D_esign _K_it. A JDK is a command line based interface to the&lt;br /&gt;JVM, plus the classes. You are responsible for your own editors, creating code&lt;br /&gt;for GUI elements, and all code. All of the IDE's I have reviewed personally&lt;br /&gt;come with JDK or their own vendor's equivalent (JVM and class libraries). Some&lt;br /&gt;IDE's are capable of a&lt;br /&gt;&lt;br /&gt;sort of "upgrading" by downloading the latest JDK from Sun (JBuilder&lt;br /&gt;for example). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: If you want to write a Java program using any editor and not an IDE&lt;br /&gt;then you would want to download the JDK. It will let you compile and run Java&lt;br /&gt;programs from the command line (like a DOS window).&lt;br /&gt;&lt;br /&gt;JDK stands for Java Development Kit and SDK stands for Standard Development&lt;br /&gt;Kit. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Java comes in three versions - Standard, Enterprise, and Micro editions. JDK&lt;br /&gt;could be any one of the three. SDK is the standard one - this is the one most&lt;br /&gt;people use. If you want an IDE they typically come with a JDK so all you would&lt;br /&gt;need to do there is download the IDE and start using it.&lt;br /&gt;&lt;br /&gt;How does a java application stored within a jar file reference/edit/read other&lt;br /&gt;files ( like .txt, or data files,) that are also within the jar file?&lt;br /&gt;&lt;br /&gt;Answer: Classes located in a JAR archive are loaded via a class loader whose&lt;br /&gt;purpose is to load classes form JAR archives. This ClassLoader implements the&lt;br /&gt;getResource and getResourceAsStream methods to retrieve files from the JAR file.&lt;br /&gt;So you can take any class from the JAR and say ClassName.class.getClassLoader().getResource("fname");&lt;br /&gt;to get the resource and use it.&lt;br /&gt;&lt;br /&gt;I want to keep my java GUI always on the top of any other desktop application.&lt;br /&gt;Any idea?&lt;br /&gt;&lt;br /&gt;I want to keep my java GUI always on the top of any other desktop application.&lt;br /&gt;Any idea?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Spawn a thread that knows about the parent Window, and every X milliseconds,&lt;br /&gt;executes the toFront () command of that window. Just remember to execute it&lt;br /&gt;using SwingUtilities.invokeLater (), and don't&lt;br /&gt;&lt;br /&gt;let your users launch two apps, unless you enjoy screen lockup.&lt;br /&gt;&lt;br /&gt;Can a java application be run of a CD without installing anything (i.e. runtime,&lt;br /&gt;etc) on the target computer?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I would like to put my application and hand it out as a demo, but I want to&lt;br /&gt;make it easy to view.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer1: by Dale King The JRE was made so that it didn't need to be "installed".&lt;br /&gt;What I did in one case was to simply put the JRE into a jre folder in the same&lt;br /&gt;directory as my application then invoke it from that directory using:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;jre\bin\jre.exe -cp MyJar.java MyClass&lt;/p&gt;&lt;br /&gt;&lt;p&gt;That was for JDK1.1 and you have to modify it slightly for Java 2. But this&lt;br /&gt;did not require any installation of environment variables to be set up. The&lt;br /&gt;JRE was smart enough to know how to get to its system classes relative to where&lt;br /&gt;the jre.exe file was located. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: you could try a Java to native compiler.&lt;br /&gt;&lt;br /&gt;I would like to know whether it is possible to test the memory, so as to avoid&lt;br /&gt;the OutOfMemoryError or whether it is possible to increase the amount of memory&lt;br /&gt;in the JRM.&lt;br /&gt;&lt;br /&gt;Answer: You can get the total and available memory used by the VM by making&lt;br /&gt;two calls from the Runtime class:&lt;br /&gt;&lt;br /&gt;Runtime runtime = Runtime.getRuntime();&lt;br /&gt;&lt;br /&gt;long free = runtime.freeMemory(); //the available memory&lt;br /&gt;&lt;br /&gt;long total = runtime.totalMemory(); // the total for the JVM&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The amount returned be totalMemory() isn't that useful unless you specify how&lt;br /&gt;much memory your program will have from the beginning (if you don't, the JVM&lt;br /&gt;will just keep grabbing more until you run out).&lt;br /&gt;&lt;br /&gt;You can set the initial and maximum memory from the command line:&lt;br /&gt;&lt;br /&gt;java -Xms64m -Xmx64m name.of.Application&lt;br /&gt;&lt;br /&gt;This will start your appplication with 64 megs initial and maximum memory.&lt;br /&gt;&lt;br /&gt;by Corey Wineman&lt;br /&gt;&lt;br /&gt;What needs to be done to reduce size of a jar file? What optimization techniques&lt;br /&gt;to use on classes inside the jar file? What tools if any?&lt;br /&gt;&lt;br /&gt;Answer: A JAR file is a ZIP archive. You can influence its size by choosing&lt;br /&gt;the degree of compression you want to have. This is usually defined by a value&lt;br /&gt;between 0 (no compression) and 9 (maximum compression). Although JAR tool does&lt;br /&gt;not list a -9 switch, you might want to create compressed JARs with any ZIP&lt;br /&gt;tool like Winzip or the free Info-ZIP zip command line tool.&lt;br /&gt;&lt;br /&gt;The amount of reduction you get totally depends on the nature of your data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that if you use compression in your JAR file, loading goes slower (classes&lt;br /&gt;must be decompressed).&lt;br /&gt;&lt;br /&gt;Q: Is there any way to run code after the VM has been instructed to exit?&lt;br /&gt;&lt;br /&gt;Answer: In 1.3, you can use Runtime.addShutdownHook(Thread hook)&lt;br /&gt;&lt;br /&gt;Q: Where can I find Java --&amp;gt; Native code compilers?&lt;br /&gt;&lt;br /&gt;Answer: We just published a list of Java products that lets you do&lt;br /&gt;&lt;br /&gt;Java --&amp;gt; Native code compilation:&lt;br /&gt;&lt;br /&gt;http://javafaq.nu/java/staff/staff.shtml&lt;br /&gt;&lt;br /&gt;I have a directory having class files arranged in package hierarcy. How can&lt;br /&gt;I make the executable of this whole directory?&lt;br /&gt;&lt;br /&gt;Any application available for that in Windows NT environment.&lt;br /&gt;&lt;br /&gt;Answer: Make a JAR file out of it and add a manifest file that indicates which&lt;br /&gt;main() method of which class must be called.&lt;br /&gt;&lt;br /&gt;Double-clicking this JAR file will run your application.&lt;br /&gt;&lt;br /&gt;Q: I'm interested in writing a little mp3 player in Java...&lt;br /&gt;&lt;br /&gt;I'm interested in writing a little mp3 player in java. I have an entirely different&lt;br /&gt;app right now that plays sound (wav files), and I substituted an mp3 file for&lt;br /&gt;one of the waves but it didn't work. Can anyone tell me if java even supports&lt;br /&gt;mp3 files?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Go to the "Products &amp; APIs" section of java.sun.com and&lt;br /&gt;look for JMF (Java Media Framework). It's a library that also supports reading&lt;br /&gt;MP3 files.&lt;br /&gt;&lt;br /&gt;Q: Are there any tools out there that will convert a program writen in C to&lt;br /&gt;JAVA?&lt;br /&gt;&lt;br /&gt;Answer: Yes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;C2J: http://www.novosoft-us.com/NS2B.nsf/w1/C2J&lt;br /&gt;&lt;br /&gt;C2J has successfully compiled itself as well as programs such as PGP and YACC.&lt;br /&gt;Obviously YMMV.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Based on C2J is a C++ to Java tool: http://sol.pace.edu/~tilevich/c2j.html&lt;/p&gt;&lt;br /&gt;&lt;p&gt;jim&lt;br /&gt;&lt;br /&gt;Q: Can we create DLLs in java??? if yes How???&lt;br /&gt;&lt;br /&gt;Answer: Unfortunately it is impossible. DLL stands for Dynamic Linking Library&lt;br /&gt;and has definite structure inside. DLL is a part of executable code and helps&lt;br /&gt;to make an application for Windows to be more smaller. And more flexible. It&lt;br /&gt;is something like classes but compiled (Java class files are byte codes and&lt;br /&gt;JDK compiles them during the runtime...).&lt;br /&gt;&lt;br /&gt;In Java it is not possible to make an executable code. But with third party&lt;br /&gt;software Yes!&lt;br /&gt;&lt;br /&gt;See native compilers on our site.&lt;br /&gt;&lt;br /&gt;But I didn't hear about creating DLLs.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So my answer is: in Java it is not possible, but with third party applications&lt;br /&gt;it is possible theoretically. Although I do not know any compilers that produce&lt;br /&gt;DLLs there is no limitations to do that....&lt;/p&gt;&lt;br /&gt;&lt;p&gt;John&lt;br /&gt;&lt;br /&gt;Can someone tell me the difference between the JRE that comes with the J2SDK&lt;br /&gt;and the stand-alone JRE?&lt;br /&gt;&lt;br /&gt;Can someone tell me the difference between the JRE that comes with the J2SDK&lt;br /&gt;and the stand-alone JRE? When should I use which? I read the sun's web page&lt;br /&gt;and they said the the JRE stand-alone package is for shipping your application,&lt;br /&gt;it doesn't come with a compiler nor debugger, but what does it really mean?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Exactly that. The Java 2 SDK (aka JDK) is the JRE plus the compiler&lt;br /&gt;(javac) and debugger (jdb). The JRE is entirely sufficient to run a Java application&lt;br /&gt;(with a couple exceptions in situations where you call into the compiler or&lt;br /&gt;some such). It's entirely redistributable with your Java application if you've&lt;br /&gt;written an app in Java intended for an audience that may not have the JRE installed.&lt;br /&gt;&lt;br /&gt;Chris Smith&lt;br /&gt;&lt;br /&gt;Q: Does anyone know of a java machine that will run from a 1.44Mb Floppy? I&lt;br /&gt;have an application I want to run from a dos 7.1 floppy disk.&lt;br /&gt;&lt;br /&gt;Answer: please check here:&lt;br /&gt;&lt;br /&gt;http://www.transvirtual.com/kaffe-features.htm&lt;br /&gt;&lt;br /&gt;there is written:&lt;br /&gt;&lt;br /&gt;"Efficiency is not just about execution speed, but Kaffe's JIT is quite&lt;br /&gt;speedy: it runs Java code only 30% slower than plain C. Such things as memory&lt;br /&gt;consumption of a JIT-enabled, graphical Kaffe are also important.&lt;br /&gt;&lt;br /&gt;Here we can execute a full system on a 4 MB DOS system, and the VM and library&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;footprint won't exceed 1 MB. Our complete source tree fits on a single 1.4 MB&lt;br /&gt;floppy.&lt;br /&gt;&lt;br /&gt;This is what we mean by "efficiency".&lt;br /&gt;&lt;br /&gt;Good enough for you?&lt;br /&gt;&lt;br /&gt;Q: Anybody know a good tool to distribute your made java classes with for windows&lt;br /&gt;platforms?&lt;br /&gt;&lt;br /&gt;I want to create a setup file that alse verifies existence of java runtimes&lt;br /&gt;etc etc and creates a shortcut and that kinda things...I tried looking into&lt;br /&gt;Wise installation systems and Installshield asswel, but they are both not really&lt;br /&gt;build for this kinda things...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: You should try, InstallAnywhere by ZeroG (http://www.zerog.com)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;ZeroG has a free version call, "InstallAnywhere NOW". You should&lt;br /&gt;give it a try, its a really easy-to-use java installer. It has all the features&lt;br /&gt;you need, such as creating an Icon on your desktop, creating a folder under&lt;br /&gt;the Windows "Start" button, it can be set to have the user search&lt;br /&gt;for a JVM on their computer, and much much more... (I sound like a commercial,&lt;br /&gt;hehehe)&lt;br /&gt;&lt;br /&gt;JHig310336&lt;br /&gt;&lt;br /&gt;Q: Heap size limit!! I am running JVM from JDK 1.2 on Solaris 2.7 and I couldn't&lt;br /&gt;allocate the max heapsize over 2G when I invoke the JVM.&lt;br /&gt;&lt;br /&gt;I have repetive tasks that take 500m memory each to run, so I naturally want&lt;br /&gt;to run as many threads as possible. I figured out this 2G (-mx2047m) limit by&lt;br /&gt;trial and error but is there any way out of this? My workstation happen to have&lt;br /&gt;2G physical memory, and the file size limit is 2G as well (from ulimit), are&lt;br /&gt;there any co-relation among those numbers?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Yes, there is a relation: both result from limiting addressing space&lt;br /&gt;to what you can get with signed 32-bit ints for addresses:&lt;br /&gt;&lt;br /&gt;2^31 - 1 = 2 * 2^30 -1 = 2 * 1 GB -1 = 2 GB&lt;/p&gt;&lt;br /&gt;&lt;p&gt;One of the interesting features of Java, is you could run the code with 64&lt;br /&gt;bit addresses, and nothing would need to change in either the source code or&lt;br /&gt;the class files. The only difference would be you could hold a lot more objects&lt;br /&gt;and stack frames before you blew virtual RAM.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Obviously you would need a different JVM or Hotspot.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Java never lets you discover how big references really are inside or how they&lt;br /&gt;are implemented, e.g. as pointers or as handles, or even the granularity of&lt;br /&gt;the addressibility of your machine.&lt;br /&gt;&lt;br /&gt;On a 32-bit OS it is a liitle hard to get 32+ bit memory space. How about you&lt;br /&gt;try a 64-bit Solaris 8?&lt;br /&gt;&lt;br /&gt;answered by Michiel,&lt;br /&gt;&lt;br /&gt;Roedy Green, JAVA GLOSSARY see http://www.mindprod.com/jgloss.html&lt;br /&gt;&lt;br /&gt;and Johnny Bravo&lt;br /&gt;&lt;br /&gt;I have difficulty understanding what is the difference between sockets&lt;br /&gt;&lt;br /&gt;and ports. They seem to be doing the same thing, receiving/sending&lt;br /&gt;&lt;br /&gt;data streams to other computers over network.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: A port is a software address on a computer on the network--for instance,&lt;br /&gt;the&lt;br /&gt;&lt;br /&gt;News server is a piece of software that is normally addressed through port 119,&lt;br /&gt;&lt;br /&gt;the POP server through port 110, the SMTP server through port 25, and so on.&lt;br /&gt;A&lt;br /&gt;&lt;br /&gt;socket is a communication path to a port. When you want your program to&lt;br /&gt;&lt;br /&gt;communicate over the network, you have give it a way of addressing the port,&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;this is done by creating a socket and attaching it to the port.&lt;br /&gt;&lt;br /&gt;basically, socket = IP + ports&lt;br /&gt;&lt;br /&gt;Sockets provide acces to the port+ip&lt;br /&gt;&lt;br /&gt;We were trying to write a mail client using sun's javamail. I was wondering&lt;br /&gt;if there is a way to set the priority of the message.&lt;br /&gt;&lt;br /&gt;Commercial mail clients does this by setting the X-priority:&amp;lt;num&amp;gt; field&lt;br /&gt;of the smtp header ( 1 means highest and 5 means lowest - I think the rfc allows&lt;br /&gt;much more than this ). Looking at the documentation I could not find any way.&lt;br /&gt;I was wondering if any of you have done anything similar.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Look at MimeBodyPart::addHeader(String name, String value);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You can add any headers allowed by the RFC spec. :-)&lt;br /&gt;&lt;br /&gt;I am trying socket level programming through firewalls. Could somebody tell&lt;br /&gt;what Http tunnelling is and how to achieve that using Java 2? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: As an aside, how do you request your proxy server to fetch a page from&lt;br /&gt;the net?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;http://developer.java.sun.com/developer/technicalArticles/InnerWorkings/Burrowing/index.html&lt;br /&gt;&lt;br /&gt;How can I let dial a phone number with a modem in a Java app.? Is there a way&lt;br /&gt;without a System.exec() call and without any M$ classes?&lt;br /&gt;&lt;br /&gt;Answer: You could use javax.comm to do it manually via the serial port and the&lt;br /&gt;good old AT command set on the modem. Alternatively, you might look at JTAPI,&lt;br /&gt;but that might have its own problems and a lot of overkill.&lt;br /&gt;&lt;br /&gt;Does it possible to have two thread running at the same time which reads from&lt;br /&gt;the same socket. If a message is received, does both threads then receive it?&lt;br /&gt;&lt;br /&gt;Answer: Two threads can read data from the same socket input stream, but they&lt;br /&gt;WON'T each get copies of the same data. They'll each get separate parts of the&lt;br /&gt;message.&lt;br /&gt;&lt;br /&gt;Q: how can I get an IP Adress in the class InetAdress? The constructor is private,&lt;br /&gt;so I can’t use it. I want to call the method getName () to get the domain&lt;br /&gt;name out of an IP Address.&lt;br /&gt;&lt;br /&gt;Answer: It is not necessary to construct something :-)&lt;br /&gt;&lt;br /&gt;Just do it like this:&lt;br /&gt;&lt;br /&gt;for example: String hostname = InetAddress.getLocalHost().getHostName();&lt;br /&gt;&lt;br /&gt;I'm converting an old java client/server program which is based on raw byte&lt;br /&gt;stream heavily into new one which requires utilizing object streams. But if&lt;br /&gt;I open input/output object streams on both sides this blocks system and won't&lt;br /&gt;proceed...&lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;&lt;br /&gt;I'm converting an old java client/server program which is based on raw byte&lt;br /&gt;stream heavily into new one which requires utilizing object streams. But if&lt;br /&gt;I open input/output object streams on both side this blocks system and won't&lt;br /&gt;proceed.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;ObjectInputStream in = new ObjectInputStream(socket.getInputStream());&lt;br /&gt;&lt;br /&gt;ObjectOutputStream out = new&lt;br /&gt;&lt;br /&gt;ObjectOutputStream(socket.getOutputStream());&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Upon opening the ObjectInputStream, the constructor blocks to read&lt;br /&gt;a header from the stream (doing who-knows-what). Now, what happens is, both&lt;br /&gt;your client and server open the InputStream... and happily wait forever for&lt;br /&gt;the other side to send them the header they want. Deadlock guaranteed!&lt;br /&gt;&lt;br /&gt;The solution is simple: open the ObjectOutputStream first on at least one side,&lt;br /&gt;but better on both sides (usually, symmetry == good). Problem solved&lt;br /&gt;&lt;br /&gt;:)&lt;br /&gt;&lt;br /&gt;You are trying to keep two streams going at once independently, right.&lt;br /&gt;&lt;br /&gt;That means you need at least two threads at each end.&lt;br /&gt;&lt;br /&gt;Are there classes available to read and write to an RS 232 port or does this&lt;br /&gt;require using native code?&lt;br /&gt;&lt;br /&gt;Answer: See the Java Communications API.&lt;br /&gt;&lt;br /&gt;Q: Is there a System property that'll tell me the (TCP/IP) machine name? If&lt;br /&gt;not, how do you go about it?&lt;br /&gt;&lt;br /&gt;I need to display all the machine's TCP/IP addresses to the user. This requires&lt;br /&gt;a call to InetAddress.getAllByName(), which requires the machine name. You *can't*&lt;br /&gt;pass null or "localhost" to this method. Well, you can pass "localhost",&lt;br /&gt;but that only gets you the localhost addy itself-&lt;br /&gt;&lt;br /&gt;127.0.0.1. Not useful.&lt;br /&gt;&lt;br /&gt;Answer: Try this: Working that out, I tried&lt;/p&gt;&lt;br /&gt;&lt;p&gt;String hostname = InetAddress.getLocalHost().getHostName();&lt;br /&gt;&lt;br /&gt;System.out.println(hostname);&lt;br /&gt;&lt;br /&gt;InetAddress[] ads = InetAddress.getAllByName(hostname);&lt;br /&gt;&lt;br /&gt;for (int i=0; i&amp;lt;ads.length; i++) {&lt;br /&gt;&lt;br /&gt;System.out.println(ads[i]);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;by Michiel&lt;br /&gt;&lt;br /&gt;Q: Hi, I am new to JTapi (java telephony). I am trying to run a sample code&lt;br /&gt;provided with the JTAPI specification. However I get an error message such as&lt;br /&gt;:&lt;br /&gt;&lt;br /&gt;Can't get Provider:&lt;br /&gt;&lt;br /&gt;javax.telephony.JtapiPeerUnavailableException: JtapiPeer: DefaultJtapiPeer could&lt;br /&gt;not be instantiated.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer:&lt;br /&gt;&lt;br /&gt;As with many Java packages (most notably JDBC) java.telephony is only an API&lt;br /&gt;-there is nothing behind it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You have to pay someone for an implementation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The point is that if you use the API then it will run with anyone's implementation.&lt;br /&gt;&lt;br /&gt;Is anyone aware of any way to determine OS type, version...&lt;br /&gt;&lt;br /&gt;Answer: There is in the java.lang.System&lt;br /&gt;&lt;br /&gt;try first:&lt;br /&gt;&lt;br /&gt;Properties p = System.getProperties();&lt;br /&gt;&lt;br /&gt;System.out.println(p);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;to see what properties you can get(CPU among others)..&lt;br /&gt;&lt;br /&gt;you then can:&lt;br /&gt;&lt;br /&gt;String prop = System.getProperty("aproperty(the CPU among other)");&lt;br /&gt;&lt;br /&gt;Does anyone know if there is an easy way to invoke UNIX shell scripts from a&lt;br /&gt;Java application.&lt;br /&gt;&lt;br /&gt;Answer: There is!&lt;br /&gt;&lt;br /&gt;execute a shell and then write the name of the shell script on the shells stdin&lt;br /&gt;stream.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Process child = rtime.exec("/bin/bash");&lt;br /&gt;&lt;br /&gt;BufferedWriter outWriter = new BufferedWriter(new OutputStreamWriter(child.getOutputStream()));&lt;br /&gt;&lt;br /&gt;outWriter.writeLine("filename");&lt;br /&gt;&lt;br /&gt;outWriter.flush();&lt;br /&gt;&lt;br /&gt;Is there a way to differentiate the enter key on the main keyboard from the&lt;br /&gt;enter key on the keypad?&lt;br /&gt;&lt;br /&gt;Answer: I don't think so, they're both represented by the character code 10.&lt;br /&gt;&lt;br /&gt;Is there any way to manage Systray Icons with Java? I didn't even find anything&lt;br /&gt;in the Microsoft packages...&lt;br /&gt;&lt;br /&gt;Answer: You must create a C/C++ program that call directly the&lt;br /&gt;&lt;br /&gt;NotifyIcon API to display/manage the Icon in the Systray. Then&lt;br /&gt;&lt;br /&gt;call the program from Java with JNI.&lt;br /&gt;&lt;br /&gt;Currently I'm running two operating systems on one machine, Windows 2000 and&lt;br /&gt;Windows ME...&lt;br /&gt;&lt;br /&gt;Q: Currently I'm running two operating systems on one machine, Windows 2000&lt;br /&gt;and Windows ME.&lt;br /&gt;&lt;br /&gt;Windows ME runs on default, Windows 2000 is on D drive and ME is on C drive.&lt;br /&gt;I tried to add the JDK directory to the classpath but there isn't a autoexec.bat&lt;br /&gt;on the D directory, but there is one for C.&lt;br /&gt;&lt;br /&gt;Should I just create a autoexec.bat for D?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Go to Settings/Control Panel/System/Advanced/Environment Variables...&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;edit your CLASSPATH variable if exists or add a new one.&lt;br /&gt;&lt;br /&gt;I need to be able to run a shell script from java, by doing a host call to unix.&lt;br /&gt;I am currently trying 'Runtime.exec' to do this. It says it runs it, but doesn't&lt;br /&gt;actually successfully complete the command (which is a file delete).&lt;br /&gt;&lt;br /&gt;Q: I need to be able to run a shell script from java, by doing a host call to&lt;br /&gt;unix. I am currently trying 'Runtime.exec' to do this. It says it runs it, but&lt;br /&gt;doesn't actually successfully complete the command (which is a file delete).&lt;br /&gt;&lt;br /&gt;A few questions I have about this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. Can I trace it or something to see why it isn't working?&lt;br /&gt;&lt;br /&gt;2. How can I get the 'return code' from the shell script?&lt;br /&gt;&lt;br /&gt;3. Will the java procedure wait for the shell script to execute, or does&lt;br /&gt;&lt;br /&gt;it run a seperate thread concurrently?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: &amp;gt; 1. Can I trace it or something to see why it isn't working?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Runtime.exec() returns a Process object that you can get information from.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If the script is written with sh or some derivate thereof you can do 'set -x'&lt;br /&gt;in the script to trace its behaviour. For other scripting languages there is&lt;br /&gt;likely a similar mechanism. To see the trace in your Java program, read from&lt;br /&gt;the error or output streams of the process (Process.getErrorStream() or Process.getOutputStream()).&lt;br /&gt;It's possible that the script is already printing a message to its error stream&lt;br /&gt;that you aren't seeing, indicating why it isn't working.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: &amp;gt; 2. How can I get the 'return code' from the shell script?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Call Process.exitValue().&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: &amp;gt; 3. Will the java procedure wait for the shell script to execute,&lt;br /&gt;or does it run a seperate thread concurrently?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The program runs concurrently in a separate *process*, not a thread within&lt;br /&gt;the JVM. To wait for the process to finish, call Process.waitFor().&lt;br /&gt;&lt;br /&gt;Are not-initializable classes and methods like System.out.println() and Math.random()&lt;br /&gt;"synchronized" ?&lt;br /&gt;&lt;br /&gt;Answer: I think they are synchronized. Simple observation: did you ever see&lt;br /&gt;once that printout was broken into two pices by another printouts? I mean for&lt;br /&gt;example if you do: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;In 1st thread: System.out.println("1234567890");&lt;br /&gt;&lt;br /&gt;And in 2nd thread: System.out.println("something else here");&lt;/p&gt;&lt;br /&gt;&lt;p&gt;it never will be broken like:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;12345&lt;br /&gt;&lt;br /&gt;something else here&lt;br /&gt;&lt;br /&gt;67890&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Even if Sun didn't write about it explicitly, we can see that it is synchronized&lt;br /&gt;or at least behaves like synchronized that is the same for our real life.&lt;br /&gt;&lt;br /&gt;How can I pass a string to the command line(DOS) ? Also i want to capture the&lt;br /&gt;output given by the command line in a string.&lt;br /&gt;&lt;br /&gt;Answer: Try this out:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// works for DOS&lt;br /&gt;&lt;br /&gt;String cmds[] = new String[2];&lt;br /&gt;&lt;br /&gt;cmds[0] = "dir"; // replace with "ls" on UNIX&lt;br /&gt;&lt;br /&gt;cmds[1] = "c:"; // replace with "/" on UNIX&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// execute the command&lt;br /&gt;&lt;br /&gt;Process pro = Runtime.getRuntime().exec(cmds);&lt;br /&gt;&lt;br /&gt;// wait until it's done executing&lt;br /&gt;&lt;br /&gt;pro.waitFor();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// what did the process output from the Input pipe back to&lt;br /&gt;&lt;br /&gt;// this process (okay, who named this stuff)?&lt;br /&gt;&lt;br /&gt;InputStream out = pro.getInputStream();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// output it (really slowly)&lt;br /&gt;&lt;br /&gt;int i;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;while ((i = out.read()) != -1) System.out.println((char) i);&lt;br /&gt;&lt;br /&gt;How can I take a program that runs in a DOS shell and send the text that comes&lt;br /&gt;from the shell program into a Java program where it can analyzed, etc.?&lt;br /&gt;&lt;br /&gt;Answer: From a command line, use a pipe (with the "|" symbol):&lt;/p&gt;&lt;br /&gt;&lt;p&gt;c:\&amp;gt; dosprogram | java JavaProgram&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In the Java program, read the text from System.in:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public static void main(String[] args) throws IOException {&lt;br /&gt;&lt;br /&gt;int nLines = 0;&lt;br /&gt;&lt;br /&gt;BufferedReader in =&lt;br /&gt;&lt;br /&gt;new BufferedReader(&lt;br /&gt;&lt;br /&gt;new InputStreamReader( System.in));&lt;br /&gt;&lt;br /&gt;for (;;) {&lt;br /&gt;&lt;br /&gt;String line = in.readLine();&lt;br /&gt;&lt;br /&gt;if (line == null)&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;nLines++;&lt;br /&gt;&lt;br /&gt;System.out.println(nLines + ":" + line);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If there is a way to run a java program by just typing the name in UNIX. I mean&lt;br /&gt;instead of typing for example "java Main" just type "Main"&lt;br /&gt;and run the program. And how to implement that in a makefile?&lt;br /&gt;&lt;br /&gt;Answer: Write a script that runs the program and put it in your path. For&lt;br /&gt;&lt;br /&gt;instance:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;java BlahBlah&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Call this whatever you want, mv it to your /usr/local/bin directory, then just&lt;br /&gt;type it at the command line and BlahBlah will be run.&lt;br /&gt;&lt;br /&gt;Q: Are there any Java libraries for executing Linux commands? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Try java.lang.Runtime.exec(). E.g.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Runtime.getRuntime().exec("xterm"); &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Note if you want to use shell builtins or shell features like&lt;br /&gt;&lt;br /&gt;redirection you need a shell, e.g.:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Runtime.getRuntime().exec(new String[] {"/bin/sh",&lt;br /&gt;&lt;br /&gt;"-c", "ls / 2&amp;gt;&amp;1 | tee ls.log"});&lt;br /&gt;&lt;br /&gt;I'd like to know how to know which operating system java application is running&lt;br /&gt;on.&lt;br /&gt;&lt;br /&gt;Answer: You could try using the system Properties.&lt;br /&gt;&lt;br /&gt;e.g.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Properties prop = System.getProperties();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;String osString = prop.getProperty( "os.name" );&lt;br /&gt;&lt;br /&gt;I would like to know how my Java program can catch when someone sends a "kill"&lt;br /&gt;to my app in Unix or does a Ctrl-C in windows?&lt;br /&gt;&lt;br /&gt;In Unix there is atexit() function that handles this type of situation. Is this&lt;br /&gt;possible in Java ?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Starting with 1.3 there is Runtime.addShutdownHook(). This is for cleanup&lt;br /&gt;only.&lt;br /&gt;&lt;br /&gt;from API: "A shutdown hook is simply an initialized but unstarted thread.&lt;br /&gt;When the virtual machine begins its shutdown sequence it will start all registered&lt;br /&gt;shutdown hooks in some unspecified order and let them run concurrently. When&lt;br /&gt;all the hooks have finished it will then run all uninvoked finalizers if finalization-on-exit&lt;br /&gt;has been enabled.&lt;br /&gt;&lt;br /&gt;Finally, the virtual machine will halt. Note that daemon threads will continue&lt;br /&gt;to run during the shutdown sequence, as will non-daemon threads if shutdown&lt;br /&gt;was initiated by invoking the exit method. Once the shutdown sequence has begun&lt;br /&gt;it can be stopped only by invoking the halt method, which forcibly terminates&lt;br /&gt;the virtual machine.&lt;br /&gt;&lt;br /&gt;Once the shutdown sequence has begun it is impossible to register a new shutdown&lt;br /&gt;hook or de-register a previously-registered hook. Attempting either of these&lt;br /&gt;operations will cause an IllegalStateException to be thrown.&lt;br /&gt;&lt;br /&gt;Shutdown hooks should also finish their work quickly. When a program invokes&lt;br /&gt;exit the expectation is that the virtual machine will promptly shut down and&lt;br /&gt;exit. When the virtual machine is terminated due to user logoff or system shutdown&lt;br /&gt;the underlying operating system may only allow a fixed amount of time in which&lt;br /&gt;to shut down and exit. It is therefore inadvisable to attempt any user interaction&lt;br /&gt;or to perform a long-running computation in a shutdown hook."&lt;br /&gt;&lt;br /&gt;more read here: http://java.sun.com/j2se/1.3/docs/api/index.html&lt;br /&gt;&lt;br /&gt;Q: Is it possible for a minimized window in MS Windows task bar to start blinking?&lt;br /&gt;In any IRC client a minimized window starts blinking when a new message appears&lt;br /&gt;in it. Is it possible in Java?&lt;br /&gt;&lt;br /&gt;Answer: I doubt very much that it is possible with pure java; you would have&lt;br /&gt;to use some native code to achieve that. Maybe what you could try though, is&lt;br /&gt;to play around with the icon used in the title bar of the frame. I haven't tried&lt;br /&gt;this myself - and in any case I'm running linux, but it might be possible to&lt;br /&gt;have two icons and to switch them around at some rate using the Frame.setIconImage(Image)&lt;br /&gt;method. This will only affect the icon itself - not the whole window, but it's&lt;br /&gt;better than nothing.&lt;br /&gt;&lt;br /&gt;By Allen Wallis&lt;br /&gt;&lt;br /&gt;Q: How do I find the list of all system properties?&lt;br /&gt;&lt;br /&gt;Answer: do smth like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Enumeration list = System.getProperties().propertyNames();&lt;br /&gt;&lt;br /&gt;while(list.hasMoreElements()){&lt;br /&gt;&lt;br /&gt;System.out.println((String) list.nextElement());&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Is it cls-like command in DOS (CMD) window? I would like to clean the screen&lt;br /&gt;the user sees?&lt;br /&gt;&lt;br /&gt;Answer: Unfortunately there is no command as "cls", but try this instead:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;for (int i=0; i&amp;lt;25; i++) System.out.println();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It will print 25 empty lines and they will move current printouts up&lt;br /&gt;&lt;br /&gt;Q: Why my program does not give the address of the local machine on one PC and&lt;br /&gt;give on another?&lt;br /&gt;&lt;br /&gt;Answer: As long as you have TCP/IP installed, you should at least get 127.0.0.1&lt;br /&gt;&lt;br /&gt;Can applet corrupt my registry file?&lt;br /&gt;&lt;br /&gt;Q: I have written a java applet for displaying my genealogy. It has worked fine&lt;br /&gt;at home. My brother tested it on my web site with no problems. BUT, the third&lt;br /&gt;person I asked to take a look at it reported, that though it worked fine, when&lt;br /&gt;he exited the page, his system locked up and he had to reboot. After the reboot&lt;br /&gt;he said his registry was corrupted and had to be restored.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Has anyone seen anything like this? if so, do you have any suggestions as to&lt;br /&gt;probable cause and fix?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Any time you don't shutdown properly, your registry can be corrupted,&lt;br /&gt;even if the program that did the freezing was not even using the registry.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The registry is one of the stupidest ideas ever conceived in computer science.&lt;br /&gt;It puts ALL your eggs in one basket.&lt;br /&gt;&lt;br /&gt;by Roedy Green&lt;br /&gt;&lt;br /&gt;For the JAVA GLOSSARY see http://mindprod.com/jgloss.html&lt;br /&gt;&lt;br /&gt;How can I get access to Cookie set at the Client?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The following code should access a cookie on a client. It reads in&lt;br /&gt;all the cookies on the machine. And checks there name for whichever one you&lt;br /&gt;are looking for.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Cookie[] cookies = request.getCookies();&lt;br /&gt;&lt;br /&gt;for(int i=0; i &amp;lt; cookies.length; i++) {&lt;br /&gt;&lt;br /&gt;Cookie thisCookie = cookies[i];&lt;br /&gt;&lt;br /&gt;if (thisCookie.getName().equals("Cookiename")) {&lt;br /&gt;&lt;br /&gt;// Do whatever you want with the cookie....&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;&lt;br /&gt;// cookie doesn't exist...&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The Cookie class is in package javax.servlet.http.Cookie&lt;br /&gt;&lt;br /&gt;I'd like to provide to the showDocument() method of an applet the URL of a CGI&lt;br /&gt;program...&lt;br /&gt;&lt;br /&gt;I'd like to provide to the showDocument() method of an applet the URL of a CGI&lt;br /&gt;program with including a certain number of (URL-encoded) parameters to this&lt;br /&gt;URL (which is the same as doing a GET HTTP request).&lt;br /&gt;&lt;br /&gt;What is the maximum size I can give to this URL ?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: If I remember exactly it something around 240 for many servers. Maybe&lt;br /&gt;less, but not more!!!&lt;br /&gt;&lt;br /&gt;1000000%&lt;br /&gt;&lt;br /&gt;I read it last year in "Java Servlet Programming" from O'Reily.&lt;br /&gt;&lt;br /&gt;I am experimenting a Java server application. This program has worked well&lt;br /&gt;&lt;br /&gt;It did start on the Red Hat Linux 6.0 server, but it does not open the socket,&lt;br /&gt;in other words, it cannot communicate with the client applet on the Linux. On&lt;br /&gt;this Linux server I have installed every components and all of them were running&lt;br /&gt;at the experiment time. Why does this server application communicate with the&lt;br /&gt;client applet only on the Linux? Does anyone give me a suggestion?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Take a look at your port number. If it is under 1024, it is a protected&lt;br /&gt;port&lt;br /&gt;&lt;br /&gt;number and non-privileged users cannot touch it on Linux or any other&lt;br /&gt;&lt;br /&gt;Unix-system.&lt;br /&gt;&lt;br /&gt;Where Can I find a server to try my servlets?&lt;br /&gt;&lt;br /&gt;Q: Hi guys!&lt;br /&gt;&lt;br /&gt;I am creating a client/server application. I don't run my own server&lt;br /&gt;&lt;br /&gt;and my ISP won't allow me to install and run applications from their&lt;br /&gt;&lt;br /&gt;server.&lt;br /&gt;&lt;br /&gt;Does anyone know of anywhere (preferably FREE) that will allow&lt;br /&gt;&lt;br /&gt;me to use server side Java? Any help is GREATLY appreciated.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: http://www.mycgiserver.com/&lt;br /&gt;&lt;br /&gt;Hi, I am using servlets. I need to store an object NOT a string in a cookie.&lt;br /&gt;Is that possible? The helpfile says BASE64 encoding is suggested for use with&lt;br /&gt;binary values. How can I do that???&lt;br /&gt;&lt;br /&gt;Answer: You could serialize the object into a ByteArrayOutputStream and then&lt;br /&gt;Base64 encode the resulting byte []. Keep in mind the size limitations of a&lt;br /&gt;cookie and the overhead of transporting it back and forth between the browser&lt;br /&gt;and the server.&lt;br /&gt;&lt;br /&gt;Limitations are:&lt;br /&gt;&lt;br /&gt;* at most 300 cookies&lt;/p&gt;&lt;br /&gt;&lt;p&gt; * at most 4096 bytes per cookie (as measured by the characters that comprise&lt;br /&gt;the cookie non-terminal in the syntax description of the Set-Cookie2 header,&lt;br /&gt;and as received in the Set-Cookie2 header)&lt;/p&gt;&lt;br /&gt;&lt;p&gt; * at most 20 cookies per unique host or domain name&lt;br /&gt;&lt;br /&gt;For more details please refer to RFC 2965.&lt;br /&gt;&lt;br /&gt;Q: Hi, I want to send a POST request, but I can't find such functionality in&lt;br /&gt;the servlet API, how can I do this? Must I implement this with a socket connection&lt;br /&gt;to port 80?&lt;br /&gt;&lt;br /&gt;Answer: A servlet can do anything a standalone Java application can do. It doesn't&lt;br /&gt;need anything beyond what the java.net package already provides. You can use&lt;br /&gt;an httpURLConnection to POST to a server program like a servlet or CGI script:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// Create a string with the parms you want to post and convert it to a byte&lt;br /&gt;array. You may need to&lt;br /&gt;&lt;br /&gt;// pass the values through java.net.URLEncoder.encodeURL()&lt;br /&gt;&lt;br /&gt;// if they have embedded blanks or special characters&lt;/p&gt;&lt;br /&gt;&lt;p&gt;String parms = "a=10" + "&amp;amp;b=20" + "&amp;c=30";&lt;br /&gt;&lt;br /&gt;byte[] bytes = parms.getBytes();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// Create a URL pointing to the servlet or CGI script and open an HttpURLConnection&lt;br /&gt;on that URL&lt;/p&gt;&lt;br /&gt;&lt;p&gt;URL url = new URL(TARGET_URL);&lt;br /&gt;&lt;br /&gt;HttpURLConnection con = (HttpURLConnection) url.openConnection();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// Indicate that you will be doing input and output, that the method is POST,&lt;br /&gt;and that the content&lt;br /&gt;&lt;br /&gt;// length is the length of the byte array&lt;/p&gt;&lt;br /&gt;&lt;p&gt;con.setDoOutput(true);&lt;br /&gt;&lt;br /&gt;con.setDoInput(true);&lt;br /&gt;&lt;br /&gt;con.setRequestMethod("POST");&lt;br /&gt;&lt;br /&gt;con.setRequestProperty("Content-length", String.valueOf(bytes.length));&lt;/p&gt;&lt;br /&gt;&lt;p&gt;// Write the parameters to the URL output stream&lt;/p&gt;&lt;br /&gt;&lt;p&gt;OutputStream out = con.getOutputStream();&lt;br /&gt;&lt;br /&gt;out.write(bytes);&lt;br /&gt;&lt;br /&gt;out.flush();&lt;br /&gt;&lt;br /&gt;// Read the response&lt;br /&gt;&lt;br /&gt;BufferedReader in = new BufferedReader(&lt;br /&gt;&lt;br /&gt;new InputStreamReader(con.getInputStream()));&lt;br /&gt;&lt;br /&gt;while (true) {&lt;br /&gt;&lt;br /&gt;String line = in.readLine();&lt;br /&gt;&lt;br /&gt;if (line == null) break;&lt;br /&gt;&lt;br /&gt;System.out.println(line);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;in.close();&lt;br /&gt;&lt;br /&gt;out.close();&lt;br /&gt;&lt;br /&gt;con.disconnect();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;--&lt;br /&gt;&lt;br /&gt;Phil Hanna&lt;br /&gt;&lt;br /&gt;Author of Instant Java Servlets&lt;br /&gt;&lt;br /&gt;http://www.philhanna.com&lt;br /&gt;&lt;br /&gt;I am writing an application, using Java Servlets, which requires me to set and&lt;br /&gt;read cookies. It works okay, but fails if I set the domain of the cookie to&lt;br /&gt;something other than the current server.&lt;br /&gt;&lt;br /&gt;I am writing an application, using Java Servlets, which requires me to set and&lt;br /&gt;read cookies.&lt;br /&gt;&lt;br /&gt;Using the servlet API, and the javax.servlet.http.Cookie class.&lt;br /&gt;&lt;br /&gt;I created a new cookie, and added it to the http response, using its addCookie()&lt;br /&gt;method. It works okay, but fails if I use the setDomain method, on the newly&lt;br /&gt;created cookie, to set the domain of the cookie to something other than the&lt;br /&gt;current server.&lt;br /&gt;&lt;br /&gt;Answer: I suspect that is not a legal operation for any browser to&lt;br /&gt;&lt;br /&gt;accept a cookie that has a domain inconsistent with the source&lt;br /&gt;&lt;br /&gt;of the cookie.&lt;br /&gt;&lt;br /&gt;by William Brogden&lt;br /&gt;&lt;br /&gt;I am working on weblogic server 5.1 with MsSQLSERVER7 i am able to load the&lt;br /&gt;driver but it says unable to get socket connection&lt;br /&gt;&lt;br /&gt;I am working on weblogic server 5.1 with MsSQLSERVER7 i am able to load the&lt;br /&gt;driver but it says unable to get socket connection.It says connect to the MSSQLSERVER's&lt;br /&gt;host and port no.&lt;br /&gt;&lt;br /&gt;How do I get these name and value.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: The MS Sql Server's host is usually the name or ip of the server that&lt;br /&gt;run SQL Server, if you know the IP (ping &amp;lt;nameoftheserver&amp;gt;), put the IP&lt;br /&gt;in it, it will be faster, for the Port number, sincerely I don't&lt;br /&gt;&lt;br /&gt;remember the standard port, but look into the SQL Server documentation and you&lt;br /&gt;will find it.&lt;br /&gt;&lt;br /&gt;by Davide&lt;br /&gt;&lt;br /&gt;Whenever I compile my servlets it always says "can't find package javax.*"&lt;br /&gt;even though I downloaded the JSDK. Where the JSDK files so it'll find that package?&lt;br /&gt;&lt;br /&gt;Answer: There are no classes in the javax.* package. There are classes in javax.servlet.*&lt;br /&gt;and javax.servlet.http.*, but neither are really related to javax.* -- importing&lt;br /&gt;javax.* won't affect them. You should import the packages that you really want&lt;br /&gt;to use!&lt;br /&gt;&lt;br /&gt;Q: I have a list of html links on a web page, and I want to be able to call&lt;br /&gt;a servlet based on what the user clicked on...&lt;br /&gt;&lt;br /&gt;I used:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;a href=/servlet/SomeServlet"&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;for each link, and I want the servlet to display information based on what&lt;br /&gt;the user clicked on. If the user click on an applet link, I want the Servlet&lt;br /&gt;to print, "You just clicked on an&lt;br /&gt;&lt;br /&gt;applet", etc.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;My question is, how do I send information to a servlet, based on what html&lt;br /&gt;link the user clicked on? I know i can use getParamaterValue() for getting information&lt;br /&gt;off of forms, but I'm not sure how to do this with html tags.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Change the link to:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;A href="/servlet/SomeServlet?click=apple"&amp;gt;link&amp;lt;/A&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In the servlet, use request.getParameter("click") to retrieve the&lt;br /&gt;value.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Give each link a unique "click" value and that will tell you what&lt;br /&gt;was&lt;br /&gt;&lt;br /&gt;clicked.&lt;br /&gt;&lt;br /&gt;B Russell&lt;br /&gt;&lt;br /&gt;An idea for validating the phone number field on a form..,&lt;br /&gt;&lt;br /&gt;Q: Does anyone have an idea for validating the phone number field on a form.&lt;br /&gt;I am looking for something that will basically check this input mask &lt;/p&gt;&lt;br /&gt;&lt;p&gt;*111*111*1111*&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Where the 1's are number's and the *'s are either - . spaces, or any&lt;br /&gt;&lt;br /&gt;other character like (). Please advise.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer1: You could use a regular expression package. For example, Jakarta ORO:&lt;br /&gt;&lt;br /&gt;http://jakarta.apache.org/oro/&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: i'm thinking regular expressions. See:&lt;br /&gt;&lt;br /&gt;http://www.cacas.org/java/gnu/regexp/&lt;br /&gt;&lt;br /&gt;http://www.crocodile.org/~sts/Rex/&lt;br /&gt;&lt;br /&gt;How does Java read the text files? Can Java read the files that are in other&lt;br /&gt;formats? Is the read file method in Java only recognizes the file in .txt or&lt;br /&gt;other text format?&lt;br /&gt;&lt;br /&gt;Answer: Java can read any text file ( using a java.io.FileReader for example&lt;br /&gt;), the attribute at the end is an indictor and thus is not relevant as long&lt;br /&gt;as the actual code read is in the correct format. I It can read files that are&lt;br /&gt;in other formats bytes etc and if you have a wierd format you could extend the&lt;br /&gt;IO mechanism with some work to work with that.&lt;br /&gt;&lt;br /&gt;Could someone show me a basic File I/O example? I just can't figure out streams.&lt;br /&gt;I'm willing to accept basic mockery in exchange...&lt;br /&gt;&lt;br /&gt;Q: Could someone show me a basic File I/O example? I just can't figure out streams.&lt;br /&gt;I'm willing to accept basic mockery in exchange...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer:&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public class FileIO {&lt;/p&gt;&lt;br /&gt;&lt;p&gt; public static void main(String[] args) throws Exception {&lt;br /&gt;&lt;br /&gt;if(args.length!=1){&lt;br /&gt;&lt;br /&gt;System.out.println("Invalid parameters!!!");&lt;br /&gt;&lt;br /&gt;System.exit(0);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;File fl = new File(args[0]);&lt;br /&gt;&lt;br /&gt;FileReader fileReader = new FileReader(fl);&lt;br /&gt;&lt;br /&gt;BufferedReader bufferedReader = new BufferedReader(fileReader);&lt;br /&gt;&lt;br /&gt;String currentLine;&lt;br /&gt;&lt;br /&gt;while( (currentLine = bufferedReader.readLine()) != null ){&lt;br /&gt;&lt;br /&gt;System.out.println(currentLine);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I've got a (simple) menu on a new application and am trying to put in the works&lt;br /&gt;behind the cut, copy &amp; paste menu options - does anyone know how I can do&lt;br /&gt;this - what's the code or can you point me in the right direction?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Look at java.awt.datatransfer package. It contains much of the tools&lt;br /&gt;necessary to implement cut. copy, paste.&lt;br /&gt;&lt;br /&gt;Can anyone please explain clearly how BufferedReader works and how to use it&lt;br /&gt;to get input from a keyboard?&lt;br /&gt;&lt;br /&gt;Q: Can anyone please explain clearly how BufferedReader works and how to use&lt;br /&gt;it to get input from a keyboard?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: BufferedReader is a filter reader class.&lt;br /&gt;&lt;br /&gt;That is, it wraps another reader and reading from it is like reading from the&lt;br /&gt;reader it wraps, except that it changes something. In the case of BufferedReader,&lt;br /&gt;it reads in large chunks and then you can retrieve its data in smaller bits.&lt;br /&gt;To use it to read from System.in, you first need a reader to wrap. You can bridge&lt;br /&gt;from an input stream (which System.in is) to a reader by using an InputStreamReader.&lt;br /&gt;&lt;br /&gt;Then wrap that in a BufferedReader as follows:&lt;/p&gt;&lt;br /&gt;&lt;p&gt; BufferedReader input = new BufferedReader(new InputStreamReader(System.in));&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now you can call methods of BufferedReader to read from standard input. Generally,&lt;br /&gt;you create a BufferedReader to be able to call the readLine() method. That isn't&lt;br /&gt;BufferedReader's main intended use -- the main intended use is performance --&lt;br /&gt;but you don't generally care too awfully much about performance of reads from&lt;br /&gt;the console. So call readLine to get a line of input, which will be null on&lt;br /&gt;end of stream (user presses Ctrl-D on UNIX or a file was redirected in and is&lt;br /&gt;done).&lt;br /&gt;&lt;br /&gt;answered by Chris Smith&lt;br /&gt;&lt;br /&gt;How do I encode the value of a variable of type long (or int) into bytes? And&lt;br /&gt;how do I restore the original value of the long (or int) variable back&lt;br /&gt;&lt;br /&gt;How do I encode the value of a variable of type long (or int) into bytes such&lt;br /&gt;that the number of bytes used will always be the same, say 4 bytes?&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;int in; ...&lt;br /&gt;&lt;br /&gt;byte b1 = (byte)(in &amp;amp; 0xff);&lt;br /&gt;&lt;br /&gt;byte b2 = (byte)((in &amp;gt;&amp;gt; 8) &amp;amp; 0xff);&lt;br /&gt;&lt;br /&gt;byte b3 = (byte)((in &amp;gt;&amp;gt; 16) &amp;amp; 0xff);&lt;br /&gt;&lt;br /&gt;byte b4 = (byte)(in &amp;gt;&amp;gt;&amp;gt; 24);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;: How do I restore the original value of the long (or int) variable back&lt;br /&gt;&lt;br /&gt;: from the bytes that i have just created then?&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;int in = (b1 &amp; 0xff) | ((b2 &amp;lt;&amp;lt; 8) &amp; 0xff00) |&lt;br /&gt;&lt;br /&gt;((b3 &amp;lt;&amp;lt; 24) &amp;gt;&amp;gt;&amp;gt; 8) | (b4 &amp;lt;&amp;lt; 24);&lt;br /&gt;&lt;br /&gt;by Tim Tyler&lt;br /&gt;&lt;br /&gt;Is there any Java API allowing creating easily PDF files (Adobe Acrobat type)&lt;br /&gt;including images?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: No, just text&lt;br /&gt;&lt;br /&gt;Etymon™ PJ is a developer toolkit for parsing, modifying, and creating&lt;br /&gt;PDF documents.&lt;br /&gt;&lt;br /&gt;http://www.etymon.com/pj/index.html&lt;br /&gt;&lt;br /&gt;Are there any public domain matrix/linear algebra java packages out there?&lt;br /&gt;&lt;br /&gt;I'm mainly interested in solving systems of equations and finding matrix inverses.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: http://math.nist.gov/javanumerics/&lt;br /&gt;&lt;br /&gt;The JavaNumerics page provides a focal point for information on numerical computing&lt;br /&gt;in Java.&lt;br /&gt;&lt;br /&gt;Does anyone know how to write multi-line string in Java?&lt;br /&gt;&lt;br /&gt;Answer: Something like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;String a =&lt;br /&gt;&lt;br /&gt;"This is a&lt;br /&gt;&lt;br /&gt;multiline string.";&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It is really pain to print HTML or XML from the Java program. Perl offer something&lt;br /&gt;like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;print &amp;lt;&amp;lt;END_HTML;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;h1&amp;gt;this is html.&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;END_HTML;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Try this:&lt;br /&gt;&lt;br /&gt;String a = "This is a\nmultiline string"&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A "\n" stands for a line feed. Take a look at the Java language specification&lt;br /&gt;(downloadable on Sun's site), it has a section about strings.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2: You mean like this?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;String a = "&amp;lt;html&amp;gt;" +&lt;br /&gt;&lt;br /&gt;" &amp;lt;body&amp;gt;" +&lt;br /&gt;&lt;br /&gt;" &amp;lt;h1&amp;gt;this is html.&amp;lt;/h1&amp;gt;" +&lt;br /&gt;&lt;br /&gt;" &amp;lt;/body&amp;gt;" +&lt;br /&gt;&lt;br /&gt;"&amp;lt;/html&amp;gt;";&lt;br /&gt;&lt;br /&gt;I am doing some servlet programming and I need to include a few " in a&lt;br /&gt;string. How can I do this?&lt;br /&gt;&lt;br /&gt;Answer: By using the escape character \ like so:&lt;br /&gt;&lt;br /&gt;String s = "\"";&lt;br /&gt;&lt;br /&gt;I cannot find the method to convert a binary number to an int. I used Integer.toBinaryString&lt;br /&gt;to get a decimal to binary but I don't know how to to convert it back.&lt;br /&gt;&lt;br /&gt;Answer: Try using Integer.parseInt(String s, int radix) with radix = 2&lt;br /&gt;&lt;br /&gt;that should do your job.&lt;br /&gt;&lt;br /&gt;How do I launch a native Document by its Associated MIME Type? For example,&lt;br /&gt;I would like to ask the 'operating system' what application is associated with&lt;br /&gt;.DOC and then launch it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: On WinNt,&lt;/p&gt;&lt;br /&gt;&lt;p&gt;String docName = "c:\\someyourdir\\nameofdoc.doc";&lt;br /&gt;&lt;br /&gt;Runtime.getRuntime().exec("cmd.exe /c "+docName);&lt;br /&gt;&lt;br /&gt;Q: How do I indicate Unicode characters that cannot be represented in ASCII,&lt;br /&gt;such as ö?&lt;br /&gt;&lt;br /&gt;Answer: from "Java Tutorial (http://java.sun.com/docs/books/tutorial/i18n/text/convertintro.html)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"To indicate Unicode characters that cannot be represented in ASCII, such&lt;br /&gt;as o, we used the \uXXXX escape sequence. Each X in the escape sequence is a&lt;br /&gt;hexadecimal digit. The following example shows how to indicate the o character&lt;br /&gt;with an escape sequence: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;String str = "\u00F6";&lt;br /&gt;&lt;br /&gt;char c = '\u00F6';&lt;br /&gt;&lt;br /&gt;Character letter = new Character ('\u00F6'); "&lt;br /&gt;&lt;br /&gt;When I tried to read one string representing boolean value and convert it into&lt;br /&gt;boolean it didn't work. Finally I found that Java API has a bug!&lt;br /&gt;&lt;br /&gt;Q: I wrote the program that uses redaing ini file settings for initialization.&lt;br /&gt;All settings in a file are strings. I am converting them to appropriate type&lt;br /&gt;during reading. When I tried to read one string representing boolean value and&lt;br /&gt;convert it into boolean it didn't work. Finally I found that Java API has a&lt;br /&gt;bag:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;boolean x = true;&lt;br /&gt;&lt;br /&gt;getBoolean(x);&lt;br /&gt;&lt;br /&gt;will show false!!!!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Why Java has method that doesn't work? Is it bug in Java or I am stupid? &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: neither statement is true! It is not a bug and you are Ok! Just please&lt;br /&gt;read more carefully JavaDoc next time.&lt;br /&gt;&lt;br /&gt;It is written there for getBoolean ():&lt;br /&gt;&lt;br /&gt;"Returns is true if and only if the system property named by the argument&lt;br /&gt;exists and is equal to the string "true".&lt;br /&gt;&lt;br /&gt;(Beginning with Java 1.0.2, the test of this string is case insensitive.)&lt;br /&gt;&lt;br /&gt;A system property is accessible through getProperty, a method defined by the&lt;br /&gt;System class."&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So you didn't use this method properly...&lt;br /&gt;&lt;br /&gt;Use instead:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public static Boolean valueOf(String s)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This method returns the boolean value represented by the specified String.&lt;br /&gt;A new Boolean object is constructed. This Boolean contains the value true if&lt;br /&gt;the string argument is not null and is equal, ignoring case, to the string "true".&lt;/p&gt;&lt;br /&gt;&lt;p&gt;example:&lt;br /&gt;&lt;br /&gt;boolean x= true;&lt;br /&gt;&lt;br /&gt;(Boolean.valueOf(x)).booleanValue()&lt;br /&gt;&lt;br /&gt;gives you proper boolean (not Boolean!) value&lt;br /&gt;&lt;br /&gt;Q: I'm working on a java project and looking for a better API that can generate&lt;br /&gt;PDF, work with Excel, Word documents... Where can I find it?&lt;br /&gt;&lt;br /&gt;Answer: We have a list here:&lt;br /&gt;&lt;br /&gt;http://www.javafaq.nu/java/office/index.shtml&lt;br /&gt;&lt;br /&gt;Q: I'm looking for a rich text editor that I can embed within a web page, and&lt;br /&gt;allow users to enter rich text that I can in turn store as HTML.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I've seen similar applets through web based e-mail clients. I'd appreciate&lt;br /&gt;it if someone could point me in the right direction!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer:&lt;br /&gt;&lt;br /&gt;Try Swing, by Robinson, Manning Publication. You could probably adjust the code&lt;br /&gt;to fit into the applet style.&lt;br /&gt;&lt;br /&gt;It is here&lt;/p&gt;&lt;br /&gt;&lt;p&gt;http://javafaq.nu/java/free-swing-book/free-swing-book-chapter20.shtml&lt;br /&gt;&lt;br /&gt;John&lt;br /&gt;&lt;br /&gt;Q: I want to have a while loop execute for a maximum of n seconds or until it&lt;br /&gt;receives something in an input stream. How would I do this?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: I think you could do it this way:&lt;br /&gt;&lt;br /&gt;********************************************&lt;br /&gt;&lt;br /&gt;InputStream Input=null;&lt;br /&gt;&lt;br /&gt;int n=10; /*Number of seconds to wait*/&lt;br /&gt;&lt;br /&gt;/*initialize you input stream*/&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;/*Now start you while loop*/&lt;/p&gt;&lt;br /&gt;&lt;p&gt;long lStart = (new Date()).getTime();&lt;br /&gt;&lt;br /&gt;long lCurrent = (new Date()).getTime();&lt;/p&gt;&lt;br /&gt;&lt;p&gt;while((lCurrent-lStart &amp;lt; n*1000) &amp;&amp;amp; (Input.available()==0)){&lt;br /&gt;&lt;br /&gt;Thread.currentThread.sleep(100); /* This will give JVM time to other threads&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;lCurrent = (new Date()).getTime();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;********************************************&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You could simply count number of steps inside the loop keeping in mind that&lt;br /&gt;each step takes 100ms but I think using dates would be a bit more precise method.&lt;br /&gt;&lt;br /&gt;Alex Shlega&lt;br /&gt;&lt;br /&gt;Can anyone please explain the difference between the two types: green threads&lt;br /&gt;and native threads?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: Green threads is thread mechanism implemented in JVM itself.&lt;br /&gt;&lt;br /&gt;It is blind and can run on any OS, so actually all threads are run in one&lt;br /&gt;&lt;br /&gt;native thread and scheduling is up to JVM. This is disadvantageously for&lt;br /&gt;&lt;br /&gt;SMP systems, since only one processor can serve Java application.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Native threads is a mechanism based on OS threading mechanism. This allows&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to use features of hardware and OS. For example,there is IBM's JDK for&lt;br /&gt;&lt;br /&gt;AIX that supports native threads. The perfomance of applications&lt;br /&gt;&lt;br /&gt;can be highly imploved by this.&lt;br /&gt;&lt;br /&gt;I'm having trouble getting sleep to work properly. It seems to just return immediately,&lt;br /&gt;and not sleep for the requested time. Is there some trick I need to know about?&lt;br /&gt;The docs say that sleep takes an argument in milli-seconds, but sleep(10000)&lt;br /&gt;seems to return immediately.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer: It can happen if another thread interrupts your sleeping thread.&lt;br /&gt;&lt;br /&gt;sleep(10000) says that it just can sleep 10 sec if nobody needs it. That is&lt;br /&gt;reason why you do&lt;br /&gt;&lt;br /&gt;try{&lt;br /&gt;&lt;br /&gt;sleep(10000);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;catch(InterruptedException x){&lt;br /&gt;&lt;br /&gt;//do smth here&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You just try, it is not an order. It tries but not always sleeps!&lt;br /&gt;&lt;br /&gt;Hi, Is there somebody who can tell me why my thread sleeps longer then I told&lt;br /&gt;him to do...&lt;br /&gt;&lt;br /&gt;I have a thread that has to sleep for 60000 millesec. But every 4, 5 minutes&lt;br /&gt;&lt;br /&gt;it sleeps for 61000 millesec.? I have to built an application that get the&lt;br /&gt;&lt;br /&gt;time every minute, but with this sleep I can't trust the java threads.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So can somebody tell me what is going wrong???&lt;br /&gt;&lt;br /&gt;Answer: Really JDK never give you warranty that will wake your thread after&lt;br /&gt;XXX ms.&lt;br /&gt;&lt;br /&gt;You can be sure only&lt;br /&gt;&lt;br /&gt;that your thread will not be waked up before!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For good timing you should take another, better for real time perfomance, VM.&lt;br /&gt;&lt;br /&gt;For example PERC from Nemonics.com or something else...&lt;br /&gt;&lt;br /&gt;I have created a program with a main method that instantiates and starts three&lt;br /&gt;threads, the first two of which are daemons. Why daemons does die when normal&lt;br /&gt;thread die?&lt;br /&gt;&lt;br /&gt;Answer: Because of nature of daemon threads. They are alive if exists at least&lt;br /&gt;one "normal user's" thread. Otherwise they die immediately&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114198660456632667?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114198660456632667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114198660456632667&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114198660456632667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114198660456632667'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/03/java-faq.html' title='Java FAQ'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114198645368013803</id><published>2006-03-10T10:26:00.000Z</published><updated>2006-03-10T10:27:33.760Z</updated><title type='text'>Java Misc</title><content type='html'>Misc&lt;br&gt;&lt;br /&gt;1. What is Maven? &lt;br&gt;&lt;br /&gt;Maven is a Java project management and project comprehension tool developed by &lt;br /&gt;http://maven.apache.org. Maven is based on the concept of a project object model &lt;br /&gt;(POM) in that all the artifacts produced by Maven are a result of consulting a &lt;br /&gt;well defined model for your project. Builds, documentation, source metrics, source &lt;br /&gt;cross-references and a countless number of reports are all controlled by your &lt;br /&gt;POM. Maven has the following features. &lt;br&gt;&lt;br /&gt;o Making the build process easy &lt;br&gt;&lt;br /&gt;o Providing a uniform build system &lt;br&gt;&lt;br /&gt;o Providing quality project information &lt;br&gt;&lt;br /&gt;o Providing clear development process guidelines &lt;br&gt;&lt;br /&gt;o Providing guidelines for thorough testing practices &lt;br&gt;&lt;br /&gt;o Providing coherent visualization of project information &lt;br&gt;&lt;br /&gt;o Allowing transparent migration to new features &lt;br /&gt;&lt;p&gt;2. What is JPay? &lt;br&gt;&lt;br /&gt;  The JPay is Java payment API. It supports payments in an open, Web-like environment &lt;br /&gt;  and allow Java applications to use a third-party payment service to charge users &lt;br /&gt;  for using an application or accessing content. For more information, please &lt;br /&gt;  visit this page &lt;/p&gt;&lt;br /&gt;&lt;p&gt;3. What is Jeson? &lt;br&gt;&lt;br /&gt;  Jetson is an automation toolset designed to simplify and speed the development &lt;br /&gt;  and deployment of J2EE applications. Jetson enables rapid Enterprise JavaBean &lt;br /&gt;  (EJB)-based application generation; allows business rules to be exposed as Web &lt;br /&gt;  services; supports most common databases; and features a security model that &lt;br /&gt;  conforms to Java Authentication and Authorization Service (JAAS). More information &lt;br /&gt;  can be found at http://www.JetsonJ2EE.com.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;4. What is Jamaica? &lt;br&gt;&lt;br /&gt;  Jamaica (like Jasmin) is an abstract assembly language for Java Virtual Machine(JVM). &lt;br /&gt;  It uses Java language syntax to define class structures and uses mnemonics or &lt;br /&gt;  symbolic names in instructions for variables, parameters, data fields, constants, &lt;br /&gt;  and labels. JVM bytecode is hard to read and can be viewed via javap utility &lt;br /&gt;  to decompile a class file. For example, you may view a compiled class file as &lt;br /&gt;  follows: &lt;br&gt;&lt;br /&gt;  javap -c anyCompiledClassName&lt;br&gt;&lt;br /&gt;  You will see the decompiled JVM bytecode displayed on the screen. But when you &lt;br /&gt;  use Jamaica to write code, it is easy to read. For example, the HelloWorld class &lt;br /&gt;  may be written as follows. &lt;br&gt;&lt;br /&gt;  public class HelloWorld {&lt;br&gt;&lt;br /&gt;  public static void main(String[] args) {&lt;br&gt;&lt;br /&gt;  %println &amp;quot;Hello, World!&amp;quot;&lt;br&gt;&lt;br /&gt;  %println &amp;quot;Hello, World!&amp;quot;&lt;br&gt;&lt;br /&gt;  %println &amp;quot;This is NOT an error!&amp;quot;&lt;br&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;  The %println is JVM macro. It needs Jamaica to compile and run &lt;/p&gt;&lt;br /&gt;&lt;p&gt;5. What is WML? &lt;br&gt;&lt;br /&gt;  Wireless Markup Language (WML) page is delivered over Wireless Application Protocol &lt;br /&gt;  (WAP) and the network configuration requires a gateway to translate WAP to HTTP &lt;br /&gt;  and back again. It can be generated by a JSP page or servlet running on the &lt;br /&gt;  J2EE server. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;6. What software development methodologies are prevailing? &lt;br&gt;&lt;br /&gt;  o Rational Unified Process(RUP) -- Model-driven architecture, design and development; &lt;br /&gt;  customizable framework for scalable processes; developed and marketed by Rational &lt;br /&gt;  company. &lt;br&gt;&lt;br /&gt;  o Enterprise Unified Process(EUP) -- extension of RUP(add: production, retirement, &lt;br /&gt;  operations,support and enterprise disciplines.) &lt;br&gt;&lt;br /&gt;  o Personal Software Process(PSP) -- Self-calibration. &lt;br&gt;&lt;br /&gt;  o Team Software Process(TSP) -- Extends PSP with specific roles. &lt;br&gt;&lt;br /&gt;  o Agile Modeling (AM)-- Feature-driven, test often. &lt;br&gt;&lt;br /&gt;  o Extreme Programming(XP) -- Effective pair-programming. &lt;br&gt;&lt;br /&gt;  o Reuse -- Across multiple providers. &lt;br&gt;&lt;br /&gt;  ? Architecture-driven reuse -- domain component &lt;br&gt;&lt;br /&gt;  ? Artifact reuse -- use cases, standards docu, models, procesures, guidelines,etc. &lt;br /&gt;  &lt;br&gt;&lt;br /&gt;  ? Code reuse -- source code, across multiple applications, etc. &lt;br&gt;&lt;br /&gt;  ? Component reuse -- fully-encapsulated, well tested components. &lt;br&gt;&lt;br /&gt;  ? Framework reuse -- collections of classes with basic funtionality of a common &lt;br /&gt;  tech or business domain. &lt;br&gt;&lt;br /&gt;  ? Inheritance reuse -- taking advantagle of behavior implemented in existing &lt;br /&gt;  classes. &lt;br&gt;&lt;br /&gt;  ? Pattern reuse -- publicly documented approaches to solve common problems. &lt;br /&gt;  &lt;br&gt;&lt;br /&gt;  ? Template reuse -- common set of layouts for key development artifacts. &lt;br&gt;&lt;br /&gt;  o Note: They are all iterative development methodologies. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;7. What are orthogonal dimensions in software development? &lt;br&gt;&lt;br /&gt;  There are several popular orthogonal dimensions listed as follows&lt;br&gt;&lt;br /&gt;  o Top-down vs. bottom-up. &lt;br&gt;&lt;br /&gt;  o Waterfall vs. incremental. &lt;br&gt;&lt;br /&gt;  o Iterative vs. concurrent. &lt;br&gt;&lt;br /&gt;  o Planned vs. mining. &lt;br&gt;&lt;br /&gt;  o Same team vs. different team. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br&gt;&lt;br /&gt;  8. What is domain engineering(DE)? &lt;br&gt;&lt;br /&gt;  Domain engineering(DE) is a process that produces reusable assets including &lt;br /&gt;  components, web services, generators, frameworks, models and documents, for &lt;br /&gt;  subsequent use in the development of applications or product line.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;9. What is domain analysis(DA)? &lt;br&gt;&lt;br /&gt;  Domain analysis(DA) is the front part of domain engineering(DE), which analyzes &lt;br /&gt;  the anticipated applications, technology trends, standards,and existing assets &lt;br /&gt;  to develop a model of commonality, variability and initial features into reusable &lt;br /&gt;  assets. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;10. What are alpha, beta or gamma version of a software? &lt;br&gt;&lt;br /&gt;  o alpha -- the release contains some large section of new code that hasn't been &lt;br /&gt;  100% tested. &lt;br&gt;&lt;br /&gt;  o beta -- all new code has been tested, no fatal bugs. &lt;br&gt;&lt;br /&gt;  o gamma -- a beta that has been around a while and seems to work fine. Only &lt;br /&gt;  minor fixes are added. The so-called a release. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;11. What is the difference between component and class? &lt;br&gt;&lt;br /&gt;  A component is a finished class, whereas a class is a design schema. A component &lt;br /&gt;  is ready to be used as a member of a class and a class may consist of many components(classes). &lt;br /&gt;  Component and class names may be exchangeble in context. For example, a Button &lt;br /&gt;  is a component and also a class. MyWindow class may contain several buttons. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;12. What is JUnit? &lt;br&gt;&lt;br /&gt;  JUnit is a unit-testing framework. Unit-testing is a means of verifying the &lt;br /&gt;  results you expect from your classes. If you write your test before hand and &lt;br /&gt;  focus your code on passing the test you are more likely to end up with simple &lt;br /&gt;  code that does what it should and nothing more. Unit-testing also assists in &lt;br /&gt;  the refactoring process. If your code passes the unit-test after refactoring &lt;br /&gt;  you will know that you haven't introduced any bugs to it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;13. What is the difference between Java and PL/SQL? &lt;br&gt;&lt;br /&gt;  Java is a general programming language. PL/SQL is a database query languague, &lt;br /&gt;  especially for Oracle database.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Beyhan Meyrali 2007 / London UK&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23793039-114198645368013803?l=javafish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafish.blogspot.com/feeds/114198645368013803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=23793039&amp;postID=114198645368013803&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114198645368013803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/23793039/posts/default/114198645368013803'/><link rel='alternate' type='text/html' href='http://javafish.blogspot.com/2006/03/java-misc.html' title='Java Misc'/><author><name>Beyhan Meyrali - Biser Hristov</name><uri>http://www.blogger.com/profile/08404670817733108519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_cOtyOFydhww/TQqA9MpAhsI/AAAAAAAAB9M/b0qzTubsq2k/S220/BursaAltiParmak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-23793039.post-114198610269913192</id><published>2006-03-10T10:19:00.000Z</published><updated>2006-03-10T10:25:55.066Z</updated><title type='text'>Basic Java Info</title><content type='html'>Chapter1. Language Fundamentals&lt;br /&gt;&lt;p&gt;Java Programming Language Keywords&lt;br /&gt;&lt;br /&gt; • Keywords cannot be used as identifiers (names) for classes, methods,&lt;br /&gt; variables, or anything else in your code.&lt;br /&gt;&lt;br /&gt; • All keywords start with a lowercase letter.&lt;br /&gt;&lt;br /&gt; Literals and Ranges of All Primitive Data Types&lt;br /&gt;&lt;br /&gt; • All six number types in Java are signed, so they can be positive or&lt;br /&gt; negative.&lt;br /&gt;&lt;br /&gt; • Use the formula -2(bits-1) to 2(bits-1)-1 to determine the range of&lt;br /&gt; an integer type.&lt;br /&gt;&lt;br /&gt; • A char is really a 16-bit unsigned integer.&lt;br /&gt;&lt;br /&gt; • Literals are source code representations of primitive data types, or&lt;br /&gt; String.&lt;br /&gt;&lt;br /&gt; • Integers can be represented in octal (0127), decimal (1245), and hexadecimal&lt;br /&gt; (0XCAFE).&lt;br /&gt;&lt;br /&gt; • Numeric literals cannot contain a comma.&lt;br /&gt;&lt;br /&gt; • A char literal can be represented as a single character in single quotes&lt;br /&gt; (‘A’).&lt;br /&gt;&lt;br /&gt; • A char literal can also be represented as a Unicode value (‘\u0041’).&lt;br /&gt;&lt;br /&gt; • A char literal can also be represented as an integer, as long as the&lt;br /&gt; integer is less than 65536.&lt;br /&gt;&lt;br /&gt; • A boolean literal can be either true or false.&lt;br /&gt;&lt;br /&gt; • Floating-point literals are always double by default; if you want a&lt;br /&gt; float, you must append an F or f to the literal.&lt;br /&gt;&lt;br /&gt; Array Declaration, Construction, and Initialization&lt;br /&gt;&lt;br /&gt; • Arrays can hold primitives or objects, but the array itself is always&lt;br /&gt; an object.&lt;br /&gt;&lt;br /&gt; • When you declare an array, the brackets can be to the left or right&lt;br /&gt; of the variable name.&lt;br /&gt;&lt;br /&gt; • It is never legal to include the size of an array in the declaration.&lt;br /&gt;&lt;br /&gt; • You must include the size of an array when you construct it (using new)&lt;br /&gt; unless you are creating an anonymous array.&lt;br /&gt;&lt;br /&gt; • Elements in an array of objects are not automatically created, although&lt;br /&gt; primitive array elements are given default values.&lt;br /&gt;&lt;br /&gt; • You’ll get a NullPointerException if you try to use an array element&lt;br /&gt; in an object array, if that element does not refer to a real object.&lt;br /&gt;&lt;br /&gt; • Arrays are indexed beginning with zero. In an array with three elements,&lt;br /&gt; you can access element 0, element 1, and element 2.&lt;br /&gt;&lt;br /&gt; • You’ll get an ArrayIndexOutOfBoundsException if you try to access&lt;br /&gt; outside the range of an array.&lt;br /&gt;&lt;br /&gt; • Arrays have a length variable that contains the number of elements in&lt;br /&gt; the array.&lt;br /&gt;&lt;br /&gt; • The last index you can access is always one less than the length of&lt;br /&gt; the array.&lt;br /&gt;&lt;br /&gt; • Multidimensional arrays are just arrays of arrays.&lt;br /&gt;&lt;br /&gt; • The dimensions in a multidimensional array can have different lengths.&lt;br /&gt;&lt;br /&gt; • An array of primitives can accept any value that can be promoted implicitly&lt;br /&gt; to the declared type of the array. For example, a byte variable can be placed&lt;br /&gt; in an int array.&lt;br /&gt;&lt;br /&gt; • An array of objects can hold any object that passes the IS-A (or instanceof)&lt;br /&gt; test for the declared type of the array. For example, if Horse extends Animal,&lt;br /&gt; then a Horse object can go into an Animal array.&lt;br /&gt;&lt;br /&gt; • If you assign an array to a previously declared array reference, the&lt;br /&gt; array you’re assigning must be the same dimension as the reference you’re&lt;br /&gt; assigning it to.&lt;br /&gt;&lt;br /&gt; • You can assign an array of one type to a previously declared array reference&lt;br /&gt; of one of its supertypes. For example, a Honda array can be assigned to an array&lt;br /&gt; declared as type Car (assuming Honda extends Car).&lt;br /&gt;&lt;br /&gt; Using a Variable or Array Element That Is Uninitialized and Unassigned&lt;br /&gt;&lt;br /&gt; • When an array of objects is instantiated, objects within the array are&lt;br /&gt; not instantiated automatically, but all the references get the default value&lt;br /&gt; of null.&lt;br /&gt;&lt;br /&gt; • When an array of primitives is instantiated, all elements get their&lt;br /&gt; default values.&lt;br /&gt;&lt;br /&gt; • Just as with array elements, instance variables are always initialized&lt;br /&gt; with a default value.&lt;br /&gt;&lt;br /&gt; • Local/automatic/method variables are never given a default value. If&lt;br /&gt; you attempt to use one before initializing it, you’ll get a compiler error.&lt;br /&gt;&lt;br /&gt; Command-Line Arguments to Main&lt;br /&gt;&lt;br /&gt; • Command-line arguments are passed to the String array parameter in the&lt;br /&gt; main method.&lt;br /&gt;&lt;br /&gt; • The first command-line argument is the first element in the main String&lt;br /&gt; array parameter.&lt;br /&gt;&lt;br /&gt; • If no arguments are passed to main, the length of the main String array&lt;br /&gt; parameter will be zero.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Chapter2. Declarations and Access Control&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Class Access Modifiers&lt;br /&gt;&lt;br /&gt; • There are three access modifiers: public, protected, and private.&lt;br /&gt;&lt;br /&gt; • There are four access levels: public, protected, default, and private.&lt;br /&gt;&lt;br /&gt; • Classes can have only public or default access.&lt;br /&gt;&lt;br /&gt; • Class visibility revolves around whether code in one class can:&lt;br /&gt;&lt;br /&gt; o Create an instance of another class&lt;br /&gt;&lt;br /&gt; o Extend (or subclass), another class&lt;br /&gt;&lt;br /&gt; o Access methods and variables of another class&lt;br /&gt;&lt;br /&gt; • A class with default access can be seen only by classes within the same&lt;br /&gt; package.&lt;br /&gt;&lt;br /&gt; • A class with public access can be seen by all classes from all packages.&lt;br /&gt;&lt;br /&gt; Class Modifiers (nonaccess)&lt;br /&gt;&lt;br /&gt; • Classes can also be modified with final, abstract, or strictfp.&lt;br /&gt;&lt;br /&gt; • A class cannot be both final and abstract.&lt;br /&gt;&lt;br /&gt; • A final class cannot be subclassed.&lt;br /&gt;&lt;br /&gt; • An abstract class cannot be instantiated.&lt;br /&gt;&lt;br /&gt; • A single abstract method in a class means the whole class must be abstract.&lt;br /&gt;&lt;br /&gt; • An abstract class can have both abstract and nonabstract methods.&lt;br /&gt;&lt;br /&gt; • The first concrete class to extend an abstract class must implement&lt;br /&gt; all abstract methods.&lt;br /&gt;&lt;br /&gt; Member Access Modifiers&lt;br /&gt;&lt;br /&gt; • Methods and instance (nonlocal) variables are known as “members.”&lt;br /&gt;&lt;br /&gt; • Members can use all four access levels: public, protected, default,&lt;br /&gt; private.&lt;br /&gt;&lt;br /&gt; • Member access comes in two forms:&lt;br /&gt;&lt;br /&gt; o Code in one class can access a member of another class.&lt;br /&gt;&lt;br /&gt; o A subclass can inherit a member of its superclass.&lt;br /&gt;&lt;br /&gt; • If a class cannot be accessed, its members cannot be accessed.&lt;br /&gt;&lt;br /&gt; • Determine class visibility before determining member visibility.&lt;br /&gt;&lt;br /&gt; • Public members can be accessed by all other classes, even in different&lt;br /&gt; packages.&lt;br /&gt;&lt;br /&gt; • If a superclass member is public, the subclass inherits it—regardless&lt;br /&gt; of package.&lt;br /&gt;&lt;br /&gt; • Members accessed without the dot operator (.) must belong to the same&lt;br /&gt; class.&lt;br /&gt;&lt;br /&gt; • this. always refers to the currently executing object.&lt;br /&gt;&lt;br /&gt; • this.aMethod() is the same as just invoking aMethod().&lt;br /&gt;&lt;br /&gt; • Private members can be accessed only by code in the same class.&lt;br /&gt;&lt;br /&gt; • Private members are not visible to subclasses, so private members cannot&lt;br /&gt; be inherited.&lt;br /&gt;&lt;br /&gt; • Default and protected members differ only in when subclasses are involved:&lt;br /&gt;&lt;br /&gt; o Default members can be accessed only by other classes in the same package.&lt;br /&gt;&lt;br /&gt; o Protected members can be accessed by other classes in the same package, plus&lt;br /&gt; subclasses regardless of package.&lt;br /&gt;&lt;br /&gt; • Protected = package plus kids (kids meaning subclasses).&lt;br /&gt;&lt;br /&gt; • For subclasses outside the package, the protected member can be accessed&lt;br /&gt; only through inheritance; a subclass outside the package cannot access a protected&lt;br /&gt; member by using a reference to an instance of the superclass (in other words,&lt;br /&gt; inheritance is the only mechanism for a subclass outside the package to access&lt;br /&gt; a protected member of its superclass).&lt;br /&gt;&lt;br /&gt; • A protected member inherited by a subclass from another package is,&lt;br /&gt; in practice, private to all other classes (in other words, no other classes&lt;br /&gt; from the subclass’ package or any other package will have access to the&lt;br /&gt; protected member from the subclass).&lt;br /&gt;&lt;br /&gt; Local Variables&lt;br /&gt;&lt;br /&gt; • Local (method, automatic, stack) variable declarations cannot have access&lt;br /&gt; modifiers.&lt;br /&gt;&lt;br /&gt; • final is the only modifier available to local variables.&lt;br /&gt;&lt;br /&gt; • Local variables don’t get default values, so they must be initialized&lt;br /&gt; before use.&lt;br /&gt;&lt;br /&gt; Other Modifiers—Members&lt;br /&gt;&lt;br /&gt; • Final methods cannot be overridden in a subclass.&lt;br /&gt;&lt;br /&gt; • Abstract methods have been declared, with a signature and return type,&lt;br /&gt; but have not been implemented.&lt;br /&gt;&lt;br /&gt; • Abstract methods end in a semicolon—no curly braces.&lt;br /&gt;&lt;br /&gt; • Three ways to spot a nonabstract method:&lt;br /&gt;&lt;br /&gt; o The method is not marked abstract.&lt;br /&gt;&lt;br /&gt; o The method has curly braces.&lt;br /&gt;&lt;br /&gt; o The method has code between the curly braces.&lt;br /&gt;&lt;br /&gt; • The first nonabstract (concrete) class to extend an abstract class must&lt;br /&gt; implement all of the abstract class’ abstract methods.&lt;br /&gt;&lt;br /&gt; • Abstract methods must be implemented by a subclass, so they must be&lt;br /&gt; inheritable. For that reason:&lt;br /&gt;&lt;br /&gt; o Abstract methods cannot be private.&lt;br /&gt;&lt;br /&gt; o Abstract methods cannot be final.&lt;br /&gt;&lt;br /&gt; • The synchronized modifier applies only to methods.&lt;br /&gt;&lt;br /&gt; • Synchronized methods can have any access control and can also be marked&lt;br /&gt; final.&lt;br /&gt;&lt;br /&gt; • Synchronized methods cannot be abstract.&lt;br /&gt;&lt;br /&gt; • The native modifier applies only to methods.&lt;br /&gt;&lt;br /&gt; • The strictfp modifier applies only to classes and methods.&lt;br /&gt;&lt;br /&gt; • Instance variables can&lt;br /&gt;&lt;br /&gt; o Have any access control&lt;br /&gt;&lt;br /&gt; o Be marked final or transient&lt;br /&gt;&lt;br /&gt; • Instance variables cannot be declared abstract, synchronized, native,&lt;br /&gt; or strictfp.&lt;br /&gt;&lt;br /&gt; • It is legal to declare a local variable with the same name as an instance&lt;br /&gt; variable; this is called “shadowing.”&lt;br /&gt;&lt;br /&gt; • Final variables have the following properties:&lt;br /&gt;&lt;br /&gt; o Final variables cannot be reinitialized once assigned a value.&lt;br /&gt;&lt;br /&gt; o Final reference variables cannot refer to a different object once the object&lt;br /&gt; has been assigned to the final variable.&lt;br /&gt;&lt;br /&gt; o Final reference variables must be initialized before the constructor completes.&lt;br /&gt;&lt;br /&gt; • There is no such thing as a final object. An object reference marked&lt;br /&gt; final does not mean the object itself is immutable.&lt;br /&gt;&lt;br /&gt; • The transient modifier applies only to instance variables.&lt;br /&gt;&lt;br /&gt; • The volatile modifier applies only to instance variables.&lt;br /&gt;&lt;br /&gt; Static variables and methods&lt;br /&gt;&lt;br /&gt; • They are not tied to any particular instance of a class.&lt;br /&gt;&lt;br /&gt; • An instance of a class does not need to exist in order to use static&lt;br /&gt; members of the class.&lt;br /&gt;&lt;br /&gt; • There is only one copy of a static variable per class and all instances&lt;br /&gt; share it.&lt;br /&gt;&lt;br /&gt; • Static variables get the same default values as instance variables.&lt;br /&gt;&lt;br /&gt; • A static method (such as main()) cannot access a nonstatic (instance)&lt;br /&gt; variable.&lt;br /&gt;&lt;br /&gt; • Static members are accessed using the class name: ClassName.theStaticMethodName()&lt;br /&gt;&lt;br /&gt; • Static members can also be accessed using an instance reference variable,&lt;br /&gt; someObj.theStaticMethodName() but that’s just a syntax trick; the static&lt;br /&gt; method won’t know anything about the instance referred to by the variable&lt;br /&gt; used to invoke the method. The compiler uses the class type of the reference&lt;br /&gt; variable to determine which static method to invoke.&lt;br /&gt;&lt;br /&gt; • Static methods cannot be overridden, although they can be redeclared/&lt;br /&gt; redefined by a subclass. So although static methods can sometimes appear to&lt;br /&gt; be overridden, polymorphism will not apply (more on this in Chapter 5).&lt;br /&gt;&lt;br /&gt; Declaration Rules&lt;br /&gt;&lt;br /&gt; • A source code file can have only one public class.&lt;br /&gt;&lt;br /&gt; • If the source file contains a public class, the file name should match&lt;br /&gt; the public class name.&lt;br /&gt;&lt;br /&gt; • A file can have only one package statement, but can have multiple import&lt;br /&gt; statements.&lt;br /&gt;&lt;br /&gt; • The package statement (if any) must be the first line in a source file.&lt;br /&gt;&lt;br /&gt; • The import statements (if any) must come after the package and before&lt;br /&gt; the class declaration.&lt;br /&gt;&lt;br /&gt; • If there is no package statement, import statements must be the first&lt;br /&gt; statements in the source file.&lt;br /&gt;&lt;br /&gt; • Package and import statements apply to all classes in the file.&lt;br /&gt;&lt;br /&gt; • A file can have more than one nonpublic class.&lt;br /&gt;&lt;br /&gt; • Files with no public classes have no naming restrictions.&lt;br /&gt;&lt;br /&gt; • In a file, classes can be listed in any order (there is no forward referencing&lt;br /&gt; problem).&lt;br /&gt;&lt;br /&gt; • Import statements only provide a typing shortcut to a class’ fully&lt;br /&gt; qualified name.&lt;br /&gt;&lt;br /&gt; • Import statements cause no performance hits and do not increase the&lt;br /&gt; size of your code.&lt;br /&gt;&lt;br /&gt; • If you use a class from a different package, but do not import the class,&lt;br /&gt; you must use the fully qualified name of the class everywhere the class is used&lt;br /&gt; in code.&lt;br /&gt;&lt;br /&gt; • Import statements can coexist with fully qualified class names in a&lt;br /&gt; source file.&lt;br /&gt;&lt;br /&g
