CSS Transition Property

Krantik Chavan
Updated on 02-Jul-2020 09:18:48

215 Views

Use the CSS transition property to set all the four transition properties into a single line. You can try to run the following code to work with the transition property −ExampleLive Demo                    div {             width: 150px;             height: 150px;             background: blue;             transition: height 3s;          }          div:hover {             height: 250px;          }                     Heading One       Hover over the below box to change its height.          

Purpose of Using CHANGE Command in MySQL

AmitDiwan
Updated on 02-Jul-2020 09:10:31

164 Views

The CHANGE command in MySQL is used to rename column name. Let us first create a table −mysql> create table DemoTable796 (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, Name varchar(100), StudentAge int ); Query OK, 0 rows affected (0.56 sec)Let us check the description of table −mysql> desc DemoTable796;This will produce the following output −+------------+--------------+------+-----+---------+----------------+ | Field      | Type         | Null | Key | Default | Extra          | +------------+--------------+------+-----+---------+----------------+ | StudentId  | int(11)      | NO   | PRI | NULL    | auto_increment | | Name ... Read More

Importance of serialVersionUID Keyword in Java

raja
Updated on 02-Jul-2020 09:02:37

6K+ Views

SerialVersionUIDThe SerialVersionUID must be declared as a private static final long variable in Java. This number is calculated by the compiler based on the state of the class and the class attributes. This is the number that will help the JVM to identify the state of an object when it reads the state of the object from a file.The SerialVersionUID can be used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible w.r.t serialization. If the deserialization object is different than serialization, then it can throw an InvalidClassException.If the serialVersionUID is ... Read More

Print System Time in C++: 3 Different Ways

Sunidhi Bansal
Updated on 02-Jul-2020 08:52:10

13K+ Views

There are different ways by which system day, date and time can be printed in Human Readable Form.First wayUsing time() − It is used to find the current calendar time and have arithmetic data type that store timelocaltime() − It is used to fill the structure with date and timeasctime() − It converts Local time into Human Readable FormatDay Month Date hour:month:second YearExample#include #include // used to work with date and time using namespace std; int main() {    time_t t; // t passed as argument in function time()    struct tm * tt; // decalring variable for localtime()   ... Read More

Set CSS Transition Duration in Seconds or Milliseconds

Daniol Thomas
Updated on 02-Jul-2020 08:25:03

288 Views

Use the transition-duration property in CSS to set how many seconds or milliseconds a CSS transition effect takes to complete −ExampleLive Demo                    div {             width: 150px;             height: 150px;             background: blue;             transition-property: height;             transition-duration: 2s;          }          div:hover {             height: 200px;          }                     Heading One       Hover over the below box to change its height.          

Get Count of a Specific Value in a Column with MySQL

AmitDiwan
Updated on 02-Jul-2020 08:16:08

2K+ Views

Let us first create a table −mysql> create table DemoTable    (       Id int,       Name varchar(100)    ); Query OK, 0 rows affected (1.40 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(100, 'John'); Query OK, 1 row affected (0.44 sec) mysql> insert into DemoTable values(101, 'Chris'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable values(102, 'Chris'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable values(103, 'Chris'); Query OK, 1 row affected (1.05 sec) mysql> insert into DemoTable values(104, 'David'); Query OK, 1 ... Read More

Call invokeLater Method in Java

raja
Updated on 02-Jul-2020 08:12:57

4K+ Views

An invokeLater() method is a static method of the SwingUtilities class and it can be used to perform a task asynchronously in the AWT Event dispatcher thread. The SwingUtilities.invokeLater() method works like SwingUtilities.invokeAndWait() except that it puts the request on the event queue and returns immediately. An invokeLater() method does not wait for the block of code inside the Runnable referred by a target to execute.Syntaxpublic static void invokeLater(Runnable target)Exampleimport java.awt.*; import java.awt.event.*; import javax.swing.*; public class InvokeLaterTest extends Object {    private static void print(String msg) {       String name = Thread.currentThread().getName();       System.out.println(name + ": " + msg);    }   ... Read More

Create a Transition Effect with CSS

Chandu yadav
Updated on 02-Jul-2020 08:08:02

160 Views

To create a transition effect, set the property for the transition effect. With that also set the duration of effect.transition: height 5s;You can try to run the following code to create a transition effectExampleLive demo                    div {             width: 150px;             height: 150px;             background: blue;             transition: width 3s;          }          div:hover {             width: 250px;          }                     Heading One       Hover over the below box to change its width.          

Usage of transform-origin Property with CSS

George John
Updated on 02-Jul-2020 08:04:18

116 Views

Use the transform-origin property to change the position on transformed elements with CSS.ExampleYou can try to run the following code to learn how to work with transform-origin property with CSSLive Demo                    .demo1 {             width: 300px;             height: 300px;             background-color: yellow;          }          .demo2 {             width: 200px;             height: 200px;             background-color: orange;          }          .demo3 {             width: 100px;             height: 100px;             background-color: blue;             transform: rotate(10deg);             transform-origin: 30% 40%;          }                     Rotation       Demo          Demo                            Demo                                

Complete Address from Latitude and Longitude on Android

Azhar
Updated on 02-Jul-2020 08:03:55

636 Views

This example demonstrates how do I complete address from latitude and logitude in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.             Step 3 − Add the following code to src/MainActivity.javaimport android.support.v7.app.AppCompatActivity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.location.Location; import android.location.LocationManager; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.provider.Settings; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    Button btnShowAddress;    TextView tvAddress;   ... Read More

Advertisements