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)
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)
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
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.'); } }
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
The validator considers the following table as valid: Example My Table
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
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.
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; });
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; }
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP