Answer to emoticon conundrum http://xkcd.com/541/
When on Mac, press option+command+t and select the happy face character. Unfortunately that don't solve the problem entirely, there's no wink character ;-)
Wednesday, December 15, 2010
Enable Aero Glass on Yahoo Messenger
To enable aero glass on Yahoo Messenger. right click YahooMessenger.exe, choose Properties, Compatibility and check Disable Visual Themes
Tuesday, December 14, 2010
Open Finder from Terminal
Use: open .
That will launch Finder from /etc/apache2 folder
Michael-Buens-MacBook:~ Michael$ cd /etc/apache2 Michael-Buens-MacBook:apache2 Michael$ Michael-Buens-MacBook:apache2 Michael$ open .
That will launch Finder from /etc/apache2 folder
Decimal and Float Gotchas
I advised my brother(they use Postgres in their work too) to use decimal(aka numeric) instead of float. I told him decimal follows paper and pencil approach for computation, and float is a binary system for approximating decimal number and as such is more prone to irregular representation of number.
Today my brother ask me why this doesn't show 1:
Outputs: 0.99999999999999999996
What I answer is, numeric is honest; if it shows you it's not 1, it's not 1. While float might look like 1, but it's not exactly 1. Example:
Outputs:
Today my brother ask me why this doesn't show 1:
select 1::numeric / 12 * 12
Outputs: 0.99999999999999999996
What I answer is, numeric is honest; if it shows you it's not 1, it's not 1. While float might look like 1, but it's not exactly 1. Example:
select n, z, z = 1 as is_equal from ( select n, 1::float / n * n as z from generate_series(41,50) as x(n) ) as x
Outputs:
n | z | is_equal ----+---+---------- 41 | 1 | t 42 | 1 | t 43 | 1 | t 44 | 1 | t 45 | 1 | t 46 | 1 | t 47 | 1 | t 48 | 1 | t 49 | 1 | f 50 | 1 | t (10 rows)
Subscribe to:
Posts (Atom)