Fork me on GitHub

Other articles

  1. Bcrypt with Rails

    Bcrypt is an algorithm for hashing passwords that can be implemented in many programming languages. When a user signs up or logs in, the password they entered is sent to the server. SSL should be used for this stage, but that is separate from bcrypt. Bcrypt's job is to ...

    read more
  2. Decimal to Change Number Precision

    The built in math functions in Python use binary approximations, giving some funky results when dealing with numbers containing decimals:

    >>> .1 + .2
    >>> round(100.00 / 3.000, 4)

    One way to appropriately find the sum of decimals is to use strings

    >>> str(.1 + .2)
    '0.3 ...
    read more

Page 1 / 2 »