Wednesday 18 October 2017

Contra (1988) - An Old Classic Game (Download) ~ niit post

The other day my friend reminded me of the era when we used to play old 8 bit games on an 8 bit console. The first thing that came to my mind was Contra. Although it was released in 1988, we could get hold of this game only in the early nineties..(1994 to be exact !).



So I went on a CONTRA hunt and came up with the below link to the game .

Whats best is its a self contained exectuable, just extract it and run it. I tested it on WIN XP, not sure about Windows 7.

Contra Download:

PS: If u have problems running this on Windows 7 , I think you may need to install DOSBOX to run this. If you have a prob with DOSBOX, then comment below, maybe i can look into it !

Enjoy Contra once again!!!!
Read More »

NIIT Sem D Project on J2EE ~ niit post

This is my project submission, for NIIT Semester D. The technology to be used was J2EE (Servlets & JSPs, Java Beans). 
The projects name is S-Gallery and its an image management web application. It uses SQL Server 2005 for its backend and a JDBC-ODBC bridge to connect to the database.

Requirements:
1. Netbeans 5.5
2. Java Source Version is 1.4 (not 1.5 !!)
3. MS SQL Server 2005 Express/Developer Editions

Finally, heres the link: Download

PS: Included are two files(dependencies), commons-fileupload-1.2.2.jar and commons-io-2.0.1.jar, reference these two files from inside the project in NetBeans.
Read More »

NIIT HTML Q1 ACTIVITY BOOK CHAPTER 6 ~ niit post

Q1) In the skyLight university, you need to create a web page named placements
    showing the name of the companies that are coming for students' placements. IN addition, you need to
    display the student placement ratio over the last six years. For this, you need
    to create a bar graph, as shown in the following figure.
    
    Prerequisite: To perform this exercise, you need to use the solution file created for exercise 2 of chapter 5. In addition, you  need the RGraph.bar.js and RGraph.common.core.js files.


Ans1)

<!DOCTYPE HTML>
<HTML><TITLE>OnlineBookings page</Title>
<HEAD>
<Link type="text/css" rel="stylesheet" href="externalStylesheet/homestylesheet.css"/>
<style>
p{
font-size:20px;
color:blue;
}
ul{
list-style-type:square;
color:red;
font-size:20px;
}
canvas{
postion:relative;
top:0px;
}
</style>
<script type="text/javascript" src="./Rgraph.common.core.js"></script>
<script type="text/javascript" src="./Rgraph.bar.js></script>
</head>
<body>
<h1>Placements:</h1>
<p>we conduct the placements programs within our institutes to provide jobs to students who are in the stage of completing the programme in the
current academic year. In this programme, a lot of companies visit our university to select students.</P>
<p>Companies visited last year:</p>
<ul>
<li>360 Netwroks Inc.</li>
<li>724 Solutions Inc.</li>
<li>Advancetech inc.</li>
<li>Amcor Ltd.</li>
<br>
<p>the following bar-graph depicts the number of students placed in the companies over the last six years.</p>
<br><br><br>
<canvas width="700" height="250" id="test" style="border:1px solid black"></canvas>
<script type="text/javascript" charset="utf-8">
var bar = new RGraph.bar('test', [60,80,90,50,70,90]);
bar.set('chart.gutter', 50);
bar.set('chart.colors', ['blue']);
bar.set('chart.labels',["2007", "2008","2009","2010","2011,"2012"]);
bar.Draw();
</script>
</body>
</html>
Read More »

NIIT HTML Q2 ACTIVITY BOOK CHAPTER 6 CHESS ~ niit post

Q2) Advin is a web designer and has been given a task to crete a chess board.
   A chess board is a combination of eight rows and eight columns. For this, he needs to create
   a matrix of 8*8 in canvas. In addition, he needs to apply alternate colors on the squares in the chess
   board, i.e. black and white. Help advin to perform this task.




Ans2)

<HTML>
<HEAD>
<canvas id="canvas" width="400" height="400" style="border:1px solid #000000;"></canvas>
<script type="text/javascript">
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var baseX = 0.5, baseY=0.5, width=50;
for (var i = 0; i < 8; i++){
         for (var j = 0; j < 8; j++) {
              var x = baseX + width * i, y = baseY + width * j;
              if ((i+j) % 2 !=0){
                   ctx.fillRect(x, y, width, width);
                                    }
                      
                       else              {
                       ctx.strokeRect(x, y, width, width);
                                           }
                                           }
                                           }
</script>
<body></body>
</head>
</html>
Read More »

NIIT HTML Q3 ACTIVITY BOOK CHAPTER 6 Smiley face ~ niit post

Q3) You have been assigned a task to create a smiley on canvas. the face of the smiley
     should be colored in yellow, with eye balls colored in blue, and month outline in red, as shown in the following  figure. How will you perform this task?

Ans3)

<!Doctype HTML><html>
<head>
</head>
<body>
<canvas id="canvas" width='500' height="500"></canvas>
<script>
var ctc=document.getElementById("canvas");
var ctx=ctc.getContext("2d");
ctx.beginPath();
ctx.arc(150, 150, 100, 0, 2 * Math.PI, false);
ctx.closePath();
ctx.fillStyle="gold";
ctx.stroke();
ctx.fill();

ctx.beginPath();
ctx.arc(120, 130, 20, 0, 2 * Math.PI, false);
ctx.closePath();
ctx.fillStyle = "white";
ctx.stroke();
ctx.fill();


ctx.beginPath();
ctx.arc(123, 133, 4, 0, 2 * Math.PI, false);
ctx.closePath();
ctx.fillStyle="blue";
ctx.stroke();
ctx.fill();


ctx.beginPath();
ctx.arc(180, 130, 20, 0, 2 * Math.PI, false);
ctx.closePath();
ctx.fillStyle = "white";
ctx.stroke();
ctx.fill();


ctx.beginPath();
ctx.arc(183, 133, 4, 0, 2 * Math.PI, true);
ctx.closePath();
ctx.fillStyle = "blue";
ctx.stroke();
ctx.fill();

ctx.beginPath();
ctx.arc(155, 165, 60, 0, 3, false);
ctx.closePath();
ctx.lineWidth = 5;
ctx.strokeStyle = "red";
ctx.fillStyle = "white";
ctx.stroke();
ctx.fill();

</script>
</body>
</html>
Read More »

NIIT HTML Q4 ACTIVITY BOOK CHAPTER 6 ~ niit post

Q4) Advin is a web developer and has been assigned a task to rotate an image on canvas,
    as shown in the following figure.Help advin to perform this task.
    Prerequisite: To perform this exercise, you need to use the image file, car.gif.

Ans4)




<html>
<head>
<title></title>
<script type="text/javascript">
   var can, ctx, sprite,
       x, y, rot = 0;

       function init(){
          sprite = document.getElementById("Sprite");
          can = document.getElementById("canvas");
          ctx = can.getContext("2d");
          ctx.fillStyle = "blue";
          ctx.font = "12pt helvetica";
          ctx.textBaseline = "top";
          x = 100;
          y = 0;
          rot = 240;
          drawSprite();
          function drawSprite() {
          ctx.save();
          ctx.translate(x, y);
          ctx.rotate(rot);
          ctx.drawImage(sprite, 0, 0);
        
          ctx.restore();
          }
          </script>
          </head>
          <body onload="init()">
          <h2>Rotating Image</h2>
          <canvas id="canvas" height="800" width="800">
          </canvas>
          <img id="sprite" src="car.gif" style="display:none">
          </body>
          </html>
Read More »

NIIT HTML ACTIVITY BOOK CHAPTER 7 ~ niit post

Chapter 7
 Q1)Create a link,Admission,on the SkyLight University website to display the admission calendar for the cources,Social Psychology,Botany,and Communications.The calendar appears when the user moves the mouse over the Admission Calendar link,as shown in the following figure.

<!DOCTYPE html>
<html>
<head>
<style>
a{color:orange;font-size:15px;}
th{color:red;font-size:15px;}
tr{color:red;font-size:15px;}
a{font-size:20px;color:blue;font-weight:bold;}
</style>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#coolMenu").hide();
$("#prooffers").hide();
$("#bank").mouseenter(function(){
$("#coolMenu").show(500);
});
$("#bank").mouseleave(function(){
$("#coolMenu").hide(500);
});
$("#pro").mouseenter(function(){
$("#prooffers").show(500);
});
$("#pro").mouseleave(function(){
$("#prooffers").hide(500);
});

});
</script>
</head>
<body><P>Place the mouse over the 'Admission Calender' link to view the admission calender (2013-14) for Social Psychology,Botany,and Communications.</P>
<a id-"bank" href-"">Admission Calender</a>

<div id="coolMenu" style="width:500px;height:200px;padding-top:0px;border:4px solid red;background-color:lightgrey;">
<table border="ipx solid red">
<tr>
<tr><td>1.</td><td>Social Psychology</td><td>Peter</td><td>07-04-2013</td><td>15-05-2013</td></tr>
<tr><td>2.</td><td>Botany</td><td>Mark.v.Wen</td><td>15-05-2013</td><td>30-05-2013</td></tr>
<tr><td>3.</td><td>Communications</td><td>Alice Ben</td><td>30-04-2013</td><td>10-05-2013</td></tr>
</table>
</div>
</body>
</html>


Q2)To enchanse the browsing experience of the users in the SkyLight University website,the management of the university wants the website should display the slideshow of the college campus images.When a user clicks the link,University Image Gallery,the slideshow starts,as shown in the following figure.

<HTML><HEAD><TITLE>SkyLight University</TITLE>
<link type="text/css" rel="stylesheet" href="ExternalStylesheet/homestylesheet.css"/>
<link media="screen"rel="stylesheet"href="gallery/css/colorbox.css"/>
<script src="gallery/jQueryS/jquery-1.8.3.js"></script>
<script src="gallery/jQueryS/jquery-colorbox.js"></script>
<script>
$(document).ready(function(){
$("a").colorbox({width:800,height:600,slideshow:true,current:false)};
});
</script>

<style>body{padding-left:50px;border:1px solid red;}</style></HEAD>
<BODY>
<h1>Our College Campus.....</h1><br>
<img src="images\campusimage1.png" width=210 height=160></img></a>
<img src="images\campusimage2.png" width=210 height=160></img></a>
<img src="images\campusimage3.jpg" width=210 height=160></img></a>
<img src="images\campusimage4.jpg" width=210 height=160></img></a>
<img src="images\campusimage5.jpg" width=210 height=160></img></a>
<article>
<P>The SkyLight University is a pioneer institute that distinctively contributes to the society in the field of research,learning and teacheing,and engagement.As a non-profit making organization,the University maintains its position among nation's top universities and is increasingly turning international in its outlook and reputation.</P>
<p>The Universityproposes academic programs in various streams,such as Arts,Commerce,IT,and Science.Students can opt for these programs through regular and distance education.Apart from studies,the University also aims at enchancing the overall personality of students,which enables them to grow.</p>
</article>
<details>
<summary><b>Colleges affliated:</b></summary><ul>
<li>
Denmeu College of Arts
<li>
Lebian College
<li>Armin College of Science
<li>LL College of Commerce
</details>
<BR>
<a href="gallery/contentfiles/Campusimage1.jpg" rel="collection"><b><i>University Image Gallery</i></b></a>
<a href="gallery/contentfiles/Campusimage2.jpg" rel="collection"></a>
<a href="gallery/contentfiles/Campusimage3.jpg" rel="collection"></a>
<a href="gallery/contentfiles/Campusimage4.jpg" rel="collection"></a>
<a href="gallery/contentfiles/Campusimage5.png" rel="collection"></a>
</body>
</html>


Q3)You have been assigned a task to create a Web page for the USASiteSeeing website.The Web page should dispaly the images of tourist locations is USA.In addition,you need to apply rollover effect on the images in such a way that the description of locations should appear on the image mouse over,as shown in the following figure.

<html>
<head>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<SCRIPT>
function over(img,imgsrc)
{
img.src=imagesrc;
}
function out(img,imgsrc)
{
img.src=imagesrc;
}
</SCRIPT>
<style type="text/css">

div.panelUSA{
width:410px;
height:120px;
display:none;
margin:0px;
padding:0px;
text-align:center;
background:FFCC66;
color:black;
border:solid 1px #c3c3c3;
}
</style>
</head>
<body bgcolor="beige">
<b><center><u><font face="Verdana" color="black" size="5">Travel</font><font face="Verdana" color="red" size="5"> Around.</font><font face="Verdana" color="black" size="5">Inc.</font></u></center></b>
<hr size="5" color="red">
<font face="Arial" color="#660033" size="4"><i>Welcome to our website<br/>There are many beautiful tourist locations to visit in USA.<br/>On this Website,you can get information about the tourist locations in USA.</i></font>
<table class="class1">
<tr>
<td colspan="5">
</td>
</tr>
<tr>
<td height="100" colspan="5"><font face="algerian" color="660033" size="6">USA</font></td>
</tr>
<tr><td colspan="8">
<div class="panelUSA">
<p><i>Some of the most prominent places to visit in USA are:</i><br/>Statue of Liberty,Central Park,Disneyland,Bellagio,South Beach,and many more...</p>
</div>
<p class="USA">Mouse over the image to view the information about the tourist locations</p></td></tr>
<td><IMG ID="Image1" src="nationalgallery.jpg" height="250" width="250" onmouseover="over(this,'NationalGOA_ex.png')" onmouseout="out(this,"nationalgallery.jpg')"/></td>
<td><IMG ID="Image2" src="sanjose.jpg" height="250" width="250" onmouseover="over(this,'sanjose_ex.png')" onmouseout="out(this,"sanjose.jpg')"/></td>
<td><IMG ID="Image3" src="statueofliberty.jpg" height="250" width="250" onmouseover="over(this,'StatueofLiberty_ex.png')" onmouseout="out(this,"statueofliberty.jpg')"/></td>
<td><IMG ID="Image4" src="WhitneyMuseumofAmericanArt.jpg" height="250" width="250" onmouseover="over(this,'Whitneymuseum_ex.jpg')" onmouseout="out(this,"WhitneyMuseumofAmericanArt.jpg')"/></td>
<tr>
</table>
</body>
</html>
Read More »