Lets share love

How ? copy url of this blog and share in your social network :) simple

12

Sunday, September 14, 2014

You have a birthday cake and have exactly 3 cuts to cut it into 8 equal pieces. How do you do it?

The answer: stack the pieces The “correct” answer is to cut the cake in quarters (4 pieces) using 2 of the cuts – one horizontally down the center of the cake and the other vertically down the center of the cake. This will leave you with 4 pieces (or slices) of cake. Then, you can take all 4 pieces and arrange them in a stack that is 4 pieces high. Finally, you can just cut that stack of 4 pieces in half – using your third and final cut – and then you will end up with 8 pieces of cake! You might think of this as sort of a trick question, since...

Thursday, September 11, 2014

how to zip a folder

have you ever wondered how to zip a folder . many just wonder :p try this :)  ...

Tuesday, September 9, 2014

Spring security logout

put this anywhere :) <form name="submitForm" method="POST" action="${createLink(controller: 'logout')}"> <input type="hidden" name="" value=""> <a HREF="javascript:document.submitForm.submit()">Logout</a> </form&g...

The webpage has redirect loop . Grails Spring Security Core RC4 error

Here while installing and implementing new Spring Security Core RC4 i faced following problems: and in console  In console you will see that it will not find SecRoleSecUser table and webpage will get looped :  If you are using requestmap to handle your access level you have to place following code in bootstrap.groovy  new Requestmap(url: '/home', configAttribute: 'ROLE_ADMIN').save()         new Requestmap(url:...

how to change default home page in grails

class UrlMappings { static mappings = {         "/$controller/$action?/$id?(.$format)?"{             constraints {                 // apply constraints here             }         }         "/login/$action?"(controller: "login")         "/logout/$action?"(controller: "logout")         "/"                 {  ...

Monday, September 8, 2014

how to change port to run grails app

put this line in buildconfig.groovy grails.server.port.http = 8888 8888 is the port that u want grails app to run on note: 0 to 9999 There are total 65535 ports in a computer, in which 1024 ports are well known port...

Wednesday, September 3, 2014

Heap size and Perm size

The GC document on Sun's site showed the Perm generation to be part of the Heap size. It seems that the Perm size is different from the Heap size.The total memory used by the JVM process will be = Memory used by the JVM for internal management + memory allocated in native code + memory allocated for the permanent space. This is the memory that U see in Task-Manager in Windows or 'top' on Solaris. A quick definition of the "permanent generation": "The permanent generation is used to hold reflective data of the VM itself such as class objects...

How do I properly set the permgen size?

Two ways to solve perm gen (out of memory ) problem. 1.  You have to change the values in the CATALINA_OPTS option defined in the Tomcat Catalina start file. To increase the PermGen memory change the value of the MaxPermSize variable, otherwise change the value of the Xmx variable. Linux : Open Catalina.sh file placed in the "bin" directory. You have to apply the changes to this line CATALINA_OPTS="$CATALINA_OPTS -server -Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m" Windows: Open the "Catalina.bat" file placed in the "bin"...

Tuesday, September 2, 2014

Khudi ko kar buland itna ke har taqder se pehle Khuda bande se ye poche bata teri raza kia hai

Khudi ko kar buland itna ke har taqder se pehle Khuda bande se ye poche bata teri raza kia h...

Monday, September 1, 2014

How to change password of mysql in xampp

You will need this many times :) 1. First of all open the control panel of xampp and click on config of Apache . You will find config.inc.php file of phpmyadmin.  this will open you a txt file. Then search for password.  this will open you a txt file. Then search for password.  2.now open command prompt and write as following : then you have to execute following query    ...