<?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-4839772116138908481</id><updated>2011-07-07T15:54:21.349-07:00</updated><category term='Cyber Fraud'/><category term='Google'/><title type='text'>Niche for Thoughts</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4839772116138908481.post-3076754327130709211</id><published>2009-08-01T22:39:00.000-07:00</published><updated>2009-08-02T02:56:33.890-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cyber Fraud'/><title type='text'>Will Cyber Courts be the solution?</title><content type='html'>As almost all the aspects or out lives in the contemporary society, major fraud has also become high tech. But it’s important to remember that it’s not the technology that commit crimes, but it’s the people that use them. &lt;br /&gt;&lt;br /&gt;It is really hard to define such a broad term as cyber fraud. There is, however, a few general characteristics you find in all cyber fraud. Most of these are done by e-mail (Spam). They entice users to give them critical information like usernames, passwords, credit card information, or other types of account information. Although many attacks come from outside the organisations, some are ‘insider jobs’ - carried out by employees who have access to systems within the company’s defenses. Consumer Fraud Reporting (CFR) has come up with the 'Top 10 List of Current Scams - 2008'. You can have a look at these Scams at &lt;a href="http://www.consumerfraudreporting.org/current_top_10_scam_list.htm"&gt;http://www.consumerfraudreporting.org/current_top_10_scam_list.htm&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Internet Crime Complaint Center (IC3), in 2009 released its latest annual report on victims' complaints received and referred to law enforcement. From January 1, 2008 – December 31, 2008, the IC3 website received 275,284 complaint submissions. This is a (33.1%) increase when compared to 2007 when 206,884 complaints were received. This clearly shows that, this is becoming a huge problem to cater in the future for the law authorities. The following figure clearly shows the acceleration of cyber fraud over the years. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U0_5GLY4Aj0/SnVhHYlnUbI/AAAAAAAAAFM/ziBDIj4E3vc/s1600-h/IC32008graph.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 129px;" src="http://4.bp.blogspot.com/_U0_5GLY4Aj0/SnVhHYlnUbI/AAAAAAAAAFM/ziBDIj4E3vc/s320/IC32008graph.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5365301310569009586" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, where lies a solution for this? &lt;br /&gt;&lt;br /&gt;After a lame attempt to solve the cyber crime cases in regular courts for more than 8 years and after previous attempts been incredulous, Indian Government has recognized the need of a separate court for cyber crimes and is looking to set up at least one cyber court in each region to handle cases related to cyber crimes like email forger, email and website hacking, identity theft, data theft etc. The first cyber court has been setup in Delhi with Justice Rajesh Tandon as the presiding officer of Cyber Regulation Appellate Tribunal. &lt;br /&gt;&lt;br /&gt;Will this solve the issues of Cyber Crimes? The whole world would be eying on this solution with profound eager.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4839772116138908481-3076754327130709211?l=chulaka84.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/3076754327130709211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4839772116138908481&amp;postID=3076754327130709211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/3076754327130709211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/3076754327130709211'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/2009/08/will-cyber-courts-be-solution.html' title='Will Cyber Courts be the solution?'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_U0_5GLY4Aj0/SnVhHYlnUbI/AAAAAAAAAFM/ziBDIj4E3vc/s72-c/IC32008graph.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4839772116138908481.post-4872130923510642457</id><published>2009-02-05T03:41:00.000-08:00</published><updated>2009-08-02T05:18:49.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>Custom search engines by Google</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U0_5GLY4Aj0/SYrSDzR3v9I/AAAAAAAAADw/t5BsP-DhpGU/s1600-h/Search-Engine-Marketing.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 313px; height: 320px;" src="http://3.bp.blogspot.com/_U0_5GLY4Aj0/SYrSDzR3v9I/AAAAAAAAADw/t5BsP-DhpGU/s320/Search-Engine-Marketing.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5299278874301415378" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;Google has come up with a new idea, which most of the web site owners were looking forward. Google's new Custom Search Engine (Google CSE) program enables web site owners to &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;define their own search engines. &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;CSE provides a deceptively simple form-based interface for building a domain-specific search engine on top of the Google search platform. When the user performs a search in the provided custom search, the users are redirected to a web page which looks similar to the traditional google search results page. The web owner can even customize that page to look like a web page of his existing site. &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;Besides, Google plans to share the ad revenue from the resulting search results pages, through the site owner's existing AdSense accounts. Many site owners will find this a very attractive part of the program too.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;Try Google custom search. You can download the necessory code from &lt;/span&gt;&lt;a href="http://www.google.com/coop/cse/onthefly"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;. Just copy and paste the code to your site and you are ready to go.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;Cheers!!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&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: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4839772116138908481-4872130923510642457?l=chulaka84.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/4872130923510642457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4839772116138908481&amp;postID=4872130923510642457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/4872130923510642457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/4872130923510642457'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/2009/02/custom-search-engines-by-google.html' title='Custom search engines by Google'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SYrSDzR3v9I/AAAAAAAAADw/t5BsP-DhpGU/s72-c/Search-Engine-Marketing.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4839772116138908481.post-8175552259799853883</id><published>2009-01-31T10:46:00.000-08:00</published><updated>2009-01-31T11:20:19.833-08:00</updated><title type='text'>Overhead of a Google Search..</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;In my very last lecture of undergraduate life, my lecturer brought out a really interesting point about the overhead of a google search, which we perform really often.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&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: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I found out that Harvard University physicist Alex Wissner-Gross had done the math on that and estimated &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px; "&gt;&lt;span class="Apple-style-span" style="line-height: 19px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;each Google search is responsible for 7 grams of Carbon Emissions. To put that in less virtual terms, he suggests every two searches generate as much carbon dioxide as it does to boil a kettle of water for tea. &lt;span class="Apple-style-span" style="line-height: normal; "&gt;In terms of greenhouse gases, one Google search is equivalent to about 0.2 grams of CO&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;2&lt;/span&gt;. The current EU standard for tailpipe emissions calls for 140 grams of CO&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;2&lt;/span&gt; per kilometer driven, but most cars don't reach that level yet. Thus, the average car driven for one kilometer produces as many greenhouse gases as a thousand Google searches.&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: verdana; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana; font-size: 13px;"&gt;Google explains that issue in its official blog as follows. "&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 12px; line-height: 17px; "&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;Queries vary in degree of difficulty, but for the average query, the servers it touches each work on it for just a few thousandths of a second. Together with other work performed before your search even starts (such as building the search index) this amounts to 0.0003 kWh of energy per search, or 1 kJ. For comparison, the average adult needs about 8000 kJ a day of energy from food, so a Google search uses just about the same amount of energy that your body burns in ten seconds.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana; font-size: 13px; line-height: normal; "&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: verdana; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana; font-size: 13px;"&gt;So its time to think twice before a google search. Having said so, I truly believe that no software Engineer in this world can survive without a google search. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 11px; line-height: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4839772116138908481-8175552259799853883?l=chulaka84.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/8175552259799853883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4839772116138908481&amp;postID=8175552259799853883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/8175552259799853883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/8175552259799853883'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/2009/01/overhead-of-google-search.html' title='Overhead of a Google Search..'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4839772116138908481.post-126826131233758137</id><published>2009-01-29T11:50:00.001-08:00</published><updated>2009-01-29T12:15:34.215-08:00</updated><title type='text'>How to repair the GRUB..</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I have been using both Windows XP and Ubuntu 8.04 as the operating systems in my laptop. But after formatting the Windows XP OS of my laptop, I had no way of accessing the ubuntu partition. I was wondering whether I will have to reinstall ubuntu in my laptop. Then I found the solution. The following steps will lead you to repair the GRUB and reaccess the unseen ubuntu partition, if you have the same problem.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="color: rgb(153, 153, 153);   line-height: 24px; font-family:'Trebuchet MS';font-size:12px;"&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;1. Boot the PC or Laptop with an Ubuntu Live CD.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2. Open a Terminal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;3. Type the following command..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 153);"&gt;sudo grub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;4. Type the following followed by the &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;TAB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; key&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 153);"&gt;root (hd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;5. This will show the list of physical drives.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;6. Type the number of the drive you installed ubuntu on&lt;/span&gt;,.&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;7. If you are not sure about the ubuntu installed drive add a ‘&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;‘ after the number and press the&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;TAB&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; key again.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 153);"&gt;root (hd0,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;8. This will enable you to see something like following,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 153);"&gt;grub&gt; root (hd0,&lt;br /&gt;Possible partitions are:&lt;br /&gt;Partition num: 0, Filesystem type unknown, partition type 0×7&lt;br /&gt;Partition num: 1, Filesystem type is ext2fs, partition type 0×83&lt;br /&gt;Partition num: 2, Filesystem type unknown, partition type 0×7&lt;br /&gt;Partition num: 3, Filesystem type is fat, partition type 0xb&lt;br /&gt;Partition num: 4, Filesystem type is fat, partition type 0xb&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;9. The &lt;/span&gt;&lt;span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;ext2fs&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt; partition is the one Ubuntu is installed partition of your machine. &lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;10. The type the following with replacing 1 with the ubuntu installed partition num of your mechine.&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 153);"&gt;root (hd0,1) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;11. Finally type the following, replacing hd0 with the physical drive Ubuntu is installed&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 153);"&gt;setup (hd0)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;This worked out fine for me. Hope it will work with you too. Let me know if there are any issues.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;Cheers!!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div&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;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4839772116138908481-126826131233758137?l=chulaka84.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/126826131233758137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4839772116138908481&amp;postID=126826131233758137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/126826131233758137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/126826131233758137'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/2009/01/how-to-repair-grub.html' title='How to repair the GRUB..'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4839772116138908481.post-2870301507991667564</id><published>2009-01-26T13:48:00.000-08:00</published><updated>2009-02-05T04:23:07.644-08:00</updated><title type='text'>Basics on Neural Networks</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style=""&gt;Currently I'm working on a project, which integrates Artificial Intelligence to a software application of a local software company in Sri Lanka. So I thought of writing down some of the basics on neural networks, which could be helpful for a beginner in the field. Some of the information follows, are the theories of neural networks and some of the information are my own experience in the field.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;The best definition for the term 'Neural Network' I found was  provided by the inventor of one of the first neurocomputers, Dr. Robert Hecht-Nielsen. He defines a neural network as: &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;"...a computing system made up of a number of simple, highly interconnected processing elements, which process information by their dynamic state response to external inputs".&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;The motivation for the development of neural network technology stemmed from the desire to develop an artificial system that could perform "intelligent" tasks similar to those performed by the human brain. Neural networks resemble the human brain in the following two ways:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;1.  A neural network acquires knowledge through learning.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;2. A neural network's knowledge is stored within inter-neuron connection strengths known as &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;   synaptic weights.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;The true power and advantage of neural networks lies in their ability to represent both linear and non-linear relationships and in their ability to learn these relationships directly from the data being modeled. Traditional linear models are simply inadequate when it comes to modeling data that contains non-linear characteristics. &lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Depending on the nature of the application and the strength of the internal data patterns you can generally expect a network to train quite well. This applies to problems where the relationships may be quite dynamic or non-linear. Artificial Neural Networks(ANN) provide an analytical alternative to conventional techniques which are often limited by strict assumptions of normality, linearity, variable independence etc. Because an ANN can capture many kinds of relationships it allows the user to quickly and relatively easily model phenomena which otherwise may have been very difficult or imposible to explain otherwise.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Neural neworks are typically organized in layers. Layers are made up of a number of interconnected 'nodes' which contain an 'activation function'. Patterns are presented to the network via the 'input layer', which communicates to one or more 'hidden layers' where the actual processing is done via a system of weighted 'connections'. The hidden layers then link to an 'output layer' where the answer is output to that.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U0_5GLY4Aj0/SYrZoWxX-VI/AAAAAAAAAD8/6lzDyTlw1OY/s1600-h/350px-Artificial_neural_network.svg.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 286px;" src="http://1.bp.blogspot.com/_U0_5GLY4Aj0/SYrZoWxX-VI/AAAAAAAAAD8/6lzDyTlw1OY/s320/350px-Artificial_neural_network.svg.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5299287198885476690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;A trained neural network can be thought of as an "expert" in the category of information it has been given to analyze. This expert can then be used to provide projections given new situations of interest and answer "what if" questions. Other advantages include:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;1. &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Adaptive learning&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;: An ability to learn how to do tasks based on the data given for training or initial experience.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;2. &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Self-Organization&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;: An Artificial Neural Network can create its own organization or representation of the information it receives during learning time.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;3. &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Real Time Operation&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;: Artificial Neural Network computations may be carried out in parallel, and special hardware devices are being designed and manufactured which take advantage of this capability.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;4. &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Fault Tolerance via Redundant Information Coding&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;: Partial destruction of a network leads to the corresponding degradation of performance. However, some network capabilities may be retained even with major network damage.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;There are a few drawbacks in using neural networks for modeling applications too. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;p  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;1. Minimizing overfitting requires a great deal of computational effort.&lt;/span&gt;&lt;/p&gt;&lt;p  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;2. The individual relations between the input variables and the output variables are not developed by engineering judgment so that the model tends to be a black box or input/output table without analytical basis.&lt;/span&gt;&lt;/p&gt;&lt;p size="13px" style=" ;"&gt;&lt;/p&gt;&lt;p style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;3. The sample size has to be large.&lt;/span&gt;&lt;/p&gt;&lt;p  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style=""&gt;I hope this will give a basic introduction to the field of neural networks. I hope to give an implementation tutorial on neural networks by upcoming posts. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style=""&gt;cheers!!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4839772116138908481-2870301507991667564?l=chulaka84.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/2870301507991667564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4839772116138908481&amp;postID=2870301507991667564' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/2870301507991667564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/2870301507991667564'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/2009/01/basics-on-neural-networks.html' title='Basics on Neural Networks'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U0_5GLY4Aj0/SYrZoWxX-VI/AAAAAAAAAD8/6lzDyTlw1OY/s72-c/350px-Artificial_neural_network.svg.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4839772116138908481.post-7346772207378464060</id><published>2008-04-04T03:18:00.000-07:00</published><updated>2008-04-05T23:28:54.304-07:00</updated><title type='text'>How to add HTML content to java mails</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt;It is easy to develop e-mail applications using the Java Mail API. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt;This article will demonstrate how to send a e-mail using your java application and how to add attachments and HTML contents to that mail sent by you.&lt;br /&gt;&lt;br /&gt;The following code segment illustrates how to send a basic e-mail in java.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;import java.util.*;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;import javax.mail.*;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;import javax.mail.internet.*;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;import javax.activation.*;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;// Send a simple, single part, text/plain e-mail&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;public class TestEmail {&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    public static void main(String[] args) {&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    // mention the relevant email addresses!!!&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    String to = "theguy@theguy.com";&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    String from = "chulakar@gmail.com";&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    // mention the ISP's email server!!!&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    String smtphost = "mail.usermail.net";&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    int smtpPort = 25;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    // Create properties, get Session&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    Properties props = new Properties();&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    // If using static Transport.send(),&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    // need to specify which host to send it to&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    props.put("mail.smtp.host", smtphost);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    props.put("mail.smtp.port", "" + smtpPort);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    Session session = Session.getInstance(props);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    try {&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        // Instantiatee a message&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        Message msg = new MimeMessage(session);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        //Set message attributes&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        msg.setFrom(new InternetAddress(from));&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        InternetAddress[] address = {new InternetAddress(to)};&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        msg.setRecipients(Message.RecipientType.TO, address);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        msg.setSubject("Test E-Mail through Java");&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        msg.setSentDate(new Date());&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        // Set message content&lt;br /&gt;&lt;br /&gt;   // &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;msg = attachHTML(msg);  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        msg.setText("This is a test of sending a &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;plain text e-mail through                             Java.);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        //Send the message&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        Transport.send(msg);&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    }&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    catch (MessagingException e) {&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;            &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        e.printStackTrace();&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;        }&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;font-size:130%;"  &gt;    }&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt;Then we can add attachments and HTML contents to the context of the e-mail. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt; You can try this by uncommenting the  "attachHTML" method and commenting out the "msg.text" part of the above code segment. The "&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt;attachHTML&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;&lt;span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:130%;"  &gt;" method is given below.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;public Message attachHTML (Message msg){&lt;br /&gt;&lt;br /&gt;Multipart mp = new MimeMultipart("related");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// the attacharray is the array which contains the file names of the     &lt;br /&gt;//  attachments to be added&lt;br /&gt;&lt;br /&gt;if (attacharray != null &amp;amp;&amp;amp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;attacharray.size()&gt;0&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;){&lt;br /&gt;for(int i=0; i&lt;attacharray.size();i++){&lt;br /&gt;                MimeBodyPart p1 = new MimeBodyPart();&lt;br /&gt;                DataSource source = new FileDataSource(attacharray.get(i).toString());&lt;br /&gt;                p1.setDataHandler(new DataHandler(source));&lt;br /&gt;                p1.setFileName("AT"+i);&lt;br /&gt;                mp.addBodyPart(p1);&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;             }&lt;attacharray.size();i++){ mimebodypart="" p1="new" datasource="" source="new" new="" at=""&gt;&lt;attacharray.size();i++){ mimebodypart="" p1="new" datasource="" source="new" new="" at=""&gt;&lt;attacharray.size();i++){ mimebodypart="" p1="new" datasource="" source="new" new="" at=""&gt;&lt;attacharray.size();i++){ mimebodypart="" p1="new" datasource="" source="new" new="" at=""&gt;&lt;attacharray.size();i++){ mimebodypart="" p1="new" datasource="" source="new" new="" at=""&gt;&lt;/attacharray.size();i++){&gt;&lt;/attacharray.size();i++){&gt;&lt;/attacharray.size();i++){&gt;&lt;/attacharray.size();i++){&gt;&lt;/attacharray.size();i++){&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;//  now create second part&lt;br /&gt;MimeBodyPart p2 = new MimeBodyPart();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;  now add the HTML content for the e-mail which is constructed as a String&lt;br /&gt;//&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt; called as the  "htmlContent"&lt;br /&gt;&lt;br /&gt;p2.setContent(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;htmlContent&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;, "text/html");&lt;br /&gt;&lt;br /&gt;mp.addBodyPart(p2);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Set Multipart as the message's content&lt;br /&gt;msg.setContent(mp);&lt;br /&gt;return msg;&lt;br /&gt;}&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;&lt;span style="color: rgb(0, 0, 0);font-size:130%;" &gt;&lt;span style="font-family:times new roman;"&gt;I think the above code will work for you as it did to me. All the best!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;Happy coding!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4839772116138908481-7346772207378464060?l=chulaka84.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chulaka84.blogspot.com/feeds/7346772207378464060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4839772116138908481&amp;postID=7346772207378464060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/7346772207378464060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4839772116138908481/posts/default/7346772207378464060'/><link rel='alternate' type='text/html' href='http://chulaka84.blogspot.com/2008/04/how-to-add-html-content-to-java-mails.html' title='How to add HTML content to java mails'/><author><name>Chulaka Gunasekara</name><uri>http://www.blogger.com/profile/08070603761821534589</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://3.bp.blogspot.com/_U0_5GLY4Aj0/SnWDv57Q4NI/AAAAAAAAAFc/IUmjskH4rS8/S220/itsme.jpg'/></author><thr:total>0</thr:total></entry></feed>
