HTMPrintMeasure or basics of HTML/CSS printing

PrintEx API of htmlayout has HTMPrintMeasure function with the following signature: HPRESULT HTMPrintMeasure(HTMPRINT hPrint, HDC hdc, int scaledWidth, int viewportWidth, int viewportHeight, int* pOutNumberOfPages); I would like to explain here meanings of its parameters as I am getting questions about printing and scaling pretty frequently. First fact that we need to know: pixels in HTML…

Try/catch/finally extravaganza #3

return in finally sections is a bad idea: function foo() { try { try { return 1/0; } catch(e) { return 2; } finally { return 3; } } catch(e) { return 4; } finally { return 5; } } Probably return allowance in finally sections is a design flaw of JavaScript language itself?

Pessimistic challenge #2

And what answer will give us following function? function test() { var flavour = “optimistic”; try { return flavour = “pessimistic”, “I am ” + flavour + ” optimist”; } finally { return “I am ” + flavour + ” pessimist”; } }

Test: who are you?

What will following JavaScript function return? function test() { try { return “I am optimist”; } finally { return “I am pessimist”; } } Try to answer as this is a good chance to measure your attitude 🙂

W3C decided to reincarnate HTML development

W3C decided to reincarnate HTML development. Phylosophical difference between HTML and XHTML can be demonstraed by the fact that tag <html> is optional in HTML and is not in XHTML. By definition of XML (XHTML): Definition: A data object is an XML document if it is well-formed, as defined in this specification. In addition, the…

New forum

We have moved forum to the new location. For many reasons we like bbpress engine more than PHPBB. It is not possible to convert user accounts so please register yourself again.

TIScript goes Open Source

I have published TIScript on Google Code. and made TIScript discussion group. Everybody are welcome. Sources are available for download through any SVN client. (I am using TortoiseSVN). You can also browse them online: Folders: com – compiler int – VM and runtime dybase – DyBASE of Konstantin Knizhnik regexp – Regexp tool – is…