We Recommend

Beginning VB.NET Beginning VB.NET
Visual Basic .NET is the latest version of the most widely used programming language in the world, popular with professional developers and complete beginners alike. This book will teach you Visual Basic .NET from first principles. You'll quickly and easily learn how to write Visual Basic .NET code and create attractive windows and forms for the users of your applications.


Posted By

vanne on 07/25/07


Tagged

ruby


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

basicmagic


random string


Published in: Other 


  1. # generates a random string
  2. # thanks to snippet : http://snippets.dzone.com/posts/show/2111
  3. def random_string(size=16)
  4. (1..size).collect { (i = Kernel.rand(62); i += ((i < 10) ? 48 : ((i < 36) ? 55 : 61 ))).chr }.join
  5. end

Report this snippet 

You need to login to post a comment.