Skip to main content

Posts

Showing posts from 2013

Introduction Basic Concepts of Oops

Introduction Basic Concepts of Oops: Encapsulation and inheritance these are the basic concepts of Object Oriented Programming. I wrote it for those who don't have basic concepts of oop, and for those who feels programming a big monster. I tried to make them understand as much easiest. Introduction In this article i would like to describe the people what are the basic concepts of Object Oriented Programming The OOP stands on the following three pillars. Object &Class (Encapsulation) Inheritance Polymorphism 1 Object & Class (Encapsulation):                   Object: The Object is an Instance in programming language which is made by inspiring from the real world which contains some properties and methods. Lets take an example of a person(object) from the real world. A person is an   object,   as i told you before that an object could   have methodes(behaviour)& properties   so here person(object) could have some properties  li

Play Videos in Pure HTML Page (Windows Media Player)

Play Videos in Pure HTML Page (Windows Media Player) Page1 :  Videoslist.html < table border ="1" cellpadding ="10" cellspacing ="0" width ="90%" align ="center" > < tr > < td > < a href ="videos.html?vid=videos/1.wmv">< b > Video 1 </ b ></ a >  // Local Video Path </ td > </ tr > < tr > < td > < a href ="videos.html?vid=videos/Wildlife.wmv">< b > Video 2 </ b ></ a > </ td > </ tr > < tr > < td > < a href ="videos.html?vid=http://flightpass.higherplaneproductions.com/g2data/alb

Different Tab Style, expanding of arbitrary DIVs on the page enabled

Different Tab Style, expanding of arbitrary DIVs on the page enabled <html> <head> <link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex17/tabcontent/tabcontent.css" /> <script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/tabcontent/tabcontent.js"> /*********************************************** * Tab Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ </script> </head> <body> <h3>Demo #1- Basic implementation</h3> <ul id="countrytabs" class="shadetabs"> <li><a href="#" rel="country1" class="selected">Tab 1</a></li> <li>&l

Light Effect Text using javascript

Light Effect Text using javascript <script language="JavaScript1.2"> var message="Welcome to Visitor!" var neonbasecolor="green" var neontextcolor="black" var flashspeed=100  //in milliseconds ///No need to edit below this line///// var n=0 if (document.all||document.getElementById){ document.write('<font color="'+neonbasecolor+'">') for (m=0;m<message.length;m++) document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>') document.write('</font>') } else document.write(message) function crossref(number){ var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number) return crossobj } function neon(){ //Change all letters to base color if (n==0){ for (m=0;m<message.length;m++) //eval("document.all.neonlight"+m).style.color=

TextArea text Count on typing

TextArea Count and Max Length ( Displaying ) on Keyup <html> <head> <script type="text/javascript"> function textCounter(textarea, counterID, maxLen) { cnt = document.getElementById(counterID); if (textarea.value.length > maxLen){ textarea.value = textarea.value.substring(0,maxLen); } cnt.innerHTML = maxLen - textarea.value.length; } </script></head> <body>  <textarea name="mytext" id="mytext" style="width:99%; height:100px;" value="" onkeyup="textCounter (this,'count_display',255);" onBlur="textCounter(this,'count_display',255);"></textarea>   <span id="count_display">255</span> a </span> </body> </html>

Create Dynamic Rows using javascript

Create Dynamic Rows using javascript <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link href="/style.css" rel="stylesheet" type="text/css" /> <title>More form fields</title> <script type="text/javascript"> function addRowToTable() {   var tbl = document.getElementById('tblAddress');   var lastRow = tbl.rows.length;   // if there's no header row in the table, then iteration = lastRow + 1   var iteration = lastRow; //  var iteration = lastRow + 1;   var row = tbl.insertRow(lastRow);   //  cell 0   var cell0 = row.insertCell(0);   var el = document.createElement('input');   el.type = 'text';   el.NAME = 'Address[]';   el.size = 30;   cell0.app

Export DataTable to PDF

Export DataTable to PDF Step 1 : Import the namespaces using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.text.html; using iTextSharp.text.html.simpleparser; Step 2 : Add the Export Method public void ExportToPdf( DataTable dt) { Document document = new Document (); //string Filename = GetUniqueName(4); PdfWriter writer = PdfWriter .GetInstance(document, new FileStream (Server.MapPath( "PDF/testpdf.pdf" ), FileMode .Create)); document.Open(); //iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance("c://ggi logo.bmp"); //document.Add(img); iTextSharp.text. Font font5 = iTextSharp.text. FontFactory .GetFont( FontFactory .HELVETICA, 5); //float[] columnDefinitionSize = { 22F, 22F, 12F, 7.75F, 7.77F, 7.77F, 7.77F, 7.77F, 10.88F, 10.88F, 10.88F, 4.75F, 7.77F, 7.77F, 7.77F, 7.77F, 7.77F, 7.77F, 9F }; PdfPTable