Noe. Nicht noch eine Webseite wo ich ein Konto hab. Wenn es nicht unbedingt sein muss (Onlineshop) oder es absehbar ist, dass ich eine Seite oefter besuche (this), mach ich keine Konten mehr auf.
hehe, wie ich schon schrieb ich hab mich bei experts-exchange 99 angemeldet, da kannte ich das selfforum noch gar nicht und erstaunlicherweise existiert der Account noch und ich finde meine alten Antworten, ein Stück Geschichte für mich.
Also hier die Antworten im gennanten Thread, ich hoffe ich hab die richtigen Sachen gelöscht:
-----------------------
bigphuckinglizard:
change the 255 to a 0 and you'll get the same number each time.
10.20.2006 at 06:27AM PDT, ID: 17773467
-----------------------
gangwisch:
rnd is a function for producing a random value
10.20.2006 at 07:55AM PDT, ID: 17774275
-----------------------
OliWarner:
Rnd() values are changing everytime in ASP.NET
As gangwisch said, Rnd() gives a random number... Why would you expect a random number to stay the same?
ROFL@ bigphuckinglizard's answer =)
10.31.2006 at 04:58AM PST, ID: 17841507
-----------------------
Jivlain:
Rnd() is a function for producing a value, as OliWarner said.
Each time you call the Rnd() function you will get a different value.
However, you can get the numbers to come out in the same order each time by calling
Try this:
Randomize(25) 'whatever number here will affect which set of numbers will come up
for i=0 to 10
Response.Write rnd(100).ToString()+"<br>" 'print a number between 0-99
next
Now note I haven't actually tested this... but theoretically it should print 10 numbers to the page. They'll all (probably) be different. But the same 10 should come up each time.
Gosh, it's been a very long time since I've used VB ;)
11.01.2006 at 03:45AM PST, ID: 17848755
-----------------------
Jivlain:
Hmmmm, I've actually tested this version...
Randomize(25) 'whatever number here will affect which set of numbers will come up
Dim i As Integer
For i = 0 To 10
Response.Write(CInt(Rnd() * 100).ToString()+"<br>") 'print a number between 0-99
Next
If you actually wanted to round a number, use CInt(x)
11.23.2006 at 01:28PM PST, ID: 18004815
-----------------------
pinaldave:
genesiscircle,
This question has been classified as abandoned as there are no comments from more than 21 days. I will make a recommendation to the moderators on its resolution in approximately 4 days. I would appreciate any comments by the experts that would help me in making a recommendation.
It is assumed that any participant not responding to this request is no longer interested in its final disposition.
If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help.jsp#hs5
pinaldave
EE Cleanup Volunteer
11.27.2006 at 01:44PM PST, ID: 18022926
-----------------------
Workshop_Alex:
Interesting addition: this question made it to the Daily WTF. See also http://thedailywtf.com/forums/thread/103463.aspx
Doesn't seem that fair to me though. When testing an application, you might want to set a starting seed for the random numbers so you can predict which number will be next. Therefore I think Jivlain gave a correct answer to a perfectly valid question.
11.28.2006 at 08:08PM PST, ID: 18034247
-----------------------
simon_thwaites:
Try this function
Function UnRnd()
UnRnd = 4 'my favourite number!
End Function
IntTemp = Int((255 * UnRnd()) + 1)
11.30.2006 at 04:10AM PST, ID: 18044554
-----------------------
OliWarner:
Yeah 4 is a good number
Recommend simon_thwaites for the points =)
03.11.2007 at 08:51PM PDT, ID: 18699461
-----------------------
Workshop_Alex:
I'd just suggest to delete this Q because the question is just too dumb. :-) Seems to me that whomever asked it wasn't even serious. (Else he needs another job.)
03.12.2007 at 01:11AM PDT, ID: 18700376
-----------------------
OliWarner:
Very much agreed. This thread is just too silly.
Suggestion: Move it to the lounge for more silliness to ensue or delete it.
03.12.2007 at 03:56PM PDT, ID: 18706506
-----------------------
Jivlain:
Aw, come on. I'm sure I could use the points for something ;)
Even if I did come to this thread off The Daily WTF.
Though it is a shame that Simon's alternate function didn't take advantage of the golden opportunity to include the number "42".
-----------------------
Struppi.