Send File and Parameters within the Same XMLHttpRequest

Jennifer Nicholas
Updated on 28-Jan-2020 10:34:09

474 Views

To send a file and parameters within the same XMLHttpRequest:var myForm = new FormData(); myForm.append('param1', 'demo'); myForm.append('param2', 6767); myForm.append('myDir', 'public-data'); myForm.append('demofile', file); xhr.send(myForm);

Enhance Real-Time Performance on HTML5 Canvas Effects

Samual Sam
Updated on 28-Jan-2020 10:33:37

549 Views

To enhance HTML5 canvas performance:Image smoothing should be disabledRender in half resolutionUse drawImage() to update main canvas You need to use integer coordinates and sizesUsage of requestAnimationFrame() You need to use while loops as often as you can

Unable to Take a Photo from Webcam using HTML5

Lakshmi Srinivas
Updated on 28-Jan-2020 10:32:55

259 Views

You need to try the following to take photo from webcam using HTML5:Declare variablesvar streaming = false,    video = document.querySelector('#video'), canvas = document.querySelector('#canvas'),    photo = document.querySelector('#photo'),    startbutton = document.querySelector('#startbutton'),    width = 320,    height = 0;Using getUserMedianavigator.getMedia = ( navigator.getUserMedia ||                 navigator.webkitGetUserMedia ||                   navigator.mozGetUserMedia ||                    navigator.msGetUserMedia);

Store 0000-00-00 as a Date in MySQL

Anvi Jain
Updated on 28-Jan-2020 10:31:35

2K+ Views

For storing the date like ‘0000-00-00’ in a column of MySQL table, we must have to set the SQL mode to ‘allow_invalid_date’. Following example will demonstrate it −mysql> SET sql_mode = 'allow_invalid_dates'; Query OK, 0 rows affected, 1 warning (0.03 sec) mysql> Create table test_date(date_order date); Query OK, 0 rows affected (0.45 sec) mysql> Insert into test_date(date_order) values('0000-00-00'); Query OK, 1 row affected (0.04 sec) mysql> Select * from test_date; +------------+ | date_order | +------------+ | 0000-00-00 | +------------+ 1 row in set (0.00 sec)

How Addiction for Pokémon Affected Many in a Short Span

Samual Sam
Updated on 28-Jan-2020 10:30:40

154 Views

You see them here, there, on the pathways, on the streets, across bridges, inside parks, inside shopping malls between buildings, behind parking lots, and basically anywhere outdoors imaginable. It seems as if the world has been invaded by a huge fleet of ‘Pokemon Go Zombies’ or more generally called ‘Pokemon-goers’.What’s all the Fuss about?Despite mixed reviews and a tad bit of criticism from game critics, Pokemon Go has become quite a phenomenon since its release on the 6th of July, 2016. It is basically a game that makes the use of the GPS and the Camera of any Android or ... Read More

Create Your Own Choice MySQL Database

Anjana
Updated on 28-Jan-2020 10:28:48

160 Views

CREATE DATABASE db_name can be used to create our own choice MySQL database. For example to create a database named Sample, we should have to run the command as follows −mysql> CREATE DATABASE Sample; Query OK, 1 row affected (0.04 sec)

Nokia 3310: Relevance in Today's Smartphone Era

Samual Sam
Updated on 28-Jan-2020 10:26:07

220 Views

Every time your smartphone troubles you all you could think of is the time when things were so simple back. I mean – Yes I like smartphones where you carry a complete package of entertainment, news, and necessity with you. Never to forget the self-camera, apps like WhatsApp, Instagram and Snapchat makes it’s more irresistible. Still being unsatisfied humans we still want more battery backup, better performance, and minimal hanging.In short, we want a merger of our previous type based phone with our new smartphones. Remember the era when mobile phones were first launched? Nokia was the best option we ... Read More

Output of UNIX TIMESTAMP Function

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

152 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

112 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

97 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

Advertisements