- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Lakshmi Srinivas has Published 315 Articles
Lakshmi Srinivas
203 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
Lakshmi Srinivas
72 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];
Lakshmi Srinivas
127 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
Lakshmi Srinivas
125 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
Lakshmi Srinivas
95 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
Lakshmi Srinivas
67 Views
Yes, we can use DESCRIBE or EXPLAIN statements instead of SHOW COLUMNS statement to get the list of the columns in an existing table. In the example below we have applied DESCRIBE and EXPLAIN statement on ‘Employee’ table and got the same result set as got after SHOW COLUMNS statement ... Read More
Lakshmi Srinivas
202 Views
You need to try the following to take photo from webcam using HTML5:Declare variablesvar streaming = false, video = document.querySelector('#video'), canvas = document.querySelector('#canvas'), photo = document.querySelector('#photo'), startbutton = document.querySelector('#startbutton'), width = 320, height = 0;Using getUserMedianavigator.getMedia = ( navigator.getUserMedia || ... Read More
Lakshmi Srinivas
928 Views
Try the following code to add a stop button to your audio in HTML5:function displayStopBtn() { var myPlayer = document.getElementsByTagName('audio')[0]; myPlayer.pause(); myPlayer.currentTime = 0; }You can also include jQuery:$("#stopButton").click(function () { audio.pause(); audio.currentTime = 0; });
Lakshmi Srinivas
294 Views
For full page drag and drop files, try the following code:var myDrop = document.getElementById('dropZone'); function displayDropZone() { myDrop.style.visibility = "visible"; } function hideDropZone() { myDrop.style.visibility = "hidden"; } function allowDrag(ev) { if (true) { ev.dataTransfer.dropEffect = 'copy'; ev.preventDefault(); } } ... Read More
Lakshmi Srinivas
250 Views
To move an HTML div in a curved path, use any of the following: CSS Transitions JavaScript (jQuery) HTML5 CanvasTry JavaScript to make it work in every browser.Use the animate() method. The animate() method performs a custom animation of a set of CSS properties.The following is the syntax:selector.animate( params, [duration, easing, callback] );Here ... Read More