letters = ("a".."z").to_a
letters.each_index do | l |
r = rand(letters.length - 1);
letters[l],letters[r] =letters[r],letters[l]
end
string = letters[0,rand(8)].to_s
if string.empty?
random_text
else
return string
end
end
print %^^
it is what you are looking for ?
stefan s. wrote:
···
hi
i´d like to fill out a html webform with ruby with randomly generated
values. an example:
Open IIS Help, which is accessible in IIS Manager
(inetmgr), and search for topics titled Web Site Setup, Common
Administrative Tasks, and About Custom Error Messages.
-a
···
On Wed, 26 Nov 2003, stefan s. wrote:
Date: Wed, 26 Nov 2003 16:07:31 +0100
From: stefan s. xschmidix@gmx.net
Newsgroups: comp.lang.ruby
Subject: another stupid question: filling out webforms
hi
i´d like to fill out a html webform with ruby with randomly generated
values. an example:
The difference between art and science is that science is what we
understand well enough to explain to a computer.
Art is everything else.
– Donald Knuth, “Discover”
/bin/sh -c ‘for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done’
===============================================================================
letters = ("a".."z").to_a
letters.each_index do | l |
r = rand(letters.length - 1);
letters[l],letters[r] =letters[r],letters[l]
end
string = letters[0,rand(8)].to_s
if string.empty?
random_text
else
return string
end
end
print %^^
it is what you are looking for ?
stefan s. wrote:
hi
i´d like to fill out a html webform with ruby with randomly generated
values. an example: