Monday, September 21, 2009

Laws of Robotics

Zero Law:
A robot may not harm a human being, unless he finds a way to prove that in the final analysis, the harm done would benefit humanity in general.
First Law:
A robot may not injure a human being or, through inaction, allow a human being to come to harm.
Second Law:
A robot must obey any orders given to it by human beings, except where such orders would conflict with the First Law.
Third Law:
A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
Forth Law:
A robot must establish its identity as a robot in all cases.
Fifth Law:
A robot must know it is a robot

Thursday, September 17, 2009

Optional keyword in C#

Hi there...

Wouldn't be nice if C# had a optional keyword for the methods/properties in an interface?

interface IMyInterface
{
optional void OptionalMethod();

void NotOptionalMethod();
}

public class MyClass1 : IMyInterface
{
public void NotOptionalMethod()
{
//implement the method...
}
}

public class MyClass2 : IMyInterface
{
public void NotOptionalMethod()
{
//implement the method...
}

public void OptionalMethod()
{
//implement the method...
}
}
I’ve created a thread where you can comment on this.

Wednesday, September 9, 2009

SGAI-2009 Conference

Hello…

An article of mine on neural networks was accepted to SGAI-2009 conference.

The article will be uploaded soon.

World Wide Web Publishing Error 87

Sometimes ago, I’ve encountered an error when starting the IIS web server. After some looking inside Event viewer, I saw that the World Wide Web Publishing service was unable to start due to the Error 87: The parameter is not correct.

Looking over the Internet, I found all kinds of solutions from resetting the Windows sockets (using netsh winsock reset) to reinstalling the Windows (I hate this last solution! :) ).

But I’ve remembered that I had a problem with the DTC service when invoking a service and I had to modify some registry. The correct registry are:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc]
"DCOM Protocols"=hex(7):6e,00,63,00,61,00,63,00,6e,00,5f,00,69,00,70,00,5f,00,\
  74,00,63,00,70,00,00,00,6e,00,63,00,61,00,63,00,6e,00,5f,00,73,00,70,00,78,\
  00,00,00,00,00,00,00
"UuidSequenceNumber"=dword:00fd313a

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\ClientProtocols]
"ncacn_np"="rpcrt4.dll"
"ncacn_ip_tcp"="rpcrt4.dll"
"ncadg_ip_udp"="rpcrt4.dll"
"ncacn_http"="rpcrt4.dll"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\NameService]
"DefaultSyntax"="3"
"Endpoint"="\\pipe\\locator"
"NetworkAddress"="\\\\."
"Protocol"="ncacn_np"
"ServerNetworkAddress"="\\\\."

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\NetBios]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\SecurityService]
"9"="secur32.dll"
"10"="secur32.dll"
"14"="schannel.dll"
"16"="secur32.dll"
"1"="secur32.dll"
"18"="secur32.dll"
"68"="netlogon.dll"

Hope this helps someone/stops him to reinstall Windows! :)