varma

varma

54 Articles Published

Articles by varma

Page 2 of 6

CSS2 sizing property vs CSS3 box sizing property

varma
varma
Updated on 11-Mar-2026 347 Views

Let us understand the difference between CSS2 sizing property and CSS3 box-sizing property.CSS2 sizing property                    .div1 {             width: 200px;             height: 100px;             border: 1px solid green;           }          .div2 {             width: 200px;             height: 100px;             padding: 50px;             border: 1px solid pink;          }                     TutorialsPoint.com       TutorialsPoint.com     CSS3 box-sizing property                    .div1 {             width: 300px;             height: 100px;             border: 1px solid blue;             box-sizing: border-box;          }          .div2 {             width: 300px;             height: 100px;             padding: 50px;             border: 1px solid red;             box-sizing: border-box;          }                     TutorialsPoint.com       TutorialsPoint.com    

Read More

CSS3 Linear gradients

varma
varma
Updated on 11-Mar-2026 182 Views

Linear gradients are used to arrange two or more colors in linear formats like top to bottom.ExampleYou can try to run the following code to implement linear gradients in CSS3 −                    #grad1 {             height: 100px;             background: -webkit-linear-gradient(pink,green);             background: -o-linear-gradient(pink,green);             background: -moz-linear-gradient(pink,green);             background: linear-gradient(pink,green);          }                                

Read More

What is Is-a relationship in Java?

varma
varma
Updated on 11-Mar-2026 1K+ Views

IS-A is a way of saying: This object is a type of that object. Let us see how the extends keyword is used to achieve inheritance.Examplepublic class Animal { } public class Mammal extends Animal { } public class Reptile extends Animal { } public class Dog extends Mammal { }Now, based on the above example, in Object-Oriented terms, the following are true −Animal is the superclass of Mammal class.Animal is the superclass of Reptile class.Mammal and Reptile are subclasses of Animal class.Dog is the subclass of both Mammal and Animal classes.Exampleclass Animal { } class Mammal extends Animal { ...

Read More

Selects all elements with class="mydemo" with CSS

varma
varma
Updated on 11-Mar-2026 188 Views

To select all elements with class=”mydemo”, you can try to run the following code. Use the .class CSS selector to achieve this,Example                    .demo {             border: 2px dashed orange;          }                     Heading 1       Heading 1       Heading 2    

Read More

Set the coordinates of the area in an image map in HTML?

varma
varma
Updated on 22-Nov-2023 1K+ Views

To set the coordinates of the area in an image map, Use the cords attribute in HTML to set the coordinates of the area in an image map in HTML.ExampleYou can try to run the following code to implement the cords attribute −           HTML coords attribute                                        

Read More

HTML5/CSS align list-items depending on other columns mutual height

varma
varma
Updated on 24-Jun-2020 239 Views

Align list-item with the help of flex. Flex will make columns flexible according to content. The wrapper will layout columns in a row..wrap{    display : flex }// This will help wrapper to become flexible .wrap.col{    flex: 1 0 33%; }Flex is basically a property which helps in making element flexible.Use the following to keep the lists vertically aligned to the bottom −.col .content {    margin-top: auto; }

Read More

How to write PHP script to fetch data, based on some conditions, from MySQL table?

varma
varma
Updated on 22-Jun-2020 806 Views

If we want to fetch conditional data from MySQL table then we can write WHERE clause in SQL statement and use it with a PHP script. While writing the PHP script we can use PHP function mysql_query(). This function is used to execute the SQL command and later another PHP function mysql_fetch_array() can be used to fetch all the selected data. This function returns a row as an associative array, a numeric array, or both. This function returns FALSE if there are no more rows. To illustrate it we are having the following example −ExampleIn this example we are writing ...

Read More

How can MySQL produce the output in a vertical format rather than tabular format?

varma
varma
Updated on 22-Jun-2020 583 Views

By using \G at the end of MySQL statement, it returns the output in a vertical format rather than a tabular format. Consider the example below −mysql> Select curdate(); +------------+ | curdate()  | +------------+ | 2017-11-06 | +------------+ 1 row in set (0.00 sec) mysql> Select CURDATE()\G *************************** 1. row *************************** CURDATE(): 2017-11-06 1 row in set (0.00 sec)From the example above, the difference of using \G at the end of the MySQL statement can be understood. It returns the same output in a vertical format rather than a tabular format.

Read More

How MySQL IF ELSE statement can be used in a stored procedure?

varma
varma
Updated on 22-Jun-2020 17K+ Views

MySQL IF ELSE statement implements a basic conditional construct when the expression evaluates to false. Its syntax is as follows −IF expression THEN    statements; ELSE    else-statements; END IF;The statements must end with a semicolon.To demonstrate the use of IF ELSE statement within MySQL stored procedure, we are creating the following stored procedure which is based on the values, as shown below, of the table named ‘student_info’ −mysql> Select * from student_info; +------+---------+------------+------------+ | id   | Name    | Address    | Subject    | +------+---------+------------+------------+ | 101  | YashPal | Amritsar   | History    | | 105  | ...

Read More

How to check table status of the tables in a particular MySQL database?

varma
varma
Updated on 22-Jun-2020 471 Views

We can check the status of tables in a database with the help of show table status statement. For example, in the database named tutorial, by executing this statement we can get the status of tables as follows −mysql> show table status \G*************************** 1. row ***************************            Name: student          Engine: InnoDB         Version: 10      Row_format: Compact            Rows: 0  Avg_row_length: 0     Data_length: 16384 Max_data_length: 0    Index_length: 0       Data_free: 7340032  Auto_increment: NULL     Create_time: 2017-10-24 09:34:29   ...

Read More
Showing 11–20 of 54 articles
Advertisements