Recommend this
on Google+

Recommend this
on Google+

Saturday, October 27, 2012

Calendar generator using C language

/*

K Chandrasekhar Omkar - Calendar library

*/

#include<stdio.h>
#include<string.h>
#include<conio.h>
int getNumberOfDays(int month,int year)
{
   switch(month)
   {
      case 1 : return(31);
      case 2 : if(year%4==0)
         return(29);
           else
         return(28);
      case 3 : return(31);
      case 4 : return(30);
      case 5 : return(31);
      case 6 : return(30);
      case 7 : return(31);
      case 8 : return(31);
      case 9 : return(30);
      case 10: return(31);
      case 11: return(30);
      case 12: return(31);
      default: return(-1);
   }
}
char *getName(int odd)
{
   switch(odd)
   {
      case 0 :return("Sunday");
      case 1 :return("Monday");
      case 2 :return("Tuesday");
      case 3 :return("Wednesday");
      case 4 :return("Thursday");
      case 5 :return("Friday");
      case 6 :return("Saturday");
      default:return("Error in getName() module.Invalid argument
passed");
   }
}
int getOddNumber(int day,int mon,int year)
{
   int res=0,t1,t2,y=year;
   year = year-1600;
   while(year>=100)
   {
       res=res+5;
       year=year-100;
   }
   res=(res%7);
   t1=((year-1)/4);
   t2=(year-1)-t1;
   t1=(t1*2)+t2;
   t1=(t1%7);
   res = res+t1;
   res=res%7;
   t2=0;
   for(t1=1;t1<mon;t1++)
   {
      t2+=getNumberOfDays(t1,y);
   }
   t2 = t2+day;
   t2 = t2%7;
   res = res+t2;
   res = res%7;
   if(y>2000)
     res=res+1;
   res = res%7;
   return res;
}
char *getWeek(int dd,int mm,int yy)
{
   int odd;
   if(!(mm>=1 && mm<=12))
   {
      return("Invalid month value");
   }
   if(!(dd>=1 && dd<=getNumberOfDays(mm,yy)))
   {
      return("Invalid date");
   }
   if(yy>=1600)
   {
     odd = getOddNumber(dd,mm,yy);
     odd=odd%7;
     return(getName(odd));
   }
   else
   {
      return("
Please give year more than 1600");
   }
}
void printMonth(int mon,int year,int x,int y)
{
   int nod,odd,cnt,d=1,x1=x,y1=y;
   if(!(mon>=1 && mon<=12))
   {
       printf("
INVALID MONTH");
       getch();
       return;
   }
   if(!(year>=1600))
   {
      printf("
INVALID YEAR");
      getch();
      return;
   }
   if(x<=0)
     x=wherex();
   if(y<=0)
     y=wherey();
   gotoxy(x,y);
   textcolor(RED);
   cprintf("S");
   textcolor(YELLOW);
   cprintf("   M   T   W   T   F   S");
   /*       1234567891234567891234567 */
   textcolor(7);
   cprintf("");
   y++;
   nod=getNumberOfDays(mon,year);
   odd=getOddNumber(d,mon,year);
   switch(odd)
   {
     case 0 : x=x;
          cnt=1;
          break;
     case 1 : x=x+4;
          cnt=2;
          break;
     case 2 : x=x+8;
          cnt=3;
          break;
     case 3 : x=x+12;
          cnt=4;
          break;
     case 4 : x=x+16;
          cnt=5;
          break;
     case 5 : x=x+20;
          cnt=6;
          break;
     case 6 : x=x+24;
          cnt=7;
          break;
     default : printf("

INVALID DATA FROM THE getOddNumber()
MODULE");
           return;
   }
   gotoxy(25,25);
   gotoxy(x,y);
   printf("%02d",d);
   for(d=2;d<=nod;d++)
   {
      if(cnt%7==0)
      {
    y++;
    cnt=0;
    x=x1-4;
      }
      x = x+4;
      cnt++;
      gotoxy(x,y);
      printf("%02d",d);
   }
}
main()
{
   char ch='k';
   int dd,mm,yy;
   while(ch!='0')
   {
      clrscr();
      printf("

 


                1.Know the day");
      printf("
                2.Print the month");
      printf("
                0.EXIT");
      printf("

                ENTER YOUR CHOICE : ");
      flushall();
      fflush(stdin);
      ch=getche();
      clrscr();
      switch(ch)
      {
    case '1': printf("Enter date (DD MM YYYY) : ");
          scanf("%d %d %d",&dd,&mm,&yy);
          printf("
Day is : %s",getWeek(dd,mm,yy));
          flushall();
          getch();
          break;
    case '2' : printf("Enter month and year (MM YYYY) : ");
           scanf("%d %d",&mm,&yy);
           printf("

");
           printMonth(mm,yy,-1,-1);
           flushall();
           getch();
           break;
    case '0' : exit(0);
      }
   }
}

Timepass QUIZ code

/*               ====================
                 CODE OF QUIZ PROGRAM
                 ====================

   Q U I Z Program by Mr.K Chandrasekhar Omkar, Devendra Surana & Balaram Das Mahant

   Q.DAT --> Questions Database file
   HISCORE.DAT --> High scorer's file
   USER.DAT --> Stores user id's and passwords

   FUNCTIONS USED :-
   ==============
    addq() --> The function which adds questions to the database
    delq() --> The function which deletes questions from the database
    modq() --> The function which modifies questions in the database
    viewrec(int id,int i) --> This function displays a record of ID number
                  "id". If i==1 it displays the record with answer
    viewrec1(struct question *,int a) --> This function displays a record with call
                      be reference method with answer if a=1
    test1() --> This function displays menu of Manipulating Records
    viewmenu() --> This function displays menu for Viewing Records
    reg1() --> This function registers a username
    login() --> This function logins a user into the game
    initfiles() --> This function deletes the pre-existing Q.DAT && USER.DAT
            files, before the first start of Quiz program. Since, these
            files may contain any unrecognizable data by Quiz, these
            will be first deleted and then re-written by Quiz's data.
            This ensures the consistency of the software.

   Question structure :
   ==================
   1. ques[] --> STRING VARIABLE WHICH STORES THE QUESTION
   2. id     --> INTEGER VARIABLE WHICH STORES THE QUESTION ID
   3. op1[]  --> OPTION VARIABLE 1 (STRING)
   4. op2[]  --> OPTION VARIABLE 2 (STRING)
   5. op3[]  --> OPTION VARIABLE 3 (STRING)
   6. op4[]  --> OPTION VARIABLE 4 (STRING)
   7. ans    --> INTEGER VARIABLE WHICH STORES THE ANSWER

       -->   "qe" IS THE QUESTION STRUCTURE VARIABLE
       -->    Another sturcture variable "t1" is also declared for temporary
              access.
       -->    This structure is declared globally

 

   User structure :-
   ==============

   name[]      --> NAME OF THE USER (STRING)
   id[]        --> THIS IS A UNIQUE ID WITH WHICH THE USER ACCESSES HIS/HER
           ACCOUNT. (STRING)
   password[]  --> THIS IS LIKE A KEY FOR A USER TO ACCESS HIS ACCOUNT (STRING)
   log         --> THIS STORES THE NUMBER OF TIMES THE USER ACCESSED HIS/HER
           ACCOUNT. (INTEGER)

        -->    "usr" IS THE USER STRUCTURE VARIABLE
        -->     This structute is decalred globally


  Accessing of Files :
  ==================
  TWO FILES ARE USED IN THE PROGRAM. THEY ARE:-
  1.  Q.DAT       -->  THE FILE WHICH STORES THE QUESTIONS DATABASE
               This file is accessed using the file pointer "q"

  2. HISCORES.DAT -->  THE FILE WHICH STORES THE WINNERS OF THE QUIZ
               This file is accessed using the file pointer "h"

  3. USER.DAT     -->  THIS FILE STORES THE REGISTERED USERS DETAILS

  All these file pointers are declared globally. All these files are
  opened in APPENDED BINARY READ/WRITE mode (ab+) at the beginning of the program
  and are closed finally at the end of the program. Remember, file opening
  and closing are done only once in the program to avoid confusion.

 

  CODE BEGINS HERE :-
  ================                                                       */
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <process.h>

FILE *q,*h,*idd;
FILE *reg,*log;

struct question           /* Structure Question */
{
  char ques[200];
  int id;
  char op1[200];
  char op2[200];
  char op3[200];
  char op4[200];
  char ans;
}qe,t1;

struct user
{
  char name[100];
  char id[100];
  char password[100];
  int log;
}usr;

addq()
{
  char ch,an='Y';
  int id1,f,flag;
  while (toupper(an)=='Y')
  {
    clrscr();
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy(1,1);
    printf ("ENTER AN ID TO THE QUESTION : ");
    rewind(q);
    printf ("\nENTER THE QUESTION : ");
    printf ("\n\n\n\nENTER OPTION 1 : ");
    printf ("\nENTER OPTION 2 : ");
    printf ("\nENTER OPTION 3 : ");
    printf ("\nENTER OPTION 4 : ");
    printf ("\nENTER THE ANSWER NUMBER : ");
    enid : flag = 0;
    while (flag==0)
    {
      id1 = NULL;
      gotoxy (31,1);
      flag = scanf ("%d",&id1);
    }
    rewind(q);
    while (fread(&qe,sizeof(qe),1,q)==1)
    {
      if (qe.id==id1)
      {
    textcolor(-3);
    gotoxy (10,15);
    cprintf ("ID NUMBER IS REPEATED ");
    getch();
    gotoxy(10,15);
    clreol();
    textcolor (7);
    cprintf (" ");
    goto enid;
      }
    }
    qe.id = id1;
    flushall();
    enqe : gotoxy (22,2);
    gets(qe.ques);
    if (strlen(qe.ques)<=2)
    {
      gotoxy (10,15);
      textcolor (-4);
      cprintf ("INVALID QUESTION. PLEASE ENTER IT AGAIN");
      textcolor (7);
      getch();
      gotoxy (10,15);
      printf ("                                        ");
      goto enqe;
    }
    flushall();
    enop1 : gotoxy(18,6);
    gets(qe.op1);
    if (strlen(qe.op1)<1)
    {
      gotoxy (10,15);
      textcolor (-5);
      cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
      getch();
      gotoxy (10,15);
      clreol();
      textcolor(7);
      cprintf ("");
      goto enop1;
    }
    flushall();
    enop2 : gotoxy(18,7);
    gets(qe.op2);
    if (strlen(qe.op2)<1)
    {
      gotoxy (10,15);
      textcolor (-5);
      cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
      getch();
      gotoxy (10,15);
      textcolor (7);
      clreol();
      goto enop2;
    }
    flushall();
    enop3 : gotoxy(18,8);
    gets(qe.op3);
    if (strlen(qe.op3)<1)
    {
      gotoxy (10,15);
      textcolor (-5);
      cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
      getch();
      textcolor (7);
      gotoxy (10,15);
      clreol();
      goto enop3;
    }
    flushall();
    enop4 : gotoxy(18,9);
    gets(qe.op4);
    if (strlen(qe.op4)<1)
    {
      gotoxy (10,15);
      textcolor (-5);
      cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
      getch();
      textcolor(7);
      gotoxy (10,15);
      clreol();
      goto enop4;
    }
    flushall();

    enans : gotoxy(27,10);
    qe.ans = getchar();
    if (qe.ans!='1' && qe.ans!='2' && qe.ans!='3' && qe.ans!='4')
    {
      gotoxy (10,15);
      textcolor (-3);
      cprintf ("ANSWER MUST BE ONLY 1 OR 2 OR 3 OR 4. INPUT ERROR");
      getch();
      gotoxy (10,15);
      textcolor(7);
      clreol();
      goto enans;
    }
    flushall();
    fwrite (&qe,sizeof(qe),1,q);
    printf ("\n\nADD ANOTHER QUESTION (Y/N) : ");
    an = getche();
  }
}

test()
{
  int i=0,j=0;
  clrscr();
  rewind(q);
  textcolor(7);
  cprintf ("");
  while (fread(&qe,sizeof(qe),1,q)==1)
  {
    j++;
  }
  if (j!=0)
  {
  rewind(q);
  while (fread(&qe,sizeof(qe),1,q)==1)
  {
    clrscr();
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy(1,1);
    i++;
    printf ("QUESTION %d\/%d",i,j);
    viewrec1(&qe);
    getch();
  }
  }
  else
  {
    clrscr();
    printf ("NO QUESTIONS IN THE QUESTIONS DATABASE FILE");
  }

  printf ("\n\nTOTAL QUESTIONS LISTED : %d",i);
  getch();
}

delq()
{
  int id1,i,j=0,k,flag=0;
  char an='Y';
  FILE *t;
  rewind(q);
  while (fread(&qe,sizeof(qe),1,q)==1)
  {
   j++;
  }
  if (j==0)
  {
    clrscr();
    gotoxy (1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy (20,10);
    printf ("NO QUESTIONS TO DELETE");
    gotoxy (20,11);
    printf ("The questions database file is empty");
    getch();
    return;
  }
  while (toupper(an)=='Y')
  {
    clrscr();
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy(1,1);
    flag=0;
    printf ("ENTER THE QUESTION ID TO BE DELETED : ");
    scanf ("%d",&id1);
    rewind(q);
    while (fread(&qe,sizeof(qe),1,q)==1)
    {
      if (id1==qe.id)
      {
    flag=1;
    break;
      }
    }
    rewind(q);
    if (flag==1)
    {
      unlink ("TEMP.DAT");
      t = fopen("TEMP.DAT","ab+");
      while (fread(&qe,sizeof(qe),1,q)==1)
      {
    if (id1!=qe.id)
    {
      fwrite (&qe,sizeof(qe),1,t);
    }
      }
      rewind (t);
      fclose (q);
      unlink ("Q.DAT");
      q = fopen ("Q.DAT","ab+");
      if (q==NULL)
      {
    printf ("\n\nUNABLE TO CREATE QUESTIONS DATABASE FILE Q.DAT.");
    getch();
    fclose(q);
    fclose(h);
    fclose(t);
    exit(0);
      }
      while (fread(&qe,sizeof(qe),1,t)==1)
      {
     fwrite (&qe,sizeof(qe),1,q);
      }
      fclose (t);
      printf ("\nDO YOU WANT TO DELETE ANOTHER RECORD \(Y\/N\) : ");
      an = getche();
    }
    if (flag!=1)
    {
      printf ("\nID NUMBER %d NOT FOUND",id1);
      printf ("\nDO YOU WANT TO DELETE ANOTHER RECORD \(Y\/N\) : ");
      an = getche();
    }
  }
}


reg1()
{
int nrec=0,flag=0;
char password[100],usrid[100];
rewind(reg);
while (fread(&usr,sizeof(usr),1,reg)==1)
{
   nrec++;
}
clrscr();
gotoxy(1,25);
printf ("OmDev Softwares Pvt. Ltd.");
gotoxy(1,1);
printf ("ENTER YOUR FULL NAME   : ");
printf ("\nENTER DESIRED USERNAME : ");
printf ("\nENTER PASSWORD         : ");
gotoxy (26,1);
gets(usr.name);
enusrid : gotoxy (26,2);
gets(usrid);
rewind (reg);
while (fread(&usr,sizeof(usr),1,reg)==1)
{
   flag=0;
   if (strcmp(usrid,usr.id)==0)
   {
     flag = 1;
     break;
   }
}
if (flag==1 || strlen(usrid)<2)
{
   gotoxy (1,5);
   textcolor (-3);
   cprintf ("This USER ID is already in use by someone");
   gotoxy (1,6);
   cprintf ("Please Choose another one");
   getch();
   gotoxy (1,5);
   clreol();
   gotoxy (1,6);
   clreol();
   textcolor (7);
   cprintf ("");
   gotoxy (26,2);
   clreol();    /* CLREOL() --> THIS FUNCTIONS CLEARS A LINE */
   textcolor (7);
   cprintf ("");
   goto enusrid;
}
gotoxy (26,3);
gets(usr.password);
strcpy(usr.id,usrid);
fseek(reg,0,SEEK_END);
fwrite (&usr,sizeof(usr),1,reg);
}
modq()
{
  int id1,j=0;
  int flag=0;
  char an='Y',ch;
  FILE *t;
  rewind(q);
  while (fread(&qe,sizeof(qe),1,q)==1)
  {
   j++;
  }
  if (j==0)
  {
    clrscr();
    gotoxy (1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy (20,10);
    printf ("NO QUESTIONS TO MODIFY");
    gotoxy (20,11);
    printf ("The questions database file is empty");
    getch();
    return;
  }

  while (toupper(an)=='Y')
  {
    clrscr();
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    flag=0;
    textcolor(GREEN);
    gotoxy (10,12);
    cprintf ("\nENTER THE RECORD ID TO BE MODIFIED : ");
    textcolor(7);
    cprintf ("");
    scanf ("%d",&id1);
    rewind(q);
    while (fread(&qe,sizeof(qe),1,q)==1)
    {
      if (id1==qe.id)
      {
    clrscr();
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy(1,1);
    flag=1;
    textcolor(LIGHTRED);
    gotoxy (1,1);
    cprintf ("DETAILS OF CURRENT RECORD NUMBER %d : ",id1);
    textcolor(GREEN);
    gotoxy(20,10);
    cprintf ("QUESTION : ");
    textcolor (CYAN);
    cprintf ("%s",qe.ques);
    gotoxy (20,12);
    textcolor (GREEN);
    cprintf ("OPTION 1 : ");
    textcolor(CYAN);
    cprintf ("%s",qe.op1);
    gotoxy (20,13);
    textcolor (GREEN);
    cprintf ("OPTION 2 : ");
    textcolor(CYAN);
    cprintf ("%s",qe.op2);
    gotoxy (20,14);
    textcolor (GREEN);
    cprintf ("OPTION 3 : ");
    textcolor (CYAN);
    cprintf ("%s",qe.op3);
    textcolor(GREEN);
    gotoxy (20,15);
    cprintf ("OPTION 4 : ");
    textcolor (CYAN);
    cprintf ("%s",qe.op4);
    gotoxy (20,16);
    textcolor (GREEN);
    cprintf ("ANSWER   : ");
    textcolor (CYAN);
    cprintf ("%c",qe.ans);
    getch();
    textcolor(7);
    cprintf ("");
    printf ("\n\nPress any key to modify this record...");
    break;
      }
    }
    clrscr();
    if (flag==1)
    {
      sure : printf ("\n\nAre you sure that you want to modify this record (Y/N) : ");
      ch = getche();
      switch(toupper(ch))
      {
    case 'Y' :  clrscr();
            gotoxy(1,25);
            printf ("OmDev Softwares Pvt. Ltd.");
            gotoxy(1,1);
            printf ("ENTER AN ID TO THE QUESTION : %d",id1);
            rewind(q);
            printf ("\nENTER THE QUESTION : ");
            printf ("\n\n\n\nENTER OPTION 1 : ");
            printf ("\nENTER OPTION 2 : ");
            printf ("\nENTER OPTION 3 : ");
            printf ("\nENTER OPTION 4 : ");
            printf ("\nENTER THE ANSWER NUMBER : ");

            t1.id = id1;
            flushall();
            enqe1 : gotoxy (22,2);
            gets(t1.ques);
            if (strlen(t1.ques)<=2)
            {
              gotoxy (10,15);
              textcolor (-4);
              cprintf ("INVALID QUESTION. PLEASE ENTER IT AGAIN");
              textcolor (7);
              getch();
              gotoxy (10,15);
              printf ("                                        ");
              goto enqe1;
            }
            flushall();
            enop11 : gotoxy(18,6);
            gets(t1.op1);
            if (strlen(t1.op1)<1)
            {
              gotoxy (10,15);
              textcolor (-5);
              cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
              getch();
              gotoxy (10,15);
              cprintf ("                               ");
              textcolor(7);
              cprintf (" ");
              goto enop11;
            }
            flushall();
            enop21 : gotoxy(18,7);
            gets(t1.op2);
            if (strlen(t1.op2)<1)
            {
              gotoxy (10,15);
              textcolor (-5);
              cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
              getch();
              gotoxy (10,15);
              textcolor (7);
              cprintf ("                               ");
              goto enop21;
            }
            flushall();
            enop31 : gotoxy(18,8);
            gets(t1.op3);
            if (strlen(t1.op3)<1)
            {
              gotoxy (10,15);
              textcolor (-5);
              cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
              getch();
              textcolor (7);
              gotoxy (10,15);
              cprintf ("                               ");
              goto enop31;
            }
            flushall();
            enop41 : gotoxy(18,9);
            gets(t1.op4);
            if (strlen(t1.op4)<1)
            {
              gotoxy (10,15);
              textcolor (-5);
              cprintf ("AN OPTION FIELD CANNOT BE EMPTY");
              getch();
              textcolor(7);
              gotoxy (10,15);
              cprintf ("                               ");
              goto enop41;
            }
            flushall();

            enans1 : gotoxy(27,10);
            t1.ans = getchar();
            if (t1.ans!='1' && t1.ans!='2' && t1.ans!='3' && t1.ans!='4')
            {
              gotoxy (10,15);
              textcolor (-3);
              cprintf ("ANSWER MUST BE ONLY 1 OR 2 OR 3 OR 4. INPUT ERROR");
              getch();
              gotoxy (10,15);
              cprintf ("                                                 ");
              goto enans1;
            }
            flushall();
            unlink("TEMP.DAT");
            t = fopen("TEMP.DAT","ab+");
            t1.id = id1;
            rewind(q);
            while (fread(&qe,sizeof(qe),1,q)==1)
            {
              if (id1!=qe.id)
              {
            fwrite (&qe,sizeof(qe),1,t);
              }
              if (id1==qe.id)
              {
            fwrite (&t1,sizeof(t1),1,t);
              }
            }
            rewind(t);

            fclose(q);
            unlink("Q.DAT");
            q = fopen("Q.DAT","ab+");
            while (fread(&qe,sizeof(qe),1,t)==1)
            {
              fwrite(&qe,sizeof(qe),1,q);
            }
            fclose(t);
            unlink ("TEMP.DAT");
            printf ("\n\n Record modified...");
            break;
      case 'N' : break;
      default : goto sure;
    }
    }
    else
    {
    printf ("RECORD ID %d NOT FOUND ",id1);
    }


    printf ("\n\nDo you want to modify another record (Y/N) : ");
    an = getche();
  }
}

viewrec1 (struct question *q1,int a)
{
  printf ("\n");
  textcolor (BROWN);
  cprintf ("Q.ID : %d",q1->id);
  printf ("\n\n");
  textcolor (LIGHTRED);
  cprintf ("QUESTION : %s",q1->ques);
  printf ("\n\n");
  textcolor(LIGHTCYAN);
  cprintf ("1. %s",q1->op1);
  printf ("\n");
  cprintf ("2. %s",q1->op2);
  printf ("\n");
  cprintf ("3. %s",q1->op3);
  printf ("\n");
  cprintf ("4. %s",q1->op4);
  if (a==1)
  {
    printf ("\n\n");
    textcolor (YELLOW);
    cprintf ("ANSWER : %c",q1->ans);
    textcolor (7);
    cprintf ("");
  }
  textcolor(7);
  cprintf ("");
}


viewrec(int id1,int a)    /* FUNCTION WHICH DISPLAYS A PARTICULAR RECORD */
{
  int found=0;
  idd = q;
  rewind(idd);
  gotoxy(1,25);
  printf ("OmDev Softwares Pvt. Ltd.");
  gotoxy(1,1);
  while(fread(&qe,sizeof(qe),1,idd)==1)
  {
    if (id1==qe.id)
    {
      found = 1;
      printf ("\n");
      textcolor (BROWN);
      cprintf ("Q.ID : %d",qe.id);
      textcolor (LIGHTRED);
      printf ("\n\n");
      cprintf ("QUESTION : %s",qe.ques);
      printf ("\n\n");
      textcolor (LIGHTCYAN);
      cprintf ("1. %s",qe.op1);
      printf ("\n");
      cprintf ("2. %s",qe.op2);
      printf ("\n");
      cprintf ("3. %s",qe.op3);
      printf ("\n");
      cprintf ("4. %s",qe.op4);
      if (a==1)
      {
    textcolor (YELLOW);
    printf ("\n\n");
    cprintf ("ANSWER : %c",qe.ans);
    textcolor (7);
    cprintf ("");
      }
    }
  }
  if (found==0)
  {
    printf ("\nRECORD NOT FOUND");
    getch();
  }
}

test1()
{
  char ch,an='Y';
  int i;
  do
  {
    clrscr();
    gotoxy (1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy (28,8);
    printf ("1.ADD RECORDS");
    gotoxy (28,9);
    printf ("2.DELETE RECORDS");
    gotoxy (28,10);
    printf ("3.MODIFY RECORDS");
    gotoxy (28,11);
    printf ("4.VIEW ");
    gotoxy (28,12);
    printf ("0.RETURN TO PREVIOUS MENU");
    gotoxy (28,14);
    printf ("ENTER YOUR CHOICE : ");
    ch = getche();
    switch(ch)
    {
       case '1' : addq();
          break;
       case '2' : delq();
          break;
       case '3' : modq();
          break;
       case '4' : clrscr();
          viewmenu();
          break;
       case '5' : clrscr();
          gotoxy (1,25);
          printf ("OmDev Softwares Pvt. Ltd.");
          gotoxy (10,10);
          printf ("ENTER RECORD ID TO BE VIEWED : ");
          scanf ("%d",&i);
          viewrec(i,1);
          getch();
          break;
       case '0' : an='N';
    }
  }while(an=='Y');
}

viewmenu()  /*DISPLAYS VIEWMENU */
{
  char ch;
  int i;
  char an='Y';
  do
  {
    clrscr();
    textcolor (7);
    cprintf ("");
    gotoxy (28,10);
    textcolor(7);
    cprintf ("");
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy(28,10);
    printf ("1.VIEW ALL RECORDS");
    gotoxy (28,11);
    printf ("2.VIEW A PARTICULAR RECORD");
    gotoxy (28,12);
    printf ("0.RETURN TO PREVIOUS MENU");
    gotoxy (28,14);
    printf ("ENTER YOUR CHOICE : ");
    ch = getche();
    switch(ch)
    {
      case '1' : test();
         break;
      case '2' : clrscr();
         gotoxy(1,25);
         printf ("OmDev Softwares Pvt. Ltd.");
         gotoxy(1,1);
         printf ("ENTER THE RECORD ID TO BE VIEWED : ");
         scanf ("%d",&i);
         viewrec(i,0);
         getch();
         break;
      case '0': an='N';
    }
  }while(an=='Y');
}

char usrname1[100],usr1[100];

conduct()
{
  char ans,temp;
  int i,j,k,nrec=0,qno=0,cond=1;
  int score=0,qualify;
  rewind(q);
  clrscr();
  while (fread(&qe,sizeof(qe),1,q)==1)
  {
    nrec++;
  }
  if (nrec<=0)
  {
    clrscr();
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy (28,11);
    printf ("NO RECORDS TO PLAY QUIZ");
    gotoxy (28,12);
    printf ("Build Database and start playing");
    gotoxy (28,13);
    printf ("Press any key to continue...");
    getch();
    return;
  }

  printf ("\nTOTAL NUMBER OF QUESTIONS ARE : %d",nrec);
  printf ("\nYOUR MAXIMUM SCORE WILL BE    : %d",nrec);
  qualify = nrec*(0.75);
  printf ("\nQUALIFYING MARK               : %d",qualify);
  printf ("\n\nPress any key to start quiz...");
  gotoxy(1,25);
  printf ("OmDev Softwares Pvt. Ltd.");
  getch();
  flushall();
  clrscr();    /*viewrec1(struct *,0);*/
  rewind(q);
  while (fread(&qe,sizeof(qe),1,q)==1)
  {
    clrscr();
    gotoxy (1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy(40,1);
    {
      textcolor(LIGHTGRAY);
      cprintf ("CURRENTLY LOGGED : %s",usr1);
    }
    gotoxy (1,1);
    printf ("YOUR SCORE : %d",score);
    qno++;
    printf ("\nQUESTION NUMBER : %d\n",qno);
    viewrec1(&qe,0);
    printf ("\n\n");
    textcolor (LIGHTMAGENTA);
    cprintf ("ENTER YOUR ANSWER : ");
    scanf ("%c",&ans);
    flushall();
    flushall();
    cond++;
    if (cond>=4)
    {
      cond=0;
    }
    if (ans==qe.ans)
    {
      score++;
      if (cond==1)
      {
    printf ("\n\n");
    printf ("So, r u thinking that ur answer is right (Y/N) : ");
    temp = getche();
    switch(toupper(temp))
    {
      case 'Y' : printf ("\n\nU r absolutely correct.\nReally confidence builds a man");
             getch();
             break;
      case 'N' : printf ("\nHey, be confindent.\nYou are right...!");
             getch();
             break;
      default : printf ("\nHey, dont get confused. You are right");
            getch();
            break;
    }
      }
      if (cond==2)
      {
    printf ("\n\nHmmmmm...Thinking of your answer");
    sleep(2);
    printf ("\nYES, U R CORRECT!!!");
    getch();
      }
      if (cond==3)
      {
    printf ("\n\nBe cool. I am processing your answer");
    sleep(2);
    printf ("\nhmmmmmm...YES, U R RIGHT. Hurray!!!!");
    getch();
      }
      if (cond==4)
      {
    printf ("\n\nYes, your answer is absolutely correct");
    getch();
      }
    }
    else
    {
      score=score+0;
      if (cond==1)
      {
    printf ("\n\nI am sorry to say....");
    printf ("\nYour guess is wrong");
    getch();
      }
      if (cond==2)
      {
    sleep(2);
    printf ("\n\nJust now we processed ur result.\nBut, u r wrong");
    getch();
      }
      if (cond==3)
      {
    sleep(2);
    printf ("\n\nAll the best to the next question...");
    printf ("\nSorry 2 say that ur answer is wrong");
    getch();
      }
      if (cond==4)
      {
    sleep(2);
    printf ("\n\nOh..NO..Your answer is wrong\nKoi bat nahi. All the best to next one.");
    getch();
      }

    }
    textcolor (7);
    cprintf ("");
  }
   clrscr();
   if (score>=qualify)
   {
     gotoxy (1,25);
     printf ("OmDev Softwares Pvt. Ltd.");
     textcolor (-5);
     gotoxy (28,11);
     cprintf ("CONGRATULATIONS YOU ARE QUALIFIED");
     gotoxy (28,12);
     textcolor (RED);
     flushall();
     getch();
     textcolor(7);
     cprintf ("");
     return;
   }
   else
   {
     gotoxy (1,25);
     printf ("OmDev Softwares Pvt. Ltd.");
     textcolor (2);
     cprintf ("Sorry, you are disqualified");
     gotoxy (28,12);
     cprintf ("Hey, cheer up ur mood and play again");
     gotoxy (28,13);
     cprintf ("Press any key to return to main menu...");
     getch();
     textcolor (7);
     cprintf ("");
     return;
   }
}


char id1[100];

login()
{
  char password[100],i;
  char c;
  int flag=0;
  enuid : clrscr();
  gotoxy (1,25);
  printf ("OmDev Softwares Pvt. Ltd.");
  gotoxy (28,11);
  printf ("ENTER USERID : ");
  gotoxy (28,12);
  printf ("PASSWORD     : ");
  gotoxy (44,11);
  flushall();
  gets(usr1);
  i=0;
  c='\0';
  gotoxy (44,12);
  while (c!='\r')
  {
    flushall();
    c = getch();
    if (c=='\t' || c=='\n')
    {
      printf ("\a");
    }
    if (c!='\r' && c!='\b' && c!='\t' && c!='\0' && c!='\a')
    {
      password[i] = c;
      i++;
      /* printf ("Û"); */
      /* printf (""); */
      /* printf ("þ"); */
     printf ("*");
      /* printf ("ø"); */

    }
    if (c=='\b' && i>0)
    {
      i--;
      printf ("\b");
      printf (" ");
      printf ("\b");
    }
  }
  password[i]='\0';
  if (strlen(usr1)<1 || strlen(password)<1)
  {
     printf ("\n\n\t\t\tUSERID/PASSWORD ARE INVALID ON DOMAIN");
     getch();
     goto enuid;
  }
  rewind(reg);
  while (fread(&usr,sizeof(usr),1,reg)==1)
  {
    flag = 0;
    if (strcmp(usr.id,usr1)==0)
    {
      if (strcmp(usr.password,password)==0)
      {
    flag = 1;
    fseek(reg,1,SEEK_CUR);
    strcpy(usrname1,usr.name);
      }
    }
  }
  if (flag==0)
  {
    printf ("\n\n\t\t\tUSERID/PASSWORD ARE INVALID ON DOMAIN");
    flushall();
    getch();
  }
  if (flag==1)
  {
    return(1);
  }
  else
  {
    return(0);
  }
}
void initfile(void)
{
  int nusr;
  rewind(reg);
  nusr=0;
  while (fread(&usr,sizeof(usr),1,reg)==1)
     nusr++;
  if(nusr==0)
  {
    fclose(reg);
    unlink("USER.DAT");
    reg = fopen("USER.DAT","ab+");
  }
  rewind(q);
  nusr=0;
  while(fread(&qe,sizeof(qe),1,q)==1)
      nusr++;
  if(nusr==0)
  {
    fclose(q);
    unlink("Q.DAT");
    q = fopen("Q.DAT","ab+");
  }

}

main()
{
  char ch,an='Y';
  int check=0,nusr;
  q = fopen("Q.DAT","ab+");
  h = fopen("HISCORE.DAT","ab+");
  reg = fopen("USER.DAT","ab+");
  clrscr();
  initfile();
  textcolor(9);
  printf ("\n\n\n\n\n\n\n\n\n\n\n\t\t\t");
  cprintf ("OmDev Softwares Pvt. Ltd.");
  printf ("\n\t\t\t");
  textcolor(6);
  cprintf("     Q U I Z v.1.0");
  textcolor(7);
  cprintf("");
  sleep(3);
  printf ("\n\n\n\t\t\tPress any key to continue...");
  gotoxy(1,1);
  flushall();
  getch();
  do
  {
     clrscr();
     rewind(reg);
     nusr=0;
     while (fread(&usr,sizeof(usr),1,reg)==1)
    nusr++;
     gotoxy (45,1);
     textcolor(-6);
     cprintf ("NUMBER OF REGISTERED USERS : %d",nusr);
     gotoxy(1,25);
     printf ("OmDev Softwares Pvt. Ltd.");
     textcolor(7);
     cprintf ("");
     gotoxy (28,11);
     printf ("1.LOGIN");
     gotoxy (28,12);
     printf ("2.REGISTER");
     gotoxy (28,13);
     printf ("3.HELP");
     gotoxy (28,14);
     printf ("0.EXIT");
     gotoxy (28,16);
     printf ("ENTER YOUR CHOICE : ");
     flushall();
     ch = getche();
     switch(ch)
     {
       case '1' : check = login();
          break;
       case '2' : reg1();
          break;
       case '3' : clrscr();
          gotoxy(1,25);
          printf ("OmDev Softwares Pvt. Ltd.");
          gotoxy(1,1);
          printf ("1.IF YOU ALREADY HAVE A USERID AND PASSWORD.      ");
          printf ("\nTHEN PRESS \"1\", TYPE YOUR USERID AND PASSWORD");
          printf ("\n\n2.IF YOU DON'T HAVE ONE, THEN PRESS \"2\" AND FILL");
          printf ("\nTHE FORM AND LOGIN AGAIN. REMEMBER, YOU SHOULD HAVE A UNIQUE ID");
          flushall();
          getch();
          clrscr();
          break;
       case '0' : fclose(q);
          fclose(h);
          fclose(reg);
          unlink("TEMP.DAT");
          fcloseall();
          exit(0);
     }
  }while(check==0);
  do
  {
    clrscr();
    textcolor(7);
    cprintf ("");
    gotoxy(1,25);
    printf ("OmDev Softwares Pvt. Ltd.");
    gotoxy (28,11);
    printf ("1.PLAY QUIZ");
    gotoxy (28,12);
    printf ("2.MANIPULATE RECORDS");
    gotoxy (28,13);
    printf ("3.HELP");
    gotoxy (28,14);
    printf ("0.QUIT");

    gotoxy (28,16);
    printf ("ENTER YOUR CHOICE : ");
    flushall();
    ch = getche();
    switch(ch)
    {
      case '1' : conduct();
         break;
      case '2' : test1();
         break;
      case '3' : clrscr();
         gotoxy(1,25);
         printf ("OmDev Softwares Pvt. Ltd.");
         gotoxy(1,1);
         printf ("1.YOU WILL BE ASKED A NUMBER OF QUESTIONS DEPENDING UPON THE NUMBER OF");
         printf ("\n  RECORDS IN THE DATABASE FILE.");
         printf ("\n\n2.EACH QUESTION CARRIES ONE MARK.");
         printf ("\n  THERE IS NO NEGATIVE MARKING");
         printf ("\n\n3.ONE QUESTION WITH FOUR OPTIONALS WILL BE PROVIDED TO YOU");
         printf ("\n  IN WHICH YOU HAVE TO CHOOSE THE RIGHT OPTION");
         printf ("\n\n4.YOU CAN EDIT,DELETE AND ADD RECORDS IN THE RECORD MANIPULATIONS MENU");
         flushall();
         getch();
         clrscr();
         break;
      case '0' : an = 'N';
         fcloseall();
         break;
      default  : gotoxy (10,1);
         textcolor (-3);
         cprintf ("INVALID CHOICE");
         getch();
         textcolor(7);
         cprintf ("");
    }
  }while(an=='Y');
  unlink("TEMP.DAT");
  fclose(q);
  fclose(h);
  fclose(reg);
}

Wednesday, October 17, 2012

A test automation framework to fit in an existing manual-test-suite…

TestDriver.html web page source code

<!DOCTYPE HTML> <html> <head> <title>QA Automation Driver</title> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <!-- /**** Chunk logging: ============== 1. summarizedResult to be flushed-out for every 50 testcases, so as to prevent memory leaks, or out-of-memory conditions. 2. individualCaseResult() appends each testcase result to the buffer-summarizedResult. 3. ****/ --> <!-- 04th April 2012 - Commenting styling for testing purpose. Setting display and visibility of firstFrame is resulting in failure of few modules. --> <style type="text/css"> #secondFrame,#thirdFrame,#fourthFrame,#fifthFrame,#sixthFrame { display: none; visibility: hidden; } #testProgress { height: 100%; width: 100%; vertical-align: middle; text-align: center; display: block; } #pbInfoTable { display: table-row-group; height: 66%; width: 80%; vertical-align: middle; text-align: justify; } #pbInfoTable tr { text-align: center; vertical-align: middle; } #pbar {

padding: 5% 5% 5% 5%; } img { height: 50%; } </style> <link rel="stylesheet" type="text/css" href="Automated/styles/testheaders.css"> <script type="text/javascript" language="javascript" src="Automated/scripts/PostTestResults.js"></script> <script type="text/javascript" language="javascript"> /* 03rd April 2012 - Modifying for jQuery specific test cases. As cases are already automated using QUnit frame work. We are directly loading the individual test modules (not test cases) into testdriver and capturing the logs. */ var rtp = "Automated/resources/qunit_remote/file/jquery-mobile/tests/unit/"; /** * Commented below line of code in order to set serverURL relatively refer to Logtestresults.php. * Modified on 13th Dec 2011 **/ //serverURL = "http://iop4.nokia-boston.com/users/browser/tests/sr/gcf_new/Automated/resources/Logtestresults.php"; serverURL = "./Automated/resources/Logtestresults.php"; var summarizedResult = ''; var testEndResult; var passCount = failCount = skipCount = 0; var ticker = -1; /* 03rd April 2012 - Modifying to use only one iframe */ var framesLeft = 1; /* 03rd April 2012 - Creating an extra variable -- currentSession -- specifically in purview of running jQuery testsuite; as, session is required to be maintained explicitly by the testsuite for logging purpose. */ var currentSession = getTimeStamp(); //currentSession = "kcomkar"; /* 03rd April 2012 - Modifying for jQuery specific test cases. As cases are already automated using QUnit frame work. We are directly loading the individual test modules (not test cases) into testdriver and capturing the logs. Hence Array - tests contain the references to test module pages instead of individual test cases. As session is required and maintained across the testsuite execution session is parameterized expicitly for each test module. Also, for logging purposes qunit_remote/index.php has to be called before starting test suite execution and at the end of the execution. Begining: ~/qunit_remote/index.php?action=init&session=<<session>>

End : qunit_remote/index.php?action=end&session=<<session>>&output=raw 'action' parameter is self explainatory and when 'output' is set to 'raw'; a consolidated log for the testmodules executed in current session (specified by 'session') will be generated and rendered in XML format. */ /* 03rd April 2012 - Explicitly defining variables beginTimeStamp and endTimeStamp to hold the begin timestamp */ var beginTimeStamp = null; var endTimeStamp = null; /* 03rd April 2012 - Explicitly defining a variable logFilePrefix to hold the log filename. As result log is not posted using PostTestResults.js; had to define in the testdriver itself. This is directly parameterized along with index.php at the end of testsuite. */ /* 27th April 2012 - Removing timestamp info from log file prefix */ //var logFilePrefix = currentSession+"_"+querystring('buildNum')+querystring('mode')+'_'+querystring('type')+"_"+querystring('feature')+"_"+"results"; var logFilePrefix = querystring('buildNum')+"_"+querystring('mode')+'_'+querystring('type')+"_"+querystring('feature')+"_"; var tests = new Array("../../../../index.php?action=init&session="+currentSession, "page/index.html?session="+currentSession, "navigation/index.html?session="+currentSession, "buttonMarkup/index.html?session="+currentSession, "checkboxradio/index.html?session="+currentSession, "collapsible/index.html?session="+currentSession, "controlgroup/index.html?session="+currentSession, "core/index.html?session="+currentSession, "degradeInputs/index.html?session="+currentSession, "dialog/index.html?session="+currentSession, "event/index.html?session="+currentSession, "fieldContain/index.html?session="+currentSession, "fixedToolbar/index.html?session="+currentSession, "init/index.html?session="+currentSession, "listview/index.html?session="+currentSession, "media/index.html?session="+currentSession, "navbar/index.html?session="+currentSession, "button/index.html?session="+currentSession, "page-sections/index.html?session="+currentSession, "select/index.html?session="+currentSession, "slider/index.html?session="+currentSession, "support/index.html?session="+currentSession

"textinput/index.html?session="+currentSession,

Uncaught SyntaxError: Unexpected string

"widget/index.html?session="+currentSession, "zoom/index.html?session="+currentSession); var failureList = new Array(); var skipList = new Array(); function incrementPassCount()

{ passCount++; } function incrementFailCount() { failCount++; } function incrementSkipCount() { skipCount++; } //=========================================== START SERIAL LOAD ======================================================// function loadFirstSet() { /* 03rd April 2012 - Modifying to use only one iframe. It is observed that using a # value results in an unexpected behavior, as jQuert testsuite implicitly is using # values for executing test cases. Removing # values to avoid such conflicts. */ document.getElementById("firstFrame").setAttribute("src", rtp + tests[++ticker]); //document.getElementById("firstFrame").setAttribute("src", rtp + tests[++ticker] + "#firstFrame"); //document.getElementById("secondFrame").setAttribute("src", rtp + tests[++ticker] + "#secondFrame"); //document.getElementById("thirdFrame").setAttribute("src", rtp + tests[++ticker] + "#thirdFrame"); //document.getElementById("fourthFrame").setAttribute("src", rtp + tests[++ticker] + "#fourthFrame"); //document.getElementById("fifthFrame").setAttribute("src", rtp + tests[++ticker] + "#fifthFrame"); //document.getElementById("sixthFrame").setAttribute("src", rtp + tests[++ticker] + "#sixthFrame"); } function loadNextTest(destFrame) { destFrame = "firstFrame"; if (ticker < (tests.length - 1)) { ticker++; /* 03rd April 2012 - Modifying to use only one iframe removing #firstFrame*/ document.getElementById(destFrame).setAttribute("src", rtp + tests[ticker]); } else { framesLeft--; if (framesLeft == 0) { //console.log('=============================================================================RESULT======================================================='); //console.log('PASS :' + passCount); //console.log('FAIL :' + failCount); //console.log('SKIP :' + skipCount); console.log('=========================================================================================================================================='); try

{ var newLine='\r\n'; document.getElementById("complete").innerHTML="Completed"; var now = new Date() var hour = now.getHours(); var minute = now.getMinutes(); var second = now.getSeconds(); endTimeStamp = hour+":"+minute+":"+second; /* 03rd April 2012 - Commenting below lines of code as log generation code in jQuery testsuite has been used. */ //testEndResult= newLine+"Totals: "+passCount+" passed, "+failCount+" failed, "+skipCount+" skipped"+newLine+"********* Finished testing of jQuery *********"+hour+":"+minute+":"+second; //postResults(summarizedResult + testEndResult); /* 03rd April 2012 - Loading index.php with 'action' - 'end' and 'output' - 'text'; indicating all the required modules are executed and logs are requested in 'text' format. Suitable changes are made to 'qur_engine.php', which is used in 'index.php' for log generation. */ document.getElementById(destFrame).setAttribute("src", "./Automated/resources/qunit_remote/index.php?action=end&output=text&session="+currentSession+"&fileName="+logFilePrefix+"&beginTime="+beginTimeStamp+"&endTime="+endTimeStamp); } catch (serverLogErr) { console.error('Exception during creating log strings.\n.Details:\t' + serverLogErr); console.log('Server log failed.\n.Details:\t' + serverLogErr); } /* 03rd April 2012 - Commenting below lines of code as log generation code in jQuery testsuite has been used. */ //setLogFileLocation("./Results/"); //document.getElementById("firstFrame").setAttribute("src", rtp + "resources/log_results.txt"); } } /* 03rd April 2012 - Including call to notifyProgress here. */ notifyProgress(); } //=========================================== END SERIAL LOAD ======================================================// //=========================================== START SETUP ENVIRONMENT===============================================// function setupEnvironment() { var now= new Date() var hour = now.getHours(); var minute = now.getMinutes(); var second = now.getSeconds(); /* 03rd April 2012 - Explicitly declared a variable to hold the begin timestamp */ beginTimeStamp = hour+":"+minute+":"+second; summarizedResult = "************ Start GCF Test ************"+hour+":"+minute+":"+second; loadFirstSet(); }

//=========================================== END SETUP ENVIRONMENT===============================================//

function timedEvent()

{

if (ticker < tests.length)

{

ticker++;

document.getElementById("middleLevel").setAttribute("src", rtp + tests[ticker]);

removeJunk();

}

else

{

console.log('=============================================================================RESULT=======================================================');

console.log('PASS :' + passCount);

console.log('FAIL :' + failCount);

console.log('SKIP :' + skipCount);

console.log('==========================================================================================================================================');

try

{

var newLine='\r\n';

var now = new Date()

var hour = now.getHours();

var minute = now.getMinutes();

var second = now.getSeconds();

testEndResult= newLine+"Totals: "+passCount+" passed, "+failCount+" failed, "+skipCount+" skipped"+newLine+"********* Finished testing of jQuery *********"+hour+":"+minute+":"+second;;

postResults(summarizedResult + testEndResult);

}

catch (serverLogErr)

{

console.error('Exception during creating log strings.\n.Details:\t' + serverLogErr);

console.log('Server log failed.\n.Details:\t' + serverLogErr);

}

}

}

function removeJunk()

{

var tmp = document.getElementsByTagName('iframe')[0];

tmp = null;

window.setTimeout(timedEvent, 9000);

//CollectGarbage();

}

function notifyProgress()

{

document.getElementById('pbar').value = parseInt(document.getElementById('pbar').value) + 1;

}

</script>

<title></title>

</head><body>

<script type="text/javascript" language="javascript">window.setTimeout(setupEnvironment, 3000);</script>

Uncaught ReferenceError: setupEnvironment is not defined

<iframe id="firstFrame"></iframe><iframe id="secondFrame"></iframe><iframe id="thirdFrame"></iframe><iframe id="fourthFrame"></iframe><iframe id="fifthFrame"></iframe> <iframe id="sixthFrame"></iframe>

<div id="testProgress">

<table class="pbInfoTable" align="center">

<tbody>

<tr>

<td>

<h3 align="center"> jQuery Automated testsuite under execution </h3>

</td>

</tr>

<tr>

<td> <progress max="24" value="0" id="pbar">Test status will be

displayed below when testing is done...</progress> </td>

</tr>

<tr>

<td> <span id="complete">In progress..</span> </td>

</tr>

</tbody>

</table>

<!-- Adding anchor tag to keep a reference to results file -13th Dec 2011 -->

<a id="logURI" target="_new" href=""></a>

</div>

</body></html>

		






















jQuery Automated testsuite under execution

Test status will be displayed below when testing is done...
In progress..



Friday, October 5, 2012

Extending using inheritance in Javascript