Skip to main content

Posts

If condition in jstl tags

For using JSTL ( J SP S tandard T ag L ibrary) you must include the below code in your jsp page : <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> After including this you can use the JSTL tags in your jsp page with prefix as 'c'. Using if condition in the jsp : <c:if test="${variableName=='test'}">      <label>The condition is true</label> </c:if> this will show an label on the the jsp page as "The condition is true" if it satisfies the mentioned condition.

Set div background image from javascript

While working with JavaScript and html many time this happens that you need to set some CSS property via  JavaScript  .One of the scenario that I faced was setting div's background image via a  JavaScript  function. I had following code : <div id="tree" style="width:200px; height:150px;">    Test data  </div> Now while loading the page I had few condition depending on that it should set the background image of the div.So, I created a function in JavaScript and called it onLoad of the body tag in the html page. That JavaScript method is as following : function changeDivBackground() {      document.getElementById("tree").style.background = "url('images/backgroundImage.jpg')"; } This will set the background image for the div.

MySQL : can't rmdir './demo/' errno 17

Problem : "can't rmdir './test/' errno 17"   Error comes while dropping a database. Reason : For maintaining the data present in the databases MySQL maintains directory. These directories have same name as the database name. While executing the "drop database demo;" command for dropping the database if it's not able to delete it's directories then it throws the above exception Solution : This issue can be solved by manually deleting the database data related directory from the installed directory. Where is the data directory present for MySQL database in windows ? The default location of this directory would be : C:\Program Files (x86)\MySQL\MySQL Server 5.0\data Inside data directory you will see folders present for all the databases, in my case it is 'demo' folder. Deleting this folder solves my problem.

What are DSLR cameras?

DSLR stands for Digital Single Lens Reflex. Unlike other cameras DSLR have only one lens. Tthe photographer looks directly through the lens via a mirror so he gets what he sees. So when a photographers clicks a photo there is a voice produce by the camera that is due to mirror moves out of the way of the lens and the light falls directly on the lens that is the reason why the photographer sees a blackout.

How to create RSS feed for blogger ?

What is RSS? RSS stands for Really Simple Syndication This will keep sending the data to the users whoever is subscribed to your RSS feed link. It's like a content delivery vehicle which delivers all new data to the users. There are two types of RSS feeds. 1) Partial RSS Feeds : This will only send the headline of your newly published posts. 2) Full RSS feeds : This sends the whole content of the posts. Creating a full RSS feed url : Just add "/feeds/posts/default?alt=rss" in front of your url and this will become your RSS feed url. You can try with the below one :) http://apdynamicviews.blogspot.com/feeds/posts/default?alt=rss

Sticky notes for windows 7 : Large Note gadget

It's one of the most useful gadget that I found so far on windows 7. You can download it from here. The font present in it is great the typical yellow colors that we have for sticky notes make it look more beautiful, though you can change the color of the notes to your favourite. You can also add multiple pages in this. http://windows7themes.net/windows-7-notepad-gadget.html Another way to have a sticky notes on your windows 7 is by clicking on "Start" button and search for "Sticky notes" and there it is, the inbuilt sticky notes by Microsoft for windows 7.

Water is life.Save water! Save life!

EXIF : Canon EOS 1000D | f/5.6 | 1/60sec | ISO-400 | 55mm Did little post processing to achieve this.