Lakshmi Srinivas has Published 287 Articles

Does HTML5 only replace the video aspects of Flash/Silverlight?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 08:12:31

105 Views

Flash provides amazing GUI and many visual features for animations. It allows the user build everything inside a particular platform without a full integration into the browser wrapped inside the browser with the main scopes that are multimedia and other kinds of animation.The HTML5 element gives you an easy ... Read More

How to adopt a flex div's width to content in HTML?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 08:10:22

316 Views

Use display: inline-flex to adopt a flex div’s width to content:#box {    display: inline-flex;    flex-direction: row;    flex-wrap: wrap;    max-width: 200px;    padding: 10px;    margin: 20px;    background-color: blue; }

Properties for HTML5 Canvas to create shadows

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 07:05:42

154 Views

HTML5 canvas provides capabilities to create nice shadows around the drawings. All drawing operations affected by the four global shadow attributes.     Sr.No.                                         Property and Description1shadowColor [ = value ]This property ... Read More

HTML5 tag

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 06:42:19

236 Views

The HTML5 tag is used to draw SVG Gradients. Yes, modern browsers support it.The following is the HTML5 version of an SVG example that would draw an ellipse using the tag and would use the tag to define an SVG radial gradient. Similar way you can use ... Read More

Detect area of a PNG that is not transparent with HTML

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 06:40:56

505 Views

To detect an area of a PNG that is not transparent: You need to first get the buffer You need to get 32-bits reference of that buffer Scan 0 widths to find x1 edge Scan width 0 to find x2 edge Height to find the y1 edge Height 0 to find the y2 edgeRead More

Play video on canvas and preserve the last frame/image on HTML5 Canvas

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 06:38:07

293 Views

You can try to run the following code to play and preserve the video’s last frame:var c = $('canvas')[0]; var context = canvas.getContext('2d'); c.width = 640; c.height = 480; $("#, myPlayer").on('play', function (e) {    var $this = this;    (function loop() {       if (!$this.paused ... Read More

How to make iOS UIWebView display a mobile website correctly?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 06:28:55

110 Views

To display the mobile website correctly, try the following fix:mywebview.scalesPageToFit = YES; mywebview.contentMode = UIViewContentModeScaleAspectFit;You can also set the following:NSString *js = [NSString stringWithFormat:@"document.body.style.zoom = 0.8;"]; [webView stringByEvaluatingJavaScriptFromString:js];

How do I programmatically create a DragEvent for Angular app and HTML?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 06:26:48

204 Views

To create a DragEvent, use the protractor API. The official documentation states:The browser.get method loads a page. Protractor expects Angular to be present on a page, so it will throw an error if the page it is attempting to load does not contain the Angular library. (If you need to interact ... Read More

Programmatically fire HTML5 dragstart after mousemove

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 06:25:28

154 Views

To fire dragstart after mousemove, try the following:If you are firing dragstart event, then implement the rest of the process flow as well:To solve the problem, create the user experience as follows: You need to instruct the user to click on the respective area for enabling drag When a user clicks on ... Read More

What MySQL returns when we remove all the columns from a table by using ALTER TABLE command with DROP keyword?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 29-Jan-2020 05:37:18

206 Views

Eventually, we cannot remove all the columns from a table by using ALTER TABLE command with DROP keyword. In this case, MySQL will return an error message. It is demonstrated with the help of the following exampleSuppose in table ‘Employee’ we have two columns ‘name’ and ‘id’, now if we ... Read More

Advertisements