George John has Published 1081 Articles

Pagination using MySQL LIMIT, OFFSET?

George John

George John

Updated on 25-Jun-2020 07:53:00

6K+ Views

Firstly, we need to create a table with some records, then we will use pagination with the help of limit and offset.Creating a table with the help of CREATE command. The query is as follows −mysql> CREATE table limitoffsetDemo -> ( -> id int, -> FisrtName varchar(200) -> ); Query ... Read More

HTML5 file uploading with multiple progress bars

George John

George John

Updated on 25-Jun-2020 07:51:15

406 Views

To make it work correctly, you need to work around xhr progress event, which is fired when all list items had been already created.The xhr should know what you want to do −var a = new XMLHttpRequest(); a.upload.li = li; a.upload.addEventListener('progress', function(e) {    var pc = parseInt(event.loaded / event.total ... Read More

What is unsigned in MySQL?

George John

George John

Updated on 25-Jun-2020 07:49:07

2K+ Views

Unsigned allows us to enter positive value; you cannot give any negative number. Let us create a table to understand unsigned in MySQL. To create a table, we will use the CREATE command.Let us create a table −mysql> CREATE table UnsignedDemo -> ( -> id int unsigned -> ); Query ... Read More

How to add a day to the date in MySQL?

George John

George John

Updated on 25-Jun-2020 07:47:48

434 Views

To add 1 day, use date_add() function. Adding a day to datetime in MySQL gives the next day. The following is the syntax −SELECT DATE_ADD('Any date’', INTERVAL 1 DAY) AS AliasName;Now, I am applying the above query to add a day with date in MySQL. The query is as follows ... Read More

Alternatives to HTML5 iframe srcdoc?

George John

George John

Updated on 25-Jun-2020 07:44:29

569 Views

The HTML tag is used to create an inline frame.Example           HTML iframe Tag                   The srcdoc attribute specifies the HTML content of the page to show in the iframeAn alternative of the srcdoc attribute ... Read More

HTML5 Geolocation in Safari 5

George John

George John

Updated on 25-Jun-2020 07:40:03

1K+ Views

HTML5 Geolocation API lets you share your location with your favorite web sites. A JavaScript can capture your latitude and longitude, can be sent to backend web server, and do fancy location-aware things like finding local businesses or showing your location on a map.ExampleLet us see how to get the ... Read More

Measure text height on an HTML5 canvas element

George John

George John

Updated on 25-Jun-2020 07:12:51

2K+ Views

To get the text height, set the font in pt −context.font="15pt Calibri";Now, get the height like the following −var height = parseInt(context.font.match(/\d+/), 10);Above we have used a match to separate the font size from font face.

How to position text to center on an image with CSS

George John

George John

Updated on 25-Jun-2020 07:11:46

2K+ Views

To positioned text to center an image, use the transform property in CSS. You can try to run the following code for centered text over an imageExampleLive Demo                    .container {             position: relative;   ... Read More

CSS content: attr() on HTML5 progress doesn't work

George John

George John

Updated on 25-Jun-2020 06:48:39

249 Views

You need to add static content in CSS to make it work.Let us see an example −HTMLYou need to add the following CSS. This is to add CSS generated content before and after the HTML5 progress element −progress::-webkit-progress-bar:before, progress::-webkit-progress-bar:after {    content: '989'; }

Autocomplete text input for HTML5?

George John

George John

Updated on 25-Jun-2020 06:38:21

414 Views

Use the autocomplete attribute for autocomplete text input. The autocomplete attribute is used with a form elements to set the autocomplete feature on or off. If the autocomplete feature is on, the browser will automatically show values, based on what users entered before in the field.If the autocomplete feature is off, the ... Read More

Advertisements