Posts

Showing posts from February, 2010

Optical mouse cam

Image
Optical mouse cam Are you using an optical mouse right now? Ever wanted to see your desktop through the eye on the bottom of it? Me neither, I already know I have to clean my desktop :-) People get bored sometimes, and when I get bored I sometimes open up stuff to find out what makes it tick. One time, I did this with an old optical mouse. Well, a mouse only has 2 chips inside: the optical sensor and a chip for the usb/ps2-interfacing. I looked up the datasheet of the optical sensor (which is an  ADNS2610 ) and it told me the sensor has a tiny 18x18 CCD,  which can be read out using the serial port  (the one which normally interfaces to the PS2/USB-chip). So I start Visual Basic (I usually do my stuff under Linux, but I'm no star at using anything graphical like QT or GTK, so for this quick'n'dirty project I fell back in my old habits) and hack something up using a few wires to the trusty ole parallel port. The result: crisp lo-res b&w imaging :-) As you can see, ...

C# – BinaryFormatter.Deserialize is “Unable to find assembly”

While testing a SQL CLR procedure recently I came across an issue with the binary formatter deserialization failing because it could not find the assembly for the type (even though the type is within the same assembly as the deserialization code). The database application I have been working on has an initial request object (from a web service or web site) that is serialized using the binary formatter and stored in a Request table. It is then added into a Queue to be processed by one or more Service Broker services at a later time. The serialization and deserialization of the request object is performed by a SQL CLR procedure, utilising the “System.Runtime.Serialization.Formatters.Binary.BinaryFormatter” formatter. While testing that the Service Broker was configured correctly I was reusing the same Request table data, where the request object had previously been serialized and saved to the table. However I quickly noticed that after re-deploying the SQL CLR project I was running into ...