Posts

Showing posts from January 11, 2019

Where in the V8 source does the automatic cast for BinaryOperation occour?

Image
0 I stumbled again in the good old '12' + 2 = '122' I wanted to deeply understand what happens here, so my first thesis was that Maybe Javascript casts the right operand to the type of the first one and then operates, like so: '12' + String(2) = '122' all good... But no, because 12 + '2' = '122' too; So the engine's magic is clearly favoring to concat over casting to number. My second thesis was then Maybe the engine enumerates all operands and looks for an "operator override", similar to C#? And then favor executing that over doing the self-magic thing? My confusion got even weirder when I realized that also '5' * '8' = 40 , it casts both operands to Number and does the operation. The only way I could possibly

Vertical help lines only in tiKz

Image
9 The following tiKz code gives you a 100x10 grid of help lines. draw [help lines, dashed] (0,0) grid(100,10); What is the code if you just want the 100 vertical helplines but not the 10 horizontal ones? tikz-pgf share | improve this question asked Mar 5 '15 at 12:31 iank131 iank131 48 6 Welcome to TeX.SX! You can have a look at our starter guide to familiarize your