<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns: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'><id>tag:blogger.com,1999:blog-7495145072270785983</id><updated>2024-09-25T20:53:51.250-07:00</updated><category term="java"/><category term="validation"/><category term="ClaimAV"/><category term="JSP"/><category term="above 18"/><category term="age"/><category term="alphanumeric"/><category term="amazon"/><category term="aws"/><category term="binding"/><category term="certain"/><category term="character"/><category term="child"/><category term="clamd"/><category term="cloud"/><category term="decrypt md5"/><category term="downcasting"/><category term="dynamic"/><category term="email"/><category term="encrypt"/><category term="encryption"/><category term="extends"/><category term="fibonacci"/><category term="generate"/><category term="get"/><category term="get value"/><category term="how"/><category term="html"/><category term="index"/><category term="inheritance"/><category term="javascript"/><category term="length"/><category term="mail"/><category term="mathmetical"/><category term="md5"/><category term="option"/><category term="override"/><category term="parent"/><category term="parser"/><category term="password"/><category term="polymorphism"/><category term="pop up"/><category term="postfix"/><category term="program"/><category term="random"/><category term="reference"/><category term="retrieve"/><category term="runtime"/><category term="script"/><category term="select"/><category term="selected"/><category term="series"/><category term="string"/><category term="swap"/><category term="text"/><category term="upcasting"/><category term="valid"/><category term="xml"/><title type='text'>CoderLog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-3859307977307292533</id><published>2014-11-17T01:13:00.001-08:00</published><updated>2014-11-17T01:13:31.769-08:00</updated><title type='text'>Interview Questions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;8 balls , 7 correct 1 heavy. What will be &amp;nbsp;the minimum value of iterations to find faulty ball ??&lt;/li&gt;
&lt;li&gt;8 balls , 7 correct 1 faulty [ don&#39;t know light or heavy ] . What will be &amp;nbsp;the minimum value of iterations to find faulty ball ??&lt;/li&gt;
&lt;li&gt;In an array of integer, find pair of 2 numbers such that the sum is equal to k.&lt;/li&gt;
&lt;li&gt;What is time complexity in Map for get and put operations ?&lt;/li&gt;
&lt;li&gt;How to make class immutable ?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;What are patterns you know ?&lt;/li&gt;
&lt;li&gt;What is singleton pattern ?&lt;/li&gt;
&lt;li&gt;How mysql saves data ?&lt;/li&gt;
&lt;li&gt;What are the optimization techniques in mysql ?&lt;/li&gt;
&lt;li&gt;What are cons in using hibernate ?&lt;/li&gt;
&lt;li&gt;How do you implement caching in hibernate ?&lt;/li&gt;
&lt;li&gt;What is difference in GET and POST ?&lt;/li&gt;
&lt;li&gt;How can you index a column in table &amp;nbsp;?&lt;/li&gt;
&lt;li&gt;What is generics ?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;What did you used to implement Web-services &amp;nbsp;?&lt;/li&gt;
&lt;li&gt;How will you find kth minimum number in array of integers ?&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/3859307977307292533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2014/11/interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/3859307977307292533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/3859307977307292533'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2014/11/interview-questions.html' title='Interview Questions'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-2762874706058801393</id><published>2014-06-05T03:27:00.000-07:00</published><updated>2014-06-05T03:27:56.637-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fibonacci"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="mathmetical"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="series"/><title type='text'>Java Programs For Various Series</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Fibonacci Series :-&amp;nbsp;&lt;/b&gt;&lt;/h2&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Code :-&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;import java.util.Scanner;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class Fibonacci {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String arg[]){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Scanner in = new Scanner(System.in);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int n = in.nextInt();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for (int i = 0; i &amp;lt;= n; i++) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(fibonacci(i) + &quot; &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;in.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static int fibonacci(int n) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (n == 0) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (n == 1) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return fibonacci(n - 1) + fibonacci(n - 2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Output:-&lt;/b&gt;&lt;/h3&gt;
10&lt;br /&gt;
&lt;br /&gt;
0 1 1 2 3 5 8 13 21 34 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/2762874706058801393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2014/06/java-programs-for-various-series.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/2762874706058801393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/2762874706058801393'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2014/06/java-programs-for-various-series.html' title='Java Programs For Various Series'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-8726607313369806416</id><published>2014-03-01T05:00:00.002-08:00</published><updated>2014-03-01T05:01:28.213-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon"/><category scheme="http://www.blogger.com/atom/ns#" term="aws"/><category scheme="http://www.blogger.com/atom/ns#" term="ClaimAV"/><category scheme="http://www.blogger.com/atom/ns#" term="clamd"/><category scheme="http://www.blogger.com/atom/ns#" term="cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="mail"/><category scheme="http://www.blogger.com/atom/ns#" term="postfix"/><category scheme="http://www.blogger.com/atom/ns#" term="swap"/><title type='text'>On The Cloud [AWS]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I was assigned to setting up new server on AWS and i was pretty much excited while i started working on it. Being a java guy, i am having no knowledge of working with servers, but let see:-&lt;br /&gt;
&lt;br /&gt;
Setting up ISPConfig 3:-&lt;br /&gt;
&lt;br /&gt;
Just followed the instruction given on &lt;a href=&quot;http://www.howtoforge.com/perfect-server-ubuntu-12.10-apache2-bind-dovecot-ispconfig-3&quot;&gt;this&lt;/a&gt; article. And yeah ISPConfig is installed.&lt;br /&gt;
&lt;br /&gt;
Successfully generated SPF&lt;br /&gt;
&lt;br /&gt;
Now i am stuck with DKIM, i have to set my mail server and i used Postfix for it, but my ClaimAV is real pain in the arse. I have created DKIM key and all other settings but now mail delivery is stopped. :&#39;(&lt;br /&gt;
&lt;br /&gt;
Dammn itt. I had no SWAP on AWS that is why it was failing.&lt;br /&gt;
I found out via:-&lt;br /&gt;
free -m&lt;br /&gt;
&lt;br /&gt;
I added swap space by help of this &lt;a href=&quot;https://forums.aws.amazon.com/message.jspa?messageID=199073#199073&quot;&gt;link&lt;/a&gt; :-&lt;br /&gt;
&lt;br /&gt;
SWAPFILE=/mnt/swapfile.swap&lt;br /&gt;
dd if=/dev/zero of=$SWAPFILE bs=1M count=512&lt;br /&gt;
mkswap $SWAPFILE&lt;br /&gt;
swapon $SWAPFILE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and voila its working...... &amp;nbsp;^_^&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/8726607313369806416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2014/03/on-cloud-aws.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8726607313369806416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8726607313369806416'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2014/03/on-cloud-aws.html' title='On The Cloud [AWS]'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-8041617093456842310</id><published>2013-09-22T13:35:00.002-07:00</published><updated>2013-09-22T14:00:10.935-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="binding"/><category scheme="http://www.blogger.com/atom/ns#" term="child"/><category scheme="http://www.blogger.com/atom/ns#" term="downcasting"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamic"/><category scheme="http://www.blogger.com/atom/ns#" term="extends"/><category scheme="http://www.blogger.com/atom/ns#" term="inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="override"/><category scheme="http://www.blogger.com/atom/ns#" term="parent"/><category scheme="http://www.blogger.com/atom/ns#" term="polymorphism"/><category scheme="http://www.blogger.com/atom/ns#" term="reference"/><category scheme="http://www.blogger.com/atom/ns#" term="runtime"/><category scheme="http://www.blogger.com/atom/ns#" term="upcasting"/><title type='text'>Java inheritance concept</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Interviewers loves to trap candidates in inheritance and overridding concepts. So here is the solution. Just copy the code below and you will understand all about it as soon as you run this code. Let me know in case of any confusion. &amp;nbsp;;)&lt;br /&gt;
&lt;br /&gt;
P.S.:- Be careful for the &quot;**&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class InheritanceConcept {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public&amp;nbsp;InheritanceConcept() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Inside Polymorphism Constructor&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String args[]) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Parent p = new Parent();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Child c = new Child();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Parent pCast = new Child();&lt;br /&gt;
//&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Child cCast = (Child) new Parent();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;//Class Cast Exception&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;**Downcasting&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p.ParentsMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;//inside ParentsMethod&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p.OverriddenMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;//inside Parent&#39;s OverriddenMethod&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;c.ParentsMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;//inside ParentsMethod&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;c.ChildsMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;//inside ChildsMethod&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;c.OverriddenMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;//inside Child&#39;s OverriddenMethod&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;pCast.ParentsMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;//inside ParentsMethod&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;pCast.OverriddenMethod();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;//inside Child&#39;s OverriddenMethod&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;**Runtime Polymorphism/Dynamic Binding&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Parent{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Parent(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Inside Parent&#39;s Constructor&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void OverriddenMethod(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;inside Parent&#39;s OverriddenMethod&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void ParentsMethod(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;inside ParentsMethod&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Child extends Parent{&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Child(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Inside Child&#39;s Constructor&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void OverriddenMethod(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;inside Child&#39;s OverriddenMethod&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void ChildsMethod(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;inside ChildsMethod&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/8041617093456842310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2013/09/java-inheritance-concept.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8041617093456842310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8041617093456842310'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2013/09/java-inheritance-concept.html' title='Java inheritance concept'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-8440218677984265083</id><published>2012-06-26T00:34:00.000-07:00</published><updated>2012-06-26T00:34:18.725-07:00</updated><title type='text'>Comparison BetweenTwo Dates</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt; var startDate = &quot;02/01/2013&quot;;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt; var endDate = &quot;02/01/2012&quot;;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var stDate = startDate.split(&quot;/&quot;)
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        var enDate = endDate.split(&quot;/&quot;)
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var stdate = stDate[1]        //date
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        var stmnth = stDate[0]-1        //month
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var stYr = stDate[2]        //year
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var endate = enDate[1]        //date&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var enmnth = enDate[0]-1        //month
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        var enyr = enDate[2]        //year
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var strtDate = new Date(); &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;var endDate = new Date();
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;strtDate.setFullYear(styr,stmnth,stdate);
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        endDate.setFullYear(enyr, enmnth, endate)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        if(strtDate&amp;gt;endDate){
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            alert(&quot;Start date is greater than end date.&quot;)
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;sourceRow &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;sourceRowText &quot; role=&quot;presentation&quot;&gt;        }
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/8440218677984265083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2012/06/comparison-betweentwo-dates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8440218677984265083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8440218677984265083'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2012/06/comparison-betweentwo-dates.html' title='Comparison BetweenTwo Dates'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-8494276557836695737</id><published>2012-06-11T21:29:00.000-07:00</published><updated>2012-06-11T21:31:15.774-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="get"/><category scheme="http://www.blogger.com/atom/ns#" term="get value"/><category scheme="http://www.blogger.com/atom/ns#" term="how"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="index"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="option"/><category scheme="http://www.blogger.com/atom/ns#" term="pop up"/><category scheme="http://www.blogger.com/atom/ns#" term="retrieve"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="select"/><category scheme="http://www.blogger.com/atom/ns#" term="selected"/><category scheme="http://www.blogger.com/atom/ns#" term="text"/><title type='text'>Select Option Ops</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;select id=&quot;slct&quot; onchange=&quot;slct();&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;option value=&quot;1&quot;&amp;gt;Volvo&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;option value=&quot;2&quot;&amp;gt;Saab&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;option value=&quot;3&quot;&amp;gt;Mercedes&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;option value=&quot;4&quot;&amp;gt;Audi&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;/select&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
function slct(){&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var selObj = document.getElementById(&#39;slct&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var selIndex = selObj.selectedIndex;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(selIndex);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(selObj.options[selIndex].value);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(selObj.options[selIndex].text);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/8494276557836695737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2012/06/select-option-ops.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8494276557836695737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8494276557836695737'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2012/06/select-option-ops.html' title='Select Option Ops'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-4398295372889441382</id><published>2012-05-22T21:54:00.002-07:00</published><updated>2012-05-22T21:54:35.705-07:00</updated><title type='text'>Codelets</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;#Convert String to Date in Java&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;syntaxhighlighter  java&quot; id=&quot;highlighter_764934&quot;&gt;
&lt;div class=&quot;toolbar&quot;&gt;
&lt;b&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;b&gt;&lt;code class=&quot;java plain&quot;&gt;java.util.Date = java.text.DateFormat.getDateInstance().parse(date String);&lt;/code&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;or&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;syntaxhighlighter  java&quot; id=&quot;highlighter_227014&quot;&gt;
&lt;div class=&quot;toolbar&quot;&gt;
&lt;b&gt;&lt;span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;b&gt;&lt;code class=&quot;java plain&quot;&gt;SimpleDateFormat format = &lt;/code&gt;&lt;code class=&quot;java keyword&quot;&gt;new&lt;/code&gt; &lt;code class=&quot;java plain&quot;&gt;SimpleDateFormat( &lt;/code&gt;&lt;code class=&quot;java string&quot;&gt;&quot;dd.MM.yyyy&quot;&lt;/code&gt; &lt;code class=&quot;java plain&quot;&gt;);&lt;/code&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;b&gt;&lt;code class=&quot;java plain&quot;&gt;Date date = format.parse( myString );&lt;/code&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/4398295372889441382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2012/05/codelets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/4398295372889441382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/4398295372889441382'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2012/05/codelets.html' title='Codelets'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-4561224490242684889</id><published>2012-03-03T23:24:00.003-08:00</published><updated>2012-03-03T23:24:57.386-08:00</updated><title type='text'>Read File In JAVA</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
import java.io.*;&lt;br /&gt;
&lt;br /&gt;
class ReadFile{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static void main(String args[]) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileInputStream fstream = new FileInputStream(&quot;c:/yash.txt&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataInputStream disobj = new DataInputStream(fstream);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedReader br = new BufferedReader(new InputStreamReader(disobj));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String frst = br.readLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String scnd = br.readLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (frst != null) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(frst);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(scnd);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;empty&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; disobj.close();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception ex) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(ex.getMessage());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/4561224490242684889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2012/03/read-file-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/4561224490242684889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/4561224490242684889'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2012/03/read-file-in-java.html' title='Read File In JAVA'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-5959953663759370168</id><published>2012-02-19T01:50:00.000-08:00</published><updated>2012-02-19T01:50:30.474-08:00</updated><title type='text'>In The Spring 3.0</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Introduction-&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
To be very honest i am not some die hard geek coder or some sort of JAVA Guru writing some Bible. I am just a beginner who just started learning to work in JAVA but i am trying to note all the points i am covering while learning Spring 3.0. Just hoping, may be it will also help you. Have fun. :-)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/5959953663759370168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2012/02/in-spring-30.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/5959953663759370168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/5959953663759370168'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2012/02/in-spring-30.html' title='In The Spring 3.0'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-2789835507879963866</id><published>2011-12-13T23:27:00.000-08:00</published><updated>2011-12-13T23:28:46.217-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alphanumeric"/><category scheme="http://www.blogger.com/atom/ns#" term="certain"/><category scheme="http://www.blogger.com/atom/ns#" term="character"/><category scheme="http://www.blogger.com/atom/ns#" term="generate"/><category scheme="http://www.blogger.com/atom/ns#" term="length"/><category scheme="http://www.blogger.com/atom/ns#" term="random"/><category scheme="http://www.blogger.com/atom/ns#" term="string"/><title type='text'>Generate random string of certain length</title><content type='html'>&lt;div&gt;&lt;!--?php&lt;/div--&gt;&lt;div&gt;function genRandomString() &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;    $length = 10;&lt;/div&gt;&lt;div&gt;    $characters = &quot;0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&quot;;&lt;/div&gt;&lt;div&gt;    $string = null;    &lt;/div&gt;&lt;div&gt;    for ($p = 0; $p &amp;lt; $length; $p++) {&lt;/div&gt;&lt;div&gt;        $string .= $characters[mt_rand(0, strlen($characters))];&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    return $string;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$x=genRandomString();&lt;/div&gt;&lt;div&gt;echo substr($x,0,6);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/2789835507879963866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2011/12/generate-random-string-of-certain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/2789835507879963866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/2789835507879963866'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2011/12/generate-random-string-of-certain.html' title='Generate random string of certain length'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-5664273329341599144</id><published>2011-12-05T22:55:00.000-08:00</published><updated>2011-12-05T22:57:39.950-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JSP"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>XML Parser in JSP</title><content type='html'>&lt;div&gt;/**&lt;/div&gt;&lt;div&gt;&lt;div&gt; *&lt;/div&gt;&lt;div&gt; * @author yashx1@gmail.com&lt;/div&gt;&lt;div&gt; */&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import javax.xml.parsers.DocumentBuilderFactory;&lt;/div&gt;&lt;div&gt;import javax.xml.parsers.DocumentBuilder;&lt;/div&gt;&lt;div&gt;import org.w3c.dom.Document;&lt;/div&gt;&lt;div&gt;import org.w3c.dom.NodeList;&lt;/div&gt;&lt;div&gt;import org.w3c.dom.Node;&lt;/div&gt;&lt;div&gt;import org.w3c.dom.Element;&lt;/div&gt;&lt;div&gt;import java.io.InputStream;&lt;/div&gt;&lt;div&gt;import java.net.URL;&lt;/div&gt;&lt;div&gt;import com.ahoy.ubid.utils.ParseUtil;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;public class XmlParserHelp {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    public static void main(String argv[]) {&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            ParseUtil p = new ParseUtil();&lt;/div&gt;&lt;div&gt;            URL xmlURL = new URL(&quot;http://www.newsletter.uahoy.com:8081/WeBid/api.auctions.php&quot;);&lt;/div&gt;&lt;div&gt;            InputStream xml = xmlURL.openStream();&lt;/div&gt;&lt;div&gt;            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();&lt;/div&gt;&lt;div&gt;            DocumentBuilder db = dbf.newDocumentBuilder();&lt;/div&gt;&lt;div&gt;            Document doc = db.parse(xml);&lt;/div&gt;&lt;div&gt;            xml.close();&lt;/div&gt;&lt;div&gt;            doc.getDocumentElement().normalize();&lt;/div&gt;&lt;div&gt;            NodeList nList = doc.getElementsByTagName(&quot;result&quot;);&lt;/div&gt;&lt;div&gt;            for (int temp = 0; temp &amp;lt; nList.getLength(); temp++) {&lt;/div&gt;&lt;div&gt;                Node nNode = nList.item(temp);&lt;/div&gt;&lt;div&gt;                if (nNode.getNodeType() == Node.ELEMENT_NODE) {&lt;/div&gt;&lt;div&gt;                    Element eElement = (Element) nNode;&lt;/div&gt;&lt;div&gt;                    System.out.println(&quot;auctionTitle : &quot; + p.getTagValue(&quot;auctionTitle&quot;, eElement));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;           &lt;/div&gt;&lt;div&gt;                    //System.out.println(&quot;auctioneerId : &quot; + p.getTagValue(&quot;auctioneerId&quot;, eElement));&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;        } catch (Exception e) {&lt;/div&gt;&lt;div&gt;            System.out.println(e);&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/5664273329341599144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2011/12/xml-parser-in-jsp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/5664273329341599144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/5664273329341599144'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2011/12/xml-parser-in-jsp.html' title='XML Parser in JSP'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-8880833965684221316</id><published>2011-11-22T23:09:00.000-08:00</published><updated>2011-11-24T02:25:51.104-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="above 18"/><category scheme="http://www.blogger.com/atom/ns#" term="age"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><title type='text'>Validation For Checking If User Is Above 18 Years Of Age</title><content type='html'>&lt;div&gt;This code block returns if user is above 18 years of age. it also have checks for leap year and all. Although it is written in php but logic can be used in other platforms also.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;!--?php&lt;/div--&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;//for calculating birthdate.&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;$birth_day = $_GET[&quot;day&quot;];&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;$birth_month = $_GET[&quot;month&quot;];&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;$birth_year = $_GET[&quot;year&quot;];&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;$DATE = $birth_year . $birth_month . $birth_day;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;function CheckAge($day, $month, $year)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$QCPASS=0;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;if((empty($day))&amp;amp;&amp;amp;(empty($month))&amp;amp;&amp;amp;(empty($year))){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;echo &quot;atleast put the date, man!!  :@&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$QCPASS=1;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;elseif((!empty($day))&amp;amp;&amp;amp;(!empty($month))&amp;amp;&amp;amp;(!empty($year))){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;if($day&amp;lt;1||$day&amp;gt;31){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;echo &quot;day is not valid. R u nuts ?? &quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;$QCPASS=1;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;elseif(($month&amp;lt;1||$month&amp;gt;12)&amp;amp;&amp;amp;$month!=2){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;echo &quot;month is not valid. may god help u.....&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;$QCPASS=1;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;elseif($month==2){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;if($year%4==0&amp;amp;&amp;amp;$day&amp;gt;29)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;            &lt;/span&gt;echo &quot;only till 29 in feb&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;            &lt;/span&gt;$QCPASS=1;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;elseif($year%4!=0&amp;amp;&amp;amp;$day&amp;gt;28){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;            &lt;/span&gt;echo &quot;only till 28 not a leap year bro...&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;            &lt;/span&gt;$QCPASS=1;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;elseif($month==4||$month==6||$month==9||$month==11){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;if($day&amp;gt;30){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;echo &quot;some months have 30 days only. sorry i cant change my calendar for u.&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;$QCPASS=1;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;if($QCPASS==0){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;          &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;$NOW_year = gmdate(&#39;Y&#39;);&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;$NOW_month = gmdate(&#39;m&#39;);&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;           &lt;/span&gt;$NOW_day = gmdate(&#39;d&#39;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;if (($NOW_year - $year) &amp;gt; 18){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;              &lt;/span&gt;echo &quot;fine,u r above 18. do watever u lyk dude.....&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;elseif ((($NOW_year - $year) == 18) &amp;amp;&amp;amp; ($NOW_month &amp;gt; $month)){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;              &lt;/span&gt;echo &quot;fine,u r above 18. do watever u lyk dude.....&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;elseif ((($NOW_year - $year) == 18) &amp;amp;&amp;amp; ($NOW_month == $month) &amp;amp;&amp;amp; ($NOW_day &amp;gt;= $day)){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;echo &quot;fine,u r above 18. do watever u lyk dude.....&quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;else{&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;echo &quot;mummy se bolo complan pilayein&quot;;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;      &lt;/span&gt;//if err exist&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;             &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;          &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;     &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;else if((!empty($day))||(!empty($month))||(!empty($year))){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;echo &quot;LOL......u missed some fields above.  :D &quot;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CheckAge($birth_day, $birth_month, $birth_year);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;// URL:  &lt;a href=&quot;http://localhost/datechecker.php?&amp;amp;day=30&amp;amp;month=2&amp;amp;year=1993&quot;&gt;http://localhost/datechecker.php?&amp;amp;day=30&amp;amp;month=2&amp;amp;year=1993&lt;/a&gt;&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/8880833965684221316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2011/11/validation-for-checking-if-user-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8880833965684221316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/8880833965684221316'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2011/11/validation-for-checking-if-user-is.html' title='Validation For Checking If User Is Above 18 Years Of Age'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-6407195200861301978</id><published>2011-11-22T22:48:00.000-08:00</published><updated>2011-11-22T22:58:50.315-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="decrypt md5"/><category scheme="http://www.blogger.com/atom/ns#" term="encrypt"/><category scheme="http://www.blogger.com/atom/ns#" term="encryption"/><category scheme="http://www.blogger.com/atom/ns#" term="md5"/><category scheme="http://www.blogger.com/atom/ns#" term="password"/><title type='text'>Generating MD5 Encrypted Password For Storing In Database</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;This code block generates hash code for an input such as password. But this must be kept in mind that this uses MD5 encryption method,which is only one way encryption method. Means if u want to decrypt the stored password in database it is not feasible. So you can also use reset passord method for setting new password:-&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[This code is written in php,butt this can be used in any other desired language using the same function.]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;function get_hash(){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$string = &#39;0123456789abcdefghijklmnopqrstuvyxz&#39;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$hash = &#39;&#39;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;     &lt;/span&gt;for ($i = 0; $i &amp;lt; 5; $i++){&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;      &lt;/span&gt;$rand = rand(0, (34 - $i));&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;      &lt;/span&gt;$hash .= $string[$rand];&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;      &lt;/span&gt;$string = str_replace($string[$rand], &#39;&#39;, $string);&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;     &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;return $hash;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/6407195200861301978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2011/11/this-code-block-generates-hash-code-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/6407195200861301978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/6407195200861301978'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2011/11/this-code-block-generates-hash-code-for.html' title='Generating MD5 Encrypted Password For Storing In Database'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7495145072270785983.post-921305936187023240</id><published>2011-11-22T22:34:00.000-08:00</published><updated>2011-11-22T22:59:59.789-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="email"/><category scheme="http://www.blogger.com/atom/ns#" term="valid"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><title type='text'>Validation For e-mail Id</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;&gt;This code generates the valid output for an email. It is written for php but can be used in any language :-&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;function getmailvalid(){&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$x=$_GET[&#39;email&#39;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$atpos=strpos($x,&quot;@&quot;);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;$dotpos=strripos($x,&quot;.&quot;);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;if ($atpos&amp;lt;1 || $dotpos&amp;lt;$atpos+2 || $dotpos+2&amp;gt;=strlen($x)){&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;     &lt;/span&gt;return 1;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;else{&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;return 0;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;$valideid=getmailvalid();&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycoderlog.blogspot.com/feeds/921305936187023240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycoderlog.blogspot.com/2011/11/this-code-generates-valid-output-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/921305936187023240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7495145072270785983/posts/default/921305936187023240'/><link rel='alternate' type='text/html' href='http://mycoderlog.blogspot.com/2011/11/this-code-generates-valid-output-for.html' title='Validation For e-mail Id'/><author><name>streak</name><uri>http://www.blogger.com/profile/04418405758053513887</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>