Don't worry, it's ok now, my years old computer that I can't get myself to replace. The experience has been very educational and I want to share it with you. Here is what happened: the computer that I keep always on started making strange clanking sounds; they came from the HDD. I got a little concerned, but I didn't have the time to address the problem right then. The computer seemed to work fine so I continued (btw, don't you do that in the same situation :) ) to work on it. Finally the computer reset itself and it wouldn't boot. Or, better said, it would boot for a second and restart. I checked the hard drive cables, I removed and cleaned the processor cooler, I vacuumed the power source. Nothing worked. I took the IDE drive from an older Duron computer and tried to boot with that one. It didn't work either, but then again, I had no guarantee that the old drive was functional.

I was really upset. I had an exam to take, all my data was lost, I had a full schedule for days and, being the end of the month, not enough cash to buy a computer right away. And I needed bank loan formalities like I needed an anal probe. But, I thought, maybe I can take the hard drive at work and copy the data, or at least part of it. And it worked. In fact, the drive worked so well at work that I began to doubt that the HDD had any problems. What could it be? I did have a feeling that it might be from the processor cooler that I had removed to clean. After years of use, the thermoconducting gel that transferred heat from the CPU to the metal radiator was only a dusty crust. I decided to buy a cooler or at least some gel.

Of course, any computer shop that was near my work did not have coolers for my old Athlon processor, so I bought gel and then (to be sure) also a cooler for a more recent processor type. I went home, saw that the radiator was way too large for the processor so I removed the fan from the new cooler and placed it (using ingeniously twisted wires) on the old radiator, then applied it with new gel on the processor. And the computer began to work with no drives attached to it. However, attaching the drive would make it reset itself again.

The culprit was, I assumed, either the motherboard (oh no!) or the power source. I removed the old power source from the Duron computer and replaced it on the Athlon computer. And it worked! With wires and thermoconducting gel I brought my baby back to life. I was better than MacGyver! However, the new source would make a really high pitch sound when I turned the computer off and a loud fan noise when I turned it on. I had no intention of buying a new power source for an old computer, I just wanted to make it work.

So I went to my office and borrowed three power sources that had been replaced with newer models. Went back home... none of them worked. As computer parts go, the power source is both the most solicited and the less standard item. There are unlimited ways a power source can fail and the effects on the computer are always surprising. All three displayed some (different) sort of partial functionality. I was considering opening them up and making a Frankensteinian source from them. I know nothing of electronics, but how hard can it be (vision: me burned to a crisp by an electrical fire after having my heart stop due to electric shock). However, I did remember that the source in the Athlon computer was not the original source. I had replaced it with a newer model a while ago and I had kept the old one. I rummaged through my stuff and found the old power source. It worked, it had a somewhat loud fan, but not that loud and it didn't make any electrical high pitched noises. Saved!

I was congratulating myself on repairing the computer using only the things in my house (all but the new cooler) when I remembered that I had an old 500Gb external drive that wouldn't work unless you applied power from the computer power source to the internal drive in the box. And so I did that (using wires again, because the adapter from the old power port to the new got lost somewhere) and backed up all the data from the drive that I thought died. Now I have a backup!

And if I am here, why not borrow a voltmeter and try to figure out how to wire up this external drive so I can use it without all the wires sticking out of it? So the story continues, as this is what I intend to do. I am a guy, tinkering is in my DNA, and it is so satisfying. Also, it helps seeing the uncomprehending look on my wife's face and the horror in her eyes when she sees more wires. It's fun! :)

Today I went and certified myself as a Windows Communication Foundation developer in .Net 4.0 (exam 70-513). I passed with 1000/1000, which makes me "strong" in all areas of the exam. It was difficult, too, as there is no official preparation material for the exam. You have the old 3.5 preparation book for the 70-503 exam and then you have to guess about the things that are in 4.0. Basically, you can read the book, then study a little about the router services, service discovery and simplified configuration. I found a nice post on James J. Foster's blog detailing the material that needs study, with links. Also, here is a link on MSDN about what is new in WCF 4.0.

The problem with the exam is that I had found the questions (the real ones) on the web. You can download them and simulate exams until you remember all of them and their answers. These are called brain dumps (.vce format) and apparently it is the norm rather than the exception; Cisco exams are just the same. It was too weird to be true and, frankly, the whole point of taking these exams was to actually learn something in a structured way, so I was both hoping that those were the real questions and also that they were not and I will have the opportunity to test myself on what I have learned. Alas, it was not the case. I knew all the questions already and this has soiled the entire experience and grade.

Actually, when you think about it, it makes sense. Microsoft needs to show how serious they are about the whole test thing and ignore the elephant in the room altogether, pretending the answers are not out there. Meanwhile, the companies that organize the tests need those answers public, otherwise nobody would dare come take them and thus pay for them. I mean, really... 50 questions of increasing obscureness and a minimum passing grade of 800/1000 ? Who would even consider testing themselves against sets of four questions where one of them would throw a compiler error, one of them would be completely off topic and the other two were competing on which one gets the most hard to remember, one google-second away configuration setting that would make your brain explode. The ugliest thing is that people learning this stuff normally have little to no chance of getting every question right, even if in the official preparation books you find stuff like "Exam tip: beware questions in this format, as they will always be incorrect, but we will ask them anyway so we can trap you if you didn't read our material".

So, bottom line. I am proud of myself for actually studying for this. I feel I know a lot more about WCF and the powerful ways in which I can make it work for me. But the fact that any kid can download a file, do a dozen test runs on their home computer and then take the test and achieve the same perfect score soils it a little.

Well, this makes me a MCTS. I have 3 more exams to take and then I will become a MCPD. It's like achievements in games, only they are worth something.

and has 0 comments
I was trying a piece of code and I was amazed to see that Math.Round(4.5) results to 4! 1.5 leads to 2, 2.5 leads also to 2, 3.5 leads to 4, as does 4.5. According to the MSDN documentation on Math.Round, The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding to nearest, or banker's rounding. It minimizes rounding errors that result from consistently rounding a midpoint value in a single direction. To control the type of rounding used by the Round method, call the Math.Round(Double, MidpointRounding) overload. That's nice and everything, but it contradicts the description of the method on the same page: Rounds a double-precision floating-point value to the nearest integral value. It also contradicts the behaviour of Javascript's Math.round in Microsoft's browser Internet Explorer.

The solution for this is to use the overload Math.Round(value,MidpointRounding.AwayFromZero). Math.Round(4.5,MidpointRounding.AwayFromZero) equals 5. If you don't know that, like I did after 5 years of .Net, you are pretty much screwed. So be wary of helpful mathematical functions.

and has 0 comments
Update: this is more of an exploration post, not something serious on how to achieve the desired result. For a construct that actually works like a switch, check this post out: Creating a C# construct that acts like a more complex switch/case

Many a time I had to select a different behaviour based on the type of a boxed object. The usual solution for this is an ugly stream of if statements that check for the type and then return if found. A while ago I was writing about the dynamic keyword and how it can be used to declare a method for each specific type that is then executed from a simple method having the boxed object as a parameter. Some people liked it, some did not. What would have been nice is a switch statement that works with types, something like:
switch(obj.GetType()) 
{
case typeof(MyClass1):
// do something with obj
break;
case typeof(MyClass2):
// do something else with obj
break;
default:
throw new NotSupportedException();
}
Alas, this is impossible in C# due to the fact that typeof(class) is not considered a constant, but a method call.

What I am about to present to you is in no way a best practice, but something that I've cropped up in my wild musings on code: why not use the try/catch blocks as a switch statement? The idea is simple: create a generic Exception class then throw it based on the type of the object, then catch the specific generic Exception class. Here is the code, enjoy:
class Program
{
public class BaseClass
{
}

public class InheritedClass1 : BaseClass
{
}

public class InheritedClass2 : BaseClass
{
}

public class TypeCatchBlockException : Exception
{
public static void Throw(object obj)
{
doThrow((dynamic)obj);
}

private static void doThrow<T>(T obj)
{
throw new TypeCatchBlockException<T>();
}

/*public static void Throw(object obj)
{
var type=obj==null?null:obj.GetType();
var exceptionTypeName=typeof(TypeCatchBlockException)+"`1";
Type generic=Type.GetType(exceptionTypeName).MakeGenericType(new[]{type});
throw (Exception)Activator.CreateInstance(generic);
}*/
}

public class TypeCatchBlockException<T> : TypeCatchBlockException
{
}

static void Main(string[] args)
{
showObjectType(new InheritedClass2());
showObjectType(new BaseClass());
showObjectType(new InheritedClass1());
showObjectType(new object());
Console.ReadLine();
}

private static void showObjectType(object obj)
{
try
{
TypeCatchBlockException.Throw(obj);
}
catch (TypeCatchBlockException<BaseClass>)
{
Console.WriteLine("BaseClass object");
}
catch (TypeCatchBlockException<InheritedClass1>)
{
Console.WriteLine("InheritedClass1 object");
}
catch (TypeCatchBlockException<InheritedClass2>)
{
Console.WriteLine("InheritedClass2 object");
}
catch (TypeCatchBlockException)
{
Console.WriteLine("Unsupported object");
}
}
}


So there is the simple class TypeCatchBlockException that has a Throw method. You have the dynamic implementation as well as the reflection implementation in the commented region. You execute Throw with an object inside a try block and then you add a catch block for each generic version of the exception for each supported type. The last block is reached if none of the supported types were encapsulated into the exception object.

Executing the console application in the code block results in:
InheritedClass2 object
BaseClass object
InheritedClass1 object
Unsupported object


Update: Some people didn't understand this was mostly a joke, so I needed to clarify it. We do need type switches and someone should implement them as a language construct. Throwing exceptions is expensive and the solution in this blog post would not be recommended for any production software.

But here is a nice solution for type switching using lambda expressions: Switching on Types.

and has 3 comments
I am the kind of guy that uses a piece of software until he has a really good reason to change it. I don't try new stuff if I am satisfied with what I've got and I am all for second chances when mistakes are made. After all, I am not immune to the occasional error. However, from this day on I am fully switching from Internet Explorer to Chrome.

Wipe that smirk off your face, I happen to think that IE is a reasonable browser and, given the hypothetical situation where Google would have made their browser compatible with Internet Explorer rather than the standards, you would all curse at FireFox right now. Besides, this is not about the standards at all. Firefox is still not on my list of available choices. It is sluggish, pretentious and buggy.

The thing is that parameters have changed. I now use the browser to quickly get answers to questions or to open RSS feed blog articles. Before I was using it to make ASP.Net applications and web applications and I still think Internet Explorer 8 developer tools are nicer and easier to use than Firebug, not to mention the horrible confusing developer tools on Chrome. Now I am free (partially) of web development and I can rejoice. Also, sites were more compatible with IE than any "standard" browser and it is not the case any more.

The downloading window from Internet Explorer always made more sense to me: have an option of Open, Save and Cancel and do it in another process so you can close the windows that spawned the download. Then it opens or you just go to the file and use it, you know where you saved it. I think this is the only thing I will miss from Internet Explorer, though.

Let's summarise:
  • Chrome opens instantly, letting you write something in the address bar immediately and having autocomplete for search term as well as web addresses. Internet Explorer blocks the CPU for a second or two and, even if it lets you write something in the address bar, it hickups just so that what you wrote is truncated. Firefox is so keen to update every fucking extension that it takes forever to start. Yeah, I know, FF4 is way better. Not compared to Chrome it isn't.
  • Internet Explorer is supposed to support the new Silverlight wonder technology. Unfortunately, every single SL video I open is sluggish, blocks my mouse, doesn't respond to simple commands like Space to pause and arrows to skip and every Silverlight app is alower than their Flash counterpart. I've just wasted one hour today to uninstall with a special tool the older Silverlight version as the installer for the new one brutally stopped with a "generic error message". Well, screw that! I would rather download the videos and run them in a "generic" video player
  • Javascript: it works 8 times faster on Chrome that on Internet Explorer 8. I know they've just released Internet Explorer 9, but it won't work on Windows XP. I have an old computer, it works fine, I want a browser for it without buying a trillion dollar Windows 7 license. You can't provide it for me, Microsoft!
  • HTML5: it is supported in Chrome. If I ever want to start web dev again, I would go with that
  • Extensions: I am not a big fan of extensions as they slow the browser down. I do prioritize speed. However, I have AdBlock Plus installed on Chrome and I couldn't install it (even if I have tried emulating it) on Internet Explorer. Having no flashing nonsense on a page when I am reading the text on it is wonderful. Try it!


I could find even more reasons if I think about it longer. Like a long relationship going bad, you start noticing all the things you hated only after you break up, but break it up I do. So there it is, found me a new girlfriend and she is chrome shiny.

As you know, the uberuseful tool Reflector, originally developed by Lutz Roeder, was bought by Red Gate, with promises that the tool will always remain free for its users. Of course, the first thing they did is to create a commercial version of it with some extra features, but they did keep their word by allowing people to use a free version. Recently they changed their minds again, practically saying "Fuck you, developers!" and asking for money for any version of Reflector. The community was outraged.

Enter Jetbrains, my favourite company, the one that would have replaced Google and Microsoft at the top of the development world if they weren't so busy actually developing. They are also the makers of ReSharper, which you should download and use if you are any decent C# programmer. What did they think of this Reflector fiasco? They've decided to build a version of their own! They did bundle it in ReSharper 6, which is a commercial tool, but then... they promised to make it a free standalone tool! Thumbs up, guys!

Here is the blog entry announcing this: ReSharper 6 Bundles Decompiler, Free Standalone Tool to Follow

and has 0 comments
I am not one for jokes, really. Actually, I am quite a neurotic person always fixating on the negative. But this story really made me laugh. It is a bit geeky, but not too much and I think that anyone who ever went to a job interview can relate.

Here it is: What would Feynman do?

and has 3 comments
You may want to create an image from a Stream or from a file on the system. You would want to use the static methods Image.FromStream or Image.FromFile to do it. However, you soon realize that this would not work if you immediately dispose the stream. Also, trying to delete the file would result in a locked file error. Could it be that some reference of the stream or file is kept in the resulting Image object? The answer is yes.

Microsoft explains it like this: GDI+, and therefore the System.Drawing namespace, may defer the decoding of raw image bits until the bits are required by the image. Additionally, even after the image has been decoded, GDI+ may determine that it is more efficient to discard the memory for a large Bitmap and to re-decode later. Therefore, GDI+ must have access to the source bits for the image for the life of the Bitmap or the Image object. And they have a fix to this, here: Bitmap and Image constructor dependencies

As you can see in the link above, their solution is different from indexed versus non indexed images. You can determine if an image is indexed or not by looking at the PixelFormat property. Also, you need to do some pretty weird stuff in the indexed case and there is no code on the Microsoft page. So here is a helper class I've cropped up to get images from Stream, File or byte array without locking any of the original resources:

/// <summary>
/// Helper for Image objects
/// </summary>
public static class ImageHelper
{
/// <summary>
/// Get an image from a byte array
/// </summary>
/// <param name="iconBytes"></param>
/// <returns></returns>
public static Image GetImageFromBytes(byte[] iconBytes)
{
if (iconBytes == null || iconBytes.Length == 0)
return null;
using (MemoryStream ms = new MemoryStream(iconBytes))
{
try
{
return GetImageFromStream(ms);
}
catch
{
return null;
}
}
}

/// <summary>
/// Get an image from a file without locking the file
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
public static Image GetImageFromFile(string fileName)
{
try
{
using (var stream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
return GetImageFromStream(stream);
}
}
catch
{
return null;
}
}

/// <summary>
/// Determines if an image is indexed (with a color palette)
/// </summary>
/// <param name="image"></param>
/// <returns></returns>
public static bool IsImageIndexed(Image image)
{
switch (image.PixelFormat)
{
case PixelFormat.Format1bppIndexed:
case PixelFormat.Format4bppIndexed:
case PixelFormat.Format8bppIndexed:
case PixelFormat.Indexed:
return true;
}
return false;
}

/// <summary>
/// Get an image from stream without locking the stream
/// </summary>
/// <param name="stream"></param>
/// <returns></returns>
public static Image GetImageFromStream(Stream stream)
{
try
{
using (var image = Image.FromStream(stream))
{
var srcBitmap = image as Bitmap;
var destBitmap = new Bitmap(image.Width, image.Height,image.PixelFormat);
if (IsImageIndexed(image)&&srcBitmap!=null)
{
Rectangle srcArea = new Rectangle(0, 0, image.Width, image.Height);
BitmapData srcData = srcBitmap.LockBits(srcArea, ImageLockMode.ReadOnly, image.PixelFormat);
Rectangle destArea = new Rectangle(0, 0, image.Width, image.Height);
BitmapData destData = destBitmap.LockBits(destArea, ImageLockMode.WriteOnly, image.PixelFormat);

IntPtr srcPtr = srcData.Scan0;
IntPtr destPtr = destData.Scan0;
byte[] buffer = new byte[srcData.Stride*image.Height];
Marshal.Copy(srcPtr, buffer, 0, buffer.Length);
Marshal.Copy(buffer, 0, destPtr, buffer.Length);
srcBitmap.UnlockBits(srcData);
destBitmap.UnlockBits(destData);
destBitmap.Palette = srcBitmap.Palette;
} else
{
using (var graphics = Graphics.FromImage(destBitmap))
{
graphics.DrawImage(image, 0, 0);
}
}
return destBitmap;
}
}
catch
{
return null;
}
}
}

and has 0 comments

From early ages we learn to listen to the people around us, but only at a later time we get to understand that what those people are saying may not be true or in our advantage. I believe this sets us up for the rest of life to partially believe even the most ridiculous claims for the sole reason that someone has uttered them. And who better to take advantage of this than politicians and lawyers.

Check out these stupid ideas:

  • Ad blocking may not be entirely legal - In other words, if someone were to help you personally to avoid all the annoying flashing and blinking and popping ads on a site, they would infringe some law of revenue. While this may sound preposterous, try googling for AdBlockPlus and you will see a myriad pages accusing successful ad-blockers of diminishing web site revenues. And if you think this is just the lament of sore losers happy to distribute their content at almost no cost on the Internet, but wanting to take money from you unencumbered, or if you think that being your browser, your computer and your money paying for the connection you should have some sort of rights, check this out: CoralQQ author arrested in 2007.
  • Free Internet porn is unfair competition to pay sites! - I may soon be accused of distributing free content on my blog as unfair competition to the ad ridden ones, if that is the case. I sure wouldn't want to hurt those, no sir. I find it terribly funny that the case against free porn was dismissed as an action designed to censor free speech (in legal terms a SLAPP).
  • Making software that allows one to make better use of software or a device, be it a computer, XBox, PlayStation or IPhone, is illegal! - As you can see from the Wikipedia link someone wrote in the first paragraph "The distribution and use of cracked copies is illegal in almost every developed country". Major arrested development! You may have heard that recently the unhackable PlayStation3 has been hacked. The funny thing is that with each new version, Sony seems to remove functionality, making PlayStation one of the few devices that are better old than new. When they found out about the hack Sony started a major law action against sites that post the hack solution for their crappy console. Apparently, their perspective is that you never owned the console, but you "rented it", while spending time to make software that allows you, the user, to do what you want with the thing you paid good money for, but is still not yours, it's illegal. They phrase it in a very funny way, too, saying that the hacking actions "are circumventing effective protection methods". Well, they aren't very effective, now, are they?
  • Major sites that distribute large content like video should pay extra; people watching should pay extra, too; ISPs should pay a lot; the Internet should be split into low rent and high rent areas. One might argue that since one does pay for the Internet connection at both ends, it should not be an issue what they are doing with it. That may be too late for Canadians, who always seemed very decent to me, as they got a new law voted on the 25th of January allowing Usage Based Billing for ISPs. People are now outraged and are protesting rather than swallow it, but already the coolness of Canada has been forever sullied in my eyes.
  • Using encryption of your own data on your own device is illegal! - The Indian government demanded that Blackberry find a way to allow authorities to read the encrypted data on their devices or at least disable the option for Indian devices, else face a national ban. Of course, they "reasoned" it is all for the sake of the people and against terrorist acts. It now seems unlikely they will proceed with the ban, but still, the whole thing begs the question: how come they didn't ask this of other device manufacturers? Also, it may be of some interest to the reader that all major instant messaging tools like Yahoo, MSN (now Windows Messenger) or GTalk do not feature encryption. Skype does, but guess what? They also provide some eavesdropping tools.



The list could go on and on and on, but these were both startlingly ridiculous and pretty recent. Apparently, the DRM bug, the one that made people sell you things and then consider it's still their property, is still alive and thriving. Most such beliefs come from the power we give other by not reacting. It is easier for us to do nothing than do something, so it is easy to take advantage by positioning the average human so that he has to do something to thwart your plans.

and has 0 comments
Kanon Wakeshima has a cool cello and voice song, taken from the soundtrack of an anime, of course, but still, a pretty cool song: Kanon Wakeshima - Suna No Oshiro




Emilie Autumn
has some really nice instrumental songs, like the one I put here, and some nice voice songs. Unfortunately I don't like the instrumentation of the voice songs. I am still looking for a perfect crazy electric violin and voice song, but it may be that singing and playing the violin is impossible or at least too difficult. So here is Emilie Autumn - Manic Depression:

and has 1 comment
It appears that a British project, secretly conducted by the Rutherford Appleton Laboratory, has produced a method of encapsulating hydrogen into microparticles of porous material. The result is something that acts like a liquid, burns like hydrogen and can be used inside normal cars without any engine modification. The price they propose is 1.5$ per gallon, which is 0.396$ per liter or 0.2915 euros. What is cool about it is that they don't need to extract any resource in order to produce this miracle fuel.

Could THIS be the end of oil? Frankly I am amazed that this news reached me and not the one about Stephen Bennington found dead in a ditch somewhere. I can only hope that the secrecy of the project paid off and that the guys at Cella Energy have really managed to find the solution while under the radar of Big Oil. Or maybe it is simply the time in which the dependency on oil has become a bigger threat to national security than the lack of funding coming from oil companies.

Link to the original news: Breakthrough promises $1.50 per galon synthetic gasoline with no carbon emissions

Update: I may have spoken too soon. A NewScientist article explains the process in a slightly different light. The beads do store hydrogen, but they must be heated in order to release that hydrogen, then the hydrogen would be used in fuel cells. That is at odds with the idea that you can use it as gasoline in a petrol tank car. Oh, well, I hope they get it right someday.

and has 0 comments
Another interesting List of Wikipedia is the list of religious texts. It's a medium sized list, although I suspect it is not nearly complete and that some of the works there are pretty big.

I am not much on religion, but I wonder what one would come to think of if presented with all the texts in the list, exposed to them without any cultural bias. Would some sort of distilation of the concept of religion emerge from it, or would everybody just choose a religion they feel more comfortable with? Or maybe they would write their own religious texts.

When I think about it, I can't help but compare it with the emergence of certain genres in fiction, like alien invasion sci-fi or comic book super heroes. First there are some original authors that come up with an idea. The idea is well liked, bought and distributed. It becomes well known so that other people start making work of their own that is inspired by that. It's almost organic, with reproduction, mutation, cross breeding and extinction. However, the integrity of religions is mostly enforced by communities of people that insist on changing nothing. They stop evolution, but also protect against extinction. Is stagnation the hallmark of religion or is it the stability that it provides in a world in continuous flux of change?

I will tell you this: I like evolution. And I mean it in the most general sense, not only the Darwinian one. I find it ironic that in my mind religion is the opposite of evolution. Or maybe that's a cultural bias. Hmm...

and has 0 comments
The Shigurui (Death Frenzy) manga is now complete. The beautifully terrible story of two exceptional samurai in a world of politics, betrayal and cultural conditioning, locked in absolute rivalry, has ended with the 84th chapter, Pure Crimson. There is an anime with the same subject, I've also seen it and it is really great, even if it stops dead after 11 episodes. I actually recommend to watch the anime and then continue with the chapters in the manga, in order to understand better the feeling of the story. It must be said that the translation from a book written by a war veteran to a graphic novel by a mangaka 58 years his young and then translated to TV anime has not lost, but gained insight and emotion.

One can read the entire manga at MangaFox.

and has 0 comments
I've never thought to check if there is such a list on the Internet, but apparently it is, as described in the xkcd comic. Good thing I at least read that! Wikipedia's List of common misconceptions is a very interesting read, many of the myths described there being reedited regularly through the media without them actually being true! So, get reading.

If you are like me, you often google a .Net class and find it at MSDN. Also, since you want the page to load quickly and get you the information you need, you probably selected the Lightweight view on MSDN. If you haven't, you should :) Anyway, a problem with MSDN is that it shows you every possible member of the class, which is especially annoying with WPF classes as they inherit from FrameworkElement that has a gazillion events. Wouldn't it be great if one could hide the inherited members from an MSDN page?

At first I thought I would parse the content of each row and detect the (Inherited from string, but it appears it is even simpler: table row elements have a data attribute that (if the member is inherited) contains the word inherited. Probably someone at MSDN wanted to make the same thing as me, but forgot to implement it (at least on the lightweight view). The javascript is simple enough:

var trs=document.getElementsByTagName('tr');
var l=trs.length;
for (var i=0; i<l; i++) {
var tr=trs[i];
var data=tr.getAttribute('data');
if (!data||data.indexOf('inherited')==-1) continue;
tr.style.display=tr.style.display=='none'?'':'none';
}
You probably wonder why I haven't used jQuery. It is because I want it to work in a javascript: url so I can put it in a bookmark! Just as with the Firebug bookmark you need to manually create a bookmark in the Favorites folder (or to add any page as a favorite, then edit its URL) in Internet Explorer or to simply add a bookmark in the browser in Chrome and Firefox and paste the one line script. To make it easier, I will write them both here. The content of the .url favorite file:
[DEFAULT]
BASEURL=http://msdn.microsoft.com/en-us/library/
[InternetShortcut]
URL=javascript:var trs=document.getElementsByTagName('tr');var l=trs.length;for (var i=0; i<l; i++) { var tr=trs[i]; var data=tr.getAttribute('data'); if (data&&data.indexOf('inherited')>-1) tr.style.display=tr.style.display=='none'?'':'none'; }; void(0);
IDList=
IconFile=http://msdn.microsoft.com/favicon.ico
IconIndex=1
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
and the javascript line to use in other browsers:
javascript:var trs=document.getElementsByTagName('tr');var l=trs.length;for (var i=0; i<l; i++) {  var tr=trs[i];  var data=tr.getAttribute('data');  if (data&&data.indexOf('inherited')>-1)  tr.style.display=tr.style.display=='none'?'':'none'; }; void(0);
.

Happy coding!