collected from stackoverflow High Level Summary of Canvas vs. SVG Canvas Pixel based (Dynamic .png) Single HTML element.(Inspect element in Developer tool. You can see only canvas tag) Modified through script only Event model/user interaction is granular (x,y) Performance is better with smaller surface, a larger number of objects (>10k), or both SVG Shape based […]

Read More →

Few pointer To update nodejs run below command: sudo apt-get install git && git clone https://github.com/audstanley/NodeJs-Raspberry-Pi-Arm7 && cd NodeJs-Raspberry-Pi-Arm7 && chmod +x Install-Node.sh && sudo ./Install-Node.sh;

Read More →

Below Code display Video Cam feed on your page… navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; if (navigator.getUserMedia) { navigator.getUserMedia({ audio: true, video: { width: 1280, height: 720 } }, function(stream) { var video = document.querySelector(‘video’); video.srcObject = stream; video.onloadedmetadata = function(e) { video.play(); }; }, function(err) { console.log(“The following error occurred: ” + err.name); […]

Read More →

Code to check whether given string is a Palindrom or not function palindrome(str) { // Good luck! var revers = str.split(“”).reverse().join(“”).toLowerCase().replace(/\W/g, ”).replace(“_”,””); var actualStr =str.toLowerCase().replace(/\W/g, ”).replace(“_”,””); console.log(revers +” : “+actualStr); if(revers === actualStr) {return true;} return false; }

Read More →