Friday, July 7, 2017

PHP - Programming 2


// Check number---regular or irregular


//This is first file-------   num.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>check Numbers</title>
</head>
<body>
<form action="number.php" method="post">
Please input six number=<input type="text" id="num" name="num"/><br/>
<input type="submit" id="submit" name="submit"/>
</form>
</body>
</html>
//This is Second file------ number.php
<?php
$num=$_POST["num"];
for($i=0; $i<6; $i++)
{
if($num[$i]==($num[$i+1]-1))
{
 $flag=$flag+1;
 if($flag==5)
 {
  echo "Number is regular". "<br/>";
 }
}
else if(($num[$i]-1)==$num[$i+1])
{
    $flag1=$flag1+1;
 if($flag1==5)
 {
  echo "Number is regular". "<br/>";
 }
}
 if($flag<5 && $flag1<5)
 {
  echo "Number is irregular". "<br/>";
 }

?>

Tuesday, July 4, 2017

PHP - Programming 1



//USE OF SELECT OPTION WHICH SHOW VALUE ACCORDING DATABASE

<?php
  include('my_conn.php');
  $my_sql="SELECT *
  FROM login
  WHERE lid =1101";
  $myresult=mysql_query($my_sql);
  
  
   while($row_select=mysql_fetch_array($myresult))
  {
  
    $check=$row_select['lactive'];

  }
//$check="";
?>
<form action="" post="">
    <select  id="lactive" name="lactive">
        <?php
        if($check=="")
        {
            echo '<option  value="">Select..</option>';
            echo '<option  value="YES">YES</option>';
            echo '<option  value="NO">NO</option>';
        }
        else
        {
        if($check=='YES')
        {
                 echo '<option  value="<?=$check;?>">Yes</option>';
                 echo '<option  value="No">No</option>';
        }
        else
        {
               
                echo '<option  value="<?=$check;?>">No</option>';
                echo '<option  value="">Yes</option>';
         }
        }
         ?>
    </select>
    <input type="submit" id="submit" name="submit"/>
</form>

Wednesday, June 21, 2017

Interview Questions for PHP - 5 - Answers



Back- Interview Questions -5

Q1. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
Ans: PHP Interpreter treats numbers beginning with 0 as octal. 

Q2. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
Ans: In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.

Q3. How do I find out the number of parameters passed into function?
Ans: func_num_args() function returns the number of parameters passed in.

Q4. Explain the ternary conditional operator in PHP?
Ans: Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.

Q5. When are you supposed to use endif to end the conditional statement?
Ans: When the original if was followed by : and then the code block without braces.






Tuesday, June 20, 2017

Interview Questions for PHP - 5


  1. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
  2. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
  3. How do I find out the number of parameters passed into a function?
  4. Explain the ternary conditional operator in PHP?
  5. When are you supposed to use endif to end the conditional statement?


Wait for Answers .......Till Next Post.....Interview questions' answers.

click here for answers

Free Download PHP Interview Questions and Answers

Tuesday, May 30, 2017

Answers --- Interview Questions for CSS-5

Back

Q1. How to set an image in background?
Ans. The background image for a page can be set like this.
     
        Example: body{
                                     background-image:url('lion');
                                   }

Q2. What is an image-repeat-effect?
Ans.The background-image property reports and image both horizontally and vertically by default. If the image is repeated only one direction, the background will look better.

Example: body{
                           background-image:url('nature.png');
                            background-repeat:repeat-x;
                           }

Q3. What is use of background position effect?
Ans: Background-position effect is that when using a background image use an image that does not disturb the text.

Example: body{
                            background-image:url('nature.png');
                            background-repeat:no-repeat;
                            background-position:right top;
                          }


Q4. What is a background shorthand property?
Ans: The shorthand property for background is simply "background".

Example: body{
                            background:#ffffff url('nature.png') no-repeat right top
                          }

Q5. What is text transformation?
Ans:The text-transform property is used to specify uppercase and lowercase letters, or capitalize the first letter of each word.

Example: p.uppercase{text-transform:uppercase;}
                p.lowercase{text-transform:lowercase;}
                p.capitalize{text-transform:capitalize;}

Thursday, May 18, 2017

Interview Questions CSS-5

Q1. How to set an image in background?

Q2. What is an image-repeat-effect?

Q3. What is use of background position effect?

Q4. What is a background shorthand property?

Q5. What is text transformation?


Wait for Answers .......Till Next Post.....Interview questions' answers.

Check here for Answer.

Free Download PHP Interview Questions and Answers 

Thursday, March 9, 2017

Answers --- Interview Questions for SQL - 1

Q1. What are SQL functions?
Ans: SQL functions are
  • Execute queries against a database
  • Retrieve data from a database
  • Insert records in a database
  • Update records in database
  • Delete records from a database
  • Create new database
  • Create new tables in a database
  • Create stored procedures in a database
  • Create views in a database
Q2. "SQL is not case sensitive.". Is this statement true or false?
Ans: True

Q3. What is SQL?
Ans: SQL is a structured query language for accessing and manipulating databases. It is an "American National Standards Institute" Standard(ANSI).

Q4. "Some database systems require a semicolon at the end of each SQL statement.". Is this statement true or false?
Ans: True

Q5. What is RDBMS?
Ans: RDBMS stands for Relational Database Management System. A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as invented by E. F. Codd, of IBM's San Jose Research Laboratory.



           

Friday, February 17, 2017

Interview Questions for SQL - 1

Q1. What are SQL functions?

Q2. "SQL is not case sensitive.". Is this statement true or false?

Q3. What is SQL?

Q4. "Some database systems require a semicolon at the end of each SQL statement.". Is this statement true or false?

Q5. What is RDBMS?


Wait for Answers .......Till Next Post.....Interview questions' answers.

Check here for Answer.

Free Download SQL Interview Questions and Answers 


Tuesday, February 14, 2017

Answers --- Interview Questions for CSS-4

Back - Interview Questions for CSS-4


Q1. Answer: Yes, True

Q2. Answer: (b) Horizontal

Q3. Answer: The text- property is property which used to set or remove decorations from text. It is mostly used to remove underlines from links for design purposes.

Example : a { text-decoration:none; }
                  h1 { text-decoration:underline; }
                  h2 { text-decoration:overline; }
                  h3 { text-decoration:line-through; }

Q4. Answer: CSS background properties are used to define the background effects of an element.

CSS properties used for background effects:
  1. background-color
  2. background-image
  3. background-repeat
  4. background-attachment
  5. background-position
Q5. Answer: The background-color property specifies the background color of an element.
The background color of a page is defined in the body selector:

Example:
                   body { background-color:"blue"; }

Monday, February 13, 2017

Interview Questions for CSS-4

Q1. "If you define the color property, you must also define the background-color property.". Is this true or false statement?

Q2. The text-align property is used to set the____________alignment of a text.
       (a) Vertical (b) Horizontal.

Q3. What is use of text decoration property.

Q4. What is use of CSS background.

Q5. How to change background color?

Wait for Answers .......Till Next Post.....Interview questions' answers.

Click Here---Interview questions for CSS -4-  Answers 

Free Download PHP Interview Questions and Answers 

Sunday, February 12, 2017

Interview Questions for CSS-3-Answers

Back To Questions

Q1. Answers: Yes, True

Q2. Answers: The CSS ID is an Id selector which used to specify a style for single, Unique element. It uses with HTML elements and is defined with a "#".

Example:
                #Ehtml
                {
                     text-align:left;
                     color:blue;
                  }

Q3. Answer: Yes, True.

Q4. Answer: The CSS Class is a class selector which used to specify a style for a group of elements. It uses with HTML elements and is defined with a ".".

Examle:
                .center
                {
                    text-align:center;
                  }

Q.5 Answer:  Inline Style Sheet

Monday, January 30, 2017

Interview Questions for CSS - 3

Q1. "Do not start a class name with a number". Is it a true or false statement?

Q2. What is a CSS ID define and use?

Q3. "Do not start an CSS ID name with a number". Is it a true or false statement?

Q4. How to CSS Class define and use?

Q5. Which CSS has the highest priority?
  • Internal Style Sheet
  • Browser Default
  • Inline Style Sheet
  • External Style Sheet

Wait for Answers .......Till Next Post.....Interview questions' answers. 


Free Download PHP Interview Questions and Answers 

Monday, October 24, 2016

Interview Questions for CSS -2- Answers



Back

Q1. Answer: The class selector is used to specify a style for a group of elements.

Q2. Answer: The class selector uses the HTML class attribute and it is define with a ".".

Example: All HTML elements with class="centre" will be centre aligned

.centre{text-align:center;}

Q3. Answer: Inline Style is used the style attribute in the relevant tag. The style attribute can contain any CSS property.

Example: <p style="color:red;margin-left:15px;">This is an Inline Style.</p>

Q4. Answer: An internal style sheet should be used when a single document has a unique style. An internal style sheet is used in the head section of an HTML page. It define in the <Style> tag.

Example: <head>
                     <style>
                                   hr{color:red;}
                                   p{margin-left:15px;}
                  </style>
                  </head>
Q5. Answer: An External Style sheet is a file which save with ".css" extension. All style format write in it for all web page and access in HTML page through <link>tag. This file should not contain any HTML tags.

Example: The <link> tag goes inside the head section:
                 <head>
                   <link rel="stylesheet" type="text/css" href="ssheet.css">
                  </head>
                   In CSS ssheet.css
                       hr{color:red;}
                       p{margin-left:15px;}

Sunday, October 23, 2016

Interview Questions for CSS - 2



Q1. What is a Class Selector?

Q2. What is an Inline Style?

Q3. What is an External Style Sheet?

Q4. What is an Internal Style Sheet?

Q5. How to use Class Selector?

Wait for Answers .......Till Next Post.....Interview questions' answers. 

Interview questions for CSS -2-  Answer

Free Download PHP Interview Questions and Answers

Wednesday, October 19, 2016

Interview Questions for CSS - 1 - Answers





Back- Interview Questions for CSS - 1

Q1. Answer : The selector is normally the HTML elements and style apply on particular HTML     element.

Q2. Answer: True

Q3. Answer: CSS is a Cascading Style Sheets. It define how to display HTML elements. CSS controls the style and layout of multiple web pages all at once.

Q4. Answer: CSS Syntax has two main parts.
  • Selector 
  • Declaration 
Declaration has two parts.
  • Property
  • Value
Example:    P {color: red;font-size:10px;}

Selector=P; Property=color, font-size; Value=red, 10px;

Q5. Answer: Three ways of inserting of Style Sheets.
  • External Style Sheet
  • Internal Style Sheet
  • Inline Style


Friday, October 7, 2016

Interview Questions for CSS - 1




Q1. What is a Selector?

Q2. "Styles were added to HTML 4.0 to solve a problem of Design".  Is this statement true or false?

Q3. What is CSS?

Q4. How much Part of CSS Syntax?

Q5. How much ways of inserting a Style Sheet?

Wait for Answers .......Till Next Post.....Interview questions' answers. 

Interview questions for CSS -1-  Answer 

Free Download PHP Interview Questions and Answers

Saturday, July 30, 2016

Project Documentation - Reason Behind Choosing C++

Back

The traditional methodology(Function-Oriented Programming), object-oriented programming emphasises on the data rather than the algorithm.In OOP, data is compartment or capsule is called an object.
In the OOP approach, the problem is divided into objects, whereas in function-oriented programming the problem is divided into functions. Although, both approaches adopt the same philosophy divide and conquer, OOP conquers a bigger region, while function-oriented programming is content with conquering a smaller region. Object-Oriented Programming contains function-oriented programming and so OOP can be referred to as the super set of function-oriented programming and hence, it can be concluded that OOP has an edge over function-oriented programming.
Some of the most prominent features of C++ are classes, operator and function overloading, free store management, constant types, references, inline and friend function, inheritance, virtual functions, streams for console and file manipulations, templates and exception handling.

Advantages:

Information hiding and data abstraction increase reliability and help decouple the procedural and representational specification from its implementation.
Dynamic binding increase flexibility.
Inheritance coupled with dynamic binding enhances the re-usability of code, thus increasing the productivity of a programmer. Code reuse is possible in conventional language as well, but object-oriented language greatly enhances the possibility of reuse.
Object-Orientation provides many other advanges in the production and maintenance of software; Shorter development time, high degree of code sharing and malleability.  

Saturday, July 23, 2016

Interview Questions for PHP - 4 - Answers

Back - Interview Questions for PHP - 4

Q1. Ans - The output is displayed directly to the browser.

Q2. Ans - If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script:

<?php
include "mysql_connection.php";

$sql = "CREATE TABLE astore ("
. " id INTEGER NOT NULL"
. ", url VARCHAR(80) NOT NULL"
. ", notes VARCHAR(1024)"
. ", counts INTEGER"
. ", time TIMESTAMP DEFAULT sysdate()"
. ")";
if (mysql_query($sql, $con)) {
print("Table Astore created.\n");
} else {
print("Table creation failed.\n");
}

mysql_close($con);
?>

Remember that mysql_query() returns TRUE/FALSE on CREATE statements. If you run this script, you will get something like this:
Table Astore created.

Q3. Ans - The include_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included, it will not be included again. The major difference between include() and require() is that in failure include() produces a warning message whereas require() produces a fatal errors.

Q4. Ans - string urlencode(str) - Returns the URL encoded version of the input string. String values to be used in URL query string need to be URL encoded. In the URL encoded version:

Alphanumeric characters are maintained as is.
Space characters are converted to "+" characters.
Other non-alphanumeric characters are converted "%" followed by two hex digits representing the converted character.

string urldecode(str) - Returns the original string of the input URL encoded string.

For example:

$discount ="10.00%";
$url = "http://domain.com/submit.php?disc=".urlencode($discount);
echo $url;

You will get "http://domain.com/submit.php?disc=10%2E00%25".

Q5. Ans - Once the Web server received the uploaded file, it will call the PHP script specified in the form action attribute to process them. This receiving PHP script can get the uploaded file information through the predefined array called $_FILES. Uploaded file information is organized in $_FILES as a two-dimensional array as:
$_FILES[$fieldName]['name'] - The Original file name on the browser system.
$_FILES[$fieldName]['type'] - The file type determined by the browser.
$_FILES[$fieldName]['size'] - The Number of bytes of the file content.
$_FILES[$fieldName]['tmp_name'] - The temporary filename of the file in which the uploaded file was stored on the server.
$_FILES[$fieldName]['error'] - The error code associated with this file upload.

The $fieldName is the name used in the <INPUT TYPE=FILE, NAME=fieldName>.

Q6. Ans - MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array.

Q7. Ans - Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program.
Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

Q8. Ans - PHP Interpreter treats numbers beginning with 0 as octal.

Q9. Ans - Total 5 types of tables we can create
1. MyISAM
2. Heap
3. Merge
4. INNO DB
5. ISAM
MyISAM is the default storage engine as of MySQL 3.23. When you fire the above create query MySQL will create a MyISAM table.

Q10. Ans - define() directive, like define ("MYCONSTANT", 100).



Tuesday, July 19, 2016

Interview Questions for PHP - 4

Q1. What does a special set of tags do in PHP?

Q2. How to create table in mysql?

Q3.What are the differences between require and include, include_once?

Q4. what is meant by urlencode and urldecode?

Q5. How to get the uploaded file information  in the receiving script?

Q6. What is the difference between mysql fetch object and mysql fetch array?

Q7. How can I execute script using command line?

Q8. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what's the problem?

Q9. What are the different tables present in mysql? which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2), ename varchar(10))?

Q10. How do you define a Constant?

Wait for Answers .......Till Next Post.....Interview questions' answers. 

Interview Questions for PHP - 4 - Answers

Free Download PHP Interview Questions and Answers

Thursday, June 9, 2016

Project Documentation - Tools / Platforms, Languages to be used

Back


  • HARDWARE CONFIGURATION
  1. Microprocessor - Intel Pentium IV
  2. Motherboard - Gigabyte 
  3. Hard Disk - 160 GB
  4. RAM - 2 GB
  5. Cache Memory - 1 MB
  6. Multimedia Keyboard
  7. Optical Mouse
  8. Color monitor 17"
  9. DVD Writer
  10. UPS 600VA
  11. Printer HP All in All
  • SOFTWARE REQUIREMENTS
  1. Operating System                            : Window XP
  2. Programming Language                  : OOPS in C++
  3. Compiler                                          : TURBO C++  IDE 3.0
  4. Documentation in MS-Word 2000