Symmetry

Just wanted to save a nice expression I read about yesterday:

  1. 1 << n >> 1  


The value returned is 2^n/2, or 2^(n-1). I just thought it looked lovely :)

Comments

Popular posts from this blog

Posting dynamic Master / Detail forms with Knockout

Comparing Excel files, take two

EF Code First: seeding with foreign keys