<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7984552454484939025</atom:id><lastBuildDate>Sat, 07 Sep 2024 12:22:15 +0000</lastBuildDate><category>Core java</category><category>Core Java Programs</category><category>JSF</category><category>JavaScript</category><category>UNIX commands</category><category>DTD</category><category>Eclipse</category><category>JAVA classes</category><category>JSP</category><category>Linux</category><category>PostgreSQL</category><category>Primefaces</category><category>XML</category><category>google charts</category><category>java 9</category><title>Java for the day</title><description></description><link>http://javafortheday.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4411767527919693133</guid><pubDate>Wed, 21 Feb 2018 04:06:00 +0000</pubDate><atom:updated>2018-02-20T20:06:01.949-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java 9</category><title>private methods on Interface</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp; Private methods can be used on interface from java 9.&lt;/li&gt;
&lt;li&gt;&amp;nbsp; This will help in&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; Avoiding code duplication.&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; Ensuring code re-usability.&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; Improving code readability.&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;There is a possibility of writing common code on more than one default methods, which leads to code duplication. Introduction of private methods will avoid this code duplication.&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&lt;u&gt;Example:&amp;nbsp; On java 8 - Default methods with duplication code.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
In the below example, we can see common code is used on both the default methods M1 and M2.&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
public interface intra {&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
default void m1() {&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&amp;nbsp; &amp;nbsp; //Business code for M1&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; // common code&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
default void m2() {&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&amp;nbsp; &amp;nbsp; //Business code for M2&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; //common code&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&lt;u&gt;Example:&amp;nbsp; From Java 9 - Default methods with Private method.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
In the below example, Common code is extracted and added as a private method which can be called by default methods.&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
public interface intra {&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
default void m1() {&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&amp;nbsp; &amp;nbsp; //Business code for M1&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Common ();&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
default void m2() {&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Business code for M2&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Common ();&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;private void common () {&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Common code&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2018/02/private-methods-on-interface.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1279501445210934765</guid><pubDate>Fri, 29 May 2015 15:46:00 +0000</pubDate><atom:updated>2015-05-29T08:46:17.059-07:00</atom:updated><title>Cannot change version of project facet Dynamic Web Module to 2.5</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 1em 30px; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Deselect the Dynamic Web Module in your project facets.&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Right click the Project -&amp;gt; preferences -&amp;gt; Project Facets&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Then run&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Maven -&amp;gt; Update Project&lt;/strong&gt;&amp;nbsp;again.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2015/05/cannot-change-version-of-project-facet.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4634352085440859170</guid><pubDate>Mon, 18 May 2015 12:03:00 +0000</pubDate><atom:updated>2015-05-18T05:03:50.217-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PostgreSQL</category><title>Forgotten PostgreSQL Windows password</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;blockquote style=&quot;background-color: #fcf9ee; border-left-color: rgb(248, 228, 157); border-left-style: solid; border-width: 0px 0px 0px 1px; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 10px; padding: 10px; quotes: none;&quot;&gt;
&lt;div style=&quot;border: 0px; clear: both; padding: 0px;&quot;&gt;
I have used&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;net user postgres postgres&lt;/code&gt;&amp;nbsp;to reset the password for my database but instead of a success message I am getting&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;&quot;System error 5 has occurred. Access is denied.&quot;&lt;/code&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
You&#39;ve reset (or tried to reset) the service account password. PostgreSQL won&#39;t run as Administrator for security reasons and the installer generally sets it up with a &quot;postgres&quot; user account in PostgreSQL 9.1 and older&lt;sup style=&quot;border: 0px; font-size: 12px; margin: 0px; padding: 0px;&quot;&gt;1&lt;/sup&gt;. On Windows you can&#39;t start a service as a user without saving the password of the user in the registry, so that&#39;s what the installer does.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
If you change the password for the Windows user account&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;postgres&lt;/code&gt;, the PostgreSQL service can no longer start. So don&#39;t do that, you&#39;ll have to fix the service configuration to store the updated password.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
Thankfully I think another mistake prevented you from doing that. It looks like you&#39;re probably running your command prompt without using &quot;Run as Administrator&quot; on an unprivileged Windows user account or a machine with UAC, so it isn&#39;t running with the access permissions required to change the password for the&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;postgres&lt;/code&gt;&amp;nbsp;user.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
Before you try to change that password, make sure it&#39;s really what you want to do. What&#39;s the problem you&#39;re trying to solve here? Are you attempting to install a database update or something else that&#39;s asking for the password for the&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;postgres&lt;/code&gt;&amp;nbsp;Windows user?&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
Most likely you&#39;re just trying to log in to the database. For that, you use the (unfortunately completely unrelated) password stored in the database its self. Since you&#39;ve lost/forgotten it you&#39;ll have to reset it:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 1em 30px; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Find your&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;pg_hba.conf&lt;/code&gt;, usually in&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;C:\Program Files\PostgreSQL\9.1\data\pg_hba.conf&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If necessary, set the permissions on it so that you can modify it; your user account might not be able to do so until you use the security tab in the properties dialog to give yourself that right by using an admin override. Alternately, find notepad / notepad++ in your start menu, right click, choose &quot;Run as administrator&quot;, then use File-&amp;gt;Open to open&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;pg_hba.conf&lt;/code&gt;&amp;nbsp;that way.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
Edit it to set the &quot;host&quot; line for user &quot;postgres&quot; on host &quot;127.0.0.1/32&quot; to &quot;trust&quot;. You can add the line if it isn&#39;t there; just insert:&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;host &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px;&quot;&gt;all&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; postgres &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;127.0.0.1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; trust&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;before&lt;/em&gt;&amp;nbsp;any other lines. (You can ignore comments, lines beginning with&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;#&lt;/code&gt;).&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
Restart the PostgreSQL service from the Services control panel (start-&amp;gt;run-&amp;gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;services.msc&lt;/code&gt;)&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;connect using psql or PgAdmin-III or whatever you prefer&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;ALTER USER postgres PASSWORD &#39;postgres&#39;&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;remove the line you added to&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;pg_hba.conf&lt;/code&gt;&amp;nbsp;or change it back&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;restart PostgreSQL again.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2015/05/forgotten-postgresql-windows-password.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-8425363975116318243</guid><pubDate>Fri, 08 May 2015 06:39:00 +0000</pubDate><atom:updated>2015-05-07T23:39:34.221-07:00</atom:updated><title>How to Create VirtualHost in Tomcat 7/8</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 class=&quot;heading1&quot; style=&quot;-webkit-transition: opacity 0.24s ease-in-out; background-color: white; border: 0px; color: #ff3a00; font-family: &#39;Roboto Slab&#39;; font-size: 24px; font-weight: bolder; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;&quot;&gt;
Source :&amp;nbsp;http://tecadmin.net/create-virtualhost-in-tomcat/&lt;/h2&gt;
&lt;h2 class=&quot;heading1&quot; style=&quot;-webkit-transition: opacity 0.24s ease-in-out; background-color: white; border: 0px; color: #ff3a00; font-family: &#39;Roboto Slab&#39;; font-size: 24px; font-weight: bolder; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;&quot;&gt;
&lt;span style=&quot;font-weight: bolder;&quot;&gt;Why VirtualHost ?&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &#39;Roboto Slab&#39;; font-size: 16px; line-height: 28px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Virtual Hosting provides us to host multiple domains (websites) on single server. It is an concept of resource sharing between multiple hosting account. The&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD1&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat !important; background-size: initial !important; border-bottom-color: rgb(27, 142, 222) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; color: rgb(27, 142, 222) !important; cursor: pointer !important; display: inline !important; float: none !important; margin: 0px; outline: 0px; padding: 0px 0px 1px !important; position: static; vertical-align: baseline;&quot;&gt;best&lt;/span&gt;&amp;nbsp;use of Virtual hosting is shared hosting servers, where multiple users can host multiple websites on single server.&lt;/div&gt;
&lt;h2 class=&quot;heading1&quot; style=&quot;-webkit-transition: opacity 0.24s ease-in-out; background-color: white; border: 0px; color: #ff3a00; font-family: &#39;Roboto Slab&#39;; font-size: 24px; font-weight: bolder; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;&quot;&gt;
Setup Details:&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &#39;Roboto Slab&#39;; font-size: 16px; line-height: 28px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
We have created a Linux server with ip 192.168.1.100 for Tomcat hosting services only. So&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD2&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat !important; background-size: initial !important; border-bottom-color: rgb(27, 142, 222) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; color: rgb(27, 142, 222) !important; cursor: pointer !important; display: inline !important; float: none !important; margin: 0px; outline: 0px; padding: 0px 0px 1px !important; position: static; vertical-align: baseline;&quot;&gt;install&lt;/span&gt;&amp;nbsp;Tomcat 8 and configured to run on port 80. After than we have deployed two java web applications on tomcat using Tomcat Admin panel. Now both applications are running on following urls&lt;/div&gt;
&lt;pre style=&quot;background: none 0px 0px repeat scroll rgb(60, 60, 60); border-radius: 4px; border: 1px solid rgb(229, 229, 229); color: white; font-size: 0.9em; line-height: 1.3em; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;&quot;&gt;http://192.168.1.100/myapp
http://192.168.1.100/myapp2&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &#39;Roboto Slab&#39;; font-size: 16px; line-height: 28px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Now we want to run both web applications on main domains ( example.com &amp;amp; mydomain.org ). So that end users can access web application by using main domain name.&lt;/div&gt;
&lt;h2 class=&quot;heading1&quot; style=&quot;-webkit-transition: opacity 0.24s ease-in-out; background-color: white; border: 0px; color: #ff3a00; font-family: &#39;Roboto Slab&#39;; font-size: 24px; font-weight: bolder; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;&quot;&gt;
Create Virtual Hosts:&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &#39;Roboto Slab&#39;; font-size: 16px; line-height: 28px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
To create virtual hosts in Tomcat, first navigate to Tomcat installation directory and edit config/server.xml file in favorite editor. Add following host entries in configuration file.&lt;/div&gt;
&lt;pre style=&quot;background: none 0px 0px repeat scroll rgb(60, 60, 60); border-radius: 4px; border: 1px solid rgb(229, 229, 229); color: white; font-size: 0.9em; line-height: 1.3em; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;&quot;&gt; 
&amp;lt;&lt;orange style=&quot;color: orange;&quot;&gt;Host&lt;/orange&gt; name=&quot;&lt;yellow style=&quot;color: yellow;&quot;&gt;example.com&lt;/yellow&gt;&quot;  appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;&amp;gt;
 &lt;alias&gt;&lt;yellow style=&quot;color: yellow;&quot;&gt;www.example.com&lt;/yellow&gt;&lt;/alias&gt;
 
 &lt;valve classname=&quot;org.apache.catalina.valves.AccessLogValve&quot; color:=&quot;&quot; directory=&quot;logs&quot; prefix=&quot;&amp;lt;yellow style=&quot; yellow=&quot;&quot;&gt;example_access_log&lt;/valve&gt;&lt;/pre&gt;
&lt;/div&gt;
&quot; suffix=&quot;.txt&quot;
           pattern=&quot;%h %l %u %t &quot;%r&quot; %s %b&quot; /&amp;gt;
     
 &lt;context color:=&quot;&quot; docbase=&quot;&amp;lt;yellow style=&quot; path=&quot;&quot; yellow=&quot;&quot;&gt;/opt/tomcat8/webapps/myapp&lt;/context&gt;&quot;
     debug=&quot;0&quot; reloadable=&quot;true&quot;/&amp;gt;
&amp;lt;&lt;orange style=&quot;color: orange;&quot;&gt;/Host&lt;/orange&gt;&amp;gt;


&amp;lt;&lt;orange style=&quot;color: orange;&quot;&gt;Host&lt;/orange&gt; name=&quot;&lt;yellow style=&quot;color: yellow;&quot;&gt;mydomain.org&quot;&lt;/yellow&gt;  appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;&amp;gt;
 &lt;alias&gt;&lt;yellow style=&quot;color: yellow;&quot;&gt;www.mydomain.org&lt;/yellow&gt;&lt;/alias&gt;
 
 &lt;valve classname=&quot;org.apache.catalina.valves.AccessLogValve&quot; color:=&quot;&quot; directory=&quot;logs&quot; prefix=&quot;&amp;lt;yellow style=&quot; yellow=&quot;&quot;&gt;mydomain_access_log&lt;/valve&gt;&quot; suffix=&quot;.txt&quot;
           pattern=&quot;%h %l %u %t &quot;%r&quot; %s %b&quot; /&amp;gt;
     
 &lt;context color:=&quot;&quot; docbase=&quot;&amp;lt;yellow style=&quot; path=&quot;&quot; yellow=&quot;&quot;&gt;/opt/tomcat8/webapps/myapp2&lt;/context&gt;&quot;
     debug=&quot;0&quot; reloadable=&quot;true&quot;/&amp;gt;
&amp;lt;&lt;orange style=&quot;color: orange;&quot;&gt;/Host&lt;/orange&gt;&amp;gt;
&lt;h2 class=&quot;heading1&quot; style=&quot;-webkit-transition: opacity 0.24s ease-in-out; background-color: white; border: 0px; color: #ff3a00; font-family: &#39;Roboto Slab&#39;; font-size: 24px; font-weight: bolder; line-height: 34px; margin: 45px 0px 12px; opacity: 1; outline: 0px; padding: 0px; transition: opacity 0.24s ease-in-out; vertical-align: baseline; visibility: visible;&quot;&gt;
Restart Tomcat Service&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &#39;Roboto Slab&#39;; font-size: 16px; line-height: 28px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
After adding virtualhost in Tomcat, we need to restart Tomcat service. Use tomcat init service to restart it or if you don’t have init service for tomcat, execute following commands from tomcat installation directory.&lt;/div&gt;
&lt;pre style=&quot;background: none 0px 0px repeat scroll rgb(60, 60, 60); border-radius: 4px; border: 1px solid rgb(229, 229, 229); color: white; font-size: 0.9em; line-height: 1.3em; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline;&quot;&gt;# ./bin/shutdown.sh
# ./bin/startup.sh&lt;/pre&gt;
</description><link>http://javafortheday.blogspot.com/2015/05/how-to-create-virtualhost-in-tomcat-78.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1624908928810945241</guid><pubDate>Tue, 05 May 2015 07:02:00 +0000</pubDate><atom:updated>2015-05-05T02:10:57.572-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Linux</category><category domain="http://www.blogger.com/atom/ns#">UNIX commands</category><title>For killing a process linux</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot;&gt;For killing a process that is associated with multiple processes, you need to kill that by using process id associated with that process.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot;&gt;To get the process id of that java process run&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot;&gt;ps -A |grep java&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot;&gt;output of this command will give the list of java processes running on your system. Note down Process ID (PID) of that process whom you want to kill and run&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify;&quot;&gt;kill -9 PID&lt;/span&gt;&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2015/05/for-killing-process-linux.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1320262806808988245</guid><pubDate>Fri, 11 Apr 2014 10:10:00 +0000</pubDate><atom:updated>2014-04-11T03:13:42.327-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DTD</category><category domain="http://www.blogger.com/atom/ns#">JAVA classes</category><category domain="http://www.blogger.com/atom/ns#">XML</category><title>Generate Java objects from DTD  or XML</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;On&amp;nbsp; Jdk installed machine use this following Command&amp;nbsp; to generate java classes.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a folder.&amp;nbsp; (say Test is the folder).&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Copy the DTD file in the location.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; On command prompt use the command&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;xjc -dtd -d com –p [Package structure] [Dtd file name with .dtd extention]&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;Java classes will be created inside test folder with the specified package structure.&lt;/span&gt;&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2014/04/generate-java-objects-from-dtd-or-xml.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1478000277805482356</guid><pubDate>Fri, 11 Apr 2014 09:27:00 +0000</pubDate><atom:updated>2014-04-11T03:11:03.298-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">UNIX commands</category><title>UNIX Commands</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot; /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Read write access&lt;/b&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;sudo chmod 777 /foldername/foldername&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;to provide access to jboss server&lt;/b&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;sudo chown jboss.jboss&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;/foldername/foldername&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;br /&gt;&lt;b&gt;To check how many instance is running&amp;nbsp;&lt;/b&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;ps -ef | grep &quot;java&quot;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;&lt;b&gt;Delete all files&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;sudo rm -r ./*&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #282828;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;&lt;b&gt;Copy files from one folder to another&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;sudo cp -r /data/das/&lt;filename&gt; /usr/local/jboss5/server/all-with-hornetq/&lt;/filename&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;filename&gt;&lt;br /&gt;&lt;/filename&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #282828;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;filename&gt;&lt;br /&gt;&lt;/filename&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #282828; font-family: &#39;Segoe UI WPC&#39;, &#39;Segoe UI&#39;, Tahoma, &#39;Microsoft Sans Serif&#39;, Verdana, sans-serif; font-size: 13.333333969116211px;&quot;&gt;ln -s /webroot/home/httpd/test.com/index.php /home/vivek/index.php&lt;/span&gt;&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2014/04/unix-commands.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4248095655928926864</guid><pubDate>Fri, 11 Apr 2014 01:11:00 +0000</pubDate><atom:updated>2015-05-19T00:28:41.513-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">google charts</category><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">Primefaces</category><title>Implementing Google charts on JSF Primefaces with dynamic data</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;tr_bq&quot;&gt;
Sample Code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class MapVO { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public MapVO(String country, String count) { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super(); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.country = country; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.count = count; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private String country; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private String count; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public String getCountry() { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return country; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public void setCountry(String country) { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.country = country; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public String getCount() { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return count; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public void setCount(String count) { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.count = count; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp;} &lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMtz2W2aRCngWFqXGtCsSYnbk7AsAFKTcfzInIJAm_dRkLxvnaGgYALfffkTNiN8eutqO9iUF5xh49n9OMYXBV_R8ggZDv64aSvlgEWQjufQF9N_trzIOrA6GDolChyphenhyphenQ4dxsXmuSQWCcYg/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&amp;nbsp;import java.io.Serializable; &lt;br /&gt;
&amp;nbsp;import java.util.ArrayList; &lt;br /&gt;
&amp;nbsp;import java.util.HashMap; &lt;br /&gt;
&amp;nbsp;import java.util.List; &lt;br /&gt;
&amp;nbsp;import javax.annotation.PostConstruct; &lt;br /&gt;
&amp;nbsp;import javax.faces.bean.ManagedBean; &lt;br /&gt;
&amp;nbsp;import javax.faces.bean.SessionScoped; &lt;br /&gt;
&amp;nbsp;@ManagedBean(name=&quot;mapBean&quot;) &lt;br /&gt;
&amp;nbsp;@SessionScoped &lt;br /&gt;
&amp;nbsp;public class MapBean implements Serializable{ &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; /** &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/ &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private static final long serialVersionUID = 89459996582054769L; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;MapVO&amp;gt; mapList; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; @PostConstruct &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public void init() { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* var data = google.visualization.arrayToDataTable([ &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;Country&#39;, &#39;Nos&#39;], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;Germany&#39;, 200], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;United States&#39;, 300], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;Brazil&#39;, 400], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;Canada&#39;, 500], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;Japan&#39;, 600], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;China&#39;, 700] &lt;br /&gt;
&amp;nbsp; &amp;nbsp; ]); */ &lt;br /&gt;
&amp;nbsp;// Instead of hardcoding data like below code, read data from database and create ArrayList like below. &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapList = new ArrayList&amp;lt;MapVO&amp;gt;(); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapList.add(new MapVO(&quot;JAPAN&quot;,&quot;200&quot;)); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapList.add(new MapVO(&quot;China&quot;,&quot;100&quot;)); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapList.add(new MapVO(&quot;Canada&quot;,&quot;1020&quot;)); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapList.add(new MapVO(&quot;United States&quot;,&quot;1000&quot;)); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapList.add(new MapVO(&quot;Germany&quot;,&quot;100&quot;)); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setMapList(mapList); &lt;br /&gt;
&amp;nbsp;} &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private HashMap&amp;lt;String, String&amp;gt; mapData; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public HashMap&amp;lt;String, String&amp;gt; getMapData() { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;getMapData -- &quot;+mapData.size()); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return mapData; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public void setMapData(HashMap&amp;lt;String, String&amp;gt; mapData) { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;setMapData -- &quot;+mapData.size()); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.mapData = mapData; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;MapVO&amp;gt; getMapList() { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return mapList; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public void setMapList(List&amp;lt;MapVO&amp;gt; mapList) { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.mapList = mapList; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;br /&gt;
&amp;nbsp;} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the sample xhtml file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; xmlns:h=&quot;http://java.sun.com/jsf/html&quot; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; xmlns:p=&quot;http://primefaces.org/ui&quot; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; xmlns:c=&quot;http://java.sun.com/jsp/jstl/core&quot;&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;h:head&amp;gt;&amp;lt;title&amp;gt;PrimeFaces Test&amp;lt;/title&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;script type=&#39;text/javascript&#39; src=&#39;https://www.google.com/jsapi&#39;&amp;gt;&amp;lt;/script&amp;gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;script type=&#39;text/javascript&#39;&amp;gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; google.load(&#39;visualization&#39;, &#39;1&#39;, {&#39;packages&#39;: [&#39;geochart&#39;]}); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; google.setOnLoadCallback(drawRegionsMap); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; function drawRegionsMap() { &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var data = google.visualization.arrayToDataTable([ &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&#39;Country&#39;, &#39;Nos&#39;], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;c:forEach var=&quot;resultAnalysis&quot; items=&quot;${mapBean.mapList}&quot; &amp;gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[&#39;${resultAnalysis.country}&#39;,${resultAnalysis.count}], &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/c:forEach&amp;gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;var options = {}; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; var chart = new google.visualization.GeoChart(document.getElementById(&#39;chart_div&#39;)); &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;chart.draw(data, options); &lt;br /&gt;
&amp;nbsp; &amp;nbsp;}; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;/script&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;/h:head&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;h:body&amp;gt; &lt;br /&gt;
&amp;nbsp; &amp;lt;div id=&quot;chart_div&quot; style=&quot;width: 900px; height: 500px;&quot;&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;/h:body&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;lt;/html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Output preview&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigHUhz1CGockMrC7Xn4SBkiBmAorrSBK4-ZulhoLRG9vPR-BJLAgLH3DfxkMc7nKr_pMuJDIqX7FGL1wlmi1bB7966hbfzxeq7kmgaQgO102XSEXOKqbagD6Ga-q3IoPeWN0dvjMfOTIja/s1600/map.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;182&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigHUhz1CGockMrC7Xn4SBkiBmAorrSBK4-ZulhoLRG9vPR-BJLAgLH3DfxkMc7nKr_pMuJDIqX7FGL1wlmi1bB7966hbfzxeq7kmgaQgO102XSEXOKqbagD6Ga-q3IoPeWN0dvjMfOTIja/s1600/map.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2014/04/implementing-google-charts-on-jsf.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigHUhz1CGockMrC7Xn4SBkiBmAorrSBK4-ZulhoLRG9vPR-BJLAgLH3DfxkMc7nKr_pMuJDIqX7FGL1wlmi1bB7966hbfzxeq7kmgaQgO102XSEXOKqbagD6Ga-q3IoPeWN0dvjMfOTIja/s72-c/map.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-6430408165108493131</guid><pubDate>Fri, 11 Apr 2014 00:31:00 +0000</pubDate><atom:updated>2014-04-14T03:42:02.193-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">JSP</category><title>Onblur change into upper case</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We can use javaScript code to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMtz2W2aRCngWFqXGtCsSYnbk7AsAFKTcfzInIJAm_dRkLxvnaGgYALfffkTNiN8eutqO9iUF5xh49n9OMYXBV_R8ggZDv64aSvlgEWQjufQF9N_trzIOrA6GDolChyphenhyphenQ4dxsXmuSQWCcYg/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; 

 function upperCaseApplInfo(compn){  
 compn.value=compn.value.toUpperCase().replace(/([^A-Z])/g,&quot;&quot;);  
 }  
   

&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: From input box in JSF, we can call the java script code as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMtz2W2aRCngWFqXGtCsSYnbk7AsAFKTcfzInIJAm_dRkLxvnaGgYALfffkTNiN8eutqO9iUF5xh49n9OMYXBV_R8ggZDv64aSvlgEWQjufQF9N_trzIOrA6GDolChyphenhyphenQ4dxsXmuSQWCcYg/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;h:inputtext onblur=&quot;upperCaseApplInfo(this);&quot; value=&quot;#{formName.variableName}&quot;&amp;gt;  
 &amp;lt;/h:inputtext&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2014/04/onblur-change-into-upper-case.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1325917173266048965</guid><pubDate>Tue, 10 Aug 2010 15:06:00 +0000</pubDate><atom:updated>2010-08-10T08:13:52.442-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Eclipse</category><title>Java heap space error in eclipse</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;Step 1: Create a shortcut for eclipse.exc&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Step  2: Right click  eclipse short cut and add target value with  “-vm  &quot;C:\Program  Files\Java\jre1.5.0_08\bin\javaw.exe&quot; -vmargs -Xmx1024M   -XX:MaxPermSize=512M”&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Like “D:\eclipse.exe -vm &quot;C:\Program Files\Java\jre1.5.0_08\bin\javaw.exe&quot; -vmargs -Xmx1024M -XX:MaxPermSize=512M” &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9EvGeSI_ivMvOU5VULvvPqUvPeBUlybi8mO7r_NuinXT-p1qlTM0CY6DnTLaNAsoFqyQkgg5iY8R531rga21f97VWJqhXnyeDYEgWi7-j2k0KCbLMPtZLCsZDqCkXwXMrlODOngWVW2Iv/s1600/image002.png&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 292px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9EvGeSI_ivMvOU5VULvvPqUvPeBUlybi8mO7r_NuinXT-p1qlTM0CY6DnTLaNAsoFqyQkgg5iY8R531rga21f97VWJqhXnyeDYEgWi7-j2k0KCbLMPtZLCsZDqCkXwXMrlODOngWVW2Iv/s400/image002.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5503798961040969250&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step3 : start eclipse by clicking on the short cut created.</description><link>http://javafortheday.blogspot.com/2010/08/java-heap-space-error-in-eclipse.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9EvGeSI_ivMvOU5VULvvPqUvPeBUlybi8mO7r_NuinXT-p1qlTM0CY6DnTLaNAsoFqyQkgg5iY8R531rga21f97VWJqhXnyeDYEgWi7-j2k0KCbLMPtZLCsZDqCkXwXMrlODOngWVW2Iv/s72-c/image002.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-6984108612973837644</guid><pubDate>Tue, 07 Oct 2008 11:42:00 +0000</pubDate><atom:updated>2008-10-07T04:42:56.423-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Transient  access modifier in java</title><description>1.   Transient can be applied only to class level variables.&lt;br /&gt;2.   Local variables can’t be declared as transient.&lt;br /&gt;3.   During serialization, Object’s transient variables are not serialized.&lt;br /&gt;4.  Transient variables may not be final or static. But the complies allows the declaration and no compile time error is generated.</description><link>http://javafortheday.blogspot.com/2008/10/transient-access-modifier-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-6222047419263585122</guid><pubDate>Tue, 07 Oct 2008 11:40:00 +0000</pubDate><atom:updated>2014-04-14T03:42:40.979-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Final access modifier in java</title><description>&lt;p&gt;&lt;br /&gt;1. All the Variables, methods and classes can be declared as Final.&lt;br /&gt;2. Classes declared as final class can’t be sub classed.&lt;br /&gt;3. Method ‘s declared as final can’t be over ridden.&lt;br /&gt;4. If a Variable is declared as final, the value contained in the Variable can’t be changed.&lt;br /&gt;5. Static final variable must be assigned in to a value in static initialized block.&lt;/p&gt;</description><link>http://javafortheday.blogspot.com/2008/10/final-access-modifier-in-java_7.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-501404798651187100</guid><pubDate>Tue, 07 Oct 2008 11:40:00 +0000</pubDate><atom:updated>2008-10-07T04:41:56.167-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Final access modifier in java</title><description>&lt;p&gt;&lt;br /&gt;1. All the Variables, methods and classes can be declared as Final.&lt;br /&gt;2. Classes declared as final class can’t be sub classed.&lt;br /&gt;3. Method ‘s declared as final can’t be over ridden.&lt;br /&gt;4. If a Variable is declared as final, the value contained in the Variable can’t be changed.&lt;br /&gt;5. Static final variable must be assigned in to a value in static initialized block.&lt;/p&gt;</description><link>http://javafortheday.blogspot.com/2008/10/final-access-modifier-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-2826946337726810783</guid><pubDate>Fri, 12 Sep 2008 09:08:00 +0000</pubDate><atom:updated>2008-09-12T02:13:54.151-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>String in java</title><description>String is Immutable and String Is a final class. The String class provides for strings whose value will not change.&lt;br /&gt;      One accessor method that you can use with both strings and string buffers is the length() method, which returns the number of characters contained in the string or the string buffer.     &lt;br /&gt;&lt;br /&gt;The methods in String Class:-&lt;br /&gt;toString( )          &lt;br /&gt;equals( )&lt;br /&gt;indexOff( )&lt;br /&gt;LowerCase( )&lt;br /&gt;charAt( )&lt;br /&gt;compareTo( )&lt;br /&gt;lastIndexOff( )&lt;br /&gt;UpperCase( )&lt;br /&gt;getChars( )&lt;br /&gt;subString( )&lt;br /&gt;trim( )&lt;br /&gt;getBytes( )&lt;br /&gt;concat( )   &lt;br /&gt;valueOf( )&lt;br /&gt;toCharArray( )&lt;br /&gt;replace( )</description><link>http://javafortheday.blogspot.com/2008/09/string-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-6624878405063105290</guid><pubDate>Tue, 09 Sep 2008 07:35:00 +0000</pubDate><atom:updated>2008-09-09T00:37:57.979-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Data Encapsulation in JAVA</title><description>What is data encapsulation?&lt;br /&gt;      The most common example I can think of is a javabean. Encapsulation may be used by creating &#39;get&#39; and &#39;set&#39; methods in a class which are used to access the fields of the object. Typically the fields are made private while the get and set methods are public.&lt;br /&gt;        Encapsulation can be used to validate the data that is to be stored, to do calculations on data that is stored in a field or fields, or for use in introspection (often the case when using javabeans in Struts, for instance).</description><link>http://javafortheday.blogspot.com/2008/09/data-encapsulation-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1120745843623966665</guid><pubDate>Wed, 27 Aug 2008 09:50:00 +0000</pubDate><atom:updated>2008-08-27T02:52:53.146-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Garbage Collection in Java</title><description>When an object is no longer referred to by any variable, java automatically reclaims memory used by that  object. This is known as garbage collection.System.gc() method may be used to call it explicitly and does not force the garbage collection  but only suggests that the JVM may make an effort to do the Garbage Collection.</description><link>http://javafortheday.blogspot.com/2008/08/garbage-collection-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4669369051634634262</guid><pubDate>Wed, 27 Aug 2008 09:50:00 +0000</pubDate><atom:updated>2014-04-14T03:42:40.971-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Garbage Collection in Java</title><description>&lt;div&gt;          When an object is no longer referred to by any variable, java automatically reclaims memory used by that  object. This is known as garbage collection.System.gc() method may be used to call it explicitly and does not force the garbage collection  but only suggests that the JVM may make an effort to do the Garbage Collection.&lt;/div&gt;</description><link>http://javafortheday.blogspot.com/2008/08/garbage-collection-in-java_27.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4616921364769787183</guid><pubDate>Mon, 25 Aug 2008 11:18:00 +0000</pubDate><atom:updated>2008-08-25T04:21:02.952-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Static in JAVA</title><description>access modifier.  Signa: Variable-Static int b; Method- static void meth(int x)&lt;br /&gt;&lt;br /&gt;1.            When a member is declared as Static, it can be accessed before any objects of its class&lt;br /&gt;are created and without reference to any object. Eg : main(),it must call before any object exit.&lt;br /&gt;&lt;br /&gt;2.           Static can be applied to Inner classes, Variables and Methods.&lt;br /&gt;&lt;br /&gt;3.            Local variables can’t be declared as static.                     &lt;br /&gt;&lt;br /&gt;4.            A static method can access only static Variables. and they can’t refer to this or super in any way.&lt;br /&gt;&lt;br /&gt;5.            Static methods can’t be abstract.&lt;br /&gt;&lt;br /&gt;6.            A static method may be called without creating any instance of the class.&lt;br /&gt;&lt;br /&gt;7.            Only one instance of static variable will exit any amount of class instances.</description><link>http://javafortheday.blogspot.com/2008/08/static-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-3472611002604405007</guid><pubDate>Wed, 20 Aug 2008 08:41:00 +0000</pubDate><atom:updated>2008-08-20T21:49:45.778-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Constructor in Java</title><description>1. A constructor method is special kind of method that determines how an object is initialized when created.&lt;br /&gt;&lt;br /&gt;2. Constructor has the same name as class name.&lt;br /&gt;&lt;br /&gt;3. Constructor does not have return type.&lt;br /&gt;&lt;br /&gt;4. Constructor cannot be over ridden and can be over loaded.&lt;br /&gt;&lt;br /&gt;5. Default constructor is automatically generated by compiler if class does not have once.&lt;br /&gt;&lt;br /&gt;6. If explicit constructor is there in the class the default constructor is not generated.&lt;br /&gt;&lt;br /&gt;7. If a sub class has a default constructor and super class has explicit constructor the code will not compile.</description><link>http://javafortheday.blogspot.com/2008/08/constructor.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-8455608099545229813</guid><pubDate>Wed, 20 Aug 2008 08:36:00 +0000</pubDate><atom:updated>2014-04-14T03:44:25.668-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>What are access specifiers and access modifiers ?</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
Accesss specifiers                                             Access modifiers&lt;br /&gt;
Public                                                                     Public&lt;br /&gt;
Protected                                                                Abstract             &lt;br /&gt;
Private                                                                    Final   &lt;br /&gt;
Static&lt;br /&gt;
Volatile                  Constant     &lt;br /&gt;
Synchronized&lt;br /&gt;
Transient&lt;br /&gt;
Native     &lt;/div&gt;
&lt;/div&gt;
</description><link>http://javafortheday.blogspot.com/2008/08/what-are-access-specifiers-and-access.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-5064688950049295603</guid><pubDate>Wed, 20 Aug 2008 08:31:00 +0000</pubDate><atom:updated>2008-08-20T21:50:11.104-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Interfaces in Java</title><description>&lt;p&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Interfaces&lt;/span&gt; can be used to implement the Inheritance relationship between the non-related classes that do not belongs to the same hierarchy, i.e. any Class and any where in hierarchy. Using Interface, you can specify what a class must do but not how it does.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;1. A class can implement more than one Interface. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;2. An Interface can extend one or more interfaces, by using the keyword extends. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;3. All the data members in the interface are public, static and Final by default. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;4. An Interface method can have only Public, default and Abstract modifiers. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;5. An Interface is loaded in memory only when it is needed for the first time. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;6. A Class, which implements an Interface, needs to provide the implementation of all the methods in that Interface. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;7. If the Implementation for all the methods declared in the Interface are not provided , the class itself has to declare abstract, other wise the Class will not compile. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;8. If a class Implements two interface and both the Intfs have identical method declaration, it is totally valid. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;9. If a class implements two interfaces both have identical method name and argument list, but different return types, the code will not compile. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;10. An Interface can’t be instantiated. Intf Are designed to support dynamic method resolution at run time. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;11. An interface can not be native, static, synchronize, final, protected or private. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;12. The Interface fields can’t be Private or Protected. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;13. A Transient variables and Volatile variables can not be members of Interface. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;14. The extends keyword should not used after the Implements keyword, the Extends must always come before the Implements keyword. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;15. A top level Interface can not be declared as static or final. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;16. If an Interface species an exception list for a method, then the class implementing the interface need not declare the method with the exception list. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;17. If an Interface can’t specify an exception list for a method, the class can’t throw an exception. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;18 If an Interface does not specify the exception list for a method, he class can not throw any exception list.&lt;/p&gt;&lt;p&gt;------------------------------------------------&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;The general form of Interface is&lt;br /&gt;Access interface name {&lt;br /&gt;return-type method-name1(parameter-list);&lt;br /&gt;type final-varname1=value;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;-------------------------------------------------&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Marker Interfaces &lt;span style=&quot;color:#000000;&quot;&gt;: Serializable, Clonable, Remote, EventListener,&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Java.lang&lt;/span&gt; is the Package of all classes and is automatically imported into all Java Program&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Interfaces&lt;span style=&quot;color:#000000;&quot;&gt;:&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color:#000000;&quot;&gt;Clonable , Comparable, Runnable&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;color:#000000;&quot;&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://javafortheday.blogspot.com/2008/08/interfaces-in-java.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4430561243018150657</guid><pubDate>Wed, 20 Aug 2008 08:29:00 +0000</pubDate><atom:updated>2008-08-20T21:50:32.796-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Declaration of access specifier and access modifiers</title><description>Class - Public, Abstract, Final&lt;br /&gt;Inner Class - Public, Protected, Private, Final, Static,&lt;br /&gt;Anonymous - Public, Protected, Private, Static&lt;br /&gt;Variable - Public, Protected, Private, Final, Static, Transient, Volatile, Native&lt;br /&gt;Method - Public, Protected, Private, Final, Abstract, Static, Native, Synchronized&lt;br /&gt;Constructor - Public, Protected, Private&lt;br /&gt;Free-floating code block - Static, Synchronized</description><link>http://javafortheday.blogspot.com/2008/08/declaration-of-access-specifier-and.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-4154206441221459725</guid><pubDate>Wed, 20 Aug 2008 05:27:00 +0000</pubDate><atom:updated>2008-08-20T21:49:28.042-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core java</category><title>Oops Concepts in java</title><description>&lt;span style=&quot;color:#006600;&quot;&gt;Abstraction&lt;/span&gt;: Showing the essential and hiding the non-Essential is known as Abstraction.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Encapsulation&lt;/span&gt;: The Wrapping up of data and functions into a single unit is known as Encapsulation. Encapsulation is the term given to the process of hiding the implementation details of the object. Once an object is encapsulated, its implementation details are not immediately accessible any more. Instead they are packaged and are only indirectly accessed via the interface of the object.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Inheritance&lt;/span&gt;: is the Process by which the Obj of one class acquires the properties of Obj’s another Class. A reference variable of a Super Class can be assign to any Sub class derived from the Super class. Inheritance is the method of creating the new class based on already existing class , the new class derived is called Sub class which has all the features of existing class and its own, i.e sub class.Adv: Reusability of code , accessibility of variables and methods of the Base class by the Derived class.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Polymorphism&lt;/span&gt;: The ability to take more that one form, it supports Method Overloading &amp;amp; Method Overriding.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Method overloading&lt;/span&gt;: When a method in a class having the same method name with different arguments (diff Parameters or Signatures) is said to be Method Overloading. This is Compile time Polymorphism. Using one identifier to refer to multiple items in the same scope.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Method Overriding&lt;/span&gt;: When a method in a Class having same method name with same arguments is said to be Method overriding. This is Run time Polymorphism.o Providing a different implementation of a method in a subclass of the class that originally defined the method.&lt;br /&gt;&lt;br /&gt;1. In Over loading there is a relationship between the methods available in the same class ,where as in Over riding there is relationship between the Super class method and Sub class method.&lt;br /&gt;&lt;br /&gt;2. Overloading does not block the Inheritance from the Super class , Where as in Overriding blocks Inheritance from the Super Class.&lt;br /&gt;&lt;br /&gt;3. In Overloading separate methods share the same name, where as in Overriding Sub class method replaces the Super Class.&lt;br /&gt;&lt;br /&gt;4. Overloading must have different method Signatures , Where as Overriding methods must have same Signatures.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Dynamic dispatch&lt;/span&gt;: is a mechanism by which a call to Overridden function is resolved at runtime rather than at Compile time , and this is how Java implements Run time Polymorphism.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Dynamic Binding&lt;/span&gt;: Means the code associated with the given procedure call is not known until the time of call the call at run time. (it is associated with Inheritance &amp;amp; Polymorphism).</description><link>http://javafortheday.blogspot.com/2008/08/oops-concepts.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-1687605771942746325</guid><pubDate>Tue, 19 Aug 2008 08:36:00 +0000</pubDate><atom:updated>2008-08-19T01:50:22.159-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core Java Programs</category><title>Program to generate 10 Random nos</title><description>&lt;span style=&quot;color:#006600;&quot;&gt;/*Write a program to generate 10 Random nos. between 1 to 100, and it&lt;br /&gt;&lt;br /&gt;should not follow with decimal point.&lt;br /&gt;&lt;br /&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;class RandomDemo{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;for(int i=1;i&lt;=10;i++){&lt;br /&gt;&lt;br /&gt;System.out.println((int)(Math.random()*100));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;</description><link>http://javafortheday.blogspot.com/2008/08/program-to-generate-10-random-nos.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7984552454484939025.post-7547734183016343031</guid><pubDate>Mon, 18 Aug 2008 06:46:00 +0000</pubDate><atom:updated>2008-08-20T21:50:54.926-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core Java Programs</category><title>Java Hello World Program</title><description>Lets take a simple java program, we will write a program to display &quot;Hello world&quot;(as usual).&lt;br /&gt;&lt;br /&gt;1. Open a notepad or text file, and start type the following coding.&lt;br /&gt;&lt;br /&gt;2. Save this file with the name HelloWorld.java.&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Tips&lt;/span&gt;: java file name and the class should always same - java compiler checks for this.&lt;br /&gt;____________________________________________________________________&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Code&lt;/span&gt; :&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;/** Comments * program to display &quot;Hello world&quot;. */&lt;br /&gt;class HelloWorld &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;{&lt;br /&gt;public static void main (String args[]) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;{&lt;br /&gt;System.out.println(&quot;Hello World!&quot;); //Displays the enclosed String on the Screen Console&lt;br /&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;____________________________________________________________________&lt;br /&gt;&lt;br /&gt;3. save this code under the path &quot;C:\Program Files\Java\Jdk****\bin&quot;&lt;br /&gt;&lt;span style=&quot;color:#006600;&quot;&gt;Note&lt;/span&gt;: **** It depends on java version installed in the system&lt;br /&gt;&lt;br /&gt;4. open the command prompt, and get into the location C:\Program Files\Java\Jdk****\bin&lt;br /&gt;&lt;br /&gt;5. Now Compile Java code.&lt;br /&gt;From a command line, the command to compile this program is :&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;javac HelloWorld.java&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;&lt;/span&gt;&lt;br /&gt;6. Now run the program&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;java HelloWorld&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#006600;&quot;&gt;You have written your first Java program! Congratulations :)&lt;/span&gt;</description><link>http://javafortheday.blogspot.com/2008/08/java-hello-world-program.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item></channel></rss>