Arrange Binary String for Maximum Value within Index Range in C++

Arnab Chakraborty
Updated on 29-Jan-2020 08:14:40

262 Views

In case of a given string consisting of only 0’s and 1’s, we are given M non-intersecting ranges A, B( A

XMLHttpRequest for Video Tag

karthikeya Boyini
Updated on 29-Jan-2020 08:14:09

534 Views

The HTML5 file Blob.slice() method is useful for creating a Blob object containing the data. This data is in the specified range of bytes of the source Blob. It uses XMLHttpRequest as in the below example.Let us see an example to send and receive binary data using slice(). This example sends a text and uses the POST method to send the "file" to the server:var val = new XMLHttpRequest(); val.open("POST", url, true); val.onload = function (event) { }; var blob = new Blob(['demo'], {type: 'text/plain'}); val.send(blob);For video:req.onload = function () {    var blob_uri = URL.createObjectURL(this.response);    myElement.appendChild(document.createElement("source")).src = ... Read More

Load HTML File into Canvas

Samual Sam
Updated on 29-Jan-2020 08:12:55

783 Views

For this, you can use the SVG elements. Let us see an example:           DEMO          

Does HTML5 Replace Flash and Silverlight for Video?

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

118 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 and powerful way to draw graphics using JavaScript. It can be used to draw graphs, make photo compositions or do simple (and not so simple) animations.Here is a simple element that has only two specific attributes width and height plus all the core HTML5 attributes like id, name, and ... Read More

JavaScript File Drop with HTML5

Nancy Den
Updated on 29-Jan-2020 08:12:03

286 Views

Drag and Drop (DnD) is powerful User Interface concept that makes it easy to copy, reorder and deletion of items with the help of mouse clicks. This allows the user to click and hold the mouse button down over an element, drag it to another location, and release the mouse button to drop the element there.For drag and drop:                    #boxA, #boxB {float:left;padding:10px;margin:10px; -moz-user-select:none;}          #boxA { background-color: #6633FF; width:75px; height:75px; }          #boxB { background-color: #FF6699; width:150px; height:150px; }       ... Read More

Keep Image at the Back of HTML5 Canvas with Fabric.js

karthikeya Boyini
Updated on 29-Jan-2020 08:11:26

358 Views

To keep the image at the back of the canvas, when move elements, you need to pass:preserveObjectStackingAnd the following would work and the image is not visible in the background:window.canvas = new fabric.Canvas('c', { preserveObjectStacking:true });Now, on moving the shape will appear over the image.

Display Rupee Symbol Correctly in HTML

Samual Sam
Updated on 29-Jan-2020 08:11:00

247 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:₹

Adopt a Flex Div's Width to Content in HTML

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

322 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; }

Update HTML5 Canvas Rectangle on Hover

Daniol Thomas
Updated on 29-Jan-2020 08:09:58

639 Views

To update HTML5 canvas rectangle on hover, try to run the following code:var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d"); context.rect(20,20,150,100); context.stroke(); $(canvas).hover(function(e){    context.fillStyle = blue;    context.fill(); });

Create Multi-Column Layout in HTML5 Using Tables

Nishtha Thakur
Updated on 29-Jan-2020 08:09:25

933 Views

Design your webpage to put your web content on multiple pages. You can keep your content in the middle column, you can use left column to use menu, and right column can be used to put an advertisement or some other stuff.Example           Three Column HTML Layout                                                    Main Menu                HTML                PHP                PERL...                                        Technical and Managerial Tutorials                                        Right Menu                HTML                PHP                PERL...                                

Advertisements