Posts Tagged ‘How-To’

Inspect your code in Eclipse using Eclipse Scrapbook feature

Inspect your code in Eclipse using Eclipse Scrapbook feature
The java IDEs (eclipse, IRAD etc) contribute a scrapbook facility that can be used to try and evaluate Java expressions (such as code snippets). Java scrapbook errors are shown in the editor. Snippets are edited and evaluated in the Scrapbook page editor. In the editor you can select a code snippet, evaluate it, and display the result as a string in console.Creating a Java Scrapbook ...

Getting JVM heap size, used memory, total memory using Java Runtime

Getting JVM heap size, used memory, total memory using Java Runtime
Reading runtime information about Java is useful sometime when your application is struggling in getting resources. System Memory is one of the main resource that an application developer has to consider while managing the application.Hence sometimes it is beneficial to see what amount of memory is your application using and what is the free memory ...

Parsing / Reading XML file in Java.

Parsing / Reading XML file in Java.
While working on a small requirement, I had to write a small piece of code that can parse an XML file in Java. Although there are number of libraries available in Java which does this task efficiently, I ended up in using normal Java XML parsing using org.w3c.dom parser.You may want to copy this code and ...

Directory listing in htaccess. Allow, Deny, Disable, Enable Directory Listing in .htaccess

Directory listing in htaccess. Allow, Deny, Disable, Enable Directory Listing in .htaccess
When a web browser is pointed to a directory on your web site which does not have an index.html file (or any other index file) in it, the files in that directory can be listed on a web page. Let us see few snippets that can be added in htaccess file to allow or avoid directory listing in apache server. Enable / Disable directory Listing To allow a ...

How to take screen shots in Java

How to take screen shots in Java
While surfing through internet, I came to this amazing piece of code in Java that takes the screen shot of your desktop and save it in a PNG file.This example uses java.awt.Robot class to capture the screen pixels and returns a BufferedImage. Java.awt.Robot class is used to take the control ...

FadeIn FadeOut html text div effect using jQuery.

Web 2.0 applications have became pervasive today. Lots of new features using AJAX, JavaScript, DHTML etc have been incorporated in web applications to make them rich in user appeal. One of the framework that has changed the way we write client side code is jQuery.Let us see a simple trick to FadeIn and FadeOut a text ...

Dynamically add button, textbox, input, radio elements in html form using JavaScript.

Dynamically add button, textbox, input, radio elements in html form using JavaScript.
Adding Elements like textbox, button, radio button etc in a html form using JavaScript is very simple. JavaScript's document object has a method called createElement() which can be used to create html elements dynamically.We had used this function in our tutorial: Dynamic combobox-listbox-drop-down using javascript to add dynamic options to ...

MySQL Database Backup using mysqldump command.

MySQL Database Backup using mysqldump command.
Since its release in 1995, MySQL has became one of the most commonly used database in Internet world. A lot of small and medium businesses uses MySQL as their backend db.  Its popularity for use with web applications is closely tied to the popularity of PHP, which is often combined with MySQL. Wikipedia runs on ...

Calling JavaScript function from String

While creating the jQuery plugin for DIV TEXT BOX: Create orkut style status update box, I had a requirement where in I had to call a JavaScript function whose name is specified as a string in some tag. For example, user is giving name of function in a text box and you have to call that function.Calling simple JavaScript function is easy, just ...

Increase performance of website by compressing JavaScript.

Performance tuning of any website involves lots of things to be taken care of. For example, compressing the output / response of the website increase the performance by significant folds. GZIp and Deflate compression techniques are commonly used in servers like Apache, Tomcat, jBoss etc.Also the size of a webpage plays significant role in load time and their by affecting websites performance. Thus if we ...
Page 3 of 512345
Copyright © 2012 ViralPatel.net. All rights reserved.