tag:blogger.com,1999:blog-59533276392709225102024-03-14T10:37:49.453+05:30aj_blkLearn about computer tips, social news, philosophies and business ideasaj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-5953327639270922510.post-14147512506000202192016-01-15T22:06:00.003+05:302016-01-15T22:09:51.233+05:30Good Marketing is an Efficiency Choice for startups<div dir="ltr" style="text-align: left;" trbidi="on">
For startups we have to look for maximum impact by the marketing effort. The key is <b>Efficiency</b>. How much ROI can u get from the single rupee spend.<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-3sV1KYBMT1A/Vpkagc5NheI/AAAAAAAAATU/zs_lFL5Ybg0/s1600/ltzvn.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Site with Brilliant Effective Marketing" border="0" height="483" src="http://3.bp.blogspot.com/-3sV1KYBMT1A/Vpkagc5NheI/AAAAAAAAATU/zs_lFL5Ybg0/s640/ltzvn.JPG" title="" width="640" /></a></div>
<br />
<br />
This site wanted more new registrations. How can we do that ?<br />
<b><br /></b>
<b>"<span style="color: yellow;">Create Artificial Scaricity</span>"</b>.<br />
<br />
<br />
Designers of this site have carefully positioned it as "<b><span style="color: #6aa84f;">Request Invite</span></b>" instead of just one common "<b><span style="color: #93c47d;">Register</span></b>" for all users.<br />
<br />
Actual Previous Registered Users may be very less (<b>lets say</b> 50 but no one knows that)<br />
<br />
Now all the other users feels insecure for not being part of this Exclusive Club because entry is Invite only.<br />
<br />
<br />
In normal case with just one "<b><span style="color: #6aa84f;">Register</span></b>" button in the site, it may have lost most users who have visited the site but for "<b><span style="color: #6aa84f;">Request Invite</span></b>" case most users would definetley hurry to be the part of the invitation list.<br />
<br />
<br />
This is a simple brilliant design to route more users to the targeted action. "<b><span style="color: #93c47d;">Registration</span></b>"<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-18087877959430703232015-07-20T12:40:00.001+05:302015-07-25T04:36:13.753+05:30Ouch! High Salary can Hurt Me!<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-fCNqBwaeWq8/VbLEndn0D6I/AAAAAAAAAP4/kPPSFn39KkU/s1600/stressed-person.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="high salary hurts image" border="0" height="280" src="http://3.bp.blogspot.com/-fCNqBwaeWq8/VbLEndn0D6I/AAAAAAAAAP4/kPPSFn39KkU/s320/stressed-person.png" title="Credits for this image -1. https://commons.wikimedia.org/wiki/User:Orionist 2. http://www.shescribes.com/wp-content/uploads/2014/10/canstockphoto6111249.jpg 3. http://vignette2.wikia.nocookie.net/clubpenguin/images/6/6f/Money_Bag_icon.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
The Story from Employee's Point of View</h3>
Its a great joy to work in a place that you are passionate about.<br />
<br />
When we join a new company, we are actually both excited and curious to know<br />
<br />
<ul style="text-align: left;">
<li>"How is to work here?"</li>
<li>Experience new Culture</li>
<li>Meet new people</li>
<li>Explore new work place</li>
<li>Learn new things</li>
<li>New Responsibilities</li>
</ul>
<div>
This is a great time for us, but overtime this joy wont last and you would feel </div>
<div>
<ul style="text-align: left;">
<li>Its a Boring place</li>
<li>Same old people</li>
<li>Relatively same Responsibilities</li>
<li>Nothing new to learn</li>
<li>Same old Customs and Pratices</li>
<li>Very Mechanical</li>
</ul>
<div>
Overtime everything becomes opposite of what u felt when you joined. You are no longer motivated to work in that place and you want to migrate to a new company. <b>Ahh! </b>now is the time when High Salary is going to cause you pain. </div>
</div>
<div>
<br /></div>
<div>
If you are receiving high salary then opportunities for a new job is scarce. If you salary is well above the market price then you are going to find it very difficult to bag a job opening. </div>
<div>
<br /></div>
<div>
High Salary will become the transparent chain enslaving you to do the miserable work.</div>
<div>
<br /></div>
<h3 style="text-align: left;">
From Employers point of View</h3>
<div>
What a great weapon, if we want skilled people to work for us.</div>
<div>
<br /></div>
<div>
For a business to sustain, customers must trust in the service or goods provided. To build the best quality service or goods, we need highly skilled people. Skilled people will find it easy to transition to another company. This is one of the big problem the employers face '<b>Attrition</b>'. Losing a key employee, will slow or stop the development or business process. To replace the key employee, with the right candidate takes some time and money.</div>
<div>
<ul style="text-align: left;">
<li>Time and Cost to find similarly skilled person</li>
<li>Time and Cost to train the domain knowledge</li>
<li>Time to get accustomed with the Company Customs and Practices</li>
</ul>
<div>
This time lost to replace a key employee will hurt the business and its brand very badly.</div>
</div>
<div>
<br /></div>
<div>
A employer is afraid to bid for a tender or sign a new business contract because he is worried what if the key employees migrate to another company during the development phase or later during the support phase. The employer can sleep peacefully only when he knows that his key employees are not going to migrate anywhere. For employers, the human is the only emotional and unpredictable resource needed in the production. So the best tool he has in his arsenal is <b>High Salary</b>.</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-64545708602175669502015-06-09T13:02:00.000+05:302015-10-01T13:26:56.946+05:30Understanding your Business Model<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: inherit;">Having a idea is the romantic period but to execute is a lot of effort and work.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">For pitching your idea it is essential to know ur business structure and plan. First entrepreneur must have clear idea of the busines model with all the 9 blocks.</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-fUD8N_shtkA/VXaCxQqGf9I/AAAAAAAAALM/JH8VO0rPVKw/s1600/business-model.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"><img border="0" height="373" src="http://2.bp.blogspot.com/-fUD8N_shtkA/VXaCxQqGf9I/AAAAAAAAALM/JH8VO0rPVKw/s640/business-model.PNG" width="640" /></span></a></div>
<span style="font-family: inherit;"><br /></span>
<br />
<h3 style="text-align: left;">
<b><span style="font-family: inherit; font-size: large;">Who is your customer segments ?</span></b></h3>
<span style="font-family: inherit;"><i><b>Mass Market</b></i> has more chance to get investment but the segment is highly competetive.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><i><b>Niche Market</b></i> is a highly specific customer segment. eg like Defence Fighter Jets, Rolls Royce Car</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><i><b>Segmented Market</b></i> is a customer base with different needs. eg like Ice cream packaged in cups and family packs.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><b><i>Diversified Market</i></b> is diversifying your infrastructure to two unrelated customer segements. eg like post office used for banking service or mobile telecom companies selling customer data insights, push free partnershippped applications/service</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<h3 style="text-align: left;">
<span style="font-family: inherit; font-size: large;">What values can u provide to your customer?</span></h3>
<div>
<ul style="text-align: left;">
<li><span style="font-family: inherit;">Is the product/service a new or unique,</span></li>
<ul>
<li><span style="font-family: inherit;">improved Performance, </span></li>
<li><span style="font-family: inherit;">Design and Brand value,</span></li>
<li><span style="font-family: inherit;">less Cost, </span></li>
<li><span style="font-family: inherit;">more Functional use </span></li>
<li><span style="font-family: inherit;">and/or Accessible. </span></li>
</ul>
</ul>
<div style="text-align: left;">
<span style="font-family: inherit;"><i>Accessibility </i>is making it more availalbe like Rolls Royce charging only for the number of hours the Jet engine is used instead of selling the engine.</span></div>
</div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<h3 style="text-align: left;">
<span style="font-family: inherit; font-size: large;">What would be your revenue streams?</span></h3>
<div>
<ul style="text-align: left;">
<li><span style="font-family: inherit;">Sale of items,</span></li>
<li><span style="font-family: inherit;">Usage fee, </span></li>
<li><span style="font-family: inherit;">Subscription fee, </span></li>
<li><span style="font-family: inherit;">Leasing, </span></li>
<li><span style="font-family: inherit;">Licensing,</span></li>
<li><span style="font-family: inherit;">Brokerage </span></li>
<li><span style="font-family: inherit;">and/or Advertising.</span></li>
</ul>
</div>
</div>
<div>
<h3 style="text-align: left;">
<span style="font-family: inherit; font-size: large;">What kind of Customer Relationships ?</span></h3>
</div>
<div>
<ul style="text-align: left;">
<li><span style="font-family: inherit;">One to One Assistance</span></li>
<li><span style="font-family: inherit;">Self Service</span></li>
<li><span style="font-family: inherit;">Automated Service</span></li>
<li><span style="font-family: inherit;">Community</span></li>
<li><span style="font-family: inherit;">Co-Creation</span></li>
</ul>
<div>
<span style="font-family: inherit;"><i>Co-Creation </i>is like a Book selling ecom site Infibeam allowing customers to write reviews which create value for book readers.</span></div>
</div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-family: inherit; font-size: large;">What are the Key Activities ?</span></h3>
<div>
<ul style="text-align: left;">
<li><span style="font-family: inherit;">Production</span></li>
<li><span style="font-family: inherit;">Problem solving</span></li>
<ul>
<li>Customer Relaionship</li>
<li>Product Innovation</li>
</ul>
<li><span style="font-family: inherit;">Platform / Network</span></li>
</ul>
</div>
<h3 style="text-align: left;">
<span style="font-family: inherit; font-size: large;">What are the Key Partnerships ?</span></h3>
<div>
<ul style="text-align: left;">
<li><span style="font-family: inherit;">Strategic Partnership with non-competitors</span></li>
<li><span style="font-family: inherit;">Stratetigic Alliance with competitors inorder to devlop a new technology eg. Android OS</span></li>
<li><span style="font-family: inherit;">Joint Venture to devlop new businesses</span></li>
<li><span style="font-family: inherit;">Buyer-Supplier relationship to assure reliable supplies</span></li>
</ul>
<br />
<ul style="text-align: left;">
</ul>
</div>
<h3 style="text-align: left;">
<span style="font-family: inherit;"><span style="font-size: large;">Characterisitcs of Cost Structure</span></span></h3>
<div style="text-align: left;">
<span style="font-family: inherit;"><b><i>Fixed Cost </i></b>: Cost remains same regardless of volume of goods and services like Salaries and Rent.</span><br />
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<div style="text-align: left;">
<span style="font-family: inherit;"><b><i>Variable Cost :</i></b> Cost remains proportional to voulume of goods and services.</span><br />
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit; line-height: 25.1999988555908px;"><b><i>Economies of scale </i></b>: Cost per unit output decreases as the number of unit output increases</span><br />
<span style="font-family: inherit; line-height: 25.1999988555908px;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit; line-height: 25.1999988555908px;"><b><i>Economies of scope</i></b> : Reduce the cost by leveraging on unused infrastructure or operation. like Amazon opened up Cloud Computing Service developed for ecom platform.</span></div>
<div>
<span style="line-height: 25.1999988555908px;"><span style="font-family: inherit;"><br /></span></span></div>
<div>
<span style="line-height: 25.1999988555908px;"><span style="font-family: inherit;"><br /></span></span></div>
<div>
<h2 style="text-align: left;">
<b style="font-family: inherit; line-height: 25.1999988555908px;">References:</b></h2>
</div>
<div>
<span style="line-height: 25.1999988555908px;"><span><a href="http://.ecommerce-digest.com/revenue-streams.html" target="_blank">http://.ecommerce-digest.com/revenue-streams.html</a></span></span></div>
<div>
<span style="line-height: 25.1999988555908px;"><span><a href="http://www.slideshare.net/hskochi/how-to-effectively-pitch-by-rajesh-nair-associate-director-markets-ey" target="_blank">http://www.slideshare.net/hskochi/how-to-effectively-pitch-by-rajesh-nair-associate-director-markets-ey</a></span></span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<br /></div>
</div>
</div>aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-16141175386798992282015-04-23T17:42:00.001+05:302015-04-23T17:52:35.016+05:30Custom Virtual Host in Apache2 in Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
<pre id="pre-0"> </pre>
<pre id="pre-0">cd ~
mkdir public_html</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">Now for each domain create a folder with following template</pre>
<pre id="pre-0">
mkdir -p public_html/domain1.com/{public,private,log,cgi-bin,backup}</pre>
<pre id="pre-0"></pre>
<pre id="pre-0"></pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">NameVirtualHost *:80
Listen 80</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">Make sure this setting is set either in ports.conf or apache2.conf or httpd.conf or in sites-available/default</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">Now create the vhost file for domain1.com in /etc/apache2/sites-available/domain1.com</pre>
<pre id="pre-0"></pre>
<pre id="pre-0">with the following settings</pre>
<pre id="pre-0"></pre>
<pre id="pre-0"><VirtualHost *:80>
ServerAdmin webmaster@domain1.com
ServerName domain1.com
ServerAlias www.domain1.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /home/username/public_html/domain1.com/public
# Custom log file locations
LogLevel warn
ErrorLog /home/username/public_html/domain1.com/log/error.log
CustomLog /home/username/public_html/domain1.com/log/access.log combined
</VirtualHost></pre>
<pre id="pre-0"> </pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">Now to enable the site in sites-enabled</pre>
<pre id="pre-0">sudo a2ensite domain1.com</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">and then restart the apache2 server</pre>
<pre id="pre-0">sudo service apache2 restart</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">Modify the host file '/etc/hosts' </pre>
<pre id="pre-0"> </pre>
<pre id="pre-0">127.0.0.1 localhost </pre>
<pre id="pre-0">127.0.0.1 domain1.com</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0"> </pre>
<pre id="pre-0"> Now set the owner permissions</pre>
<pre id="pre-0"></pre>
<pre id="pre-0">~/public_html/domain1.com$ sudo chown -R username:www-data cgi-bin log public
~/public_html/domain1.com$ sudo find ./public -type d -exec chmod 775 {} \;
~/public_html/domain1.com$ sudo find ./public -type f -exec chmod 774 {} \;
likewise for log and cgi-bin</pre>
<pre id="pre-0"> </pre>
<pre id="pre-0"> </pre>
<h4 id="pre-0" style="text-align: left;">
References </h4>
<pre id="pre-0">1. <a href="http://www.rackspace.com/knowledge_center/article/ubuntu-apache-virtual-hosts" target="_blank">Apache Virtual Hosts</a></pre>
<pre id="pre-0">2. <a href="http://stackoverflow.com/questions/12414009/permissions-for-var-www-html" target="_blank">Permissions for /var/www/html </a></pre>
<pre id="pre-0">3. <a href="http://stackoverflow.com/questions/3740152/how-to-set-chmod-for-a-folder-and-all-of-its-subfolders-and-files-in-linux-ubunt" target="_blank">Chmod only to folders and its subfolders </a></pre>
<pre id="pre-0"></pre>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-52370793067119375552015-02-12T14:33:00.002+05:302015-02-12T14:34:07.612+05:30Wireshark NPF driver isn't working<div dir="ltr" style="text-align: left;" trbidi="on">
Wireshark is an network analyzer. Wireshark depends on another utility process called WinPcap.<br />
<br />
If the WinPcap service is not running in the background then we get the error "The NPF driver isn't running. You may have trouble capturing or listing interfaces."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-KWAP-L4yxoM/VNxpFTdzRoI/AAAAAAAAAKE/l7E9dhpJOWQ/s1600/npf-driver-not-working.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-KWAP-L4yxoM/VNxpFTdzRoI/AAAAAAAAAKE/l7E9dhpJOWQ/s1600/npf-driver-not-working.PNG" /></a></div>
<br />
<br />
<h4 style="text-align: left;">
Solution</h4>
<br />
<ol style="text-align: left;">
<li>Open Command prompt by right clicking on it and "Run as administrator".</li>
<li>Goto "<b>cd Windows\System32</b>" directory</li>
<li>Start the "<b>net start npf</b>"</li>
<li>After the success message, Restart the Wireshark</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-0sqmTydD0IY/VNxsHEelWTI/AAAAAAAAAKQ/DmcIpxEvBaI/s1600/start-npf.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-0sqmTydD0IY/VNxsHEelWTI/AAAAAAAAAKQ/DmcIpxEvBaI/s1600/start-npf.PNG" /></a></div>
<div>
<br /></div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-56507629968830689512014-10-31T13:01:00.000+05:302014-10-31T13:01:07.759+05:30Codenameone Flow Order<div dir="ltr" style="text-align: left;" trbidi="on">
This is the flow order of functions that is loaded when an application created using codenameone framework starts<br />
<br />
1. ImmuntiyMeterApp.init(Object context)<br />
<br />
2. ImmuntiyMeterApp.start()<br />
<br />
3. StateMachine.initVars(Resources res)<br />
<br />
4. StateMachine.beforeMain(Form f)<br />
<br />
5. StateMachine.postMain(Form f)<br />
<br />
6. StateMachine.StateMachine(String resFile)<br />
<br /></div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-52721016042766629552014-10-25T21:47:00.001+05:302014-10-25T21:50:41.419+05:30The Web Developer's must have Tool - Firebug<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Firebug_logo.png/100px-Firebug_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Firebug_logo.png/100px-Firebug_logo.png" /></a></div>
Without Firebug i wouldn't have learned the HTML, CSS, Javascript or the working of Web very quickly.<br />
<br />
Firebug is a add-on that is available with firefox browser and a firefox-lite with chrome.<br />
<br />
<h3 style="text-align: left;">
So what is so great about the Firebug? </h3>
<div style="text-align: left;">
1. Firebug lets you inspect each HTML elements (like <a>, <div>, <table> ...) and when you inspect the element then the element, its margin, padding, border gets highlighted.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
2. On inspecting a element, you can also the view the CSS used to style that part. You can also manipulate and tweak the css to view the result on the fly.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
3. To see what all resources are loaded when a page is requested.To find out the time taken and the order in which the resource is loaded. To find out the status, url, domain, ip, size and Header info.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
4. To debug JavaScript, to trace the stack flow of the script, to break the script and inspect the DOM and other elements at that time.</div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-65051253121100271632014-07-29T14:47:00.000+05:302014-07-29T14:47:48.742+05:30Irony of Science in Eid al-Fitr<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: medium;">In today’s world, the science has grown incredibly that we have <i>Hubble Space Telescope</i> launched into space watching the universe in different spectrums. We have satellites for weather predictions; we have Terrestrial Space observatory Telescope's watching for flares in sun and climate in Jupiter. We have even accurately and safely landed man on the moon. </span></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: medium;">We can even accurately predicate solar and lunar eclipse, the exact points in earth where it would be visible. We have even predicated the next arrival of <i><b>Halley's Comet</b></i> and also the distance away from the earth. The next arrival of Halley's Comet is on <b><i>28th July 2061</i></b>, and then on <i>7th May, 2134 </i> and it will pass within 13.9 million km from earth.</span></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://upload.wikimedia.org/wikipedia/commons/b/b9/Halley's_Comet_-_May_29_1910.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Halley's Comet May 29 1910" border="0" height="302" src="https://upload.wikimedia.org/wikipedia/commons/b/b9/Halley's_Comet_-_May_29_1910.jpg" title="Halley's Comet on May 29 1910 by Professor Edward Emerson Barnard at Yerkes Observatory, in Williams Bay, Wisconsin. [Public domain], via Wikimedia Commons" width="400" /></a></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<span style="font-size: 13.5pt;"><br /></span></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<span style="font-size: medium;">In spite of all these feats, we still haven’t been able to predicate accurately the <b>Eid al-Fitr</b>. In India, all banks and govt office calendars marked 28th July as Eid al-Fitr holiday but it was predicted a day earlier.</span></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<span style="font-size: medium;">The date of Eid al-Fitr for a region is confirmed by the sighting of the new moon.in that particular region. In countries like India, where even the whole nation has same time-zone can't still predicate when the new moon will occur.</span></div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-57864906838898507112014-07-26T01:08:00.000+05:302014-07-26T01:16:38.345+05:30How much is the Advertisment Revenues in Media<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
.featured-table2 {
border-collapse: separate;
border-spacing: 0;
color: #2a2a2a;
margin: 0 auto;
table-layout: fixed;
text-shadow: 0 1px 0 #fff;
}
.featured-table2 td {
border-bottom: 1px solid #cdcdcd;
box-shadow: 0 1px 0 white;
padding: 0 20px;
white-space: normal;
font-size: medium;
}
.featured-table2 tbody td {
}
.featured-table2 td:nth-child(1), .featured-table2 td:nth-child(2) {
border-right: 1px solid white;
}
.featured-table2 td:nth-child(1){
text-align: center;
}
.featured-table2 thead td {
border-top: 1px solid #eaeaea;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.featured-table2 thead td:first-child {
border-top: medium none;
}
.featured-table2 tfoot td {
border-bottom: 1px solid #dadada;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.tablecell
{
padding:10px;
}
</style>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
Advertisment is the primary revenue for most media.<br />
<br />
<table cellpadding="0" class="featured-table2">
<thead>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
<strong>Media</strong></div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
<strong>Revenue</strong></div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
TV</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
18 b$</div>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
Newspaper</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
5 b$</div>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
Magazine</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
1 b$</div>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
Radio</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
1 b$</div>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
OOH</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
444 m$</div>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
Cinema</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
92 m$</div>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
Pay TV</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
166 m$</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td bgcolor="#F5F5F5" valign="top"><div class="tablecell">
Others</div>
</td>
<td bgcolor="#E6EAEC" valign="top"><div class="tablecell">
300 m$</div>
</td>
</tr>
</tfoot>
</table>
</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Industries that are spending in online medium.</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
<ul style="text-align: left;">
<li>Electronics</li>
<li>Fashion - Men</li>
<li>Fashion - Woman</li>
<li>Baby Care</li>
<li>Video Games</li>
<li>Fitness</li>
<li>Health Care</li>
<li>Car</li>
<li>Bike</li>
<li>Jewellery</li>
<li>Dating</li>
</ul>
</div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-23387106264877039642014-07-13T17:05:00.000+05:302014-07-14T12:50:54.168+05:30To insert debug code in all functions using regular expression<div dir="ltr" style="text-align: left;" trbidi="on">
<style>
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;}
p.sc0, li.sc0, div.sc0
{mso-style-name:sc0;
mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
//background:#F2F4FF;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;}
p.sc5, li.sc5, div.sc5
{mso-style-name:sc5;
mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
//background:#F2F4FF;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:navy;
font-weight:bold;
font-style:italic;}
p.sc7, li.sc7, div.sc7
{mso-style-name:sc7;
mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
//background:#F2F4FF;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
color:gray;}
p.sc10, li.sc10, div.sc10
{mso-style-name:sc10;
mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
//background:#F2F4FF;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
font-weight:bold;}
p.sc11, li.sc11, div.sc11
{mso-style-name:sc11;
mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
//background:#F2F4FF;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;}
span.sc51
{mso-style-name:sc51;
mso-style-unhide:no;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";
color:navy;
//background:#F2F4FF;
font-weight:bold;
font-style:italic;}
span.sc01
{mso-style-name:sc01;
mso-style-unhide:no;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";
color:black;
//background:#F2F4FF;}
span.sc111
{mso-style-name:sc111;
mso-style-unhide:no;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";
color:black;
//background:#F2F4FF;}
span.sc101
{mso-style-name:sc101;
mso-style-unhide:no;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";
color:black;
//background:#F2F4FF;
font-weight:bold;}
span.sc71
{mso-style-name:sc71;
mso-style-unhide:no;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";
color:gray;
//background:#F2F4FF;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page WordSection1
{size:595.3pt 841.9pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
</style>
<style type="text/css">
.featured-table {
border-collapse: separate;
border-spacing: 0;
color: #2a2a2a;
margin: 0 auto;
table-layout: fixed;
text-shadow: 0 1px 0 #fff;
width: 100%;
}
.featured-table td {
border-bottom: 1px solid #cdcdcd;
box-shadow: 0 1px 0 white;
padding: 0 20px;
white-space: normal;
font-size: medium;
}
.featured-table tbody td {
}
.featured-table td:nth-child(1), .featured-table td:nth-child(2) {
border-right: 1px solid white;
}
.featured-table td:nth-child(1){
width:60px;
text-align: center;
}
.featured-table thead td {
border-top: 1px solid #eaeaea;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.featured-table thead td:first-child {
border-top: medium none;
}
.featured-table tfoot td {
border-bottom: 1px solid #dadada;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
</style>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
Lets illustrate with a Javascript Source Code and Notepad++ IDE</div>
<h4 style="text-align: left;">
Regular Expression to Find functions</h4>
<div class="codeformat" style="text-align: left;">
((\w*)\s*[:|=]\s*function\(\w*\)\s*\{)</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Debug Code to insert inside each functions</h4>
<div class="codeformat" style="text-align: left;">
console.log("functionName");</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Regular Expression to Insert Debug Code inside Functions</h4>
<div class="codeformat">
$1 \n\tconsole\.log\("$2"\)\;</div>
<div>
<br /></div>
<div>
<b>Note</b>: Please enable "<i>Re<u>g</u>ular expression</i>" and "<u>.</u> <i>matches newline</i>" in Search Mode in Replace box in Notepad++ for inserting inside more than 1 function using regular expression.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-TbyAgV39eTQ/U8Km1UzbVUI/AAAAAAAAAGA/1PRIolFH0kk/s1600/regex+find+and+replace.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-TbyAgV39eTQ/U8Km1UzbVUI/AAAAAAAAAGA/1PRIolFH0kk/s1600/regex+find+and+replace.PNG" /></a></div>
<br />
<b>A sample Javascript before inserting Debug code</b></div>
<div>
<br />
<div class="longcodeformat" style="font-size: 10pt;">
<div class="WordSection1">
<div class="MsoNormal">
<span class="SpellE"><span class="GramE"><span class="sc51"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">var</span></span></span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="SpellE"><span class="sc111"><span style="background: lime; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: lime; mso-shading-themecolor: accent3; mso-shading-themetint: 153; mso-shading: #C2D69B;">SyntaxHighlighter</span></span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">=</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"> </span></span><span class="sc51"><span style="background: yellow; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: yellow; mso-shading-themecolor: accent3; mso-shading-themetint: 153; mso-shading: #C2D69B;">function</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">()</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">{</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"> <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="SpellE"><span class="GramE"><span class="sc51"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">var</span></span></span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="SpellE"><span class="sc111"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">sh</span></span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">=</span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">{</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="mso-spacerun: yes;"> </span></span></span><span class="GramE"><span class="sc111"><span style="background: lime; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: lime;">all</span></span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">:</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
</span></span><span class="sc51"><span style="background: yellow; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: yellow;">function</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">(</span></span><span class="SpellE"><span class="sc111"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">params</span></span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">)</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">{</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="SpellE"><span class="GramE"><span class="sc111"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">attachEvent</span></span></span></span><span class="GramE"><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">(</span></span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="SpellE"><span class="GramE"><span class="sc111"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">window</span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">,</span></span><span class="sc71"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">'description</span></span></span><span class="sc71"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">'</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">);</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">}</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">};</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">}();</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
</div>
</div>
<br />
<b>Javascript code after inserting Debug code using Regular Expression</b><br />
<br />
<div class="longcodeformat" style="font-size: 10pt;">
<div class="WordSection1">
<div class="MsoNormal">
<span class="SpellE"><span class="GramE"><span class="sc51"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">var</span></span></span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="SpellE"><span class="sc111"><span style="background: lime; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: lime; mso-shading-themecolor: accent3; mso-shading-themetint: 153; mso-shading: #C2D69B;">SyntaxHighlighter</span></span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">=</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"> </span></span><span class="sc51"><span style="background: yellow; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: yellow; mso-shading-themecolor: accent3; mso-shading-themetint: 153; mso-shading: #C2D69B;">function</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">()</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">{</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"> <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="mso-tab-count: 1;"> </span><span class="GramE">console.log(</span>"<span class="SpellE">SyntaxHighlighter</span>");<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="SpellE"><span class="GramE"><span class="sc51"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">var</span></span></span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="SpellE"><span class="sc111"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">sh</span></span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">=</span></span><span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"> </span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">{</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="mso-spacerun: yes;"> </span></span></span><span class="GramE"><span class="sc111"><span style="background: lime; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: lime;">all</span></span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">:</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
</span></span><span class="sc51"><span style="background: yellow; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-highlight: yellow;">function</span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">(</span></span><span class="SpellE"><span class="sc111"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">params</span></span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">)</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">{</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="mso-tab-count: 2;"> </span>console.log("all");<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="SpellE"><span class="GramE"><span class="sc111"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">attachEvent</span></span></span></span><span class="GramE"><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">(</span></span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="SpellE"><span class="GramE"><span class="sc111"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">window</span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">,</span></span><span class="sc71"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">'description</span></span></span><span class="sc71"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">'</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">);</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">}</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc01"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;"><span style="mso-spacerun: yes;"> </span></span></span><span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">};</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="sc101"><span style="background: white; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-shading-themecolor: background1;">}();</span></span><span class="sc01"><span style="font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
</div>
</div>
<br />
<br />
To know more about <a href="http://codeworkout.blogspot.in/2014/07/regular-expression-to-hack-source-code.html" target="_blank">How this Regular Expression Works and Customisation</a><br />
<br />
<br /></div>
</div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-6324375067437551322014-06-21T20:37:00.001+05:302014-06-22T14:00:49.190+05:30Eclipse IDE Shortcuts<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
1. System.out.println();</h4>
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>syso + Ctrl + Space</pre>
</div>
<br />
<h4 style="text-align: left;">
2. Toggle Comment</h4>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>Ctrl + Shift + C</pre>
</div>
<br />
<h4 style="text-align: left;">
3. Run Application</h4>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>Ctrl + F11</pre>
</div>
<br />
<h4 style="text-align: left;">
4. Import all packages</h4>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>Ctrl + Shift + O</pre>
</div>
<br />
<h4 style="text-align: left;">
5. Auto Complete </h4>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>Ctrl + Space</pre>
</div>
<br />
<h4 style="text-align: left;">
6. Generate Getter and Setter </h4>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>Ctrl + Shift + G</pre>
</div>
<br />
But this shortcut is not default one, so you have to set it in eclipse.<br />
<br />
<b>Steps to map a command to desired key combination: </b><br />
<ol style="text-align: left;">
<li>Goto 'Windows' menu -> 'Preferences' ->'General' -> 'Keys'</li>
<li>In 'type filter text', type 'getter'</li>
<li>Select command 'Generate Getters and Setters'</li>
<li>Below in 'Binding' field, press CTRL + SHIFT + G</li>
<li>In 'When' selection below, select 'In Windows' </li>
<li>Click 'Apply'.</li>
<li>If in any case there shows Conflicts then either unbind the old one or change your key combo.</li>
<li>Click 'OK'</li>
</ol>
<br />
<br />
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-63298479645073430172014-05-31T02:07:00.000+05:302014-07-14T12:52:24.710+05:30Protect your Privacy in Internet from Google and other Service Providers<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<b>DNS Servers</b><br />
Usually there are two DNS Servers<br />
<br />
Prefered DNS server : 5.135.165.179<br />
Alternate DNS server : 8.8.8.8<br />
<br />
Here 8.8.8.8 is the Public DNS service provided by Google.<br />
<br />
<br />
So best way to protect yourself is by using DNS servers of your ISP or OpenDNS<br />
<br />
BSNL DNS Server 1 : 218. 248.240.208<br />
BSNL DNS Server 2 : 218. 248.240.23<br />
<br />
or<br />
<br />
OpenDNS Server1 : 208.67.222.222<br />
<br />
OpenDNS Server2 : 208.67.220.220<br />
<br />
<br />
<br />
More detailed reasoning at <a href="http://codeworkout.blogspot.in/2014/05/lack-of-privacy-in-internet-from-google.html" target="_blank">How you have no privacy from Google and other service providers</a> <br />
<br />
<br />
<br /></div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-3697808671993037752014-05-25T20:32:00.001+05:302014-05-29T17:24:57.693+05:30Install LAMP (Linux Apache Mysql PHP) in ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
<b> </b></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;"><b>Step 1 : </b>Install Apache2</span></h3>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>sudo apt-get update
sudo apt-get install apache2</pre>
</div>
To check the installation,try the following address in the browser
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>http://localhost:80/ </pre>
</div>
<h3 style="text-align: left;">
Step 2 :<span style="font-weight: normal;"> Install Mysql
</span></h3>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql</pre>
</div>
Enter the mysql root password,when promted during installation
To do simple auto configuration of mysql follow these commands
<br /><br/>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation</pre>
</div>
Then enter the mysql root password entered earlier
<br />
press 'n' to not change the current password
<br /><br/>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] n
Reload privilege tables now? [Y/n] y</pre>
</div>
For Production machines, press 'y' for option 'Remove test database and access to it?'<br />
<h3 style="text-align: left;">
<span style="font-weight: normal;"><b>Step 3 :</b> Install PHP
</span></h3>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt</pre>
</div>
Then after installation, open below file and edit with sudo privelege.
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>etc/apache2/mods-enabled/dir.conf</pre>
</div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre><IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule></pre>
</div>
To install other php modules or extension, first find it
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>apt-cache search php5-</pre>
</div>
Then install that required module
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>sudo apt-get install <module_name></pre>
</div>
The default server public folder is in the below path
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>/var/www/</pre>
</div>
<h3 style="text-align: left;">
<b>Step 4 : Restart Apache Web Server
</b></h3>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>sudo service apache2 restart </pre>
</div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-65054929534776305582014-04-11T16:30:00.000+05:302014-04-11T16:30:13.922+05:30String is immutable in java<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Yes, it true that string is immutable in java which means that the String object doesn't change.<br />
But that can't be true because we have seen many occasions in the program where the String variable is changed.<br />
<br />
Yes its true, but we have our understanding of String a bit wrong here. Actually unlike C program, in Java, String is not a primitive variable but a special Class. So in our code actually we are creating a String object for new character sequence.<br />
<br />
For more understanding go to this link <a href="http://codeworkout.blogspot.in/2014/04/string-is-immutable-in-java.html">String can't be immutable in java</a></div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-72021712774723735512014-04-04T15:32:00.000+05:302015-10-01T13:33:11.580+05:30Neo4j Community Build Error<div dir="ltr" style="text-align: left;" trbidi="on">
<style>
.codeformat
{
background-color: #EEEEEE;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
margin-bottom: 10px;
max-height: 1200px;
overflow: auto;
padding: 5px;
min-width: 720px;
}
</style>
<!--
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre></pre>
</div>
-->
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
To build the neo4j community, I am following the steps as done in Travis CI link <a href="https://travis-ci.org/peterneubauer/community-experiments" target="_blank">here</a>.<br />
<br />
But i am getting the error below<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>[ERROR] Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header -> [Help 1]
</pre>
</div>
<span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">To solve this "</span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Build the </span><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.804800033569336px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">community/license-check</code><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"> submodule first." as suggested in SO link <a href="http://stackoverflow.com/questions/22848416/build-of-neo4j-community-is-failing-why/22848853?noredirect=1#22848853" target="_blank">here</a>.</span><br />
<span style=" font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"><br /></span>
<span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">But still i am getting the same error.</span><br />
<span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"><br /></span>
<span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Please check whether my steps taken are correct or not.</span><br />
<span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"><br /></span>
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>/$ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-60-generic", arch: "amd64", family: "unix"
</pre>
</div>
<div>
<br />
<br />
<br /></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>/$ cd ~/Workspace/neo4jdev/community-experiments/licensecheck-config/
~/Workspace/neo4jdev/community-experiments/licensecheck-config$ mvn install
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.239s
[INFO] Finished at: Fri Apr 04 15:06:07 IST 2014
[INFO] Final Memory: 14M/148M
</pre>
</div>
<div>
<br />
<br />
<br /></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>~/Workspace/neo4jdev/community-experiments/licensecheck-config$ cd ..
~/Workspace/neo4jdev/community-experiments$ MAVEN_OPTS="-Xss2m -Xmx1G"
~/Workspace/neo4jdev/community-experiments$ mvn install -DskipTests
[INFO] --- license-maven-plugin:3:check (check-licenses) @ neo4j-kernel ---
[INFO] Checking licenses...
[INFO] [INFO] Missing header in: /~/Workspace/neo4jdev/community-experiments/kernel/src/test/java/org/neo4j/unsafe/batchinsert/BatchInserterImplTest.java
[INFO] Missing header in: /~/Workspace/neo4jdev/community-experiments/kernel/src/test/java/org/neo4j/kernel/RaceBetweenCommitAndGetMoreRelationshipsIT.java
[INFO] Missing header in: /~/Workspace/neo4jdev/community-experiments/kernel/src/main/java/org/neo4j/tooling/GlobalGraphOperations.java
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j - Graph Database Kernel ..................... FAILURE [1.719s]
[INFO] Neo4j - JMX support ............................... SKIPPED
[INFO] Neo4j - Usage Data Collection ..................... SKIPPED
[INFO] Neo4j - Graphviz generation ....................... SKIPPED
[INFO] Neo4j - Lucene Index .............................. SKIPPED
[INFO] Neo4j - Graph Algorithms .......................... SKIPPED
[INFO] Neo4j - Graph Matching ............................ SKIPPED
[INFO] Neo4j - Cypher .................................... SKIPPED
[INFO] Neo4j Community ................................... SKIPPED
[INFO] Neo4j Community ................................... SKIPPED
[INFO] Neo4j - Generic shell ............................. SKIPPED
[INFO] Neo4j Examples .................................... SKIPPED
[INFO] Neo4j Server API .................................. SKIPPED
[INFO] Neo4j Server ...................................... SKIPPED
[INFO] Neo4j Server Examples ............................. SKIPPED
[INFO] Licensing configuration ........................... SKIPPED
[INFO] Neo4j Community Build ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.427s
[INFO] Finished at: Fri Apr 04 15:08:26 IST 2014
[INFO] Final Memory: 14M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
</pre>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: left;">
<h3 style="text-align: left;">
Resolved</h3>
</div>
<div style="text-align: left;">
The license check is failing may because of some repository url may have changed, which we have no control of so its better to skip the license check.<br />
<br />
The following command will help to skip license check and build sucessfully.<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>$ mvn install -DskipTests -Dlicensing.skip</pre>
</div>
<br />
In linux os, it build successfully but in windows there were some issues in project "neo4j-browser" so i skipped that project to successfully build in windows too.<br />
<br />
Below is the error in windows in project neo4j-browser<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Licensing configuration ........................... SUCCESS [ 2.796 s]
[INFO] Neo4j - Primitive Collections ..................... SUCCESS [ 0.794 s]
[INFO] Neo4j - Graph Database Kernel ..................... SUCCESS [01:34 min]
[INFO] Neo4j - JMX support ............................... SUCCESS [ 1.362 s]
[INFO] Neo4j - Usage Data Collection ..................... SUCCESS [ 3.880 s]
[INFO] Neo4j - Monitor Logging ........................... SUCCESS [ 1.120 s]
[INFO] Neo4j - Graphviz generation ....................... SUCCESS [ 1.592 s]
[INFO] Neo4j - Lucene Index .............................. SUCCESS [ 4.390 s]
[INFO] Neo4j - Graph Algorithms .......................... SUCCESS [ 2.070 s]
[INFO] Neo4j - Graph Matching ............................ SUCCESS [ 1.230 s]
[INFO] Neo4j Community Cypher Build ...................... SUCCESS [ 11.080 s]
[INFO] Neo4j - Cypher Commons ............................ SUCCESS [ 50.804 s]
[INFO] Neo4j - Cypher Compiler 2.1 ....................... SUCCESS [03:45 min]
[INFO] Neo4j - Cypher .................................... SUCCESS [ 37.636 s]
[INFO] Neo4j Community ................................... SUCCESS [ 1.420 s]
[INFO] Neo4j GraphGist ................................... SUCCESS [ 6.780 s]
[INFO] Neo4j - Cypher Documentation ...................... SUCCESS [ 36.070 s]
[INFO] Neo4j Community ................................... SUCCESS [ 0.750 s]
[INFO] Neo4j - Generic shell ............................. SUCCESS [ 3.550 s]
[INFO] Neo4j Examples .................................... SUCCESS [ 1.790 s]
[INFO] Neo4j Server API .................................. SUCCESS [ 1.920 s]
[INFO] Neo4j Browser ..................................... FAILURE [ 0.430 s]
[INFO] Neo4j Server ...................................... SKIPPED
[INFO] Neo4j - Server Plugin Tests ....................... SKIPPED
[INFO] Neo4j Server Examples ............................. SKIPPED
[INFO] Neo4j Community Build ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:15 min
[INFO] Finished at: 2014-04-11T17:08:08+05:30
[INFO] Final Memory: 54M/302M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (default) on project neo4j-browser: An An
t BuildException has occured: unless=cmdsuccess -> [Help 1]</pre>
</div>
<br />
Now if you want to continue by skipping the project "Neo4j Browser", follow the below command<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>$ mvn install -DskipTests -Dlicensing.skip -e -rf :neo4j-server</pre>
</div>
<br />
<br />
Atlas, successfully build
<br />
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j Server ...................................... SUCCESS [01:55 min]
[INFO] Neo4j - Server Plugin Tests ....................... SUCCESS [ 3.482 s]
[INFO] Neo4j Server Examples ............................. SUCCESS [ 1.880 s]
[INFO] Neo4j Community Build ............................. SUCCESS [ 0.440 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:05 min
[INFO] Finished at: 2014-04-11T17:20:07+05:30
[INFO] Final Memory: 46M/227M
[INFO] ------------------------------------------------------------------------</pre>
</div>
<br />
<br /></div>
</div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-86491011106525020462013-02-16T15:31:00.000+05:302015-10-01T14:04:44.775+05:30Difference between public, private, protected and default<div dir="ltr" style="text-align: left;" trbidi="on">
<style>
.codeformat
{
background-color: #EEEEEE;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
margin-bottom: 10px;
max-height: 800px;
overflow: auto;
padding: 5px;
width: 650px;
}
</style><br />
<div class="MsoNormal">
</div>
<br />
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span></b></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"> Access Modifier Visibility </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 16.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" class="MsoNormalTable" style="mso-border-insideh: .75pt outset windowtext; mso-border-insidev: .75pt outset windowtext; mso-cellspacing: 1.5pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184;"><tbody>
<tr style="height: 50.1pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Modifier</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 68.5pt;" width="91"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Class</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 79.4pt;" width="106"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Package</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 76.45pt;" width="102"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Subclass</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 80.8pt;" width="108"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Everywhere</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td></tr>
<tr style="height: 29.75pt; mso-yfti-irow: 1;"><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 68.5pt;" width="91"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 79.4pt;" width="106"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 76.45pt;" width="102"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 80.8pt;" width="108"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td></tr>
<tr style="height: 30.55pt; mso-yfti-irow: 2;"><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">protected</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 68.5pt;" width="91"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 79.4pt;" width="106"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 76.45pt;" width="102"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 80.8pt;" width="108"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td></tr>
<tr style="height: 29.75pt; mso-yfti-irow: 3;"><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">default</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #EEEEEE; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 68.5pt;" width="91"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 79.4pt;" width="106"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 76.45pt;" width="102"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 80.8pt;" width="108"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td></tr>
<tr style="height: 30.55pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes;"><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">private</span></b><b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 68.5pt;" width="91"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 79.4pt;" width="106"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 76.45pt;" width="102"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 80.8pt;" width="108"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>public </b> - Members are visible in same class, same package, sub classes and in other classes.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>protected - </b>Members are visible in same class, same package, sub classes but not in other classes.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>default - </b>Members are visible in same class, same package but not in sub classes and other classes.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">private</b> - Members are visible only in same class but not in same package, sub classes and other classes.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style=" font-family: Consolas; font-size: 14.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span></b></div>
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"> Access Modifier Level Applicab<span style="font-size: small;">i</span>lity </span></b></div>
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" class="MsoNormalTable" style="mso-border-insideh: .75pt outset windowtext; mso-border-insidev: .75pt outset windowtext; mso-cellspacing: 1.5pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184;"><tbody>
<tr style="height: 50.1pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Modifier</span></b><b style="mso-bidi-font-weight: normal;"><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 64.35pt;" width="86"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Member Field</span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 62.3pt;" width="83"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Member Method</span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 55.2pt;" width="74"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Nested Class</span></b></div>
</td><td style="height: 50.1pt; padding: .75pt .75pt .75pt .75pt; width: 75.7pt;" width="101"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Top Level Class</span></b></div>
</td></tr>
<tr style="height: 29.75pt; mso-yfti-irow: 1;"><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><b style="mso-bidi-font-weight: normal;"><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 64.35pt;" width="86"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 62.3pt;" width="83"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 55.2pt;" width="74"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 75.7pt;" width="101"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td></tr>
<tr style="height: 30.55pt; mso-yfti-irow: 2;"><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style=" font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">default</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 64.35pt;" width="86"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 62.3pt;" width="83"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 55.2pt;" width="74"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 75.7pt;" width="101"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td></tr>
<tr style="height: 29.75pt; mso-yfti-irow: 3;"><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">private</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 64.35pt;" width="86"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 62.3pt;" width="83"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 55.2pt;" width="74"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 29.75pt; padding: .75pt .75pt .75pt .75pt; width: 75.7pt;" width="101"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td></tr>
<tr style="height: 30.55pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes;"><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 90.85pt;" width="121"><div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">protected</span></b><b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 64.35pt;" width="86"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 62.3pt;" width="83"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 55.2pt;" width="74"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">Yes</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
</td><td style="height: 30.55pt; padding: .75pt .75pt .75pt .75pt; width: 75.7pt;" width="101"><div align="center" class="MsoNormal" style="text-align: center;">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 12.0pt; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">No</span></b></div>
</td></tr>
</tbody></table>
<br />
<div class="MsoNormal">
<b> public, default </b>- These modifiers can be applied to members of the class and also to the top class. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>private, protected </b>- These modifiers can be applied to member of a class only but not to the top class.<br />
<br />
<br />
<br />
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="color: #92d050; font-family: Consolas; font-size: 13.0pt; line-height: 115%; mso-fareast-language: EN-IN;">Simple Inheritance</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">parent.java</span></b><b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt;"></span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">package</span></b><span style="font-family: Consolas; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-fareast-language: EN-IN;"> r1;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent </span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">int</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color:black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">;</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent()</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span></span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">=10;</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> main(String args[])</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>parent p = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent();</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">"parent main x="</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">+p.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">);</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 13.0pt; line-height: 115%; mso-fareast-language: EN-IN;">Output</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #B8B8B8; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">parent main x=10</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">sub1.java</span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">package</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> sub1 </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">extends</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent<span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// a subclass of parent</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>sub1()</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span></span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">=20;</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> main(String args[])</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>sub1 s1 = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> sub1();</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">"In r1 pckg, sub1 class, main fn, sub1.x = "</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">+s1.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">);<span style="mso-tab-count: 2;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}<span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 13.0pt; line-height: 115%; mso-fareast-language: EN-IN;">Output</span></b></div>
<div class="MsoNormal">
<span style="color: #B8B8B8; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">In r1 pckg, sub1 class, main fn, sub1.x = 20</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<h3 class="MsoNormal" style="text-align: left;">
Examples of Access Modifiers</h3>
<div class="MsoNormal">
<div class="MsoNormal">
Following are the errors that occurs if access modifiers are not used properly:</div>
<br />
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 13pt; line-height: 115%;">private - The field parent.x is not visible</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">parent.java</span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">package</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1;</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent </span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="background: yellow; mso-highlight: yellow;">private</span> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">int</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">;<span style="mso-tab-count: 1;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// private access modifier</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">sub1.java</span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">package</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1;<span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// same package as the parent</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> sub1 </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">extends</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent<span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// a subclass of parent</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>sub1()</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span></span><span style="background: yellow; color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN; mso-highlight: yellow;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">=20;</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> main(String args[])</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>sub1 s1 = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> sub1();</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">"In r1 pckg, sub1 class, main fn, sub1.x = "</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">+s1.</span><span style="background: yellow; color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN; mso-highlight: yellow;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">);<span style="mso-tab-count: 2;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}<span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 13.0pt; line-height: 115%; mso-fareast-language: EN-IN;">Output</span></b></div>
<div class="MsoNormal">
<span style="font-size: small;"><span style="color: red; font-family: Consolas; line-height: 115%;">The field parent.x is not visible</span></span><br />
<br />
<span><span style="color: red; font-family: Consolas; line-height: 115%;"><span style="color: #B8B8B8;"><span><b>Because: </b><span>sub1.java is not the <span>same class where <span>x is declared.</span></span></span></span></span></span></span> </div>
<div class="MsoNormal">
<br />
<br /></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 13pt; line-height: 115%;">default - The field parent.x is not visible</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">parent.java</span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">package</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1;</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent </span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">int</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">; <span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// no access modifier is <span style="background: yellow; mso-highlight: yellow;">default</span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">sub2.java</span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// sub2 class is not part of r1 package</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1.parent;<span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// so<span style="mso-spacerun: yes;"> </span>its imported</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> sub2 </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">extends</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent<span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// a subclass of parent</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>sub2()</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span></span><span style="background: yellow; color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN; mso-highlight: yellow;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">=30;</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> main(String args[])</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>sub2 s2 = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> sub2();</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 2;"> </span>System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">"In no pckg, sub2 class, main fn, sub2.x = "</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">+s2.</span><span style="background: yellow; color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN; mso-highlight: yellow;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">);</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}<span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal">
<br />
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 13.0pt; line-height: 115%; mso-fareast-language: EN-IN;">Output</span></b></div>
<span style="font-size:small;"><span style="color: red; font-family: Consolas; line-height: 115%;">The field parent.x is not visible</span></span><br />
<br />
<span><span style="color: red; font-family: Consolas; line-height: 115%;"><span style="color: #B8B8B8;"><span><b>Because: </b><span>sub2.java is not in the <span>same package of parent where <span>x is declared.</span></span></span></span></span></span></span></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br />
<br />
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="color: red; font-family: Consolas; font-size: 13pt; line-height: 115%;"> protected - The field parent.x is not visible</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">parent.java</span></b></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">package</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1;</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent </span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span></span><b><span style="background: yellow; color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN; mso-highlight: yellow;">protected</span></b><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> int</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">;<span style="mso-spacerun: yes;"> </span></span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// protected access modifier</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; line-height: 115%; mso-bidi-font-size: 10.0pt; mso-fareast-language: EN-IN;">some1.java</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;"></span></div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// some1 class is not part of r1 package</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> r1.parent;</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> some1 </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">// not a subclass of parent</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">{<span style="mso-tab-count: 2;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> main(String args[])</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>{</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>parent p = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"> parent();</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">"In no pckg, some1 class, main fn, parent.x = "</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">+p.</span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">x</span><span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;">);</span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"><span style="mso-tab-count: 1;"> </span>}<span style="mso-tab-count: 1;"> </span></span><span style="font-family: Consolas; font-size: 10.0pt; mso-fareast-language: EN-IN;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%; mso-fareast-language: EN-IN;">}</span></div>
</div>
<div class="MsoNormal">
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Consolas; font-size: 13.0pt; line-height: 115%; mso-fareast-language: EN-IN;">Output</span></b></div>
<span style="font-size: small;"><span style="color: red; font-family: Consolas; line-height: 115%;">The field parent.x is not visible</span></span><br />
<br />
<span><span style="color: red; font-family: Consolas; line-height: 115%;"><span style="color: #B8B8B8;"><span><b>Because: </b><span>some1.java is neither in the <span>same package nor in subclass of parent where <span>x is declared.</span></span></span></span></span></span></span></div>
</div>
</div>aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com1tag:blogger.com,1999:blog-5953327639270922510.post-14884236057925373442012-10-20T21:53:00.002+05:302012-10-23T12:44:35.624+05:30Facebook and AD Campaigns<div dir="ltr" style="text-align: left;" trbidi="on">
<style>
.codeformat
{
background-color: #EEEEEE;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
margin-bottom: 10px;
max-height: 600px;
overflow: auto;
padding: 5px;
width: 600px;
}
</style>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<br />
<h3 style="text-align: left;">
<span style="font-style: normal; mso-bidi-font-style: italic;">Is it true, bots
are clicking on the ads in facebook?</span></h3>
<div class="MsoNormal">
Yes, its True! </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Limited Run Company noticed it could only verify about 20
percent of the clicks that were supposedly being converted to users showing up
on its Web site. </div>
<div class="MsoNormal" style="text-indent: 9.0pt;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">80% of clicks it was
paying for were coming from bots.</b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Bots</b> are computer
scripts or fake users who simply repeatedly click the ads.<br />
</div>
<h3 style="text-align: left;">
<span style="font-style: normal;">What if you complain this to facebook?</span></h3>
<div class="MsoNormal">
If a complaint is send to Facebook, then it demands for the
below information:</div>
<ol start="1" style="margin-top: 0cm;" type="1">
<li class="MsoNormal" style="mso-list: l2 level1 lfo1; tab-stops: list 36.0pt;">Server
Logs</li>
<li class="MsoNormal" style="mso-list: l2 level1 lfo1; tab-stops: list 36.0pt;">Aggregated
counts of your clicks</li>
</ol>
<div class="MsoNormal">
<br /></div>
<h3 style="text-align: left;">
<span style="font-style: normal;">What are these?</span></h3>
<h3>
<span style="font-family: "Times New Roman"; font-size: 11.0pt; mso-bidi-font-family: Arial;">1. Server Logs</span></h3>
<div class="MsoNormal">
Raw server logs of all clicks coming to your website, or the
total amount of all clicks coming from Facebook, with an explanation of how you
filtered them. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
These server logs must contain:</div>
<ol start="1" style="margin-top: 0cm;" type="1">
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">Timestamp
of page load</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">User
agent string</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">User
IP</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">Exact
page loaded, with the parameters passed </li>
</ol>
<h3 class="MsoNormal" style="text-align: left;">
<span style="font-family: "Times New Roman"; font-size: 11.0pt; mso-bidi-font-family: Arial;"> 2. Aggregated counts of your clicks (Optional)</span></h3>
<div class="MsoNormal">
If possible, please also include the following:</div>
<ol start="1" style="margin-top: 0cm;" type="1">
<li class="MsoNormal" style="mso-list: l1 level1 lfo3; tab-stops: list 36.0pt;">The
total number of clicks you received from Facebook split by day, for the
specific time period where you have noticed the click issues.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo3; tab-stops: list 36.0pt;">The
total number of clicks you were billed for, by Facebook, also by billable
day for the period in question.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo3; tab-stops: list 36.0pt;">A
screenshot of your external reporting system showing the total number of
clicks received from Facebook.</li>
</ol>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<h3 style="text-align: left;">
<span style="font-style: normal;">How to get Server Logs?</span></h3>
<div class="MsoNormal">
For Tomcat Application Server, it can be achieved by setting
the value of ‘Access Log Valve’ tag, in pattern attribute as ‘combined’ in
server.xml.</div>
<div class="MsoNormal">
<br /></div>
<div class="codeformat">
<Valve className="org.apache.catalina.valves.AccessLogValve" pattern="combined" directory="logs" prefix="yoursitename_access" suffix=".txt" />
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<b style="mso-bidi-font-weight: normal;"><span style="color: blue;"> </span></b></div>
<h3 style="text-align: left;">
<span style="font-style: normal;">Techniques to find or block bots</span></h3>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">1.</b> Unique<b style="mso-bidi-font-weight: normal;"> Cookie</b> is one way to find out whether a
user has registered multiple times from the campaign or not. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
When a user registers from a
campaign, server should store a unique cookie value to that user’s browser. So
the next time a user registers from that browser, server can find out by
looking at the cookie stored.</div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">2.</b> Create a <b style="mso-bidi-font-weight: normal;">blacklist</b> of user agents of known bots
like <i style="mso-bidi-font-style: normal;">FeedBurner,</i> <i style="mso-bidi-font-style: normal;">Googlebot</i>. </div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
Whenever a request comes, compare
their user agent string with the blacklist, to determine whether these are bots
or not. Or even a prevention step can also be taken from these identified bots.</div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
This implementation has a
performance hit because we have to check each user request user agent to the
blacklist.</div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
Also some user agents are real
users (hired by ad agency for cheap labour). No blacklist is going to have those
real users.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">3</b>. <b style="mso-bidi-font-weight: normal;">Flag</b> bot vs. non-bot. </div>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; text-indent: 18.0pt;">
Log information about browsers which cannot execute Javascript, and then built some sort of system that analyzes these browsers and their
<b style="mso-bidi-font-weight: normal;">trends </b>(like, if they originate from
a certain IP range).</div>
<div class="MsoNormal" style="margin-left: 18.0pt; text-indent: 18.0pt;">
<span style="mso-spacerun: yes;"> </span>Javascript is something that is on by default
and for a user to turn it off is an explicit manual action. No user wants to
turn off the javascript, unless for doing any suspicious activity or he is a
guy who hates the word ‘java’. </div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
But this means cannot catch the bots
until after the analysis. </div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">4</b>.<span style="mso-spacerun: yes;"> </span>Whenever user registers, send a <b style="mso-bidi-font-weight: normal;">verification code</b> to the user’s email
or sms to authenticate the identity.<br />
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">5</b>.<span style="mso-spacerun: yes;"> </span><b style="mso-bidi-font-weight: normal;">Captcha</b><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-jHiUHA1xHTM/UIZCqhO4d9I/AAAAAAAAACo/P3ZsNiM6orE/s1600/captcha-block+bot+technique.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="captcha block bot technique" border="0" src="http://3.bp.blogspot.com/-jHiUHA1xHTM/UIZCqhO4d9I/AAAAAAAAACo/P3ZsNiM6orE/s1600/captcha-block+bot+technique.png" title="captcha block bot technique" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<b> </b>But not good for user experience
and may even prevent irritated users from registering. <!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><span style="font-style: normal;"> </span><br />
</div>
<div class="MsoNormal">
<br />
<br />
<h3 style="text-align: left;">
<span style="font-style: normal;">References:</span></h3>
</div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<a href="http://www.crttbuzzbin.com/2012/08/03/are-your-facebook-ad-clicks-coming-from-bots/">http://www.crttbuzzbin.com/2012/08/03/are-your-facebook-ad-clicks-coming-from-bots/</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://www.abovetopsecret.com/forum/thread866821/pg1">http://www.abovetopsecret.com/forum/thread866821/pg1</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://siliconangle.com/blog/2012/07/31/80-of-facebook-ad-clicks-coming-from-bots/">http://siliconangle.com/blog/2012/07/31/80-of-facebook-ad-clicks-coming-from-bots/</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://news.cnet.com/8301-1023_3-57482220-93/firm-ditches-facebook-for-twitter-claims-clicks-are-bots/#addcomm">http://news.cnet.com/8301-1023_3-57482220-93/firm-ditches-facebook-for-twitter-claims-clicks-are-bots/#addcomm</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://www.forbes.com/sites/ericjackson/2012/07/31/why-do-some-advertisers-believe-that-90-of-facebook-ad-clicks-are-from-bots/2/">http://www.forbes.com/sites/ericjackson/2012/07/31/why-do-some-advertisers-believe-that-90-of-facebook-ad-clicks-are-from-bots/2/</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://idealab.talkingpointsmemo.com/2012/07/the-mysterious-case-of-the-facebook-ad-bots.php?ref=fpnewsfeed">http://idealab.talkingpointsmemo.com/2012/07/the-mysterious-case-of-the-facebook-ad-bots.php?ref=fpnewsfeed</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086522/Transparent-Web-Application-Bot-Protection.aspx">https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086522/Transparent-Web-Application-Bot-Protection.aspx</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://michael.langley.id.au/blog/posts/28">http://michael.langley.id.au/blog/posts/28</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://perishablepress.com/5g-blacklist-2012/">http://perishablepress.com/5g-blacklist-2012/</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://tomolivercv.wordpress.com/2011/10/16/2012-user-agent-blacklist/">http://tomolivercv.wordpress.com/2011/10/16/2012-user-agent-blacklist/</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://perishablepress.com/ultimate-htaccess-blacklist/">http://perishablepress.com/ultimate-htaccess-blacklist/</a></div>
</div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-91687764478202998232012-09-01T02:02:00.005+05:302012-09-03T22:13:23.703+05:30Year 2038 Bug<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.tableformat {
background: none repeat scroll 0 0 #F2F2F2;
border: 1px solid #AAAAAA;
border-collapse: collapse;
margin: 1em 1em 1em 0;
}
table.tableformat > tr > th, table.tableformat > tr > td, table.tableformat > * > tr > th, table.wikitable > * > tr > td{
border: 1px solid #AAAAAA;
padding: 0.2em;
}
table.tableformat > tr > th, table.tableformat > * > tr > th {
background: none repeat scroll 0 0 white;
font-weight: bold;
text-align: center;
}
table.tableformat > caption{
font-weight: bold;
}
.tableformat{
page-break-inside: avoid;
}
</style>
<![endif]-->
<br />
<h1>
<span style="font-family: Verdana;">Year 2038 Bug</span></h1>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana;">Computer programs,
softwares and systems that uses 32 bit integer to represent <a href="http://www.blogger.com/blogger.g?blogID=5953327639270922510#UNIX_Time">UNIX Time</a> will fail after 19<sup>th</sup>, Jan, 2038
at 3:14:07.</span></div>
<div class="MsoNormal">
<br /></div>
<h3>
What ?<span style="font-family: Verdana;"> </span></h3>
<div class="MsoNormal">
<span style="font-family: Verdana;">
<a href="http://www.blogger.com/blogger.g?blogID=5953327639270922510" name="#UNIX_Time"></a><span style="color: blue;">Unix Time</span>
is another way
of telling time, mostly for computer’s understanding. Each instances are defined
as number of seconds elapsed after </span><code><span style="font-family: Verdana; mso-ansi-font-size: 12.0pt;">1970-01-01 00:00:00</span></code><code><span style="font-family: Verdana; font-size: 10.0pt;">.</span></code></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<code><b style="mso-bidi-font-weight: normal;"><span style="font-family: Verdana; mso-ansi-font-size: 12.0pt;">Eg</span></b></code><code><span style="font-family: Verdana; font-size: 10.0pt;">: </span></code><code><span style="font-family: Verdana; mso-ansi-font-size: 12.0pt;">UNIX Time for </span></code><span style="font-family: Verdana;">31<sup>st</sup> Aug 2012 18:59:09 = 1346439549</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana;">On 19<sup>th</sup>, Jan,
2038 at 3:14:07, the 32 bit signed integer will reach its limit. After that,
bit will overflow the 32-bit counter and reset the time to 1<sup>st</sup> Jan,
1901.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-cgfZBYzckho/UEEeG0eEMFI/AAAAAAAAACY/QEcve_LofIE/s1600/2038_bug.png" imageanchor="1"><img alt="2038 bug" border="0" height="132" src="http://3.bp.blogspot.com/-cgfZBYzckho/UEEeG0eEMFI/AAAAAAAAACY/QEcve_LofIE/s640/2038_bug.png" title="2038 bug" width="640" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<h3>
Attention to Mysql Users</h3>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana;">Mysql 5 is a 32 bit
database, it has a function <b style="mso-bidi-font-weight: normal;">UNIX_TIMESTAMP()
</b>which returns seconds since </span><code><span style="font-family: Verdana; mso-ansi-font-size: 12.0pt;">1970-01-01 00:00:00</span></code><span style="font-family: Verdana;">. This function will return only 0 after 19<sup>th</sup>
Jan, 2038 03:14:07 GMT.</span><br />
<br />
<br />
<span style="font-family: Verdana;">The end time would be different for each region based on their time zone. </span><br />
<br />
<table class="tableformat" border="1">
<tbody><tr>
<td>Auckland</td>
<td>+12:00</td>
<td>19-01-2038 15:14:07</td>
</tr>
<tr>
<td>Sydney</td>
<td>+10:00</td>
<td>19-01-2038 13:14:07</td>
</tr>
<tr>
<td>Tokyo</td>
<td>+9:00</td>
<td>19-01-2038 12:14:07</td>
</tr>
<tr>
<td>Beijing</td>
<td>+8:00</td>
<td>19-01-2038 11:14:07</td>
</tr>
<tr>
<td>Mumbai</td>
<td>+5:30</td>
<td>19-01-2038 08:44:07</td>
</tr>
<tr>
<td>Dubai</td>
<td>+4:00</td>
<td>19-01-2038 07:14:07</td>
</tr>
<tr>
<td>Nairobi</td>
<td>+3:00</td>
<td>19-01-2038 06:14:07</td>
</tr>
<tr>
<td>Cairo</td>
<td>+2:00</td>
<td>19-01-2038 05:14:07</td>
</tr>
<tr>
<td>Paris</td>
<td>+1:00</td>
<td>19-01-2038 04:14:07</td>
</tr>
<tr>
<td>London</td>
<td>UTC</td>
<td>19-01-2038 03:14:07</td>
</tr>
<tr>
<td>Brasilia</td>
<td>-3:00</td>
<td>19-01-2038 00:14:07</td>
</tr>
<tr>
<td>Atlantic Time</td>
<td>-4:00</td>
<td>18-01-2038 23:14:07</td>
</tr>
<tr>
<td>Eastern Time</td>
<td>-5:00</td>
<td>18-01-2038 22:14:07</td>
</tr>
<tr>
<td>Central Time</td>
<td>-6:00</td>
<td>18-01-2038 21:14:07</td>
</tr>
<tr>
<td>Mountain Time</td>
<td>-7:00</td>
<td>18-01-2038 20:14:07</td>
</tr>
<tr>
<td>Pacific Time</td>
<td>-8:00</td>
<td>18-01-2038 19:14:07</td>
</tr>
<tr>
<td>Hawai</td>
<td>-10:00</td>
<td>18-01-2038 17:14:07</td>
</tr>
</tbody></table>
<br />
<h4 style="text-align: left;">
<span style="font-family: Verdana;">References:</span></h4>
<span style="font-family: Verdana;">1. http://en.wikipedia.org/wiki/Year_2038_problem</span><br />
<span style="font-family: Verdana;">2. http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function_unix-timestamp </span></div>
<div class="MsoNormal">
<br /></div>
</div>
aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-60224034503609331062012-07-27T21:06:00.001+05:302015-10-01T14:11:45.694+05:30Google search Tips<div dir="ltr" style="text-align: left;" trbidi="on">
<style>
.codeformat_post09
{
background-color: #EEEEEE;
color: #848484;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
margin-bottom: 10px;
max-height: 600px;
overflow: auto;
padding: 5px;
max-width: 300px;
}
</style>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
1<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b><b style="mso-bidi-font-weight: normal;">filetype: </b> For searching for a specific file type only.</div>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b> Search for ppt files<b style="mso-bidi-font-weight: normal;"> </b></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br />
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>computer networks <b style="mso-bidi-font-weight: normal;">filetype:</b>ppt</pre>
</div>
</div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
2<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b><b style="mso-bidi-font-weight: normal;">cache: </b> This is to load sites quickly. </div>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br />
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre><b style="mso-bidi-font-weight: normal;">cache:</b>http://www.thehindu.com</pre>
</div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
3<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b><b style="mso-bidi-font-weight: normal;">movie: </b>It shows all information regarding the
movie. </div>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br />
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre><b style="mso-bidi-font-weight: normal;">movie:</b>Dark Knight</pre>
</div>
</div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
4<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b><b style="mso-bidi-font-weight: normal;">site:</b> To search within a site domain</div>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br />
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>entrance result <b style="mso-bidi-font-weight: normal;">site:</b>gov.in</pre>
</div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
5<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b><b style="mso-bidi-font-weight: normal;">phonebook: </b>To get details of a person using phone
number</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br />
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre><b style="mso-bidi-font-weight: normal;">phonebook:</b>28576300</pre>
</div>
</div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
6<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b><b style="mso-bidi-font-weight: normal;">“ ” </b>For searching for an exact phrase</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br />
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre><b style="mso-bidi-font-weight: normal;">“</b>how to change tyre<b style="mso-bidi-font-weight: normal;">”</b></pre>
</div>
</div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l0 level1 lfo1; tab-stops: list -171.0pt; text-indent: -18.0pt;">
7<b style="mso-bidi-font-weight: normal;">.<span style="font: 7pt "Times New Roman";">
</span></b>- To
exclude a particular word in the search</div>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<b style="mso-bidi-font-weight: normal;">E.g.: </b> To exclude all search
relating to cricket match</div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 36.0pt;">
<div class="codeformat_post09" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>cricket <b style="mso-bidi-font-weight: normal;">-</b>game <b style="mso-bidi-font-weight: normal;">-</b>score</pre>
</div>
</div>
</div>
</div>aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-28973109752264440342012-07-05T19:53:00.000+05:302012-07-05T20:05:21.638+05:30Fix Memory Leak in Java<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<style>
.codeformat
{
background-color: #EEEEEE;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
margin-bottom: 10px;
max-height: 600px;
overflow: auto;
padding: 5px;
width: 600px;
}
</style>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<h1>
Fix Memory Leak in Java</h1>
<div class="MsoNormal" style="text-align: left;">
<h2>
</h2>
</div>
<h2 style="font-family: Verdana,sans-serif; text-align: left;">
<span style="font-size: small;">Actions to prevent memory leak:</span></h2>
<ol start="1" style="font-family: Verdana,sans-serif; margin-top: 0cm;" type="1">
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">When
a reference variable is no longer in use, assign null value to it.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Close
DataInputStreams and JDBC Connections.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Shutdown
the threads after completion.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Restrict
using static classes and methods.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Put
less data on Sessions.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Invalidate
Sessions.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Set
short duration for timeout of sessions.</li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list 36.0pt;">Avoid
using String for concatenation instead use StringBuffer. </li>
</ol>
<h2 style="font-family: Verdana,sans-serif; text-align: left;">
<span style="font-size: small;">How do we know memory leak is happening?</span></h2>
<div class="MsoNormal" style="font-family: Verdana,sans-serif;">
Getting OutOfMemoryError (OOM) is a sign of possible memory
leak. The other way is by checking the used JVM heap size. If the heap size is
rising with time then clearly you have memory leak.</div>
<div class="MsoNormal" style="font-family: Verdana,sans-serif;">
<br /></div>
<div class="separator" style="clear: both; font-family: Verdana,sans-serif; text-align: center;">
<a href="http://2.bp.blogspot.com/---cf-nwQ6dA/T_WQoUtAoFI/AAAAAAAAABk/zVN4M3thJuM/s1600/memory+leak+java+heapdump+graph.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="memory leak java heapdump graph" border="0" height="222" src="http://2.bp.blogspot.com/---cf-nwQ6dA/T_WQoUtAoFI/AAAAAAAAABk/zVN4M3thJuM/s400/memory+leak+java+heapdump+graph.png" title="memory leak java heapdump graph" width="400" /></a></div>
<div class="MsoNormal" style="font-family: Verdana,sans-serif;">
<br /></div>
<div class="MsoNormal" style="font-family: Verdana,sans-serif;">
</div>
<div class="MsoNormal" style="font-family: Verdana,sans-serif;">
<br /></div>
<h2 style="font-family: Verdana,sans-serif; text-align: left;">
<span style="font-size: small;">Debugging memory leak</span></h2>
<ul style="font-family: Verdana,sans-serif; margin-top: 0cm;" type="disc">
<li class="MsoNormal">In
Tomcat, open Catalina.bat file, set CATALINA_OPTS with <b>XX:+HeapDumpOnOutOfMemoryError</b><b></b></li>
</ul>
</div>
<div dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
</div>
<div class="codeformat" dir="ltr" style="font-family: Verdana,sans-serif; text-align: left;" trbidi="on">
<pre>set CATALINA_OPTS=%CATALINA_OPTS% -XX:+HeapDumpOnOutOfMemoryError
</pre>
</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<ul style="font-family: Verdana,sans-serif; margin-top: 0cm;" type="disc">
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">Now a
heap dump is written on the first Out Of Memory Error into %CATALINA_HOME%\bin
as java_pid<pid>.hprof</li>
</ul>
<div class="separator" style="clear: both; font-family: Verdana,sans-serif; text-align: center;">
<a href="http://4.bp.blogspot.com/-3ju3fHCc2h4/T_WXYTyGhaI/AAAAAAAAABw/2Dv5MFg7mMo/s1600/memory+leak+java+heapdump+file.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="memory leak java heapdump file" border="0" height="50" src="http://4.bp.blogspot.com/-3ju3fHCc2h4/T_WXYTyGhaI/AAAAAAAAABw/2Dv5MFg7mMo/s400/memory+leak+java+heapdump+file.png" title="memory leak java heapdump file" width="400" /></a></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<ul style="font-family: Verdana,sans-serif; margin-top: 0cm;" type="disc">
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">Or
for On-demand, if you are using Java6,
then use <b>jmap.exe -dump:format=b,file=HeapDump.hprof <pid>
</b> </li>
</ul>
<div class="separator" style="clear: both; font-family: Verdana,sans-serif; text-align: center;">
<a href="http://2.bp.blogspot.com/-8ErZfKGA8qo/T_WfuCn26BI/AAAAAAAAAB8/_Vufec-ob8I/s1600/memory+leak+java+jmap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="memory leak java jmap" border="0" height="102" src="http://2.bp.blogspot.com/-8ErZfKGA8qo/T_WfuCn26BI/AAAAAAAAAB8/_Vufec-ob8I/s640/memory+leak+java+jmap.png" title="memory leak java jmap" width="640" /></a></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<ul style="font-family: Verdana,sans-serif; margin-top: 0cm;" type="disc">
<li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list 36.0pt;">Now load these .hprof heapdump onto eclipse Memory Analyzer Tool <a href="http://www.eclipse.org/mat/">http://www.eclipse.org/mat/</a></li>
</ul>
<div class="MsoNormal" style="margin-left: 18.0pt;">
<br /></div>
</div>
</div>aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-70713349165598221352012-06-27T21:10:00.001+05:302012-09-01T02:36:45.227+05:30How to Increase your Laptop Battery Life<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Batteries live longer if treated in a gentle manner. The longevity is often
a direct result of the environmental stresses applied.<br />
<br />
Following are the steps
to increase your notebook’s battery life: <br />
<ol style="font-weight: bold; line-height: 3; text-align: left;">
<li>
<span style="font-family: Symbol;"><span style="font: 11pt "Verdana";">
<span style="font-weight: normal;"><a href="#notebook battery below 40%">Do not ever let your Battery Power fall below 40%.</a></span></span></span>
</li>
<li>
<span style="font-family: Symbol;"><span style="font: 11pt "Verdana";">
<span style="font-weight: normal;"><a href="#notebook battery life reduces">Do not ever charge at or below 0<sup>o </sup>C.</a></span></span></span>
</li>
<li>
<span style="font-family: Symbol;"><span style="font: 11pt "Verdana";">
<span style="font-weight: normal;"><a href="#notebook battery plugged with power supply">Always best to work with Power supply
Plugged-in.</a></span></span></span>
</li>
<li>
<span style="font-family: Symbol;"><span style="font: 11pt "Verdana";">
<span style="font-weight: normal;"><a href="#notebook battery need timeout">Always best to give a 30 min break after 3 hour usage.</a> Shutdown or hibernate the notebook and plug-off the Power supply.</span></span></span>
</li>
<li>
<span style="font-family: Symbol;"><span style="font: 11pt "Verdana";">
<span style="font-weight: normal;"><a href="#notebook battery life">Make sure to leave your battery power between 50% - 40%</a>, if you are not going to use the notebook for long time (like more than 6 hours)</span></span></span>
</li>
</ol>
<div style="margin-left: 18.0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-MYfiXsJERPk/T-yrGbpmmdI/AAAAAAAAABY/vZkkPy4by-A/s1600/Battery.png" imageanchor="1"><img alt="notebook battery power should not decrease 40%" border="0" src="http://3.bp.blogspot.com/-MYfiXsJERPk/T-yrGbpmmdI/AAAAAAAAABY/vZkkPy4by-A/s1600/Battery.png" title="notebook battery" /></a></div>
<br />
<br /></div>
<a name="notebook battery below 40%"></a>
<b style="mso-bidi-font-weight: normal;">Why not to let Battery
Power fall below 40% ?</b><br />
Do not discharge lithium-ion too deeply. Instead, charge it frequently.
Lithium-ion does not have memory problems like nickel-cadmium batteries. No
deep discharges are needed for conditioning. Deep discharges will increase the
temperature and reduce battery life. If Li-ion cells are discharged below a
certain voltage a chemical reaction occurs that make them dangerous if
recharged, which is why probably all such batteries in consumer goods now have
an "electronic fuse" that permanently disables them if the voltage
falls below a set level. The electronic fuse draws a small amount of current from
the battery, which means that if a notebook battery is left for a long time
without charging it, and with a low initial state of charge, the battery may be
permanently destroyed.<br />
<br />
<a name="notebook battery life reduces"></a>
<b style="mso-bidi-font-weight: normal;">Why not charge at or below 0<sup>o </sup>C
?</b><br />
Do not charge lithium-ion at or below freezing temperature. Although accepting
charge, an irreversible plating of metallic lithium will occur that compromises
the safety of the pack.<br />
<br />
<a name="notebook battery plugged with power supply"></a>
<b style="mso-bidi-font-weight: normal;">Why is it best to work with Power
supply Plugged-in ?</b><br />
Plugged-in power supply takes control of the power requirements and stress is
relieved from battery. Also less battery discharges occurs.<br />
<br />
<a name="notebook battery need timeout"></a>
<b style="mso-bidi-font-weight: normal;">Why to give a 30 min break after 3
hour usage ?</b><br />
A continuous usage gives more stress on the battery and raises the battery
temperature and thereby reducing life. A frequent break can allow to battery to
cool down to a nominal temperature and prevents increase of temperature to
critical levels. Degradation of battery occurs faster at higher temperatures.
Degradation in lithium-ion batteries is caused by an increased internal battery
resistance due to cell oxidation. This decreases the efficiency of the battery,
resulting in less net current available to be drawn from the battery.<br />
<br />
<a name="notebook battery life"></a>
<b style="mso-bidi-font-weight: normal;">Why need to keep battery power at
50%-40% before long time non usage of notebook?</b><br />
When storing, lithium batteries degrade more while fully charged than if they
are only 40% charged.<br />
<br />
<br />
<br />
<b>References </b><br />
http://batteryuniversity.com/learn/article/the_high_power_lithium_ion/<br />
<br /></div>aj_blkhttp://www.blogger.com/profile/01350521370650540087noreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-62529151787192119812012-06-04T00:34:00.001+05:302012-10-23T12:50:59.524+05:30How to set Google as default search engine in Internet Explorer<div dir="ltr" style="text-align: left;" trbidi="on">
Microsoft has made it really difficult for people using ie8 or ie9 in setting Google as their default search engine.<br />
Follow these simple steps:<br />
<ol style="text-align: left;">
<li>Open your Internet Explorer.</li>
<li>Go to this link <a href="http://www.iegallery.com/en-US/Addons/Details/813" target="_blank">http://www.iegallery.com/en-US/Addons/Details/813</a></li>
<li>Click on "Add to Internet Explorer".</li>
<li>Check the ''Make this my default search provider" option.</li>
<li>Click on "Add" button.</li>
</ol>
Now Google is set as default search engine.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-5cHkuTQMh8c/UIZEuV8je1I/AAAAAAAAACw/4z4gmN5m2sw/s1600/01_Add_to_Internet_Explorer2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Add Google Add-on to Internet Explorer" border="0" height="196" src="http://1.bp.blogspot.com/-5cHkuTQMh8c/UIZEuV8je1I/AAAAAAAAACw/4z4gmN5m2sw/s400/01_Add_to_Internet_Explorer2.png" title="Add Google Add-on to Internet Explorer" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-i2RfaJ43lss/UIZFJ9Pj8XI/AAAAAAAAAC4/CLMzxicL8VY/s1600/02_Set_as+default_search_engine.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Make this my default search provider" border="0" src="http://3.bp.blogspot.com/-i2RfaJ43lss/UIZFJ9Pj8XI/AAAAAAAAAC4/CLMzxicL8VY/s1600/02_Set_as+default_search_engine.png" title="Make this my default search provider" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h4 class="separator" style="clear: both; text-align: left;">
<b>+ UPDATE on 30-07-2012 </b></h4>
<div class="separator" style="clear: both; text-align: left;">
Some have complained that they are still not able to see Google search Addon. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Please access this link <a href="http://www.google.com/homepage/search/">http://www.google.com/homepage/search/</a> and click on "Switch Now!" .</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-OBMes46Lcd4/UBaoYxsZGYI/AAAAAAAAACI/m_IWGil0myI/s1600/03_google_as+default_search_engine.png" imageanchor="1"><img alt="set google as default search" border="0" height="568" src="http://2.bp.blogspot.com/-OBMes46Lcd4/UBaoYxsZGYI/AAAAAAAAACI/m_IWGil0myI/s640/03_google_as+default_search_engine.png" title="set google as default search" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For More Add-ons in IE, please refer to this link <a href="http://www.iegallery.com/Addons">http://www.iegallery.com/Addons</a> .</div>
<br />
<div style="text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
Unknownnoreply@blogger.com9tag:blogger.com,1999:blog-5953327639270922510.post-15449150214110109802011-12-12T02:32:00.016+05:302012-06-29T02:23:11.500+05:30How to make your computer fast<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Well it doesn’t matter that you use Pentium 4 (1.2GHz) Processor.</span></b></span><br />
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: small;">You still can make your system reasonably fast.</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Please note:</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">This article is for Windows XP.</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">It’s best to perform in the stage order.</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">The more deeper you go more small sacrifices you make for the only goal “Performance”, “Performance” and “Performance”.</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: small;">Following are the stages below: </span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage1">Stage 1 : Uninstall unwanted softwares</a></span></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage2">Stage 2 : Free more space in C Drive</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage3">Stage 3 : Cleanup the Disk</a> </span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage4">Stage 4 : Increase Virtual Memory</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage5">Stage 5 : Scan and Clean for Viruses</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage6">Stage 6 : Disk Defragmenter</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage7">Stage 7 : Remove all applications load at start-up</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage8">Stage 8 : Set ur system for Performance mode rather appearance.</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><span style="font-family: "Courier New";"><a href="#speed up my pc stage9">Stage 9 : Upgrade your RAM to minimum 2GB or more.</a></span></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<span style="font-size: small;"><br />
</span><br />
<a name="speed up my pc stage1"></a>
<div class="MsoNormal">
<span style="font-size: small;"><br />
<b style="text-align: left;"><span style="font-family: "Courier New";">Stage 1 : Uninstall unwanted softwares</span></b></span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Open Control Panel -> Add or Remove Programs </span><br />
<span style="font-size: small;"><a href="http://3.bp.blogspot.com/-7hjmAHCV9mM/TuUMxxm6KLI/AAAAAAAAAE8/KcRD2IVCmK4/s1600/add_or_remove_program_icon.JPG" imageanchor="1" style="margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-7hjmAHCV9mM/TuUMxxm6KLI/AAAAAAAAAE8/KcRD2IVCmK4/s1600/add_or_remove_program_icon.JPG" /></a></span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Remove software that are not being used, by clicking Remove buttons</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="http://2.bp.blogspot.com/-XVFVgc-ZQy8/TuUMsgmDEOI/AAAAAAAAAE0/GLRsHSwSp-M/s1600/add_or_remove_programs_wizard.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-XVFVgc-ZQy8/TuUMsgmDEOI/AAAAAAAAAE0/GLRsHSwSp-M/s1600/add_or_remove_programs_wizard.JPG" /></a></span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;"> Follow the ‘Next’ button, until the software is successfully uninstalled.</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<a name="speed up my pc stage2"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 2 : Free more space in C Drive</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Delete unwanted files, only the ones you created, in C drive.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Move all the files, only the ones you created, to some other drives.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Note: Don’t touch any system files or Windows folder or Program Files folder</span></b></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;"> Whenever installing a program next time onwards, keep the destination folder as <b>d:</b>\Program Files\</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<a name="speed up my pc stage3"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 3 : Cleanup the Disk </span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Right-click on C Drive -> Properties</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="20" width="83"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><span style="font-size: small;"><br />
</span></td> </tr>
</tbody></table>
<span style="font-family: "Courier New"; font-size: small;"> </span> <br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="http://1.bp.blogspot.com/-keofeP_isqA/TuUM8gZQWuI/AAAAAAAAAFk/xXlEBkpEWUQ/s1600/My_Computer_Properties.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-keofeP_isqA/TuUM8gZQWuI/AAAAAAAAAFk/xXlEBkpEWUQ/s1600/My_Computer_Properties.JPG" /></a></span></div>
<span style="font-size: small;"><br />
</span><br />
<span style="font-family: "Courier New"; font-size: small;"> 2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Click on “Disk Cleanup” button, and then wait for some time till it scans the drive.</span><br />
<span style="font-family: "Courier New"; font-size: small;"> </span> <br />
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Mark Tick in all the checkbox to safely delete all unnecessary files, and then click ‘Ok’ button.</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="8" width="114"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><br /></td> </tr>
</tbody></table>
<span style="font-size: small;"> </span><span style="font-size: small;"><a href="http://4.bp.blogspot.com/-tNslQ6rJ9To/TuUM5LhfkYI/AAAAAAAAAFE/PcjukRL-IU0/s1600/disk_cleanup.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-tNslQ6rJ9To/TuUM5LhfkYI/AAAAAAAAAFE/PcjukRL-IU0/s1600/disk_cleanup.JPG" /></a></span><br />
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;"> </span></div>
<span style="font-size: small;"><br />
</span><br />
<a name="speed up my pc stage4"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 4 : Increase Virtual Memory</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Right-click on ‘My Computer’ -> Properties</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Select ‘Advanced’ tab -> Click ‘Settings’ under Performance Section.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="20" width="110"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><span style="font-size: small;"><br />
</span></td> </tr>
</tbody></table>
<span style="font-size: small;"> </span><span style="font-size: small;"><a href="http://2.bp.blogspot.com/-VFNN5Vrda9Q/TuUM_GpDA8I/AAAAAAAAAF8/2r9nn7QGk-4/s1600/system_properties.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-VFNN5Vrda9Q/TuUM_GpDA8I/AAAAAAAAAF8/2r9nn7QGk-4/s1600/system_properties.JPG" /></a></span> <br />
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">In ‘Performance Options’ Wizard -> ‘Advanced’ tab</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">4.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">In ‘Virtual Memory’ section -> click on ‘Change’ button.</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr><td height="12" width="113"><br /></td></tr>
<tr><td><span style="font-size: small;"><br />
</span></td><td><span style="font-size: small;"><br />
</span></td></tr>
</tbody></table>
<span style="font-size: small;"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="http://4.bp.blogspot.com/-_1qbr9nLvlk/TuUM9dxYsZI/AAAAAAAAAFs/Smtkqj2s1F8/s1600/Performance_advanced.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-_1qbr9nLvlk/TuUM9dxYsZI/AAAAAAAAAFs/Smtkqj2s1F8/s1600/Performance_advanced.JPG" /></a></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">5.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">In ‘Virtual Memory’, select <b>C:</b> drive </span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">6.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Select ‘Custom Size’</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">7.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Enter Initial size (MB): 2046 </span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">8.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Enter Maximum size (MB): 3000 or 4092</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">9.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Click on ‘Set’ button and then on ‘Ok’ button.</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="16" width="125"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><br /></td> </tr>
</tbody></table>
<span style="font-family: "Courier New"; font-size: small;"> </span> <br />
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="http://4.bp.blogspot.com/-QGGui9THLfQ/TuUM_2-aMxI/AAAAAAAAAGE/eaPFbsF0gkM/s1600/virtual_memory.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-QGGui9THLfQ/TuUM_2-aMxI/AAAAAAAAAGE/eaPFbsF0gkM/s1600/virtual_memory.JPG" /></a></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<span style="font-size: small;"><br />
</span><br />
<a name="speed up my pc stage5"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 5 : Scan and Clean for Viruses</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Full scan your computer using the antivirus.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Delete the entire virus found.</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<a name="speed up my pc stage6"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 6 : Disk Defragmenter</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Right-click on ‘My Computer’ -> Manage</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="0" width="109"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><br /></td> </tr>
</tbody></table>
<span style="font-size: small;"> </span><span style="font-size: small;"><a href="http://1.bp.blogspot.com/-BIBRh7oV9tk/TuUM7zYXAjI/AAAAAAAAAFc/aBTM4OHGRW8/s1600/My_Computer_Manage.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-BIBRh7oV9tk/TuUM7zYXAjI/AAAAAAAAAFc/aBTM4OHGRW8/s1600/My_Computer_Manage.JPG" /></a></span> <br />
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">In right menu ‘Computer Management(Local)’ -> ‘Storage’ -> ‘Disk Defragmenter’</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Select one drive by drive</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;">4.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Click on the ‘Defragment’ button, it may take some time to defragment the drive. </span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="0" width="62"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><br /></td> </tr>
</tbody></table>
<span style="font-size: small;"> <a href="http://3.bp.blogspot.com/-aUIueRZ5FkM/TuUM6HO_T1I/AAAAAAAAAFM/O6UMmnzhi9Y/s1600/disk_defragmenter.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-aUIueRZ5FkM/TuUM6HO_T1I/AAAAAAAAAFM/O6UMmnzhi9Y/s1600/disk_defragmenter.JPG" /></a></span> <br />
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br clear="ALL" /></span></div>
<span style="font-size: small;"><br />
</span><br />
<span style="font-size: small;"><br />
</span><br />
<a name="speed up my pc stage7"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 7 : Remove all applications load at start-up (except the really needed ones)</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Start -> Run</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Type <i>msconfig</i> and then click ‘Ok’ button.</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="http://2.bp.blogspot.com/--2FbmUDBzgc/TuUUu5s2NLI/AAAAAAAAAGU/t64v2zA9aUY/s1600/run.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="171" src="http://2.bp.blogspot.com/--2FbmUDBzgc/TuUUu5s2NLI/AAAAAAAAAGU/t64v2zA9aUY/s320/run.JPG" width="320" /></a></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">In ‘System Configuration Utility’ -> ‘Startup’ tab</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">4.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Unmark the tick on the checkbox of the applications that you installed and don’t use as the system starts.</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Reason: When your system starts, all the softwares are sharing the memory at the startup till shutdown, even though it’s not used. So its better remove the applications to load at startup to increase the boot-time and system speed.</span></b></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">5.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;"> Click ‘Ok’ and then ‘Restart’ button</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr><td height="7" width="72"><br /></td></tr>
<tr><td><br /></td><td><span style="font-size: small;"><br />
</span></td></tr>
</tbody></table>
<span style="font-family: "Courier New"; font-size: small;"> </span><span style="font-size: small;"> <a href="http://3.bp.blogspot.com/-9ea5E6Kz4Mc/TuUM-R4inAI/AAAAAAAAAF0/5jqfiOHAd-c/s1600/run.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-9ea5E6Kz4Mc/TuUM-R4inAI/AAAAAAAAAF0/5jqfiOHAd-c/s1600/run.JPG" /></a></span> <br />
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<span style="font-size: small;"><br />
</span><br />
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<a name="speed up my pc stage8"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 8 : Set your system for “Performance” mode rather appearance.</span></b></span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Right-click on ‘My Computer’ -> Properties</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Select ‘Advanced’ tab -> Click ‘Settings’ under Performance Section.</span></div>
<table align="left" cellpadding="0" cellspacing="0"><tbody>
<tr> <td height="20" width="110"><span style="font-size: small;"><br />
</span></td> </tr>
<tr> <td><span style="font-size: small;"><br />
</span></td> <td><span style="font-size: small;"><br />
</span></td> </tr>
</tbody></table>
<span style="font-family: "Courier New"; font-size: small;"> </span> <br />
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;"> </span><span style="font-size: small;"><a href="http://4.bp.blogspot.com/-_1qbr9nLvlk/TuUM9dxYsZI/AAAAAAAAAFs/Smtkqj2s1F8/s1600/Performance_advanced.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-_1qbr9nLvlk/TuUM9dxYsZI/AAAAAAAAAFs/Smtkqj2s1F8/s1600/Performance_advanced.JPG" /></a></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">In ‘Performance Options’ Wizard -> ‘Visual Effects’ tab</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">4.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Select “Adjust for best performance” option and then click ‘Ok’ button.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;"> </span><span style="font-size: small;"><a href="http://1.bp.blogspot.com/-sW4D-2jpafU/TuUNAlvhfsI/AAAAAAAAAGM/WmkBR7NZmfQ/s1600/visual_effects.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-sW4D-2jpafU/TuUNAlvhfsI/AAAAAAAAAGM/WmkBR7NZmfQ/s1600/visual_effects.JPG" /></a></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<a name="speed up my pc stage9"></a>
<div class="MsoNormal">
<span style="font-size: small;"><b><span style="font-family: "Courier New";">Stage 9 : Upgrade your RAM to minimum 2GB or more.</span></b></span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Upgrade your system physical memory to minimum 2 GB or more.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Check the FSB speed and type of your RAM, it can be found out using a software ‘CPU-Z’.</span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Download <a href="ftp://ftp.cpuid.com/cpu-z/cpu-z_1.59-32bits-en.zip" target="_blank">‘CPU-Z’</a>. </span></div>
<div class="MsoNormal" style="margin-left: 42.75pt; text-indent: -24.75pt;">
<span style="font-family: "Courier New"; font-size: small;">4.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-family: "Times New Roman"; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-family: "Courier New"; font-size: small;">Buy a RAM that matches your FSB and DDR version.</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-family: "Courier New"; font-size: small;">5. <a href="http://www.youtube.com/watch?v=Z4zzN5qKX1o" target="_blank">Video to install RAM</a>.</span></div>
<div class="MsoNormal" style="margin-left: 18pt;">
<span style="font-size: small;"><br />
</span></div>
<div class="MsoNormal">
<span style="font-size: small;"><br />
</span></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-61320648609940231952011-10-23T21:16:00.029+05:302011-12-03T20:40:38.937+05:30Aspect Oriented Programming ( AOP )<div dir="ltr" style="text-align: left;" trbidi="on"><style>
.codeformat
{
background-color: #EEEEEE;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
margin-bottom: 10px;
max-height: 600px;
overflow: auto;
padding: 5px;
width: 600px;
}
</style><br />
<div dir="ltr" style="text-align: left;" trbidi="on"><div class="StyleHeading1CenteredLinespacing15linesFontBOLD" style="text-align: justify; text-indent: 45pt;"><span lang="EN-US" style="font-family: "Courier New";"></span></div><div class="MsoNormal" style="text-align: justify; text-indent: 45pt;"></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45pt;"><b><span lang="EN-US" style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Why is AOP required?</span></b></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45pt;"></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">We use Object-Oriented Programming (OOP), Functional-Oriented Programming (FOP) models basically to solve <span style="font-family: "Courier New",Courier,monospace; font-size: large;"><b>Concerns</b></span>.</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: left; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;"><b>- Concerns </b>like reusability of code in case of FOP.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: left; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;"><b>- Concerns </b>like data access, data integrity, data stability in case of OOP.</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Even though we use many techniques in OOP to group and encapsulate the <b>concerns</b> into separate, independent entities by providing abstractions. But some concerns still defy these forms of implementation, and are called <b><i>crosscutting concerns</i></b> because they "cut across" multiple abstractions in a program.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify;"><b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Example</span></b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">: <b>Logging</b></span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Logging is a <b>crosscutting concern</b>, because a logging strategy necessarily affects every logged part of the system. Logging thereby <i>crosscuts</i> all logged classes and methods.</span></div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Now </span><b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Logging</span></b><b><span lang="EN-US" style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;"> aspect</span></b><span lang="EN-US" style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;"> is <b><i>scattered</i></b> or <b><i>tangled</i></b> as code, making it harder to understand and maintain. It is scattered by virtue of the function being spread over a number of unrelated functions that might use <i>it</i>, possibly in entirely unrelated systems, different source languages, etc. </span></div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">To change logging means the effect will be cascading to all the classes where logging is implemented. It would be a huge task to modify the places where the logging is called.</span></div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"></div><div class="MsoNormal" style="line-height: 150%; text-align: justify;"><b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Simple Banking Scenario Example – Transfer money to another account</span></b></div><pre><span class="kw4"> </span></pre><blockquote class="codeformat"><pre><span class="kw4">void</span> transfer<span class="br0">(</span>Account fromAcc, Account toAcc, <span class="kw4">int</span> amount , Logger logger<span class="br0">)</span></pre><pre><span class="kw1">throws</span> <span class="kw3">Exception</span> </pre><pre><span class="br0">{</span></pre><pre></pre><pre> logger.<span class="me1">info</span><span class="br0">(</span><span class="st0">"transferring money..."</span><span class="br0">)</span><span class="sy0">;</span></pre><pre> </pre><pre> <span class="kw1">if</span> <span class="br0">(</span>fromAcc.<span class="me1">getBalance</span><span class="br0">()</span> <span class="sy0"><</span> amount<span class="br0">)</span> </pre><pre> <span class="br0">{</span></pre><pre><span class="br0"> </span>logger.<span class="me1">info</span><span class="br0">(</span><span class="st0">"Insufficient Funds, sorry"</span><span class="br0">)</span><span class="sy0">;</span></pre><pre> <span class="kw1">throw</span> <span class="kw1">new</span> InsufficientFundsException<span class="br0">()</span><span class="sy0">;</span></pre><pre> <span class="br0">}</span></pre><pre></pre><pre> fromAcc.<span class="me1">withdraw</span><span class="br0">(</span>amount<span class="br0">)</span><span class="sy0">;</span></pre><pre> toAcc.<span class="me1">deposit</span><span class="br0">(</span>amount<span class="br0">)</span><span class="sy0">;</span></pre><pre><span class="sy0"> </span>logger.<span class="me1">info</span><span class="br0">(</span><span class="st0">"Successful transaction."</span><span class="br0">)</span><span class="sy0">;</span></pre><pre> </pre><pre><span class="br0">}</span></pre></blockquote><pre><span class="br0"></span></pre><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Now consider what happens if we suddenly need to change the logging considerations for the application. In the program's current version, logging-related operations appear <i>scattered</i> across numerous methods, and such a change would require a major effort.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify;"><b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">AOP’s Rescue Solution</span></b></div><div class="MsoNormal" style="line-height: 150%; text-align: justify;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">AOP attempts to solve this problem by defining rules :</span></div><br />
<br />
<ol start="1" style="margin-top: 0cm;" type="1"><li class="MsoNormal" style="line-height: 150%; text-align: justify;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">To find the places where you need to change the code, and </span></li>
<li class="MsoNormal" style="line-height: 150%; text-align: justify;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">To suggest what new requirements or functionality you need to add. </span></li>
</ol><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">These rules are called <b>Aspects</b>.</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">So now a class or jar file is created, loaded or at runtime, the new functionality that you declared is automatically inserted. The extent of the new implementation is how you have defined the aspect rules.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Example:</span></b></div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">In the above logging example, I need to add the time when the logging was created.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><br />
<blockquote class="codeformat"><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><span style="line-height: 150%;">@Aspect</span></span></div><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><b><span style="line-height: 150%;">public</span></b><span style="line-height: 150%;"> <b>class</b> LoggingAspect {</span></span></div><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><span style="line-height: 150%;"> @Before("call(void Logger.info(String)) && within(*)")</span></span></div><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><span style="line-height: 150%;"> <b>public</b> <b>void</b> findtime() {</span></span></div><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><span style="line-height: 150%;"> Logger.out.print(new java.util.Date());</span></span></div><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><span style="line-height: 150%;"> }</span></span></div><div class="MsoNormal" style="font-family: inherit; line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-size: small;"><span style="line-height: 150%;">}</span></span></div></blockquote><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">So here we have set the :</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">1<sup>st</sup> rule is to find the function [<span style="color: orange;">Logger.info()</span>] to be modified.</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">2<sup>nd</sup> rule is to specify within which all packages [<span style="color: orange;">within(*)</span>] the implementation should be done.</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">3<sup>rd</sup> rule is to specify what new functionality is to be replaced with [<span style="color: orange;">findtime()</span>].</span></div><br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">4<sup>th</sup> rule is to specify whether the new functionality is to be inserted before or after the code [<span style="color: orange;">@Before</span>]. </span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Now create a following XML config file in META-INF folder on the classpath.</span><br />
<br />
<blockquote class="codeformat"><br />
<br />
<aspects><br />
<br />
<aspect name="LoggingAspect"/><br />
<br />
</aspects></blockquote></div><br />
<br />
<div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><b><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Benefits</span></b></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Now after each class is loaded in the server, if it pass the aspect conditions then the new functionality will be automatically inserted.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">We can create a central place to change the cross cutting concerns. A change in one place is affected in all code.</span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><br />
</div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"><span style="font-family: "Courier New"; font-size: 12pt; line-height: 150%;">Deployment in production server is easy as it requires no modification of production code and no or less downtime. </span></div><div class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 45.1pt;"></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5953327639270922510.post-4829649190936231452011-09-01T18:58:00.000+05:302011-09-01T18:58:54.018+05:30Beware of the Cheap Tricks of Branded Retail Stores<div dir="ltr" style="text-align: left;" trbidi="on"><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"><br />
<br />
• Stores are trying everything they can think of to disguise the fact that you're going to pay more for clothes.<br />
<br />
• Some are using less fabric and calling it the new look. Others are adding cheap stitching and advertising it as a redesign. Chances are you're not going to think it's worth paying several dollars more for the shirt just to have them.<br />
<br />
• Retailers are raising prices on merchandise an average of 10 percent in an effort to offset their rising costs for materials and labor. But merchants are worried whether the customers will buy at price hikes. So, retailers are making inexpensive tweaks—additional stitching, fake button holes, torn edges, fancy tags—to justify price increases. These tweaks can add only pennies to $1 to the cost of a garment, but retailers can charge $10 more for them.<br />
</span></span></span></span><br />
<blockquote><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"> "Stores are making consumers believe they're getting more for their money."</span></span></span></span><br />
<span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"></span></span></span></span></blockquote><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"><br />
• Spencer Elmen, owner of Cupid's Lingerie, which operates five stores in Arkansas, said he is seeing more items in his store that are even skimpier than usual, from underwear to mini dresses. He says that's because designers are finding clever ways to conceal the fact that they're clothes have less fabric.<br />
</span></span></span></span><br />
<blockquote><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"> "They're just being more creative with less fabric," Elmen said.</span></span></span></span><br />
<span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"></span></span></span></span></blockquote><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"><br />
</span></span></span></span><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;">• Another retailer Abercrombie & Fitch is advertising "Redesigned 2012" Jean Collections in its stores and on its website, touting that the jeans are "softer, with the perfect amount of stretch.". They're also mostly priced between $78 and $88, about $10 more than last year.</span></span></span></span><br />
<blockquote><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"></span></span></span></span></blockquote><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;"></span></span></span></span><span class="z19Dle zG9tqc" id="col-z13ahdqhisqisr1fl23mznsblpfbhlpd2"><span class="zo"><span class="HgYomf"><span class="QGJaM Ig sDgL9b" style="display: block;">• The Wall Street Strategies retail analyst, examined the jeans and believes they are "thinner" and of "cheaper quality." and says “That extra stretch, could simply mean the retailer is saving costs by using less denim”.</span></span></span></span></div>Unknownnoreply@blogger.com0