Rishi Rathor has Published 142 Articles

MySQL add days to a date?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:24

3K+ Views

To add days to a date, you can use DATE_ADD() function from MySQL. The syntax is as follows to add days to a date −INSERT INTO yourTableName VALUES(DATE_ADD(now(), interval n day));In the above syntax, you can use curdate() instead of now(). The curdate() will store only date while now() will ... Read More

How to display the value of a variable on command line in MySQL?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:24

5K+ Views

To display the value of a variable, you can use select statement. The syntax is follows −SELECT @yourVariableName;Let us first create a variable. This can be done using SET command. The following is the syntax to create a variable −SET @yourVariableName = yourValue;Let us check the above syntax to create ... Read More

MySQL Query to change lower case to upper case?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:24

8K+ Views

You can use in-built function UPPER() from MySQL to change a lower case to upper case. The syntax is as follows with select statement.SELECT UPPER(‘yourStringValue’);The following is an example showing string in lower case −mysql> select upper('john');Here is the output displaying string in upper case −+---------------+ | upper('john') | +---------------+ ... Read More

MySQL Sum Query with IF Condition?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:24

8K+ Views

The Sum() is an aggregate function in MySQL. You can use sum query with if condition. To understand the sum query with if condition, let us create a table.The query to create a table −mysql> create table SumWithIfCondition    −> (    −> ModeOfPayment varchar(100)    −> ,    −> ... Read More

How to adjust display settings of MySQL command line?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:24

1K+ Views

To adjust display settings of MySQL command line, use the /G at the end of MySQL queries instead of semicolon(;).The syntax is as follows −SELECT *FROM yourTableName \GThe above syntax adjusts the display settings. Here we will display records in row format from our sample ‘studenttable’ table which we created ... Read More

Can Google Analytics track interactions in an offline HTML5 app?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

230 Views

Google Analytics is a freemium analytic tool that provides a detailed statistics of the web traffic. It is used by more than 60% of website owners. Analytics Tools offer an insight into the performance of your website, visitors’ behavior, and data flow. These tools are inexpensive and easy to use. ... Read More

To “user-scalable=no” or not to “user-scalable=no” in HTML5

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

231 Views

For responsive design, you do not have to use user-scalable=no. Use it only if you want your application to look more like a native app.Zooming is a key feature for accessibility and you need to keep that in mind. You can control that users won't break your design if they ... Read More

Display video inside HTML5 canvas

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

469 Views

You can try the following code snippet to display video inside HTML5 canvas.var canvas1 = document.getElementById('canvas'); var context = canvas1.getContext('2d'); var video = document.getElementById('video'); video.addEventListener('play', function () { var $this = this; (function loop() { if (!$this.paused && !$this.ended) { context.drawImage($this, 0, 0); setTimeout(loop, 1000 / 30); } })(); }, 0);

CSS Grid Rows

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

135 Views

The horizontal line in the following is called Grid Rows.

Storing Credentials in Local Storage

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

1K+ Views

The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.For storing credentials in local storage, ... Read More

Advertisements