Skip to main content

Posts

Showing posts from August, 2013

Hide Folder in windows

First Create a folder without any name and with icon that is totally invisible Just type these codes while renaming the folder name and  press enter once you are done alt+0160 OR alt+255 Now time to hide the folder, to hide a folder first select the folder then right click and go to properties, in properties select the change icon option ... now you can see a lot of folder icon. (C:\Windows\system32\imageres.dll).. you look for a blank icon select any of the 3 blank icon. click ok then apply u will c invisible folder... (now with no name and no icon too..)

Folder Option Not working in windows

Sometimes folder options in your PC may get disabled by some virus and after removing the virus, you can not use folder options. Here i am sharing some tricks to activate folder options again Before doing this first remove that virus from ur computer using some good AV Method:1 Type “regedit” in run command and hit enter Find any of the following keys: User Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\ Explorer System Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Policies\ Explorer Value Name: NoFolderOptions Data Type: REG_DWORD (DWORD Value) Value Data: 0 = show options, 1 = hide options Method:2 >do: start > Run > Type gpedit.msc > hit enter > User Configuration > Administrative Templates > Windows Components > Windows Explorer > Select Removes the Folder Options menu item from the Tools menu. > Right click: > Properties > Disable > Apply “Shell”=”Explorer.exe “...

Java.net.BindException: Address already in use: JVM_Bind:8080 Solution

This exception is self explanatory, its saying that a Java application is trying to connect on port 8080 but that port is already used by some other process and JVM Bind to that particular port, here its 8080, is failed. Now to fix this error you need to find out which process is listening of port 8080, we will how to find a process which is listening on a particular port in windows and then how to kill that process to make our port free to use. Common Scenario when you see "Address already in use: JVM_Bind" 1. While doing Java remote debugging in Eclipse and when Eclipse tries to connect your remote java application on a particular port and that port is not free. 2. Starting tomcat when earlier instance of tomcat is already running and bonded to 8080 port. It will fail with SEVERE: Error initializing endpoint java.net.BindException: Address already in use: JVM_Bind:8080 Find and listening port 1. Go to run 2. Type cmd 3. Write this command netstat -ano | find "808...

Call ajax after completion of another ajax ,Wait for ajax to return.

Lets suppose you are trying to set loggedIn username to the header of your web page and you have 2 ajax which get fired 1st Ajax :  Which is decorating the header 2nd Ajax :  Which gets the username So if 2nd AJAX become first in the race then username is not visible to you as 1st ajax is responsible for decorating the header and if there is no header there is no place where you can set header. so to be very sure that our username is visible on the screen, we should wait for the header(1st ajax)to complete document ready function : $( document ).ready( function () { //calling this method to get the fetch logged in user fetchloggeInUser(); }); 1st Ajax request : run in parallel with 2nd ajax  this is building our header part ( function ($) { $.pageDecorate = { //declare a global variable so that it can be used. decorateDeferred : null , //set response of the ajax in a variable var decoratorDeferred = $.ajax({ url : 'se...

Project facet Java version is not supported.

Right click on your project and choose  build path->configure build path   select the latest JRE you want to use. Error is resolved

The type javax.servlet.ServletContext cannot be resolved. It is indirectly referenced from required .class files

if you right click on your project and choose build path->configure build path   and then choose the libraries tab.  click on the add library button. Now select the server runtime. Select the appropriate server. That's it you are done.

Ajax call Jquery

The ajax() method is used to perform an AJAX (asynchronous HTTP) request. All jQuery AJAX methods use the ajax() method. This method is mostly used for requests where the other methods cannot be used. Definition : $.ajax({name:value, ... }) Usage: /* get some values from elements on the page: */ var username= $( '#username' ).val(); var pass=$( '#pass' ).val(); //parameters to pass var data = { username : username, pass:pass }; //authenticateUser is the action which you need to call var testUrl = "user/authenticateUser" ; $.ajax({ url : testUrl, type : 'post' , data : data, dataType : 'json' , success : function (data) { //success action Block alert( "Login success" ); }, error: function (){ //Error action block alert( "Login failed" ); } }); or you can achieve via this way. var id = '1' var testUrl = "user/authenticate...

Hibernate dialects

DB2 - org.hibernate.dialect.DB2Dialect HypersonicSQL - org.hibernate.dialect.HSQLDialect Informix - org.hibernate.dialect.InformixDialect Ingres - org.hibernate.dialect.IngresDialect Interbase - org.hibernate.dialect.InterbaseDialect Pointbase - org.hibernate.dialect.PointbaseDialect PostgreSQL - org.hibernate.dialect.PostgreSQLDialect Mckoi SQL - org.hibernate.dialect.MckoiDialect Microsoft SQL Server - org.hibernate.dialect.SQLServerDialect MySQL - org.hibernate.dialect.MySQLDialect Oracle (any version) - org.hibernate.dialect.OracleDialect Oracle 9 - org.hibernate.dialect.Oracle9Dialect Progress - org.hibernate.dialect.ProgressDialect FrontBase - org.hibernate.dialect.FrontbaseDialect SAP DB - org.hibernate.dialect.SAPDBDialect Sybase - org.hibernate.dialect.SybaseDialect Sybase Anywhere - org.hibernate.dialect.SybaseAnywhereDialect

org.hibernate.AnnotationException: No identifier specified for entity:

Problem : org.hibernate.AnnotationException: No identifier specified for entity: Solution: You are missing a field annotated with @Id . Each @Enitity needs an @Id - this is the primary key in the database. If you don't want your entity to be persisted in a separate table, but rather be a part of other entities, you can use @Embeddable instead of @Entity.

Maven Basics Tutorial

Maven Maven is an automation and management tool developed by Apache Software Foundation. It was initially released on 13 July 2004.It is used for projects build, dependency and documentation. It simplifies the build process like ANT. In short terms we can tell maven is a tool that can beused for building and managing any Java-based project. Objective : The primary goal of Maven is to provide developer with the following : A comprehensive model for projects, which is reusable, maintainable, and easier to comprehend. Plugins or tools that interact with this declarative model. There are cases when you want to run some specific test cases as many test cases are failing and breaking your build and you just want to check your test case , So you can do this by a simple maven command. Maven POM : POM stands for Project Object Model. It is fundamental unit of work in Maven. It is an XML file that resides in the base directory of the project as pom.xml...