On the way to Cambridge...
Thursday, December 24, 2009
Cambridge, UK
On the way to Cambridge...
Monday, November 16, 2009
Both my articles on SpringerLink
Friday, November 13, 2009
My "Self-built grid" published
Thursday, November 12, 2009
Tuesday, November 10, 2009
It's a GO for my PhD Thesis
Wednesday, November 4, 2009
Friday, October 23, 2009
How many classes can a single .NET DLL contain?(VS2010 + Parallel)
Tuesday, October 20, 2009
How many classes a single .NET DLL contain?(Log)
Monday, October 19, 2009
How many classes can a single .NET DLL contain?(2)
After 3 hours on a IBM ThinkCentre machine @2GHz with HT and 2GB of RAM, I was able to create only aprox. 200.000 types. I try again on my personal computer and let it run for the whole night... :)
Here's a link to the application.
Have fun... :)
See you with new results late on... :)
Saturday, October 3, 2009
How many classes can a single .NET DLL contain?
Hello all…
There’s a common question in a programming interview that sounds like this:
“How many classes can a single .NET DLL contain?”
I did a little research on the web and I saw that lots of people think that the number is unlimited. Well, in my opinion, this is wrong!
Let me clarify this! Inside MSDN there’s a section on Overview on .NET Framework that contains a section on Metadata and Self-Describing Components. In this section you will find out how metadata is stored inside a Portable Executable and what is the structure of Metadata. When you are looking inside “Metadata and the PE File Structure” , you will find out that each element of your program is stored in a “Metadata table”(one for classes, one for members, a.s.o.). Each element is identified by a “Metadata token” and it’s definition is: ”Each row of each metadata table is uniquely identified in the MSIL portion of the PE file by a metadata token.Metadata tokens are conceptually similar to pointers, persisted in MSIL, that reference a particular metadata table.”(see MSDN). After this section, there is an explanation of these tokens. “A metadata token is a four-byte number. The top byte denotes the metadata table to which a particular token refers (method, type, and so on). The remaining three bytes specify the row in the metadata table that corresponds to the programming element being described.”
Let me stop here. If a class is identified in the metadata table using a metadata token and the metadata token is a four-byte number, this means that the number of classes that an assembly can contain is smaller than the biggest number on 3 bytes (the first byte is a connection to the metadata table type). The biggest number on 3 bytes is 2^24– 1 or 16777215.
Therefore, the maximum number of classes (and classes members) that a .NET assembly can contain is 16777215. Am I right? (Wait for comments!)
That’s nice, right? :)
If I’ll have the time, I’ll try to write some code that will generate an assembly with more than 16777215 classes and see if I can use it… :)
Happy coding…
P.S.: Next time when I’ll ask this question on an interview, I’ll be careful on the answer!
Monday, September 21, 2009
Laws of Robotics
Saturday, September 19, 2009
Thursday, September 17, 2009
Optional keyword in C#
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! :)
Saturday, September 5, 2009
Developer must have tools
Hello…
I’ve just read a blog with a list of tools that very dev must have. You can find the list here: http://www.hanselman.com/blog/ScottHanselmans2009UltimateDeveloperAndPowerUsersToolListForWindows.aspx
Thursday, August 20, 2009
How safe is Marshal class?
Thursday, August 13, 2009
Project management resource
Tuesday, August 11, 2009
Create objects in remote/other AppDomains + unload assemblie(2)
Monday, August 10, 2009
Create objects in remote/other AppDomains + unload assemblies
Friday, July 17, 2009
Number of threads in Windows (7)
Saturday, July 4, 2009
How to get your data after some partition manager deleted your data
Hi there...