Articles on Trending Technologies

Technical articles with clear explanations and examples

How to Access your Computer Files from Anywhere

Samual Sam
Samual Sam
Updated on 28-Jan-2020 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> does not load in Google Chrome

Samual Sam
Samual Sam
Updated on 28-Jan-2020 233 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.

Read More

HTML5 audio control stop button

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 28-Jan-2020 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; });

Read More

Getting Safari to recognize <main> HTML 5

karthikeya Boyini
karthikeya Boyini
Updated on 28-Jan-2020 170 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; }

Read More

Full page drag and drop files website with HTML

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 28-Jan-2020 465 Views

For full page drag and drop files, try the following code:var myDrop = document.getElementById('dropZone'); function displayDropZone() {    myDrop.style.visibility = "visible"; } function hideDropZone() {    myDrop.style.visibility = "hidden"; } function allowDrag(ev) {    if (true) {       ev.dataTransfer.dropEffect = 'copy';       ev.preventDefault();    } } function handleDrop(ev) {    ev.preventDefault();    hideDropZone();    alert('This is Drop!'); } window.addEventListener('dragenter', function(ev) {    displayDropZone(); }); myDrop.addEventListener('dragenter', allowDrag); myDrop.addEventListener('dragover', allowDrag); myDrop.addEventListener('dragleave', function(e) {    hideDropZone(); }); myDrop.addEventListener('drop', handleDrop);

Read More

What happens when MySQL encounters an out-of-range date?

varun
varun
Updated on 28-Jan-2020 527 Views

The response of MySQL on encountering out-of-range or invalid date will depend upon SQL MODE. If we have enabled ALLOW_INVALID_DATES mode then MySQL will convert the out of range values into all zeros (i.e. ‘0000:00:00 00:00:00’) and also stores the same in the table without producing any error or warning.For example, we can change SQL MODE as follows and then insert the out-of-range −mysql> set sql_mode = 'ALLOW_INVALID_DATES'; Query OK, 0 rows affected (0.00 sec) mysql> Insert into order1234(productname, quantity, orderdate) values('A', 500, '999-05-100'); Query OK, 1 row affected, 1 warning (0.13 sec) mysql> Select * from order1234; ...

Read More

How to Copy a File to Multiple Directories in Linux?

Samual Sam
Samual Sam
Updated on 28-Jan-2020 679 Views

Did you get to take one file on a Linux or Unix approach and replicate it to a whole bunch of alternative directories? Then, this article is for you to copy a file to multiple directories in Linux/Ubuntu.Using with cp and xargsTo copy a file to multiple directories in Linux/Ubuntu, use the following in command –$ echo dir1 dir2 dir3 | xargs -n 1 cp file1In the above command, we are copying file1 to dir1, dir2, and dir3 directories.The sample example of the above command is as shown below −$ echo Music Videos Desktop | xargs -n 1 cp httpstat.pyIn ...

Read More

How can we allow MySQL to store invalid dates?

Rishi Rathor
Rishi Rathor
Updated on 28-Jan-2020 387 Views

After enabling the SQL MODE to ALLOW_INVALID_DATES, MySQL will also be able to store invalid dates in the table. The example is given below to understand it −mysql> Insert into order1234(ProductName, Quantity, Orderdate) values('B',500,'2015-11-31'); Query OK, 1 row affected (0.06 sec) mysql> Select * from order1234; +-------------+----------+--------------+ | ProductName | Quantity | OrderDate    | +-------------+----------+--------------+ | A           | 500      | 0000-00-00   | | B           | 500      | 2015-11-31   | +-------------+----------+--------------+ 2 rows in set (0.00 sec)We can see MySQL also inserts the invalid date in a table.

Read More

How to Create 301 Redirection on Nginx and Apache

Samual Sam
Samual Sam
Updated on 28-Jan-2020 5K+ Views

In this article, we will learn how to redirect the URLs or Domain to another address. This can be done by using the HTTP Redirection. The URL redirection is a popular technique to point one domain address to another domain address which we can achieve on Apache and Nginx both.Redirecting to an another DomainWe might face a situation in which, we have an established web-site and we need to change the domain for the site. Here, we cannot do this by deleting the older domain since this may cause breakage and disappearance of contents on the old domain is possible ...

Read More

Chrome and HTML5 GeoLocation denial callback

Krantik Chavan
Krantik Chavan
Updated on 28-Jan-2020 218 Views

For timeout callback in Google Chrome, try the following code:_callback = false; function successCallback(position) {    _callback = true;    console.log('success'); } function errorCallback(error) {    _callback = true;    alert('error'); } setTimeout(function(){if(!_callback)console.log('ignored')}, 20000); navigator.geolocation.getCurrentPosition(    successCallback,    errorCallback,    {timeout: 2000} );

Read More
Showing 50431–50440 of 61,248 articles
Advertisements