background preloader

Javascript

Facebook Twitter

CodeMirror. Using a JavaScript Profiler for Fun and Profit: HTML5 Canvas Example. This is a gentle introduction on how and why to use performance profilers that are part of many modern browsers. JavaScript profilers are browser features or add-ons that allow you to determine what parts of your code are fast or slow. They can help you to identify unnecessary or extraneous code that needs to be refactored. They can also be used to benchmark two or more ways of accomplishing the same task, or to determine if a certain effect is the reason for a webapp’s slowness. My examples will be simple HTML5-based Canvas code snippets, but this tutorial needs no foreknowledge of Canvas and the principles are universal. I’ll be using the IE9 profiler because it is one of the more feature-rich but the tests can be done on other profilers. The profiler can be accessed through the developer tools, which are launched by pressing F12 in most browsers.

Profilers are the easiest way to measure JavaScript performance. 02. 03. 04. 05. 06. var can = document.getElementById('canvas1'); 24. 25. 26. Index. JSHint, A JavaScript Code Quality Tool. Nude.js: Nudity Detection with JavaScript. When I first heard about nude.js, the client side nudity detection software, I was very skeptical for a number of reasons: Ideally, nudity detection should be done on the server side so that adult materials don't make it to the client at all.I don't have faith in automated nudity detection as a whole (which, as a programmer, may seem stupid)Would nudity in greyscale imagery be detected? How accurate can the detection be? If you did detect nudity in an image, what would you do? What's a practical usage? I've spent some time with the nude.js software and wanted to show you how to use it and let you know if my skepticisms were answered.

About nude.js From a technical standpoint, nude.js uses Canvas and WebWorker technology to set the image up for analyzation. Detect skin-colored pixels in the image.Locate or form skin regions based on the detected skin pixels.Analyze the skin regions for clues of nudity or non-nudity.Classify the image as nude or not. Using nude.js Thoughts After Using nude.js. Magnusvw/hollywoodr - GitHub. Learning Advanced JavaScript.