Chandu yadav has Published 1091 Articles

Facing Problem in retrieving HTML5 video duration

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:17:58

458 Views

To get the video duration, query the readyState attribute. It has a series from 0 to 4. When the metadata has loaded, the value you will get is 1.Therefore, you need to do something like −window.setInterval(function(tm) {    // Using readyState attriute    if (video.readyState > 0) {     ... Read More

Flexbox and vertical scroll in a full-height app using newer Flexbox API with HTML

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:16:04

587 Views

The flex property is a shorthand for the flex-grow, flex-shrink, and flex-basis properties. The flex property sets the flexible length on flexible items.For example −#container article {    -webkit-flex: 1 1 auto;    overflow-y: auto;    height: 0px; /*here the height is set to 0px*/ }If you want a min-height, ... Read More

What is the best data type to store money values in MySQL?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:16:00

5K+ Views

We can store the money values in MySQL in decimal(value1, value2). Here, value1 is the total range including value2. The value2 specifies the number of digits after the decimal point. To understand this concept, the steps are given below.First a table is created using the create command.mysql> CREATE table MoneyDemo ... Read More

Find records from one MySQL table which don't exist in another?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:12:31

780 Views

To find the records from one MySQL table which don’t exist in another table we can use the subquery for the table which does not have the records. This can be better understood using the given steps −First a table is created using the create command. The table name is ... Read More

EventSource vs. wrapped WebSocket with HTML5 Server-Side Event

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:11:46

139 Views

The event source is just a web socket that -That cannot send data Uses text or event stream format It fires events that are server definedIt is useful in applications that only need server push.Web sockets are good for applications that need fast communications in both directions.Another major difference is the different ... Read More

How can I stop running a MySQL query?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:09:41

1K+ Views

Before stopping a running query of MySQL, first we need to see how many processes are running with the help of show command.The query for that is given as follows −mysql> show processlist;After executing the above query, we will get the output with some id’s. This is given as follows ... Read More

Variables in CSS

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:07:02

107 Views

Variables in CSS are used to add custom property values to your web page. Set a custom name of the property and set value for it.You can try to run the following code to implement variables in CSS to change the background and text colorExampleLive Demo       ... Read More

How to check if a MySQL database exists?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 14:05:49

6K+ Views

The schema_name command is used to check if a MySQL database exists or not. The syntax of this command is as follows −select schema_name from information_schema.schemata where schema_name = 'database name';Now, the above command is used to check whether the database exists or not. The query for that is as ... Read More

Update a column value, replacing part of a string in MySQL?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 13:59:31

1K+ Views

To update a column value, the update command as well as the replace method can be used. The steps to better understand these are given as follows −First create a table with the help of the create command. This is given as follows −mysql> CREATE table DemoOnReplace -> ( -> ... Read More

How can I add video to site background in HTML 5?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 13:58:52

435 Views

Add a button to play or pause the video. Then we have styled the video to a hundred percentage height and width so that it covers the entire background.The following is the code snippet to set video as a site background in HTML5.        Your browser does not ... Read More

Advertisements