- Wednesday, January 27, 2010, 14:59
- JavaScript
- 614 views
Following is an example of JavaScript where we will remove elements from an array with Index and Value. There are different methods in JavaScript that we can use to remove elements. We will use splice() method.
Remove Array element by Index
First we will see an example were we will remove array element by its index. For this we can define a generic function removeByIndex().
function removeByIndex(arr, ...
Full story
- Monday, January 25, 2010, 14:48
- JQuery
- 1,619 views
Have you ever tried doing some animation using plain Javascript or moving DIVs here and there or resizing them?! Well, you know then how much pain it is as not only you have to tackle the difficult part of animation but also making it cross browser compatible.
Well you probably know why I am stretching up so ...
Full story
- Monday, August 24, 2009, 14:00
- Featured, J2EE
- 2,537 views
A lot of time we want to run multiple instances of Apache Tomcat server on a single machine. Generally this is done for creating a separate load balancer server for an application or install a different application independently.
This can be achieved easy by some configuration in Tomcat Server. We need to install a second instance ...
Full story
- Tuesday, August 18, 2009, 13:31
- How-To, Web 2.0
- 971 views
Twitter API has became a powerful way of getting information about a twitter user and her activities. In my previous tutorial we saw how to create a simple
twitter reader in 5 minutes. Let us see how to get the User Image (or Avatar) from Twitter and display it anywhere you want.
So how ...
Full story
- Wednesday, August 12, 2009, 19:40
- How-To
- 241 views
Since few days we were noticing some really obscene ads of a Gaming website on our blog. After quick search we found that these Ads were from a website called evony.com. We received lot of concerns/comments from our website visitors who were restraining to visit us from their work area just because of these ads.
Evony ads are like a virus for a lot of people's ...
Full story
- Monday, July 6, 2009, 18:30
- Java
- 2,375 views
Static Import is a new feature added in Java 5 specification. Java 5 has been around the corner for some time now, still lot of people who are new in Java world doesn't know about this feature.
Although I have not used this feature in my work, still it is interesting to know about.
What is ...
Full story
- Monday, June 29, 2009, 14:08
- Java
- 5,986 views
A lot of time I have to convert ArrayList to Arrays in my Java program. Although this is a simple task, many people don't know how to do this and end up in iterating the java.util.ArrayList to convert it into arrays. I saw such code in one of my friends work and I thought to share this so that people don't end up writing easy ...
Full story
- Monday, June 15, 2009, 2:48
- JavaScript
- 1,608 views
I have a page on my site that allows users to create a shopping list from seven dinner recipes and one dessert, Users can deselect ingredients that are already onhand so that these items are not included on the shopping list. You can see the page as it currently functions here:...
Full story
- Tuesday, June 9, 2009, 21:55
- J2EE
- 660 views
Implementing Logout functionality in a form based authentication in J2EE website is straight forward. The session needs to be invalidated by calling request.getSession().invalidate() method. Thus in a simple servlet following code will be the code for logout:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
request.getSession().invalidate();
response.sendRedirect("/sampleapplication/index.jsp");
}
This is simple way for implementing logout. There is also another, ...
Full story
- Monday, May 25, 2009, 14:23
- Java
- 4,299 views
The basic part is very easy. To do this, we will use the Runtime’s exec method. The code would be like:
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("ping localhost");
The command (I’ve used “ping localhost” ) can be anything that your command prompt recognizes. It will vary on UNIX and Windows environment.
Now comes the bit where you would ...
Full story