Output of UNIX TIMESTAMP Function

Giri Raju
Updated on 28-Jan-2020 10:25:19

160 Views

The function UNIX_TIMESTAMP produce the output in seconds i.e this function will convert the specified date or datetime value into a total number of seconds.For example, the date ‘1970-05-15 05:04:30’ would be converted to total 11576070 seconds by UNIX_TIMESTAMP function.mysql> select UNIX_TIMESTAMP('1970-05-15 05:04:30'); +---------------------------------------+ | UNIX_TIMESTAMP('1970-05-15 05:04:30') | +---------------------------------------+ | 11576070                              | +---------------------------------------+ 1 row in set (0.09 sec)

Display List of Existing MySQL Databases on Server

Chandu yadav
Updated on 28-Jan-2020 10:24:46

126 Views

The SHOW DATABASES command is used to display the list of currently existing MySQL databases.mysql> Show Databases; +-----------------------------+ | Database                    | +-----------------------------+ | information_schema          | | gaurav                      | | mysql                       | | performance_schema          | | query                       | | query1                      | | sys                         | | tutorials                   | +-----------------------------+ 8 rows in set (0.02 sec)

Selecting Database in MySQL Sessions

Ayyan
Updated on 28-Jan-2020 10:23:55

110 Views

The database is created only once but it is necessary to select it each time we begin a MySQLsession. It can be done with the help of USE db_name statement on MySQL command line tool.mysql> Use Query; Database changedIt shows that we are now using query database.We can also select the database while invoking the MySQL from Windows command line. It can be done with the help of the following command −C:\Program Files\MySQL\bin>mysql -u root -p query Enter password: *****Here, query is the name of the database we are going to use for current MySQL sessionRead More

HTML5 drawImage Method to Draw Image onto the Canvas

Rishi Rathor
Updated on 28-Jan-2020 10:23:53

361 Views

To draw image onto the canvas, use the HTML5 drawImage() method:                    function drawShape(){             // get the canvas element using the DOM             var canvas = document.getElementById('mycanvas');                       // Make sure we don't execute when canvas isn't supported             if (canvas.getContext){                // use getContext to use the canvas for drawing                var ctx = canvas.getContext('2d');                // Draw shapes                var img = new Image();                img.src = '/images/backdrop.jpg';                img.onload = function(){                   ctx.drawImage(img,0,0);                   ctx.beginPath();                   ctx.moveTo(30,96);                   ctx.lineTo(70,66);                   ctx.lineTo(103,76);                   ctx.lineTo(170,15);                   ctx.stroke();                }             } else {                alert('You need Safari or Firefox 1.5+ to see this demo.');             }          }                        

HTML5 Meta Name Viewport Issues

Anvi Jain
Updated on 28-Jan-2020 10:23:26

798 Views

To solve the issue for HTML5 meta viewport, you can any of the following fix:You can also try this:Let us say you have a site width of 100px, then it won’t display the whole page, withinitial-scale = 1

HTML5 Validity of Nested Tables

Nishtha Thakur
Updated on 28-Jan-2020 10:22:50

191 Views

The validator considers the following table as valid:                 Example                                                                                                                                                My                            Table                                                                                                                

Access Your Computer Files from Anywhere

Samual Sam
Updated on 28-Jan-2020 10:22:05

9K+ Views

Do you wish to access your personal documents remotely, or music / videos, photos stored on your personnel computer, or on your mobile phone while you are travelling or when you are in office? The simplest solution is to copy all your data from the source to a portable hard drive and then carry it around. However, this is a cumbersome approach as you would require syncing manually the home computer with your portable disk.There are many other innovative ways these days. In this article, let us explore to see some technologies, tools to make this job easier whenever & ... Read More

Cross-Origin HTML Video Not Loading in Google Chrome

Samual Sam
Updated on 28-Jan-2020 10:21:47

216 Views

To solve the loading issues in the element, you need to set cross-origin to “anonymous”:You can also try another fix also.This can be due to missing of Access-Control-Allow-Headers response header with the list of HTTP headers that match the list passed in Access-Control-Request-Headers request header.

HTML5 Audio Control Stop Button

Lakshmi Srinivas
Updated on 28-Jan-2020 10:20:06

1K+ Views

Try the following code to add a stop button to your audio in HTML5:function displayStopBtn() {    var myPlayer = document.getElementsByTagName('audio')[0];    myPlayer.pause();    myPlayer.currentTime = 0; }You can also include jQuery:$("#stopButton").click(function () {    audio.pause();    audio.currentTime = 0; });

Getting Safari to Recognize Main HTML5

karthikeya Boyini
Updated on 28-Jan-2020 10:19:15

155 Views

To make a element to be recognized by Safari:main {    display: block;    width: 800px;    height: 800px;    background-color: #0C0; }You need to focus on:main {    display: block; }

Advertisements