Sep 15th, 2008 | No Comments

The system, called KERS for Kinetic Energy Recovery Systerms, is designer to capture energy from the car’s movement and reuse it in power bursts instead of fuel. It is a key element in Formula One’s attempt to become a more energy-efficient and technologically and socially releveant sport.

KERS allows team to take energy generated under braking, store it, and use it again for concentrated burst. The KERS will be mandatory in Formula One from 2009. It is  a step towards making Formula One cars hybrid and more environment friendly by 2013.  There are two technical solutions to KERS – mechanical and electrical. A mechanical KERS uses a flywheel to retain power under braking; an electrical system, uses an electric motor. More powerful KERS will be allowed from 2011, and operate on all four wheels from 2013.

While some support the KERS, which will make Formula One cars more environment friendly, some are quite reluctant to introduce the system.

Written by Ajay Matharu

September 15th, 2008 at 4:22 pm

Posted in Formula One,Science

Tagged with

Sep 14th, 2008 | No Comments

Here is the sample code thar you can use to access Active Directory details from a sharepoint site,

DirectoryEntry oDE;
oDE = new DirectoryEntry(“LDAP://<ldapserver>,”ADusername”,”ADpassword”,AuthenticationTypes.Secure);

DirectoryEntry de = oDE;

DirectorySearcher deSearch = new DirectorySearcher();

deSearch.Filter = “(&(objectClass=user)(SAMAccountName=” + SPContext.Current.Web.CurrentUser.LoginName + “))”;

deSearch.SearchScope = SearchScope.Subtree;

SearchResult results = deSearch.FindOne();

if (!(results == null))
{
de = new DirectoryEntry(results.Path,”AD username”,”AD password”,AuthenticationTypes.Secure);

//if you know the propertyname you want to get value from you can use this
de.Properties["propertyname"].ToString();

//this code will loop thru all the properties in active directory
ResultPropertyCollection propertiesCollection;

propertiesCollection = results.Properties;

//loop thru all the properties in AD
foreach (string currentProperty in propertiesCollection.PropertyNames)
{

Response.Write(“Property Name: ” + currentProperty);

//loop thru all the sub properties
foreach (Object thisCollection in propertiesCollection[currentProperty])
{

Response.Write(thisCollection.ToString() + “<br/>”);
}
}
}

The above code reads and writes the values of the properties from the Active directory for the current user.
But to be able to run the above code you need to make sure that you import System.DirectoryServices,
<%@ Import Namespace=”System.DirectoryServices” %>
Also you need to make sure Web.config has an entry for the System.DirectoryServices in its Assemblies Section,

<assemblies>
<add assembly=”System.DirectoryServices, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089″ />
</assemblies>

Written by Ajay Matharu

September 14th, 2008 at 8:06 am

Posted in Sharepoint

Tagged with