<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" 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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DkQMQX05fCp7ImA9WhBaEEg.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175</id><updated>2013-05-20T13:53:00.324+01:00</updated><category term="ibatis" /><category term="OpenCV-JavaCV" /><category term="Computer/Technology Tips" /><category term="java" /><category term="Matlab" /><category term="Dependency Injection" /><category term="Image Processing" /><category term="XML" /><category term="Numerical Methods C/C++ Code" /><category term="SQL Reference Guide" /><category term="My Views" /><category term="movie" /><category term="Groovy Grails" /><category term="Database and SQL" /><category term="Audio Processing" /><category term="Maven" /><category term="Java-EE" /><category term="Campus Assignments" /><category term="quotes" /><category term="computer project ideas" /><category term="Java Interview QA" /><category term="ubuntu" /><category term="Android" /><category term="Project Configuration IDE" /><category term="hidden markov model" /><category term="Video" /><category term="Data Structure C++" /><title>GT's Blog</title><subtitle type="html">(Ganesh Tiwari) gt_ebuddy's  Blog - Code snippets, technical articles, tips on computing and programming...</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>207</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/UgXPq" /><feedburner:info uri="blogspot/ugxpq" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUMCQnc_cSp7ImA9WhJWE0k.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-8394086872502031670</id><published>2012-08-19T03:31:00.001+01:00</published><updated>2012-08-19T03:31:03.949+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-19T03:31:03.949+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Groovy Grails" /><title>grails detecting environment groovy &amp; gsp code </title><content type="html">Grails/Groovy working code snippet to detect the current environment (development, test, production, or your &amp;nbsp;custom). Custom environment are defined in config.groovy file.&lt;br /&gt;
&lt;h4&gt;
Detecting Environment in GSP code :&lt;/h4&gt;
Following checks if current environment is other than production.&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;    &amp;lt;g:if test="${env != "production"}"&amp;gt;
        //your logic 

    &amp;lt;/g:if&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
Detecting environment in Groovy Code ( in Controller, Service, etc..), using switch-case comparison&lt;/h4&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;        switch(Environment.current.getName()){
            case "development":
                //do your stuff 1
                break;
            case "test":
                //do your stuff 2
                break;
            case "production":
                //do your stuff 3
                break;
            case "my_environment":  // for custom environment : my_environment
                //todo:
                break;
        }&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;
Simple comparison in groovy&lt;/h4&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 653px;"&gt;&lt;code style="word-wrap: normal;"&gt;if(Environment.current.getName()=="development") {
    //do your stuff
}&lt;/code&gt;&lt;/pre&gt;
&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/fUMbkqNOVi4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/8394086872502031670/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/08/grails-detecting-environment-groovy-gsp.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/8394086872502031670?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/8394086872502031670?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/fUMbkqNOVi4/grails-detecting-environment-groovy-gsp.html" title="grails detecting environment groovy &amp; gsp code " /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/08/grails-detecting-environment-groovy-gsp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ADSX06fyp7ImA9WhJWEE0.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-1849864268855240465</id><published>2012-08-14T18:54:00.001+01:00</published><updated>2012-08-15T06:49:38.317+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-15T06:49:38.317+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Groovy Grails" /><title>Grails - auto login in spring security</title><content type="html">Consider a typical web application where you have multiple user roles (like SUPER_ADMIN, OPERATOR, VISITOR etc ) and you need to do login and switch between them frequently. It certainly consumes a lot of time if you do this manually. One simple solution would be to use the browser's password remember feature. But this would not be useful if you need to switch between different role.&lt;br /&gt;
&lt;br /&gt;
Here, I am going to do show how we can setup this mechanism in Grails applications which uses Spring Security plugin.&lt;br /&gt;
&lt;br /&gt;
If you are using Spring Security plugin then, by default you will have following names for html textbox for username and password : j_username and j_password. and you have login request url as&amp;nbsp;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;b&gt;http://localhost:8080/YOUR_APP/j_spring_security_check&lt;/b&gt;&lt;/span&gt; .&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
The required login script :&lt;a name='more'&gt;&lt;/a&gt;&lt;/h3&gt;
It does the login form submission using hidden fields. You need to change YOUR_APP according to your app.&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;        &amp;lt;script&amp;gt;
        function doLogin(username, password){
                var path='http://localhost:8080/YOUR_APP/j_spring_security_check';
                var params={'j_username':username,'j_password':password};
                var form=document.createElement("form");
                form.setAttribute("method","POST");
                form.setAttribute("action",path);
                //set params into hidden field and submit 
                for(var key in params){
                    var hiddenField=document.createElement("input");
                    hiddenField.setAttribute("type","hidden");
                    hiddenField.setAttribute("name",key);
                    hiddenField.setAttribute("value",params[key]);
                    form.appendChild(hiddenField);
                }document.body.appendChild(form);
                form.submit();
            };
        &amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
Now use this script as :&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;    &amp;lt;button onClick="doLogin('user1', 'password')"&amp;gt;Login-User1&amp;lt;/button&amp;gt;
    &amp;lt;button onClick="doLogin('admin1', '123456')"&amp;gt;Login-Admin1&amp;lt;/button&amp;gt;
    ...for any required roles
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
Detecting the production environment:&lt;/h3&gt;
&lt;br /&gt;
As this feature shouldn't be available in production environment we should do the following check for this.&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 653px;"&gt;&lt;code style="word-wrap: normal;"&gt;&amp;lt;g:if test="${env != "production"}"&amp;gt;
//login code
&amp;lt;/g:if&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
The full code&lt;/h3&gt;
&amp;nbsp;( we can post this in layout/main.gsp so that it appears in all pages) :&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;body&amp;gt;
    &amp;lt;g:if test="${env != "production"}"&amp;gt;
        &amp;lt;script&amp;gt;
        function doLogin(username, password){
                var path='http://localhost:8080/YOUR_APP/j_spring_security_check';
                var params={'j_username':username,'j_password':password};
                var form=document.createElement("form");
                form.setAttribute("method","POST");
                form.setAttribute("action",path);
                //set params into hidden field and submit 
                for(var key in params){
                    var hiddenField=document.createElement("input");
                    hiddenField.setAttribute("type","hidden");
                    hiddenField.setAttribute("name",key);
                    hiddenField.setAttribute("value",params[key]);
                    form.appendChild(hiddenField);
                }document.body.appendChild(form);
                form.submit();
            };
        &amp;lt;/script&amp;gt;
    &amp;lt;button onClick="doLogin('operator1', '123456')"&amp;gt;Login-Operator1&amp;lt;/button&amp;gt;
    &amp;lt;button onClick="doLogin('operator2', '123456')"&amp;gt;Login-Operator1&amp;lt;/button&amp;gt;
    &amp;lt;/g:if&amp;gt;
    ...
    ...
    ...rest of the layout code
    &amp;lt;/body&amp;gt;
    &lt;/code&gt;&lt;/pre&gt;
Source : &lt;a href="http://naleid.com/blog/2011/11/29/speed-up-your-grails-spring-security-development-with-autologin-bookmarklet/" target="_blank"&gt;Speed up your Grails / Spring Security Development with an Auto Login Bookmarklet&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/CIwnUax-hLM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/1849864268855240465/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/08/grails-auto-login-in-spring-security.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1849864268855240465?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1849864268855240465?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/CIwnUax-hLM/grails-auto-login-in-spring-security.html" title="Grails - auto login in spring security" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/08/grails-auto-login-in-spring-security.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cMQH88fyp7ImA9WhJQGUs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-3192019834099306713</id><published>2012-08-01T17:05:00.000+01:00</published><updated>2012-08-03T05:44:41.177+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-03T05:44:41.177+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Groovy Grails" /><title>Groovy Grails - Dynamic Method n Variable name and invoking them</title><content type="html">Groovy allows to use dynamic method name and variable name and invoke/use them.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;Dynamic Variable Names&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
Groovy allows to use variable name dynamically.&amp;nbsp;To test this lets introduce a variable &amp;nbsp;"dogname" to Dog class&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;class Dog {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;def dogname&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; white-space: pre;"&gt; &lt;/span&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;//Testing dynamic variable name&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def aDog= new Dog()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;aDog.name="Hachi"&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;def prop="dogname"&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;println aDog."$prop" // prints Hachi&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;Dynamic Method Invocation :&lt;/b&gt;&lt;/h3&gt;
You can invoke a method even if you don't know the method name until it is invoked: In the example below, we are executing the method in the Dog class without knowing the method name in advance. We are simply passing a String to the method doAction as&amp;nbsp;doAction( rex, &lt;span class="string"&gt;"bark"&lt;/span&gt; ) and inside doAction method, we are calling the actual function whose name is fromed based on the second parameter to the doAction method - action. -&amp;gt;&amp;nbsp;animal.&lt;span class="string"&gt;"$action"&lt;/span&gt;()&lt;br /&gt;
&lt;br /&gt;
//dog class&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code class="groovy" data-result="[object Object]"&gt;&lt;b&gt;&lt;span class="class"&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="title"&gt;Dog&lt;/span&gt; {&lt;/span&gt;
  &lt;span class="keyword"&gt;def&lt;/span&gt; bark() { println &lt;span class="string"&gt;"woof!"&lt;/span&gt; }
  &lt;span class="keyword"&gt;def&lt;/span&gt; sit() { println &lt;span class="string"&gt;"(sitting)"&lt;/span&gt; }
  &lt;span class="keyword"&gt;def&lt;/span&gt; jump() { println &lt;span class="string"&gt;"boing!"&lt;/span&gt; }
}
&lt;/b&gt;
&lt;b&gt;&lt;span class="keyword"&gt;def&lt;/span&gt; doAction( animal, action ) {&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="groovy" data-result="[object Object]"&gt;&lt;span style="font-family: 'Times New Roman'; white-space: normal;"&gt;&amp;nbsp; &amp;nbsp; //creating the method name out of the action parameter&amp;nbsp;&lt;/span&gt;
&lt;b&gt;  animal.&lt;span class="string"&gt;"$action"&lt;/span&gt;()                  &lt;span class="comment"&gt;//action name is passed at invocation&lt;/span&gt;
}
&lt;/b&gt;
&lt;b&gt;&lt;span class="keyword"&gt;def&lt;/span&gt; rex = &lt;span class="keyword"&gt;new&lt;/span&gt; Dog()

doAction( rex, &lt;span class="string"&gt;"bark"&lt;/span&gt; )               &lt;span class="comment"&gt;//prints 'woof!'&lt;/span&gt;
doAction( rex, &lt;span class="string"&gt;"jump"&lt;/span&gt; )               &lt;span class="comment"&gt;//prints 'boing!'&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="groovy" data-result="[object Object]"&gt;&lt;span class="comment"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
Reference:&amp;nbsp;http://groovy.codehaus.org/Dynamic+Groovy
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/cqCTBJWZu_U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/3192019834099306713/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/08/groovy-grails-dynamic-method-n-variable.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/3192019834099306713?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/3192019834099306713?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/cqCTBJWZu_U/groovy-grails-dynamic-method-n-variable.html" title="Groovy Grails - Dynamic Method n Variable name and invoking them" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/08/groovy-grails-dynamic-method-n-variable.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRH0-fyp7ImA9WhBSEEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-1312831729673190862</id><published>2012-07-16T12:33:00.003+01:00</published><updated>2013-02-17T01:33:35.357Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-17T01:33:35.357Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computer/Technology Tips" /><title>git- saving username password - credential.helper cache - how to</title><content type="html">Isn't is interesting if there is an option in GIT to save your credentials for short time so that you don't enter your username/password repeatedly each time when you do pull/push? Yes! there is an option introduced in GIT since 1.7.9 (released on January 2012). This method is more secure than permanently saving your username/password in&amp;nbsp;
&lt;span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: left;"&gt;&amp;nbsp;.git&lt;/span&gt;&amp;nbsp; file of your git clone directory.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: inherit;"&gt;&lt;span style="background-color: white; line-height: 18px; text-align: left;"&gt;So, run the following command at the GIT console (git bash) :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq" style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;"&gt;
&lt;code style="border-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;git config --global credential.helper cache&lt;/b&gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 18px; text-align: left;"&gt;This caches the credentials for 15 minutes (&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white;"&gt;900 seconds)&lt;/span&gt;&lt;span style="background-color: white; line-height: 18px; text-align: left;"&gt;&amp;nbsp;by default. If you want a longer timeout period (say3600 seconds), you can do the following :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;blockquote class="tr_bq" style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;"&gt;
&lt;code style="border-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;git config --global credential.helper&amp;nbsp;&lt;/b&gt;&lt;/code&gt;&lt;b style="background-color: white;"&gt;&lt;span style="background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;'cache --timeout=3600'&lt;/span&gt;&lt;/b&gt;&lt;span style="background-color: white;"&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/7D_BPGNgFQk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/1312831729673190862/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/07/git-saving-username-password.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1312831729673190862?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1312831729673190862?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/7D_BPGNgFQk/git-saving-username-password.html" title="git- saving username password - credential.helper cache - how to" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/07/git-saving-username-password.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYDRHo-fCp7ImA9WhJQGE4.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-4894812313011723799</id><published>2012-06-27T11:12:00.001+01:00</published><updated>2012-08-01T17:06:15.454+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-01T17:06:15.454+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Groovy Grails" /><title>Grails - beginners video tutorial</title><content type="html">&lt;br /&gt;
From the Grails site: "Grails aims to bring the 'coding by convention' paradigm to Groovy. It's an open-source web application framework that leverages the Groovy language and complements Java Web development. You can use Grails as a standalone development environment that hides all configuration details or integrate your Java business logic. Grails aims to make development as simple as possible and hence should appeal to a wide range of developers not just those from the Java community."&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here is list of some useful video tutorials on Grails framework.&lt;br /&gt;
&lt;b style="background-color: white;"&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style="background-color: white;"&gt;From SpringSourceDev :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Getting Started with Grails - Part 1 - &lt;a href="http://www.youtube.com/watch?v=PXHxo43hn34"&gt;http://www.youtube.com/watch?v=PXHxo43hn34&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: white;"&gt;process of creating a simple domain model and generating a basic CRUD user interface for the model through Grails' scaffolding.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Getting Started with Grails - Part 2 - &lt;a href="http://www.youtube.com/watch?v=qNFksvLxZNU"&gt;http://www.youtube.com/watch?v=qNFksvLxZNU&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: white;"&gt;start building a custom user interface for your web applications using controller actions, GSP views, and CSS stylesheets.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Getting Started with Grails - Part 3 - &lt;a href="http://www.youtube.com/watch?v=oL4yVtNU31E"&gt;http://www.youtube.com/watch?v=oL4yVtNU31E&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: white;"&gt;learn about custom GSP tags and how they can promote reuse between your views.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;


&lt;span style="background-color: white;"&gt;From &lt;/span&gt;&lt;a href="http://www.grailsexample.net/" style="background-color: white;" target="_blank"&gt;Grails Example .net&amp;nbsp;&lt;/a&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style="background-color: white;"&gt;Creating a Model Part 1 - &lt;a href="http://www.youtube.com/watch?v=hGjCYfLZF_8"&gt;http://www.youtube.com/watch?v=hGjCYfLZF_8&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
Creating a Model Part 2 - &lt;a href="http://www.youtube.com/watch?v=y2ul-LIvniw"&gt;http://www.youtube.com/watch?v=y2ul-LIvniw&lt;/a&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;Creating a View - &lt;a href="http://www.youtube.com/watch?v=tzqxCuWq6k4"&gt;http://www.youtube.com/watch?v=tzqxCuWq6k4&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;Creating a Controller - &lt;a href="http://www.youtube.com/watch?v=mU0vgIPFcQo"&gt;http://www.youtube.com/watch?v=mU0vgIPFcQo&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;Dynamic Scaffolding - &lt;a href="http://www.youtube.com/watch?v=3hVXw2DoI_8"&gt;http://www.youtube.com/watch?v=3hVXw2DoI_8&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
Constraints and Static Scaffolding &amp;nbsp;- &lt;a href="http://www.youtube.com/watch?v=N-Ysr3P9-to"&gt;http://www.youtube.com/watch?v=N-Ysr3P9-to&lt;/a&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;Basic Grails Security - &lt;a href="http://www.youtube.com/watch?v=xoDG6Anbx84"&gt;http://www.youtube.com/watch?v=xoDG6Anbx84&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;... more coming soon&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/Zoto_0wX_F0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/4894812313011723799/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/grails-beginners-video-tutorial.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/4894812313011723799?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/4894812313011723799?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/Zoto_0wX_F0/grails-beginners-video-tutorial.html" title="Grails - beginners video tutorial" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/grails-beginners-video-tutorial.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYDRHo_cSp7ImA9WhJQGE4.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-4187232772785775827</id><published>2012-06-24T09:09:00.003+01:00</published><updated>2012-08-01T17:06:15.449+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-01T17:06:15.449+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Groovy Grails" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Configuration IDE" /><title>grails- add jar to lib folder - not working - solution</title><content type="html">In grails application you can add jar dependencies by just pasting the .jar file to lib folder. If your code doesn't find the jar dependency at runtime then you can do following :&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Run the following grail command (s):&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;clean&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;compile --refresh-dependencies&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
In eclipse you can open the Grails Command Prompt by :&lt;br /&gt;
Right Click on project -&amp;gt; Grail Tools -&amp;gt; Open Grails Command Prompt&lt;br /&gt;
&lt;br /&gt;
Hope this helps.&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/r2CHmGlBH3E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/4187232772785775827/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/grails-add-jar-to-lib-folder-not.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/4187232772785775827?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/4187232772785775827?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/r2CHmGlBH3E/grails-add-jar-to-lib-folder-not.html" title="grails- add jar to lib folder - not working - solution" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/grails-add-jar-to-lib-folder-not.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRH08fyp7ImA9WhBSEEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-6984192500634326027</id><published>2012-06-18T06:59:00.002+01:00</published><updated>2013-02-17T01:33:35.377Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-17T01:33:35.377Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Computer/Technology Tips" /><title>nepali english date conversion logic - working java code</title><content type="html">&lt;br /&gt;
I just found someone has blogged about Nepali-English date conversion in this post:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://forjavaprogrammers.blogspot.com/2012/06/how-to-convert-english-date-to-nepali.html" target="_blank"&gt;http://forjavaprogrammers.blogspot.com/2012/06/how-to-convert-english-date-to-nepali.html &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
He has explained the algorithm in detail about how to convert English dates into Nepali dates with java code.&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/w7bmsB1aCW4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/6984192500634326027/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/nepali-english-date-conversion-logic.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/6984192500634326027?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/6984192500634326027?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/w7bmsB1aCW4/nepali-english-date-conversion-logic.html" title="nepali english date conversion logic - working java code" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/nepali-english-date-conversion-logic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UGR3o7eSp7ImA9WhJQGUs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-3229405615491733766</id><published>2012-06-10T07:24:00.004+01:00</published><updated>2012-08-03T05:47:06.401+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-03T05:47:06.401+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Java-EE" /><title>java spring - read properties file variable from xml -PropertyPlaceholderConfigurer</title><content type="html">Java springframework xml configuration file - how to read properties file variables from spring xml :&lt;br /&gt;
We have to use PropertyPlaceholderConfigurer bean for this.&lt;br /&gt;
&lt;h3&gt;












1).properties file location -&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;src/main/resource @ maven managed project&lt;/li&gt;
&lt;li&gt;OR at classpath&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;












2)The xml code to initialize/read properties file,&amp;nbsp;&lt;a name='more'&gt;&lt;/a&gt;&lt;/h3&gt;
I have a sample config.properties file at either of above location.&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;
    &amp;lt;bean
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&amp;gt;
        &amp;lt;property name="locations" value="classpath:config.properties" /&amp;gt;
    &amp;lt;/bean&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;












&lt;b&gt;3)config.properties file content -&lt;/b&gt;&lt;/h3&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;server.url=http://localhost:8080/testapp/&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;












&lt;b&gt;4)Using this&amp;nbsp;server.url at xml file :&lt;/b&gt;&lt;/h3&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;We have to use -&lt;b&gt; &lt;i&gt;${server.url}&lt;/i&gt;&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
eg :&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;property name="serviceUrl" &lt;b&gt;&lt;i&gt;value="${server.url}testService"&lt;/i&gt;&lt;/b&gt; /&amp;gt;

-OR

&amp;lt;sometag name="someName"&amp;gt; &lt;b&gt;&lt;i&gt;${server.url}&lt;/i&gt;&lt;/b&gt; &amp;lt;/sometag&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/kPXOxdHPXdU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/3229405615491733766/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/java-spring-read-properties-file.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/3229405615491733766?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/3229405615491733766?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/kPXOxdHPXdU/java-spring-read-properties-file.html" title="java spring - read properties file variable from xml -PropertyPlaceholderConfigurer" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/java-spring-read-properties-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YMRHYzfSp7ImA9WhVaGUQ.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-2333996644887210880</id><published>2012-06-10T07:09:00.004+01:00</published><updated>2012-06-18T06:59:45.885+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-18T06:59:45.885+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Java-EE" /><title>hibernate annotation inheritance mappedsuperclass - common columns in super class</title><content type="html">When you are using annotations for hibernate&amp;nbsp;object relational mapping, there might be the case that we need to abstract out some common columns that goes into all table definitions. These columns might be ID, DFlag, LastModifiedDate etc..&lt;br /&gt;
In such case we can take advantage of&amp;nbsp;&lt;b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: large;"&gt;@MappedSuperclass&lt;/span&gt;&lt;/b&gt; annotation to achieve inheritance in hibernate annotation.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example :&lt;/b&gt;&lt;br /&gt;
&lt;h3&gt;



Super class BaseTable that contains common column definitions:&lt;/h3&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;@MappedSuperclass
public abstract class BaseTable {
    @Id
    @GeneratedValue
    @Column(name = "id")
    private int id;

    @Column(name = "dflag")
    private int dFlag;

    @Column(name = "lastmodifieddate")
    private Date lastModifiedDate;
    
    //other required columns
....
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;



Extending it to use in other tables :&lt;/h3&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;
@Entity
@Table(name = "LoginUser")
public class LoginUser extends BaseTable  implements Serializable{

    private static final long serialVersionUID = -1920053571118011085L;

    @Column(name = "username")
    private String username;

    @Column(name = "password")
    private String password;

    @Column(name = "invalidCount")
    private int invalidCount;
    
    //other required tables
   ...
}

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
It works !&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/COVPfDyo_7w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/2333996644887210880/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/hibernate-annotation-inheritance.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/2333996644887210880?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/2333996644887210880?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/COVPfDyo_7w/hibernate-annotation-inheritance.html" title="hibernate annotation inheritance mappedsuperclass - common columns in super class" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/hibernate-annotation-inheritance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YMR3o9fip7ImA9WhJQGUs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-74540948834773311</id><published>2012-06-09T06:41:00.002+01:00</published><updated>2012-08-03T05:46:26.466+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-03T05:46:26.466+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Configuration IDE" /><category scheme="http://www.blogger.com/atom/ns#" term="Java-EE" /><category scheme="http://www.blogger.com/atom/ns#" term="Database and SQL" /><title>mysql hibernate unicode support - character set, collate</title><content type="html">I just did following configurations to achieve&amp;nbsp;Unicode&amp;nbsp;support in my Java+Hibernate+MySQL project.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring MySQL to support&amp;nbsp;Unicode&amp;nbsp;- set Character Set and Collate as :&lt;/b&gt;&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;CREATE TABLE YOUR_DB_NAME
 CHARACTER SET "UTF8"
 COLLATE "utf8_general_ci";

&lt;b&gt;NOTE&lt;/b&gt; : You Need to do "ALTER TABLE" instead of "CREATE TABLE", 
      if you are going to modify existing DB.
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Hibernate JDBC connection string :&lt;/b&gt;&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;jdbc.url=jdbc:mysql://localhost:3306/YOUR_DB_NAME?useUnicode=true&amp;amp;characterEncoding=UTF-8
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Hibernate Configuration:&lt;/b&gt;&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;hibernate-configuration&amp;gt;
&amp;lt;session-factory&amp;gt;
    ...
    &amp;lt;property name="hibernate.connection.charSet"&amp;gt;UTF-8&amp;lt;/property&amp;gt;
    &amp;lt;property name="hibernate.connection.characterEncoding"&amp;gt;UTF-8&amp;lt;/property&amp;gt;
    &amp;lt;property name="hibernate.connection.useUnicode"&amp;gt;true&amp;lt;/property&amp;gt;
    ...
&amp;lt;/session-factory&amp;gt;
&amp;lt;/hibernate-configuration&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/qcjExKU1Drg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/74540948834773311/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/mysql-java-hibernate-unicode-support.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/74540948834773311?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/74540948834773311?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/qcjExKU1Drg/mysql-java-hibernate-unicode-support.html" title="mysql hibernate unicode support - character set, collate" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/mysql-java-hibernate-unicode-support.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYNRns4fyp7ImA9WhJXGUs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-5325996683865192091</id><published>2012-06-06T11:14:00.000+01:00</published><updated>2012-08-14T18:59:57.537+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-14T18:59:57.537+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Java-EE" /><title>Java code to find public IP address (servlet and client side code)</title><content type="html">&lt;br /&gt;
Java code to find public IP address :&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;i&gt;URL url= new URL("http://gt-tests.appspot.com/ip");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String ip = in.readLine();
System.out.println("IP : "+ip);&lt;/i&gt;&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
I created a simple servlet app on google app engine &amp;nbsp;and posted at&amp;nbsp;&lt;a href="http://gt-tests.appspot.com/ip"&gt;http://gt-tests.appspot.com/ip&lt;/a&gt; .&lt;br /&gt;
&lt;br /&gt;
The servlet code returns the public address of client, it looks like :&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;i&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;i&gt;public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
  PrintWriter out = resp.getWriter();
  // Get client's IP address
  String addr = req.getRemoteAddr();
  out.println(addr);
  ...&lt;/i&gt;&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/_10y4dEcMv0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/5325996683865192091/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/java-code-to-find-public-ip-address.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/5325996683865192091?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/5325996683865192091?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/_10y4dEcMv0/java-code-to-find-public-ip-address.html" title="Java code to find public IP address (servlet and client side code)" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/06/java-code-to-find-public-ip-address.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRH08fCp7ImA9WhBSEEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-6142166719890781485</id><published>2012-05-31T17:32:00.001+01:00</published><updated>2013-02-17T01:33:35.374Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-17T01:33:35.374Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computer/Technology Tips" /><title>Java Script code that disables right click and prevents selecting the text on web page.</title><content type="html">&lt;div style="text-align: center;"&gt;
&lt;i&gt;Java Script code that disables right click and selecting the text on web page.&lt;/i&gt;&lt;/div&gt;
Put the following code in your &amp;lt;body&amp;gt;........&amp;lt;/body&amp;gt; tag.&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;script&amp;gt;
function disableselect(e){return false;}
function reEnable(){return true;}
document.onselectstart=new Function (){return false;}
if (window.sidebar){
    document.onmousedown=disableselect;
    document.onclick=reEnable;
}
&amp;lt;/script&amp;gt;

&amp;lt;script&amp;gt;
document.oncontextmenu = function(){return false;}
if(document.layers) {
    window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown = function(e){
        if(e.target==document)
        return false;
    }
}else {
    document.onmousedown = function(){return false;}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;For Blogger template,&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Search for &amp;lt;/body&amp;gt; in the template code&lt;/li&gt;
&lt;li&gt;paste the above script just before &amp;lt;/body&amp;gt; tage.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;Enjoy !&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
You are now safe from website article thief.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/90Je3iVlfQw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/6142166719890781485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/java-script-code-that-disables-right.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/6142166719890781485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/6142166719890781485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/90Je3iVlfQw/java-script-code-that-disables-right.html" title="Java Script code that disables right click and prevents selecting the text on web page." /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/java-script-code-that-disables-right.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRH0zeyp7ImA9WhBSEEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-8954261506896199472</id><published>2012-05-29T19:33:00.002+01:00</published><updated>2013-02-17T01:33:35.383Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-17T01:33:35.383Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computer/Technology Tips" /><title>facebook security bug - change password of a active user - without knowing original password</title><content type="html">&lt;div style="text-align: center;"&gt;
&lt;i&gt;change password of a active user -without knowing original password - security bug -&amp;nbsp;Facebook allows to change password in active login without entering current password&lt;/i&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
As of May 2012, Facebook has over 900 million active users. Security and privacy should be the number one concern of Facebook Inc. But I just found one BUG in Facebook security system.&lt;br /&gt;
&lt;br /&gt;
This might (not) be a security bug in Facebook. And probably be fixed by Facebook when you tried to do the same, because I am going to report this to Facebook.&lt;br /&gt;
&lt;br /&gt;
All the steps below that I am going to share - deals with changing someone else’s password without entering their previous/current password. I have never seen or write code for “login preference change” that allows to change password without entering previous password or other information. &amp;nbsp;I was shocked to know that Facebook allows it. I was just playing with Security option in Facebook’s Account setting https://www.facebook.com/settings. And found that.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Steps that I followed :&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Go to Facebook’s Account setting https://www.facebook.com/settings and choose Security. And then choose “Deactivate your account”.&lt;/li&gt;
&lt;/ul&gt;
&lt;a href="http://1.bp.blogspot.com/-2VC7A2Php1I/T8USX5HoDFI/AAAAAAAAAl0/nY2_OnUn-Y8/s1600/Security+settings+-+Google+Chrome_2012-05-29_23-18-10.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" height="259" src="http://1.bp.blogspot.com/-2VC7A2Php1I/T8USX5HoDFI/AAAAAAAAAl0/nY2_OnUn-Y8/s640/Security+settings+-+Google+Chrome_2012-05-29_23-18-10.png" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="text-align: left;"&gt;Choose “My account was hacked” and click “here”.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-_7qCIGCQwx8/T8UWTk9JalI/AAAAAAAAAmE/gE2W3yHU2Jg/s1600/Deactivate+account+-+Google+Chrome_2012-05-29_23-20-05.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-_7qCIGCQwx8/T8UWTk9JalI/AAAAAAAAAmE/gE2W3yHU2Jg/s1600/Deactivate+account+-+Google+Chrome_2012-05-29_23-20-05.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;why there is option "My account was hacked" ?&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Continue --&amp;gt; Continue.&lt;/li&gt;
&lt;/ul&gt;
&lt;a href="http://2.bp.blogspot.com/-qDIJrYuR4lY/T8USSvi_EpI/AAAAAAAAAlE/nAjSdf8It-c/s1600/Facebook+-+Google+Chrome_2012-05-29_23-21-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-qDIJrYuR4lY/T8USSvi_EpI/AAAAAAAAAlE/nAjSdf8It-c/s1600/Facebook+-+Google+Chrome_2012-05-29_23-21-02.png" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/-_7LAwg0YI9o/T8USTWPY97I/AAAAAAAAAlM/2DtYRfkfy84/s1600/Facebook+-+Google+Chrome_2012-05-29_23-21-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-_7LAwg0YI9o/T8USTWPY97I/AAAAAAAAAlM/2DtYRfkfy84/s1600/Facebook+-+Google+Chrome_2012-05-29_23-21-26.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Here is the odd thing. No input text field for Old password.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-2mto66eqFuw/T8UST3CLNLI/AAAAAAAAAlU/uDI2wTS2n6M/s1600/Facebook+-+Google+Chrome_2012-05-29_23-21-51.png" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-2mto66eqFuw/T8UST3CLNLI/AAAAAAAAAlU/uDI2wTS2n6M/s1600/Facebook+-+Google+Chrome_2012-05-29_23-21-51.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Facebook allows to change password in active login without entering current password&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;And then you will see following screens.&amp;nbsp;
Continue --&amp;gt; Continue.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://1.bp.blogspot.com/-zuISCT6wxS0/T8USUZi-SgI/AAAAAAAAAlc/gjFd-8PirEc/s1600/Facebook+-+Google+Chrome_2012-05-29_23-23-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-zuISCT6wxS0/T8USUZi-SgI/AAAAAAAAAlc/gjFd-8PirEc/s1600/Facebook+-+Google+Chrome_2012-05-29_23-23-10.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/-DWh4mneolVE/T8USWGOh4gI/AAAAAAAAAlk/UWXkbHjopXw/s1600/Facebook+-+Google+Chrome_2012-05-29_23-23-32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-DWh4mneolVE/T8USWGOh4gI/AAAAAAAAAlk/UWXkbHjopXw/s1600/Facebook+-+Google+Chrome_2012-05-29_23-23-32.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://2.bp.blogspot.com/-BegwxSMhMmY/T8UT1OGqc7I/AAAAAAAAAl8/QAE_9Orsh6E/s1600/Facebook+-+Google+Chrome_2012-05-29_23-24-00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-BegwxSMhMmY/T8UT1OGqc7I/AAAAAAAAAl8/QAE_9Orsh6E/s1600/Facebook+-+Google+Chrome_2012-05-29_23-24-00.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Some thoughts :&lt;/b&gt;&amp;nbsp;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
If a user’s account was really hacked then they wouldn’t be able to login and see this screen. This screen/option can be accessed by a genuine user, then isn’t this option “&lt;i&gt;My account was hacked&lt;/i&gt;” odd? &lt;b&gt;What is the actual purpose of this option?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Consider a situation like this – you logged in into FB account from a PC and forget to logout. Then anyone can change their password and misuse.&lt;br /&gt;
This wouldn't be a big problem because Once the genuine user knows that someone else had changed their password, they won't lose their account, they can still reset their password. I just don’t know why they put “My account was hacked” option in “Deactivate your account”. This option is completely useless.&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/uS3W9HlMhLg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/8954261506896199472/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/facebook-password-hack-change-password.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/8954261506896199472?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/8954261506896199472?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/uS3W9HlMhLg/facebook-password-hack-change-password.html" title="facebook security bug - change password of a active user - without knowing original password" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-2VC7A2Php1I/T8USX5HoDFI/AAAAAAAAAl0/nY2_OnUn-Y8/s72-c/Security+settings+-+Google+Chrome_2012-05-29_23-18-10.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/facebook-password-hack-change-password.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEDQHk_eCp7ImA9WhVUFEQ.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-4371367924365235818</id><published>2012-05-20T06:57:00.000+01:00</published><updated>2012-05-20T07:01:11.740+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-20T07:01:11.740+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Configuration IDE" /><category scheme="http://www.blogger.com/atom/ns#" term="Maven" /><title>eclipse proguard maven project configuration - java obfuscate</title><content type="html">I am going to describe how can can configure proguard and maven to obfuscate a java project. If you need help on&lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/configure-maven-project-in-eclipse.html" target="_blank"&gt; how to configure maven project in eclipse see my earlier post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A)Project configs&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;    &amp;lt;!-- Project configs --&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;groupId&amp;gt;com.gt&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-proguard-test&amp;lt;/artifactId&amp;gt;
    &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;
    &amp;lt;version&amp;gt;-ver.01&amp;lt;/version&amp;gt;
    &amp;lt;name&amp;gt;maven-proguard-test-application&amp;lt;/name&amp;gt;

    &amp;lt;properties&amp;gt;
        &amp;lt;project.build.mainClass&amp;gt;com.gt.App&amp;lt;/project.build.mainClass&amp;gt;
    &amp;lt;/properties&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
B) Proguard Configuration in pom.xml :&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;            &amp;lt;!-- Proguard configs --&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;com.pyx4me&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;proguard-maven-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;2.0.4&amp;lt;/version&amp;gt;

                &amp;lt;!-- run proguard at package phase --&amp;gt;
                &amp;lt;executions&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;proguard&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                    &amp;lt;/execution&amp;gt;
                &amp;lt;/executions&amp;gt;

                &amp;lt;configuration&amp;gt;
                    &amp;lt;obfuscate&amp;gt;true&amp;lt;/obfuscate&amp;gt;
                    &amp;lt;archive&amp;gt;
                        &amp;lt;manifest&amp;gt;
                            &amp;lt;mainClass&amp;gt;${project.build.mainClass}&amp;lt;/mainClass&amp;gt;
                        &amp;lt;/manifest&amp;gt;
                    &amp;lt;/archive&amp;gt;
                    &amp;lt;options&amp;gt;
                        &amp;lt;option&amp;gt;-allowaccessmodification&amp;lt;/option&amp;gt;
                        &amp;lt;option&amp;gt;-dontshrink&amp;lt;/option&amp;gt;
                        &amp;lt;option&amp;gt;-keepattributes *Annotation*&amp;lt;/option&amp;gt;
                        &amp;lt;option&amp;gt;-keep public class ${project.build.mainClass} { *; }&amp;lt;/option&amp;gt;
                        &amp;lt;!-- &amp;lt;option&amp;gt;-keep public class [com.qualified_name]&amp;lt;/option&amp;gt; --&amp;gt;

                        &amp;lt;!-- if you want to keep enum classes, this is generally expected --&amp;gt;
                        &amp;lt;option&amp;gt;-keep public enum * { *;}&amp;lt;/option&amp;gt;
                    &amp;lt;/options&amp;gt;
                    &amp;lt;outjar&amp;gt;${project.build.finalName}.jar&amp;lt;/outjar&amp;gt;
                    &amp;lt;libs&amp;gt;
                        &amp;lt;lib&amp;gt;${java.home}/lib/rt.jar&amp;lt;/lib&amp;gt;
                        &amp;lt;lib&amp;gt;${java.home}/lib/jsse.jar&amp;lt;/lib&amp;gt;
                        &amp;lt;lib&amp;gt;${java.home}/lib/jce.jar&amp;lt;/lib&amp;gt;
                    &amp;lt;/libs&amp;gt;
                &amp;lt;/configuration&amp;gt;
                &amp;lt;dependencies&amp;gt;
                    &amp;lt;dependency&amp;gt;
                        &amp;lt;groupId&amp;gt;net.sf.proguard&amp;lt;/groupId&amp;gt;
                        &amp;lt;artifactId&amp;gt;proguard&amp;lt;/artifactId&amp;gt;
                        &amp;lt;version&amp;gt;4.4&amp;lt;/version&amp;gt;
                        &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;
                    &amp;lt;/dependency&amp;gt;
                &amp;lt;/dependencies&amp;gt;
            &amp;lt;/plugin&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
C)Maven jar plugin to make .jar file&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;            &amp;lt;!-- making jar file --&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-jar-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;archive&amp;gt;
                        &amp;lt;manifest&amp;gt;
                            &amp;lt;mainClass&amp;gt;${project.build.mainClass}&amp;lt;/mainClass&amp;gt;
                        &amp;lt;/manifest&amp;gt;
                    &amp;lt;/archive&amp;gt;
                &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
D)Maven dependency plugin - copy jar dependencies&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;            &amp;lt;!-- maven dependency plugin to copy all dependency jar to a folder, here 
                copying to target/lib --&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-dependency-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;executions&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;copy-dependencies&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                        &amp;lt;configuration&amp;gt;
                            &amp;lt;outputDirectory&amp;gt;target/lib&amp;lt;/outputDirectory&amp;gt;
                        &amp;lt;/configuration&amp;gt;
                    &amp;lt;/execution&amp;gt;
                &amp;lt;/executions&amp;gt;
            &amp;lt;/plugin&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
E)run.bat file to run the jar file ( it loads the jar files in classpath) You need to copy run.jar file to target folder.&amp;nbsp;&lt;span style="background-color: #eeeeee; font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px; line-height: 14px;"&gt;com.gt.App&lt;/span&gt;&amp;nbsp; is my main class.&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;@echo off
Start "" /B javaw -Xmx256M -cp "maven-proguard-test-0.0.1-SNAPSHOT.jar;lib/*" com.gt.App
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
F)Build command : &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;mvn clean compile package&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Project folder structure :&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qRISREN3Hhw/T7iGuM1tXDI/AAAAAAAAAkc/ysA93tNzmsg/s1600/maven-proguard.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-qRISREN3Hhw/T7iGuM1tXDI/AAAAAAAAAkc/ysA93tNzmsg/s1600/maven-proguard.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;The complete Source CODE at Google Code SVN Repo :&lt;/span&gt;&lt;br /&gt;
&lt;a href="http://code.google.com/p/maven-proguard-eclipse-java-project-configuration-working/" target="_blank"&gt;http://code.google.com/p/maven-proguard-eclipse-java-project-configuration-working/&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/-Um-hfuDI5I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/4371367924365235818/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/eclipse-proguard-maven-project.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/4371367924365235818?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/4371367924365235818?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/-Um-hfuDI5I/eclipse-proguard-maven-project.html" title="eclipse proguard maven project configuration - java obfuscate" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-qRISREN3Hhw/T7iGuM1tXDI/AAAAAAAAAkc/ysA93tNzmsg/s72-c/maven-proguard.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/eclipse-proguard-maven-project.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAASXw5fip7ImA9WhVUFkw.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-5301606843387655196</id><published>2012-05-20T05:05:00.000+01:00</published><updated>2012-05-21T17:29:08.226+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-21T17:29:08.226+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="hidden markov model" /><title>Speech Recognition Java Code - HMM VQ MFCC ( Hidden markov model, Vector Quantization and Mel Filter Cepstral Coefficient)</title><content type="html">Hi everyone, I have shared speech recognition code in &lt;a href="http://code.google.com/p/speech-recognition-java-hidden-markov-model-vq-mfcc/" target="_blank"&gt;google code&lt;/a&gt;&amp;nbsp;:&amp;nbsp;http://code.google.com/p/speech-recognition-java-hidden-markov-model-vq-mfcc/&lt;br /&gt;
You can find complete source code for speech recognition using&amp;nbsp;&amp;nbsp;HMM, VQ, MFCC ( Hidden markov model, Vector Quantization and Mel Filter Cepstral Coefficient). Feel free to use and modify this code.&lt;br /&gt;
&lt;br /&gt;
The project report that accompanies this code is here.&lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/final-report-text-prompted-remote.html"&gt;http://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/final-report-text-prompted-remote.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Introduction to the project :&amp;nbsp;&lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2010/12/text-prompted-remote-speaker.html"&gt;http://ganeshtiwaridotcomdotnp.blogspot.com/2010/12/text-prompted-remote-speaker.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/DEaqbIcSX3k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/5301606843387655196/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/speech-recognition-java-code-hmm-vq.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/5301606843387655196?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/5301606843387655196?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/DEaqbIcSX3k/speech-recognition-java-code-hmm-vq.html" title="Speech Recognition Java Code - HMM VQ MFCC ( Hidden markov model, Vector Quantization and Mel Filter Cepstral Coefficient)" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/05/speech-recognition-java-code-hmm-vq.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkENRHw-fip7ImA9WhVWFUk.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-1119491464703535044</id><published>2012-04-21T08:18:00.000+01:00</published><updated>2012-04-27T17:38:15.256+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-27T17:38:15.256+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OpenCV-JavaCV" /><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing" /><title>colored object tracking in java- javacv code</title><content type="html">Code for this demo video -&amp;nbsp;Color Based Image Segmentation to Track Path of Moving Object&lt;br /&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/r02no-zIBnI" width="560"&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;br /&gt;
Working Source Code :&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;import static com.googlecode.javacv.cpp.opencv_core.IPL_DEPTH_8U;
import static com.googlecode.javacv.cpp.opencv_core.cvCreateImage;
import static com.googlecode.javacv.cpp.opencv_core.cvFlip;
import static com.googlecode.javacv.cpp.opencv_core.cvGetSize;
import static com.googlecode.javacv.cpp.opencv_core.cvInRangeS;
import static com.googlecode.javacv.cpp.opencv_core.cvScalar;
import static com.googlecode.javacv.cpp.opencv_imgproc.CV_BGR2GRAY;
import static com.googlecode.javacv.cpp.opencv_imgproc.CV_MEDIAN;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvCvtColor;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvEqualizeHist;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvGetCentralMoment;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvGetSpatialMoment;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvMoments;
import static com.googlecode.javacv.cpp.opencv_imgproc.cvSmooth;
import static com.googlecode.javacv.cpp.opencv_highgui.*;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

import com.googlecode.javacv.CanvasFrame;
import com.googlecode.javacv.FrameGrabber;
import com.googlecode.javacv.VideoInputFrameGrabber;
import com.googlecode.javacv.cpp.opencv_core.CvScalar;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
import com.googlecode.javacv.cpp.opencv_imgproc.CvMoments;

public class ColoredObjectTrack implements Runnable {
    final int INTERVAL = 1000;// 1sec
    final int CAMERA_NUM = 0; // Default camera for this time
&lt;a name='more'&gt;&lt;/a&gt;
    /**
     * Correct the color range- it depends upon the object, camera quality,
     * environment.
     */
    static CvScalar rgba_min = cvScalar(0, 0, 130, 0);// RED wide dabur birko
    static CvScalar rgba_max = cvScalar(80, 80, 255, 0);

    IplImage image;
    CanvasFrame canvas = new CanvasFrame("Web Cam Live");
    CanvasFrame path = new CanvasFrame("Detection");
    int ii = 0;
    JPanel jp = new JPanel();

    public ColoredObjectTrack() {
        canvas.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
        path.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
        path.setContentPane(jp);
    }

    @Override
    public void run() {
        FrameGrabber grabber = new VideoInputFrameGrabber(CAMERA_NUM);
        try {
            grabber.start();
            IplImage img;
            int posX = 0;
            int posY = 0;
            while (true) {
                img = grabber.grab();
                if (img != null) {
                    // show image on window
                    cvFlip(img, img, 1);// l-r = 90_degrees_steps_anti_clockwise
                    canvas.showImage(img);
                    IplImage detectThrs = getThresholdImage(img);

                    CvMoments moments = new CvMoments();
                    cvMoments(detectThrs, moments, 1);
                    double mom10 = cvGetSpatialMoment(moments, 1, 0);
                    double mom01 = cvGetSpatialMoment(moments, 0, 1);
                    double area = cvGetCentralMoment(moments, 0, 0);
                    posX = (int) (mom10 / area);
                    posY = (int) (mom01 / area);
                    // only if its a valid position
                    if (posX &amp;gt; 0 &amp;amp;&amp;amp; posY &amp;gt; 0) {
                        paint(img, posX, posY);
                    }
                }
                // Thread.sleep(INTERVAL);
            }
        } catch (Exception e) {
        }
    }

    private void paint(IplImage img, int posX, int posY) {
        Graphics g = jp.getGraphics();
        path.setSize(img.width(), img.height());
        // g.clearRect(0, 0, img.width(), img.height());
        g.setColor(Color.RED);
        // g.fillOval(posX, posY, 20, 20);
        g.drawOval(posX, posY, 20, 20);
        System.out.println(posX + " , " + posY);

    }

    private IplImage getThresholdImage(IplImage orgImg) {
        IplImage imgThreshold = cvCreateImage(cvGetSize(orgImg), 8, 1);
        //
        cvInRangeS(orgImg, rgba_min, rgba_max, imgThreshold);// red

        cvSmooth(imgThreshold, imgThreshold, CV_MEDIAN, 15);
        cvSaveImage(++ii + "dsmthreshold.jpg", imgThreshold);
        return imgThreshold;
    }

    public static void main(String[] args) {
        ColoredObjectTrack cot = new ColoredObjectTrack();
        Thread th = new Thread(cot);
        th.start();
    }

    public IplImage Equalize(BufferedImage bufferedimg) {
        IplImage iploriginal = IplImage.createFrom(bufferedimg);
        IplImage srcimg = IplImage.create(iploriginal.width(), iploriginal.height(), IPL_DEPTH_8U, 1);
        IplImage destimg = IplImage.create(iploriginal.width(), iploriginal.height(), IPL_DEPTH_8U, 1);
        cvCvtColor(iploriginal, srcimg, CV_BGR2GRAY);
        cvEqualizeHist(srcimg, destimg);
        return destimg;
    }
}

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/AT-teEj8kSg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/1119491464703535044/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/colored-object-tracking-in-java-javacv.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1119491464703535044?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1119491464703535044?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/AT-teEj8kSg/colored-object-tracking-in-java-javacv.html" title="colored object tracking in java- javacv code" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/r02no-zIBnI/default.jpg" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/colored-object-tracking-in-java-javacv.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQCSXg9fip7ImA9WhVXGUk.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-503118124249411572</id><published>2012-04-20T18:52:00.004+01:00</published><updated>2012-04-20T18:52:48.666+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-20T18:52:48.666+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="hidden markov model" /><title>Mouse Gesture Recognition Using Hidden Markov Model - Java Source Code</title><content type="html">Hi everyone, I have uploaded the codes for my project -&lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2011/07/mouse-gesture-recognition-with-hidden.html" target="_blank"&gt; "Mouse Gesture Recognition with Hidden Markov Model - Java".&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can find it @ google code :&amp;nbsp;&lt;a href="https://code.google.com/p/mouse-gesture-recognition-java-hidden-markov-model/" target="_blank"&gt;https://code.google.com/p/mouse-gesture-recognition-java-hidden-markov-model/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This svn repository @ google code contains eclipse source code (VQ and HMM codes from&amp;nbsp;&lt;a href="http://ocvolume.sourceforge.net/" target="_blank"&gt;OCVolume Project.&lt;/a&gt;)&amp;nbsp;, trained hmm models and codebook, captured data for few gestures.&lt;br /&gt;
&lt;br /&gt;
Similar codes for &lt;b&gt;&lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2010/12/text-prompted-remote-speaker.html" target="_blank"&gt;Speech Recognition System&lt;/a&gt; using &lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/final-report-text-prompted-remote.html" target="_blank"&gt;HMM/VQ + MFCC&lt;/a&gt; &lt;/b&gt;will be uploaded &lt;b&gt;&lt;span style="font-size: large;"&gt;SOON.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
DEMO VIDEO:&amp;nbsp;&lt;a href="http://www.youtube.com/watch?v=0CNJ2fCj4xQ" target="_blank"&gt;http://www.youtube.com/watch?v=0CNJ2fCj4xQ&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/lGxMNSRO4Mw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/503118124249411572/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/mouse-gesture-recognition-using-hidden.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/503118124249411572?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/503118124249411572?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/lGxMNSRO4Mw/mouse-gesture-recognition-using-hidden.html" title="Mouse Gesture Recognition Using Hidden Markov Model - Java Source Code" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/mouse-gesture-recognition-using-hidden.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEMQHczcSp7ImA9WhVXGE0.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-1150259472970423805</id><published>2012-04-19T04:04:00.004+01:00</published><updated>2012-04-19T04:04:41.989+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-19T04:04:41.989+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Maven" /><title>maven install jar to repository locally</title><content type="html">Run the following command to install the "&lt;span style="background-color: #eeeeee; font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px; line-height: 14px;"&gt;MyJar-x.x.x.jar"&lt;/span&gt;&lt;span style="line-height: 14px;"&gt;&lt;span style="font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;into Local maven repository. The &lt;u&gt;underlined&lt;/u&gt;&amp;nbsp; values vary in your case.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;mvn install:install-file -Dfile=&lt;u&gt;&lt;b&gt;PathOFJar_MyJar-x.x.x.jar&lt;/b&gt;&lt;/u&gt; -DgroupId=&lt;b&gt;&lt;u&gt;com.mycompany&lt;/u&gt;&lt;/b&gt; -DartifactId=&lt;u&gt;&lt;b&gt;myJar&lt;/b&gt;&lt;/u&gt; -Dversion=&lt;u&gt;&lt;b&gt;x.x.x&lt;/b&gt;&lt;/u&gt; -Dpackaging=jar
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
After installing, Add the dependency into Pom.xml :&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;&lt;b&gt;&lt;u&gt;com.mycompany&lt;/u&gt;&lt;/b&gt;&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;&lt;b&gt;&lt;u&gt;myJar&lt;/u&gt;&lt;/b&gt;&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;&lt;b&gt;&lt;u&gt;x.x.x&lt;/u&gt;&lt;/b&gt;&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/xZ2H4QcVt9o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/1150259472970423805/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/maven-install-jar-to-repository-locally.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1150259472970423805?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1150259472970423805?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/xZ2H4QcVt9o/maven-install-jar-to-repository-locally.html" title="maven install jar to repository locally" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/maven-install-jar-to-repository-locally.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAFRn09fCp7ImA9WhVWFUk.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-1662169018924621515</id><published>2012-04-14T16:18:00.001+01:00</published><updated>2012-04-27T17:38:37.364+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-27T17:38:37.364+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing" /><title>Java grey image from RGB image convert full source code</title><content type="html">The java code below is for making grey image from a image&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public static void main(String[] args) {
        BufferedImage org = getImage("test.jpg");
        BufferedImage greyImage = getGrayScaleAvg(org);
        new &lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/java-loading-images-in-jframe-reusable.html" target="_blank"&gt;ImageFrame&lt;/a&gt;(org, "Original");
        new ImageFrame(greyImage, "After GrayScale");
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Full working source code : averages the pixels to obtain grey image&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class tempgrey {
    public static void main(String[] args) {
        BufferedImage org = getImage("test.jpg");//valid input image
        BufferedImage greyImage = getGrayScaleAvg(org);
        new &lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/java-loading-images-in-jframe-reusable.html" target="_blank"&gt;ImageFrame&lt;/a&gt;(org, "Original");
        new &lt;a href="http://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/java-loading-images-in-jframe-reusable.html" target="_blank"&gt;ImageFrame&lt;/a&gt;(greyImage, "After GrayScale");
    }

    public static BufferedImage getImage(String imageName) {
        try {
            File input = new File(imageName);
            BufferedImage image = ImageIO.read(input);
            return image;&lt;a name='more'&gt;&lt;/a&gt;
        } catch (IOException ie) {
            System.out.println("Error:" + ie.getMessage());
        }
        return null;
    }

    public static BufferedImage getGrayScaleAvg(BufferedImage img) {
        int w1 = img.getWidth();
        int h1 = img.getHeight();
        // int value[][] = new int[w1][h1];
        BufferedImage gray = new BufferedImage(w1, h1, 1);// new image
        int value, alpha, r, g, b;
        for (int i = 0; i &amp;lt; w1; i++) {
            for (int j = 0; j &amp;lt; h1; j++) {
                value = img.getRGB(i, j); // read and store pixel value
                alpha = get_alpha(value);
                r = get_red(value);
                g = get_green(value);
                b = get_blue(value);

                value = (r + g + b) / 3; // grey by averaging the pixels
                r = g = b = value;
                value = create_rgb(alpha, r, g, b);
                gray.setRGB(i, j, value);
            }
        }
        return gray;
    }

    public static int create_rgb(int alpha, int r, int g, int b) {
        int rgb = (alpha &amp;lt;&amp;lt; 24) + (r &amp;lt;&amp;lt; 16) + (g &amp;lt;&amp;lt; 8) + b;
        return rgb;
    }

    public static int get_alpha(int rgb) {
        return (rgb &amp;gt;&amp;gt; 24) &amp;amp; 0xFF;
        // return rgb &amp;amp; 0xFF000000;
    }

    public static int get_red(int rgb) {
        return (rgb &amp;gt;&amp;gt; 16) &amp;amp; 0xFF;
        // return rgb &amp;amp; 0x00FF0000;
    }

    public static int get_green(int rgb) {
        return (rgb &amp;gt;&amp;gt; 8) &amp;amp; 0xFF;
    }

    public static int get_blue(int rgb) {
        return rgb &amp;amp; 0xFF;
    }
}

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/QK969wkY-mk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/1662169018924621515/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/java-grey-image-from-rgb-image-convert.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1662169018924621515?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1662169018924621515?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/QK969wkY-mk/java-grey-image-from-rgb-image-convert.html" title="Java grey image from RGB image convert full source code" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/java-grey-image-from-rgb-image-convert.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQMQ3s7eyp7ImA9WhVXEUk.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-6580672127225847826</id><published>2012-04-11T12:23:00.002+01:00</published><updated>2012-04-11T13:46:22.503+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-11T13:46:22.503+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java-EE" /><title>java servlet/jsp download string into text file  - spring controller method</title><content type="html">Working example for downloading a text file out of a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;String&amp;nbsp;&lt;/span&gt;. Code segment in Spring MVC controller .&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&lt;b&gt; @RequestMapping(value = "/download", method = RequestMethod.GET)
 public @ResponseBody
 void downloadFile(HttpServletResponse resp) {
  String downloadFileName= "download.txt";
  String downloadStringContent="Download text \n This is working.";
  try {
   OutputStream out = resp.getOutputStream();
   resp.setContentType("text/plain; charset=utf-8");
   resp.addHeader("Content-Disposition","attachment; filename=\"" + downloadFileName + "\"");
   out.write(downloadStringContent.getBytes(Charset.forName("UTF-8")));
   out.flush();
   out.close();

  } catch (IOException e) {
  }
 }&lt;/b&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/vBKRigMYKQs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/6580672127225847826/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/java-download-string-into-text-file.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/6580672127225847826?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/6580672127225847826?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/vBKRigMYKQs/java-download-string-into-text-file.html" title="java servlet/jsp download string into text file  - spring controller method" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/04/java-download-string-into-text-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQFRH84fyp7ImA9WhJTGEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-7629405295389959316</id><published>2012-02-05T04:10:00.000Z</published><updated>2012-06-28T06:11:55.137+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-28T06:11:55.137+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="My Views" /><title>Job Interview Question Answer Frequently Asked - programmer</title><content type="html">&lt;br /&gt;
Some Common and most asked job interview question ( for programmer) and their answers. In Nepali Context.&lt;br /&gt;
&lt;br /&gt;
These questions are the most common questions ( in my job haunt experience) that will be asked to you in your interview.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Tell me about yourself:&lt;/b&gt;&lt;br /&gt;
After finishing computer engineering from XXX campus last year, i worked as java developer. I have good command of Java related technologies. I also have interest in XXX. I find myself as a hard worker and quick learner. And I think i am a good candidate for the position.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Last Jobs:&lt;/b&gt;&lt;br /&gt;
My first job was at XXX as N months contract. Our responsibilites were bug fixing and upgrading an existing XXX system. It was a web app. I mainly worked in feature enhancement like : XXX and some business modules like report generations.&lt;br /&gt;
After finishing the contract, i joined XXX as java developer. There too i worked &amp;nbsp;in a business application for healthcare related dataprocessing/reporting application . I mainly write code for XXX , XXX etc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Why did you leave your last job?&lt;/b&gt;&lt;br /&gt;
In fact it was a good time working for XXX but i couldnot find any learning opportunity there, I always wanted a challanging job where i can contribute myself and learn something. I worked there for N months and decided to quit the job.&lt;br /&gt;
&lt;br /&gt;
What did you did in this free time :&lt;br /&gt;
After i quit the job - besides job haunting, i did a freelancing project- it was XXX,..,&lt;br /&gt;
Meanwhile, i learned android framework and teach java in an institute for about 1 month.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;6. How do you know about this position?&lt;/b&gt;&lt;br /&gt;
I knew about this org from the job vacancy notice posted in XXX.com.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;7. What do you know about this organization?&lt;/b&gt;&lt;br /&gt;
XXX is a 10 year old software company located in XXX. it mainly works on XXX. Its major clients are XXX. Major products are XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;11. What kind of salary do you need?&lt;/b&gt;&lt;br /&gt;
As i have few experience and skills, and this might be somehow different job from my previous ... ummm...well ... NN000 NRS/Mo will be fine.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;13. How long would you expect to work for us if hired?&lt;/b&gt;&lt;br /&gt;
I would work as long as you and i both enjoy working me in XXX. I am certain that, I will enjoy the job at XXX##??&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;25. What are you looking for in a job?&lt;/b&gt;&lt;br /&gt;
Where i can contribute more and learn new things in the process . not only technically but also the detail of business domain on which i am working at.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;50. Do you have any questions for me?&lt;/b&gt;&lt;br /&gt;
Well ... yes i think i &amp;nbsp;have one.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; what will be the next possible step in selection process.&lt;br /&gt;
&amp;gt;&amp;gt; what type of responsibilities&lt;br /&gt;
&amp;gt;&amp;gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/qCzoutFq7Fs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/7629405295389959316/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/02/job-interview-question-answer.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/7629405295389959316?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/7629405295389959316?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/qCzoutFq7Fs/job-interview-question-answer.html" title="Job Interview Question Answer Frequently Asked - programmer" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/02/job-interview-question-answer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRH09fCp7ImA9WhBSEEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-2637384807515211629</id><published>2012-01-10T10:12:00.000Z</published><updated>2013-02-17T01:33:35.364Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-17T01:33:35.364Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computer/Technology Tips" /><title>Correct way of connecting ADSL splitter and router</title><content type="html">&lt;span style="font-family: inherit; font-size: x-large;"&gt;&lt;b&gt;REMEMBER :&amp;nbsp;&lt;span style="background-color: white; line-height: 18px;"&gt;If you need extensions, connect it after splitter only.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img border="0" src="http://www.ntc.net.np/internet/adsl/pictures/connect_right.jpg" style="margin-left: auto; margin-right: auto;" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;Right way of connecting adsl splitter and router in telephone line&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img border="0" src="http://www.ntc.net.np/internet/adsl/pictures/connect_wrong.jpg" style="margin-left: auto; margin-right: auto;" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;Wrong way of connecting adsl router, splitter in telephone line&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img src="http://www.ntc.net.np/internet/adsl/pictures/install.jpg" style="margin-left: auto; margin-right: auto;" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;correct adsl connection diagram, router, computer, splitter, telephone line&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/TXw6bi6dE_k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/2637384807515211629/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/correct-way-of-connecting-adsl-splitter.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/2637384807515211629?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/2637384807515211629?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/TXw6bi6dE_k/correct-way-of-connecting-adsl-splitter.html" title="Correct way of connecting ADSL splitter and router" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/correct-way-of-connecting-adsl-splitter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRH0-cSp7ImA9WhBSEEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-1794154426495938510</id><published>2012-01-10T09:57:00.000Z</published><updated>2013-02-17T01:33:35.359Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-17T01:33:35.359Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computer/Technology Tips" /><title>NTC ADSL Configuration Working Way</title><content type="html">&lt;span style="background-color: white; font-size: large;"&gt;To configure ADSL setting in a ADSL Router, you need to enter the following informations .&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The (generic) easy steps :&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;br /&gt;
1) Open 192.168.1.1 (in most routers) in router,&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; use &lt;/span&gt;&lt;b style="background-color: white;"&gt;admin &lt;/b&gt;&lt;span style="background-color: white;"&gt;for username and &lt;/span&gt;&lt;b style="background-color: white;"&gt;admin &lt;/b&gt;&lt;span style="background-color: white;"&gt;for password&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white;"&gt;(If it doesnot work, refer to the manual of router, the login information can be found on back of router)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
2) Search for the ADSL settings page in the router config -&lt;br /&gt;
For Routing Mode (where router automatically dials the connection),&amp;nbsp;You need to provide/choose the following minimum settings there&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&amp;gt;Choose &lt;/span&gt;&lt;b style="background-color: white;"&gt;PPPOE LLC&lt;/b&gt;&lt;span style="background-color: white;"&gt; for Connection type or encapsulation&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&amp;gt;Enter &lt;/span&gt;&lt;b style="background-color: white;"&gt;correct username and password&lt;/b&gt;&lt;span style="background-color: white;"&gt; given by NTC&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&amp;gt;Choose authentication &lt;/span&gt;&lt;b style="background-color: white;"&gt;AUTO&lt;/b&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&amp;gt;provide&lt;/span&gt;&lt;b style="background-color: white;"&gt; 8 for VPI,&lt;/b&gt;&lt;span style="background-color: white;"&gt; and&lt;/span&gt;&lt;b style="background-color: white;"&gt; 81 for VCI&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
3) Save the connection settings and restart the router.&lt;br /&gt;
4) Make sure all the LEDS including internet is ON.&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/KfanIAE5bpY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/1794154426495938510/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/ntc-adsl-configuration-working-way.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1794154426495938510?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/1794154426495938510?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/KfanIAE5bpY/ntc-adsl-configuration-working-way.html" title="NTC ADSL Configuration Working Way" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/ntc-adsl-configuration-working-way.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YAQnYzeCp7ImA9WhJTGEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-7794067012413503183</id><published>2012-01-08T06:18:00.000Z</published><updated>2012-06-28T06:25:43.880+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-28T06:25:43.880+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="My Views" /><title>tips - learn programming faster and effectively</title><content type="html">&lt;div style="text-align: left;"&gt;
&lt;span style="color: #333333; font-family: arial, tahoma, sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;span style="color: #333333; font-family: inherit; font-size: large;"&gt;How to learn programming effectively- tips for developing programming skills&lt;/span&gt;&lt;br /&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8219113377173546175" name="more"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;b&gt;Tip1 : Have detail knowledge of following and practice them in your favorite programming language&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;Design Patterns / Anti Patterns&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;UML&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;OOAD&lt;a name='more'&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;b style="background-color: white; color: #333333;"&gt;Tip2 :&amp;nbsp;&lt;/b&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;b&gt;Participate in Online/offline coding contests : develop your programming logics&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;a href="http://codingbat.com/" target="_blank"&gt;codingbat.com&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;a href="http://betterprogrammer.com/" target="_blank"&gt;betterprogrammer.com&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;a href="http://catcoder.catalyst.cc/" target="_blank"&gt;catcoder.catalyst.cc&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;a href="http://codechef.com/" target="_blank"&gt;codechef.com&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;b style="color: #333333; line-height: 20px;"&gt;Tip3 :&amp;nbsp;&lt;/b&gt;&lt;b style="color: #333333; font-family: inherit; line-height: 20px;"&gt;Create your own Blog - &lt;a href="http://blogger.com/" target="_blank"&gt;blogger.com&lt;/a&gt; or &lt;a href="http://wordpress.com/" target="_blank"&gt;wordpress.com&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: #333333;"&gt;&lt;span style="font-family: inherit; line-height: 20px;"&gt;Write about new things you learn today&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333;"&gt;&lt;span style="font-family: inherit; line-height: 20px;"&gt;publish your code snippets, ideas, participate in discussion with your blog reader&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;b style="background-color: white; color: #333333;"&gt;Tip4 :&amp;nbsp;&lt;/b&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;b&gt;Read Tech-articles regularly&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;b style="background-color: white; color: #333333;"&gt;Tip5 :&amp;nbsp;&lt;/b&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;&lt;b&gt;Participate on QA, Discussion forum&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;Create your account on &lt;a href="http://stackoverflow.com/" target="_blank"&gt;stackoverflow.com&lt;/a&gt; &amp;nbsp;today. It is the best site for QA&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #333333; font-family: inherit;"&gt;read the most voted questions in stackoverflow&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/-BGxa7tpMgw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/7794067012413503183/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/tips-learn-programming-faster-and.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/7794067012413503183?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/7794067012413503183?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/-BGxa7tpMgw/tips-learn-programming-faster-and.html" title="tips - learn programming faster and effectively" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/tips-learn-programming-faster-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YCSXozfCp7ImA9WhJTGEs.&quot;"><id>tag:blogger.com,1999:blog-8219113377173546175.post-3245369906607623180</id><published>2012-01-08T06:17:00.000Z</published><updated>2012-06-28T06:26:08.484+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-28T06:26:08.484+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="My Views" /><title>Career suggestion for nepali computer engineers programmers student</title><content type="html">&lt;span style="background-color: white; color: #333333; font-family: arial, tahoma, sans-serif; font-size: 12px; line-height: 20px; text-align: left;"&gt;Career Suggestions/guidelines to Computer Engineering BE, BCA, BTech, BSc-CS, BIT students&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="background-color: white; color: #333333; font-family: arial, tahoma, sans-serif; font-size: 12px; line-height: 20px; text-align: left;"&gt;
&lt;li&gt;Self Study&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Internet is your library&lt;/b&gt; - Search, search and search more&lt;/li&gt;
&lt;li&gt;Try to understand the concept of programming not language&lt;a href="http://www.blogger.com/blogger.g?blogID=8219113377173546175" name="more"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Algorithms and Data Structures are everything&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Do you know Design Patterns ?&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Projects are portfolio for your first job interview&lt;a name='more'&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Wikipedia is your teacher&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Stackoverflow is your friend&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Open Source Applications are you Code Gurus&lt;/li&gt;
&lt;li&gt;Online Discussion Forums are your Communities&lt;/li&gt;
&lt;li&gt;Organize events, competitions centered around Software development&lt;/li&gt;
&lt;li&gt;Learn to use Collaboration Tools&lt;/li&gt;
&lt;li&gt;Be disciplined inside and about your profession&lt;/li&gt;
&lt;li&gt;Build Skills that sell&lt;/li&gt;
&lt;li&gt;Join/Follow communities of developers&lt;/li&gt;
&lt;li&gt;Learn to respect community, get max from it&lt;/li&gt;
&lt;li&gt;Find what is the BUZZ in tech&lt;/li&gt;
&lt;li&gt;Learn about Project Management seriously&lt;/li&gt;
&lt;li&gt;Build products that can solves existing software problems in our community&lt;/li&gt;
&lt;li&gt;Know about Documentation&lt;/li&gt;
&lt;li&gt;Learn about software testing / Quality Assurance&lt;/li&gt;
&lt;li&gt;Do one project by yourself per computer related subject&lt;/li&gt;
&lt;li&gt;Give others, Take from others&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Share your project code in the internet&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;No one becomes professional without a hard work&lt;/li&gt;
&lt;li&gt;Those who are doing good now did their best while studying&lt;/li&gt;
&lt;li&gt;No one is born talented, its the hard effort that pays later&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/UgXPq/~4/JGfGVmer9TI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://ganeshtiwaridotcomdotnp.blogspot.com/feeds/3245369906607623180/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/career-suggestion-for-nepali-computer.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/3245369906607623180?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8219113377173546175/posts/default/3245369906607623180?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/UgXPq/~3/JGfGVmer9TI/career-suggestion-for-nepali-computer.html" title="Career suggestion for nepali computer engineers programmers student" /><author><name>Ganesh Tiwari</name><uri>https://plus.google.com/104502199478319091201</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-bVBEDDkPrGs/AAAAAAAAAAI/AAAAAAAAApQ/6NbVnBwRnu4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://ganeshtiwaridotcomdotnp.blogspot.com/2012/01/career-suggestion-for-nepali-computer.html</feedburner:origLink></entry></feed>
