
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10483 Articles for Web Development

90 Views
PhoneGap has geolocation which works well for iOS, however, in IOS6, getCurrentPosition fires a failure callback. After failure, the getcurrentPosition calls success or failure callbacks. To let PhoneGap works on IOS6, we need to set PhoneGap.plist to No.If it is set to yes then ios6 have memory problems. However, Apache Cardova can be used for this purpose for iOS. There are many bugs in an older version of Cardova, so it should be updated to Cardovanew version.

503 Views
Whenever a mobile website is created and there is a requirement in which user is requested for current position on button click, then HTML5 geolocation is used.This is working fine in mobile chrome.However when in Mobile Safari, the user is prompted to share location and browser defaults to geolocation then browser is defaulted to Permission denied errorTo solve this, the Geolocation services in mobile services is turned on to get current location of requested user.

520 Views
It is because there is no dragover event handler; however, default event handler of dragover event is used. After that, no drop event is triggered.e.preventdefault is needed for dragover event before drop event.If you want to allow a drop, then default handler is prevented for canceling the event. This can be done either by returning false from an attribute-defined event listener or by calling events event.prevent default method. False is returned when the division has dragover as property.The default is prevented.

605 Views
For storing extremely large files on Amazon S3, the configured virtual machine can be used which would be 10+ GB in size.In HTML5 file API, very large files are divided into small bits on the client. The server has the responsibility to join files together and move the complete file to S3. There is no cost of sending the files between EC2 and S3, but for this, we need to maintain 2 apps to send large files. In Amazon multipart upload if chunk upload fails, it can be restarted. A 5GB data can be divided into 1024 separate parts and upload each one ... Read More

545 Views
If we want to check whether circles are colliding with each other or not, one way is by getting the distance between two centers of circles and subtracting the radius of each circle from that distanceWe also check if the distance is greater than 1. If we want to check it for 20 circles, then we need to calculate exact differences in distances. x/y positions of centers vs the radii.bs(x2 - x1) > (r2 + r1) abs(y2 - y1) > (r2 + r1)The circles cannot collide if the distance in X or Y between circle centers is greater than the ... Read More

285 Views
Whenever we work with canvas and want the canvas to be rotated, we need to translate point to draw point as per its rotation.A transform class can be made to detect point on the canvas after canvas rotationvar t = new Transform(); console.log(t.transformPoint(5,6)); //Transform point will be [5,6] t.rotate(1); // Same transformations can be applied that we did to the canvas console.log(t.transformPoint(5,6)); // Transformed point will be [-2.347, 7.449]

513 Views
If you want to draw part of an image inside canvas, the image onload function only fires once when the image first loads into the browser. Let us see the example:$(document).ready(function () { var cw1 = 200; var ch1 = 300; var ctx1 = $("#myCanvas")[0].getContext("3d"); var myImg1 = new Image(); myImg1.src = "http://oi62.tinypic.com/148yf7.jpg"; var Fpst = 60; var Player1Tank = { x: cw1 / 2, w: 85, h: 85, Pos: 3, draw: function () { ... Read More

501 Views
When making HTML5 web application using KineticJS, grouping, and layering need to be used.Groups are basically containers whereas layers are separators basically.The group is a container which is having shaped objects inside layers for ex group might contain both circle and rectangle.If a group is manipulated then elements within that group is also manipulated.ex if we drag the group then its elements get dragged as well.However, layers actually separate canvas elements that are at the top of one another. This is quite similar to the layers that work in Photoshop and Illustrator. Multiple layers are visible simultaneously.Layers are used to ... Read More

490 Views
If the HTML5 Canvas layer disappears on mouse click in Fabric.js and Firefox stops responding when creating a canvas to the image, then there is a way to drag and drop images from your computer to canvas using Fabric.This can be done by making image draggable property to true by this way −