Category : Code Snippets

16 Apr

A little better MeasureString…

by Marco Mastropaolo

System.Drawing.MeasureString is a shit. You are better work it out with API calls and so on, but if you are on Mono that is out of choice. Apart from the known problems (not working correctly without Antialiasing enabled, requiring specific StringFormats), it also skips trailing spaces. At least this should fix that issue up: int [...]

Filed Under: .NET, Code Snippets, Programming

12 Feb

Ajax problem on Firefox

by Marco Mastropaolo

Just a quick problem report with solution. If you get : Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]” nsresult: “0×80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: http://www.********.*** :: **** :: line **” data: no] Check if you did a “xhr.send(null);” and convert to “xhr.send(”);”. Don’t ask me why, it worked for me. Take it [...]

Filed Under: Code Snippets, Programming