Thursday, January 5, 2012

jquery face recognition

<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<!-- mas js -->
<script src="https://raw.github.com/jaysalvat/jquery.facedetection/release/js/facedetection/ccv.js"></script>
<script src="https://raw.github.com/jaysalvat/jquery.facedetection/release/js/facedetection/face.js"></script>
<script src="https://raw.github.com/jaysalvat/jquery.facedetection/release/js/jquery.facedetection.js"></script>
<!-- make it happen -->
<script>
window.onload = function() {
jQuery("img").each(function() {
var img = this;
// Get faces cooridnates
var coordinates = jQuery(img).faceDetection();
// Make boxes if faces are found
if(coordinates.length) {
coordinates.forEach(function(coord) {
jQuery("<div>", {
css: {
position: "absolute",
left: coord.positionX + 5 + "px",
top: coord.positionY + 5 + "px",
width: coord.width + "px",
height: coord.height + "px",
border: "3px solid white"
}
}).appendTo(img.parentNode);
});
}
});
};
</script>

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...