Sunday, 29 March 2015

How to open a web page in new window in ASP.NET?


Sometimes you may need to open a web page in new window when user clicks at some link or on some action. In those cases you can use the following in code behind:


It will open webpage.aspx in new window having height=700 and width=1024 and with scrollbars. If you don't want scrollbars you can skip the statement(scrollbars=1). You can specify your own height and width. Here mywindow is name given to the window.

Friday, 27 March 2015

Program to print rhombus in C


#include<stdio.h>
int main( )
{

            int n = 5, inc = 1, i, j,k;     //n is number of stars to be printed in middle row
            for (i = 1; i <= n && i >= 1; i = i + inc)
            {

                for (j = 1; j <= n - i; j++)
                   printf(" ");     //prints a space

                for (k = 1; k <= i;k++ )
                    printf("* ");   //prints star and space

                printf("\n");   //prints a new line

                if (i == n)
                    inc = -1;
            }

             return 0;
}

Program to find missing elements in an array in C


#include<stdio.h>
int main( )
{

        int a[ ]={2,4,7};    //array to be tested
        int n=sizeof(a)/sizeof(a[0]);    //length of array
        int i,j,match;

        for(i=1;i<=9;i++)    //here we are testing the missing elements from 1 to 9
        {
                 match=0;
                 for(j=0; j<n | | (match==0);j++)    //it will loop until the array ends or we found a match
                           if(a[j] = = i)
                                  match=1;
   
                  if(match==0)   //no match found
                         printf("%d  ",i);
         }
     
          return 0;
}

How to find length of an array in C or C++?


To find the length of an array in C or C++, you can use the following:

int n=sizeof(a)/sizeof(a[0]);

Here, a is array

Thursday, 26 March 2015

How to disable copying of text from a webpage?


To disable copying of text from a web page write the following script in HEAD section of web page:




Monday, 23 March 2015

How to show a alert box in ASP.NET by code behind?


Sometimes, you may need to show a message after a successful insertion of record or after some action...

So you can use the following code to show a alert box in ASP.NET:

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true);


This will show an alert box with the message: Record Inserted Successfully

or you can also use the following:


ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Insert is successfull')", true);

STQA Assignment 2 solved


Click here to download it

Questions:

Short questions :
Q1: What is stress testing?
Q2: What is Cyclomatic complexity?
Q3: Define Object Oriented Testing
Q4: What is regression testing? When it is done?
Q5: How loop testing is different from the path testing?
Q6: What is client server environment?
Q7: What is graph based testing?
Q8: How security testing is useful in real applications?
Q9: What are main characteristics of real time system?
Q10: What are the benefits of data flow testing?

Long Questions:
Q1: Design test case for: ERP, Traffic controller and university management system?
Q2: Assuming a real time system of your choice, discuss the concepts. Analysis and design factors of same, elaborate
Q3: How testing in multiplatform environment is performed?
Q4: Explain graph based testing in detail
Q5: Differentiate between Equivalence partitioning and boundary value analysis


Tuesday, 17 March 2015

Artificial Intelligence Assignment 2 -Solved


Click here to download it

Short Questions
Q1: Mention the types of knowledge 
Q2: What is monotonic reasoning?
Q3: When A* is optimal?
Q4: What are the various types of informed search?
Q5: Name any two AI languages
Q6: What are semantic nets?
Q7: What is non-monotonic reasoning?
Q8: What is FOPL?
Q9: What is A* Search?
Q10: Give examples for heuristic search

Long Questions
Q1: Define heuristic search. Discuss benefits and short coming.
Q2: Discuss the following heuristic search techniques. Explain the algorithm with the help of example.
Best First Search 
A* Algorithm
Q3: Explain non-monotonic reasoning and discuss various logic related to it.
Q4: Explain the difference between forward and backward reasoning and under what conditions each would be best to use for given set of problems.
Q5: Write A* algorithm and explain how it is used to find minimal cost path