Govinda Sai has Published 74 Articles

How to save DIV as Image with canvas2image with extension in HTML?

Govinda Sai

Govinda Sai

Updated on 30-Jan-2020 07:05:15

513 Views

DIV content can be saved as image with the help of html2canvas function in javascript. DIV tag defines a section in HTML document. Example:    Hello world This shows division area named as cpimg. Html2canvas function saves div as an image with following code:html2canvas(document.querySelector(“#cpimg”)).then(canvas {    document.body.appendChild(canvas) });It saves the referred div section ... Read More

HTML5 using src using raw binary data

Govinda Sai

Govinda Sai

Updated on 30-Jan-2020 06:52:52

677 Views

If an audio file is stored in database and then we want to use this file as a blob or binary in an application where audio source is according to session then binary data is returned through ${sessionScope.user.music}. To load the audio file in an audio tag, data:audio/mp3;base64 works well.As ... Read More

How can we create a MySQL function to find out the duration of years, months, days, hours, minutes and seconds?

Govinda Sai

Govinda Sai

Updated on 30-Jan-2020 06:18:59

229 Views

Following is a MySQL function which calculates the duration in years, months, days, hours, minutes and seconds between two dates.mysql> DROP FUNCTION IF EXISTS Duration; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> DROP FUNCTION IF EXISTS Label123; Query OK, 0 rows affected, 1 warning (0.00 sec) ... Read More

How can I use 2-digit year value in MySQL DATEDIFF() function?

Govinda Sai

Govinda Sai

Updated on 30-Jan-2020 05:34:10

155 Views

We can use 2-digit year value either in single date expression or in both date expressions used as argument/s in MySQL DATEDIFF() function.For example, the query below is using 2-digit year value in first date expression and other is having 4-digit year value.mysql> Select DATEDIFF('18-10-22', '2017-10-22'); +-----------------------------------+ | DATEDIFF('18-10-22', '2017-10-22') ... Read More

Validate the size of input=file in HTML5?

Govinda Sai

Govinda Sai

Updated on 29-Jan-2020 10:49:35

1K+ Views

You can try to run the following code to validate the size of input type file:                                                             ... Read More

How to display rupee symbol in HTML

Govinda Sai

Govinda Sai

Updated on 29-Jan-2020 10:16:56

1K+ Views

The rupee symbol is the following and not every browser supports it:₹To make it visible on your web page: You can use the following as well:₹

In which format Year(2) or Year(4) MySQL will return the value of year from date ‘0000-00-00’?

Govinda Sai

Govinda Sai

Updated on 29-Jan-2020 05:10:38

81 Views

Suppose if we have stored a date value as ‘0000-00-00’ in MySQL table then on extracting year value from such kind of date, MySQL will return 0. It would not be in either Year(2) or Year(4) format. To understand it we are using the following data from ‘detail_bday’ table −mysql> ... Read More

How will addition, subtraction, multiplication, and division operator work with date represented as MySQL string?

Govinda Sai

Govinda Sai

Updated on 28-Jan-2020 10:40:17

150 Views

Such kind of calculations can cause unpredictable result because when the date is represented as MySQL string then MySQL tries to perform numeric operations on a string by taking only the first that appears. Following examples will clarify it −mysql> select '2017-10-17' + 20; +-------------------+ | '2017-10-17' + 20 | ... Read More

How to create SVG graphics using JavaScript?

Govinda Sai

Govinda Sai

Updated on 24-Jan-2020 06:52:31

405 Views

All modern browsers support SVG and you can easily create it using JavaScript. Google Chrome and Firefox both support SVG.With JavaScript, create a blank SVG document object model (DOM). Using attributes, create a shape like a circle or a rectangle.var mySvg = "http://www.w3.org/2000/svg"; var myDoc = evt.target.ownerDocument; var myShape ... Read More

Transporting SAP standard text

Govinda Sai

Govinda Sai

Updated on 16-Dec-2019 09:20:04

6K+ Views

STEP 1: Create Standard Text. To create standard text, you have to use T-Code SO10.In next window, pass the Text Name -> Click on CREATE Push Button. This will open a new window where you can save the TEXT.Next step is to create the TRANSPORT REQUEST to transport the TEXT. This ... Read More

Advertisements