Tuesday 23 October 2012

MathML

What is MathML?

MathML 3.0 was released as a W3C Recommendation on 21 October 2010. It is a revision of MathML 2.0, issued seven years ago. A product of the W3C Math Working Group, MathML is a low-level specification for describing mathematics as a basis for machine to machine communication which provides a much needed foundation for the inclusion of mathematical expressions in Web pages. It is also important in publishing workflows for science and technology and wherever mathematics has to be handled by software. The new version brings, for instance, improvements for accessibility of mathematics, and for formulas in languages written from right to left. 


Mathematical Markup Language (MathML) is an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae intoWorld Wide Web pages and other documents. It is a recommendation of the W3C math working group.

Wednesday 3 October 2012

Called id for nil


 "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id"
As a Ruby on Rails developer I am very much familiar with the above kind of error and often i used to bang my head as to why this.... and at last am able to find the reason behind it.

When Ruby interpreter boots up it initializes FalseClass, TrueClass and NilClass. As we know that false, true variable work 
exactly the same way as nil does.They are singleton instances of 
FalseClass and TrueClass,respectively.


false.object_id
 => 0

true.object_id
 => 2

nil.object_id
 => 4

What happened to 1 and 3? Well, the first bit is reserved for Fixnum values (numbers) only