This Tech Cafe!

Geekry, with a mug-o-coffee by the side.



Saturday, February 1, 2014

Decimal to Binary in ruby

puts ("%08b" % 127).scan(/.{1,4}/).join(' ')
Posted by Saad Rehman at 4:47 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: ruby

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Contributors

  • Saad Rehman
  • Unknown

Labels

  • cheat-sheet (1)
  • coding (3)
  • databases (1)
  • dos (1)
  • geek (1)
  • git (6)
  • guide (1)
  • heroku (1)
  • humor (2)
  • linux (1)
  • michael-hartl (1)
  • mysql (1)
  • pid (1)
  • port (1)
  • programming (2)
  • python (1)
  • rails (1)
  • readline (1)
  • review (2)
  • ruby (3)
  • software (3)
  • software-engineering (1)
  • ssh (1)
  • tricks (3)
  • utility (2)
  • windows (2)

Blog Archive

  • ►  2015 (1)
    • ►  April (1)
  • ▼  2014 (6)
    • ►  May (1)
    • ►  April (2)
    • ►  March (1)
    • ▼  February (1)
      • Decimal to Binary in ruby
    • ►  January (1)
  • ►  2013 (3)
    • ►  September (1)
    • ►  July (1)
    • ►  January (1)
  • ►  2012 (16)
    • ►  December (5)
    • ►  November (3)
    • ►  September (1)
    • ►  August (3)
    • ►  July (1)
    • ►  June (2)
    • ►  May (1)
  • ►  2011 (1)
    • ►  September (1)

Subscribe

Posts
Atom
Posts
Comments
Atom
Comments
Travel theme. Powered by Blogger.