Archive for June, 2009

Detection of faces on canvas with Javascript

Wednesday, June 17th, 2009

Detect faces and is not just for Google Images. Now you can implement it on your website using Javascript and the canvas properties.

Venu

How it works?

To do this we need to work only 2 files in our <head />

<script type="text/javascript" src="dat.js"></script>
<script type="text/javascript" src="detector.js"></script>

Dat.js the file shows how to detect and detector.js the file has the logic of the script can detect faces in any photo.
1 can detect faces in the photos, the process becomes slower depending on what we choose (of course).

1 Face

?View Code JAVASCRIPT
face_detect_one( document.getElementById("myCanvas") );

Multiple Faces

?View Code JAVASCRIPT
face_detect_multi( document.getElementById("myCanvas") , progress_callback, result_callback );
function progress_callback( StepsCompleted, TotalSteps){
....
}

Answer

The response functions that returns the values we obtain a rectangle that contains the person’s face.

?View Code JAVASCRIPT
var myCanvas = document.getElementById("mycanvas");
 
var result = face_detect_one( myCanvas );
if (result) draw_rect(result, myCanvas);
 
function draw_rect(r, myCanvas){
	var CanvasContext = myCanvas.getContext("2d");
 	CanvasContext.strokeRect( r.x, r.y, r.w, r.w );
}

Link: via Percobaan

LINQ to SQL changes in VS 2010 & .NET 4.0

Wednesday, June 17th, 2009

For some time did not read anything about LINQ To SQL, and the truth is that I had raised was going with this extension of LINQ in Visual Studio 2010 and. NET 4.0 … well, the fact is that work has continued in LINQ To SQL and brings a lot of developments. NET 4.0. You can access all the news in this link.

via Damieng

Microsoft Web Platform Installer & Windows Web Application Gallery !

Monday, June 15th, 2009

Among the initiatives that Microsoft has to facilitate the design and creation of Web applications, this week we find two important components focused on that idea: the Web Platform Installer and the Windows Application Web Gallery. In the case of the Web Platform Installer, we find that Microsoft continues to evolve this utility you can install at a stroke a lot of ingredients we might need to build our web applications. In the Windows Application Web Gallery, we have a resource center where people can find applications and free technology. NET and PHP available for download. But let us see in detail each of these applications.

Web Platform Installer


As I said, Microsoft has just released the first beta of version 2.0 of the Web Platform Installer, which allows us to form a unified set of components that make up the stack of a typical web platform, and all this in just 1 MB. Among the components included (and whose installation is fully customizable), we have:

* Internet Information Services (IIS) 5.1 on Windows XP SP3.
* IIS 6.0 on Windows Server 2003 SP2.
* IIS 7.0 on Windows Vista SP1 and Windows Server 2008.
* SQL Server 2008 Express.
* .NET Framework 3.5 SP1.
* Visual Web Developer 2008 Express Edition.
* IIS Extensions including:
o IIS 7 Media Services 3.0.
o IIS7 Administration Pack.
o Database Manager for IIS7.
o WebDav 7.5.
o FTP 7.5.
o FastCGI for PHP support on IIS6.
o URL Rewrite.
o IIS 7 Application Routing.
o Web Deployment Tool for IIS.S.
* ASP.NET and features such as ASP.NET MVC.
* Silverlight Tools for Visual Studio.
* The Community Version of PHP v5.2.9.

Windows Web Application Gallery


In this case we have a portfolio of applications and ASP.NET PHP fully tested as DotNetNuke, DasBlog, Graffiti, Drupal, WordPress, phpBB (incidentally, another proof of the shift to open source that Microsoft is doing) for lists download and install.

YouTube HTML5 Demo

Wednesday, June 3rd, 2009

A page that demonstrates the ability to show videos HTML5 without using Flash for this. Obviously, it is necessary to use a browser compatible with HTML5 to see it properly.
Link: http://www.youtube.com/html5

External Link: What is HTML5 via WiseCodes

Javascript Image combobox, give your life to select

Wednesday, June 3rd, 2009

Javascript Image ComboBox is a jQuery plugin that allows our items <select/> have a life that until now could not have.

comboboximage_030608

This is an extension that allows items of <select /> have an image to facilitate the selection of items within a list of options.
To do this using an attribute (not standard) element <option /> named icon which will indicate where we’ll take the image next to <option />

 <select name="webmenu" id="webmenu" onchange="showValue(this.value)">
    <option value="calendar" icon="icons/icon_calendar.gif">Calendar</option>
    <option value="shopping_cart" icon="icons/icon_cart.gif">Shopping Cart</option>
    <option value="cd" icon="icons/icon_cd.gif">CD</option>
    <option value="email"  selected="selected" icon="icons/icon_email.gif">Email</option>
    <option value="faq" icon="icons/icon_faq.gif">FAQ</option>
    <option value="games" icon="icons/icon_games.gif">Games</option>
    <option value="music" icon="icons/icon_music.gif">Music</option>
    <option value="phone" icon="icons/icon_phone.gif">Phone</option>
    <option value="graph" icon="icons/icon_sales.gif">Graph</option>
    <option value="secured" icon="icons/icon_secure.gif">Secured</option>
    <option value="video" icon="icons/icon_video.gif">Video</option>
  </select>

After a line of JavaScript with this attribute will be housed within an image <select />

?View Code JAVASCRIPT
 MSDropDown.init();

If you want to see a demo of how to be, you can take a look here.

Mastered the accordion with MooTools

Wednesday, June 3rd, 2009

Call accordion those dynamic elements of our Web pages that show an item to move the mouse (or click on it) to conceal the other components. This technique very convenient for displaying large amounts of information in a small space usually give a headache to match all the information.

byslidermenu

With BySlideMenu never have problems. This is a MooTools plugin that allows us to make a wide variety of accordions, with very few lines of code.

HTML:

The HTML code we use to generate our accordion will be based on a list of elements:

<ul id="pinclickmenu">
    <li><img src="creditcards.jpg" /></li>
    <li><img src="games.jpg" /></li>
    <li><img src="computer.jpg" /></li>
    <li><img src="eiffeltower.jpg" /></li>
    <li><img src="electronic.jpg" /></li>
</ul>

Each <li/> will be one of the elements that make up the accordion.

JavaScript:

?View Code JAVASCRIPT
var pinclickmenu = new BySlideMenu('pinclickmenu', {pinMode: 'click'});

As we see fewer lines is impossible :D

Demos and Downloads:

You can see more demos and download the plugin from the project page.

Happy Programming!!! ;-)

What is HTML5

Wednesday, June 3rd, 2009

HTML 5 (Hyper Text M Language Version 5) is the fifth largest in the revision of basic language World Wide Web, HTML. HTML 5 specifies two variants of the same language: a ‘classic’ HTML text/html the variant known as HTML 5 and a variant XHTML called XHTML 5. This is the first time in HTML and XHTML have been developed in parallel.
The development of this code is governed by the Consortium W3C.

New Elements

HTML 5 provides a number of new elements and attributes that reflect the typical use of modern web sites. Some of them are technically similar to the labels
<div> and <span> but have a semantic meaning, eg <mav> (block site navigation) and <footer> Other elements provide new functionality through an interface such as elements <audio> and <video>
Some elements of HTML 4.01 are obsolete, including purely presentation as <font> and <center> whose effects are handled by the CSS. There is also a renewed emphasis on the importance of scripting DOM for behavior on the web.

HTML 4

html4

HTML 5

html5

External Link: via W3C