NEWS
Showing posts with label Web Technologies. Show all posts
Showing posts with label Web Technologies. Show all posts

Tuesday, September 6, 2011

Google Human body browser

Google has many products which most of us aren’t aware of. One among those is Google Body Browser with the tagline “ Human Body As Never Seen Before”.


The Google Lab product let’s you browse the human body on the basis of several anatomical features (I am basically an Engineer,so expecting you to pardon my terminology) like muscles, organs, bones etc.

The navigation is pretty much like Google Maps, but three dimensional. Seeing the human anatomy in three dimension is first-of-its-kind experience, and till now only folks from medicine background would have had it

All that you need is a Web browser that supports WebGL ( Web Graphics Library, a HTML element that provides a 3D graphics application programming interface, implemented in a web browser ) which allows 3D graphics inside of webpages.

So where do you get WebGL enabled browser?

The Easiest way is to go for Chrome Beta with WebGL from here. You also have other browsers like Mozilla and WebKit nightly

Now that you have a browser enabled with WebGL, lets experience our Human Autonomy in 3D with Google Body Browser



Tuesday, August 9, 2011

HTML color codes

Thursday, July 7, 2011

Managed Extensibility Framework (or MEF for short)

What is MEF?


The Managed Extensibility Framework (or MEF for short) simplifies the creation of extensible applications. MEF offers discovery and composition capabilities that you can leverage to load application extensions.

What problems does MEF solve?

MEF presents a simple solution for the runtime extensibility problem. Until now, any application that wanted to support a plugin model needed to create its own infrastructure from scratch. Those plugins would often be application-specific and could not be reused across multiple implementations.

MEF provides a standard way for the host application to expose itself and consume external extensions. Extensions, by their nature, can be reused amongst different applications. However, an extension could still be implemented in a way that is application-specific. Extensions themselves can depend on one another and MEF will make sure they are wired together in the correct order (another thing you won't have to worry about).

MEF offers a set of discovery approaches for your application to locate and load available extensions.

MEF allows tagging extensions with additonal metadata which facilitates rich querying and filtering

How does MEF work?

Roughly speaking, MEF's core is comprised of a catalog and a CompositionContainer. A catalog is responsible for discovering extensions and the container coordinates creation and satisfies dependencies.

MEF's first-class citizen is a ComposablePart (see Parts). A composable part offers up one or more Exports, and may also depend on one or more externally provided services or Imports. A composable part also manages an instance, which can be an object instance of a given type (it is in the default MEF implementation). MEF, however, is extensible and additonal ComposablePart implementations can be provided as long as they adhere to the Import/Export contracts.

Exports and imports each have a Contract. Contracts are the bridge between exports and imports. An export contract can consist of further metadata that can be used to filter on its discovery. For example, it might indicate a specific capability that the export offers.

MEF's container interacts with Catalogs to have access to composable parts. The container itself resolves a part's dependencies and exposes Exports to the outside world. You're free to add composable part instances directly to the container if you wish.

A ComposablePart returned by a catalog will likely be an extension to your application. It might have Imports (dependencies) on components the host application offers, and it's likely to Export others.

The default MEF composable part implementation uses attribute-based metadata to declare exports and imports. This allows MEF to determine which parts, imports, and exports are available completely through discovery.

Tuesday, July 5, 2011

How to make text of an html checkbox clickable (like ASP.NET control)

If you put a label HTML tag after the checkbox (either HTML check box or Server Side checkbox control), and set the ID of the check box to the "for" attribute of the label tag, clicking the text in the label tag will click the checkbox:

The code will be as below:






label text



 

Alternate:

 






Put the website in Maintenance Mode (Under Construction)

First, you need to add a key/value to your web.config file, so you can turn the maintenance mode ON or OFF.



 
Then put this code block in the Application_BeginRequest of the Global.asax


void Application_BeginRequest(object sender, EventArgs e)


{

if (ConfigurationManager.AppSettings["MaintenanceMode"] == "true")

{

if (!Request.IsLocal)

{

HttpContext.Current.RewritePath("maintenance.aspx");

}

}

}
 
Now if you set the "MaintenanceMode" key in the config to true, all the requests from the remote clients will be redirected to the maintenance.aspx page but the requests from local client will be served normally.

Sunday, June 5, 2011

What is SAX?

SAX is a simple API for XML Processing.
It is generally an alternative to DOM and it also can be used to parse the XML documents.
This simple API is based on Streaming model

Main Advantage of using SAX over DOM :

SAX does not build an in memory representation of the source XML document so when parsing large amount of XML documents it does not require a large amount of memory or Resources.