Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Orchard 1.6.1
  • Tine 2.0 Kristina 2013....
  • Acorn Media Player 1.8
  • ZenPen
  • Google Language Transla...
  • tTooltip 2.0
  • Obfuscate.js
  • validationJ 1.0.0
  • Starling 1.3
  • Video Sidebar Widgets 5.5
  • Home > Scripts > Snippets

    Random key from Ruby Hash

    Download button


    Downloads: 607  Tell us about an update
    User Rating:
    Rated by:
    Good (3.4/5)
    23 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    aiosup | More scripts
    snippets.dzone.com
    Freeware 

    Windows / Linux
    N/A
    Ruby
    June 27th, 2007, 07:18 GMT
    C: \ Snippets

     Read user reviews (0)  Refer to a friend  Subscribe

    Random key from Ruby Hash description

    Random key from Ruby Hash - extract a random key from the keys that have not been extracted before.

    I needed a Ruby Hash class that could extract a random key from the keys that have not been extracted before. Plus that the class should be re-entrant...

    I found baby's class, but it was not working (at least not in Ruby 1.8.x). I made it work (slight changes), and I added the keys_not_used to make it work faster (baby's random would cycle almost forever on large lists). But I would say all credit should go to the original author, who did all the hard work.



    TAGS:

    Random key | Ruby Hash | ruby snippets | Random | key | Ruby

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM