Rnd() keeps changing!



  • or, for those who don't want to blindly follow the link:

    hi all,

    IntTemp = Int((255 * Rnd()) + 1)

    I used above ASP.NET code. Problem is in " Rnd() "
    Rnd() value is changing everytime.

    What is the alternative for Rnd()? OR How will stop Rnd() value changes at everytime?



  • This question makes adult Jesus facepalm

    Jesus Facepalm



  • By checking the google cache, you can read the responses. One of the responses notes that we covered this already...



  • What the failure? ESC no longer allows you to scroll down and see all the answers! NO FAIR!



  • @Spectre said:

    What the failure? ESC no longer allows you to scroll down and see all the answers! NO FAIR!
     

    Actually, yes, it does, but only if you fake Googlebot's UA header. Also for no reason that I could possibly think of, it will also append a huge list of keywords to the page if you do this...



  • The real WTF is that they're not yet blocked from Google.



  •  or use greasemonkey addon with the experts exchange script :)



  • I just scrolled down, and I've never had to press ESC. So I don't know what you're talking about.

     

    Anyway, I love this answer:@bigphuckinglizard said:

    change the 255 to a 0 and you'll get the same number each time.



  • @Zecc said:

    I just scrolled down, and I've never had to press ESC. So I don't know what
    you're talking about.

    ESC = ExpertSexChange. ;=]



  •  Alternatively, you can delete & disable cookies for "experts" exchange. Then sometimes it works without the cache.

    Personaly, I blackholed the site because I was getting pissed off at being spammed by them every time I search for anything.



  • @Spectre said:

    ESC = ExpertSexChange. ;=]
    Ah!  :)

    Still, I only have to scroll down to see the answers. I guess I'm just lucky? I can't be bothered to investigate.



  • @halcyon1234 said:

    Personaly, I blackholed the site because I was getting pissed off at being spammed by them every time I search for anything.
    Having them come up in search results is spamming?



  • @belgariontheking said:

    @halcyon1234 said:

    Personaly, I blackholed the site because I was getting pissed off at being spammed by them every time I search for anything.
    Having them come up in search results is spamming?

     

     

    Close enough. It's an unwanted result for a commercial product. The results are unrequested, and there's no way to tell google to stop showing them to me (short of appending -site:experts-exchange.com to every search).



  • @belgariontheking said:

    @halcyon1234 said:

    Personaly, I blackholed the site because I was getting pissed off at being spammed by them every time I search for anything.
    Having them come up in search results is spamming?

     

    It sort of is, if you have to pay/register for it.

    And the worst part is that nowadays faking the googlebot UA header isn't enough most of the times, you'd also have to fake google's IP-adresses.



  • @dtech said:

    And the worst part is that nowadays faking the googlebot UA header isn't enough most of the times, you'd also have to fake google's IP-adresses.

     

    Um... which for TCP-based connections you do ... how ... again?



  • @Zecc said:

    @Spectre said:

    ESC = ExpertSexChange. ;=]
    Ah!  :)

    Still, I only have to scroll down to see the answers. I guess I'm just lucky? I can't be bothered to investigate.


    Wow, I used to advocate the "just scroll down" method, as you do, but as of now, unless I fake the google UA, I get a totally different page when I visit the link in the OP, with no content to be found anywhere.



    Blatant cloaking. Can't believe they're getting away with it.



  • Anyone notice the selected answer, dated over a year and a half ago?

     

    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".

    Makes me wonder if the question was just a troll.



  • @merreborn said:

    @Zecc said:

    @Spectre said:

    ESC = ExpertSexChange. ;=]
    Ah!  :)

    Still, I only have to scroll down to see the answers. I guess I'm just lucky? I can't be bothered to investigate.


    Wow, I used to advocate the "just scroll down" method, as you do, but as of now, unless I fake the google UA, I get a totally different page when I visit the link in the OP, with no content to be found anywhere.



    Blatant cloaking. Can't believe they're getting away with it.

    I'm using FF1.5.x with NoScript, and for me it's not the UA, it's the referer.  If I follow the link from the article, I get the page with the answers suppressed.  If I cut'n'paste the title into a google search and follow the link from the google results, I get the answers in the clear.

     

    Hmm, it gets even more interesting.  If I diff the source for each of the pages (the direct link and the google results link), they're identical.

     

    They must be doing it with CSS, I reckon.  Hang on ... checking ....

     

    [EDIT] No, I was mistaken.

     

    --- no-referer-Q_22031739.html    2008-10-07 23:24:35.828125000 +0100
    +++ referer-Q_22031739.html    2008-10-07 23:24:51.468750000 +0100
    @@ -653,6 +653,315 @@ function showSelfAccept(aid,experts){
     </div>
     
     <div class="adSense"><div id="btmGoogleAdDiv"><div id="btmGoogleAdDivInner">Loading Advertisement...</div></div></div>
    +<script type="text/javascript">jsImport("com.ee.list.CollapsibleList")</script>
    +<div class="s sectionFour shFFF5 sgray expGray allZonesMain taSearchRow"><table class="h"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="allZones">
    +<table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Microsoft/" class="headerLink">Microsoft</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Applications</li><li>Development</li></ul><ul>
    +<li>Hardware</li><li>Internet Protocols</li></ul><ul>
    +<li>OS</li><li>Windows Security</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Apple/" class="headerLink">Apple</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Hardware</li><li>Networking</li></ul><ul>
    +<li>Operating Systems</li><li>Programming</li></ul><ul>
    +<li>Software</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Internet/" class="headerLink">Internet</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Anti Spam</li><li>Anti-Spyware</li><li>Anti-Virus</li><li>Chat / IM</li></ul><ul>
    +<li>Email Clients</li><li>File Sharing</li><li>New Net Users</li><li>Search Engines</li></ul><ul>
    +<li>Web Browsers</li><li>Web Development</li><li>Web Servers</li><li>WebTrends / Stats</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Gamers/" class="headerLink">Gamers</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Action / Adventure</li><li>Computer Games</li><li>Consoles</li><li>Emulators</li></ul><ul>
    +<li>Game Programming</li><li>Misc</li><li>Online / MMORPG</li><li>Puzzle</li></ul><ul>
    +<li>Role Playing</li><li>Sports</li><li>Strategy</li><li>Tips</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Digital_Living/" class="headerLink">Digital Living</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Apple</li><li>Automotive</li><li>Digital Music</li><li>Gaming World</li></ul><ul>
    +<li>Hardware</li><li>Home Security</li><li>Networking Hardware</li><li>New Net Users</li></ul><ul>
    +<li>New Users</li><li>Software</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Virus_and_Spyware/" class="headerLink">Virus & Spyware</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Anti Spam</li><li>Anti-Spyware</li><li>Anti-Virus</li><li>Cell Phones</li><li>Encryption</li></ul><ul>
    +<li>Hardware Firewalls</li><li>HijackThis</li><li>IDS</li><li>Internet</li><li>Operating Systems</li></ul><ul>
    +<li>Operating Systems Security</li><li>Software Firewalls</li><li>Vulnerabilities</li><li>WebApplications</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Hardware/" class="headerLink">Hardware</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Apple</li><li>Components</li><li>Desktops</li><li>Displays / Monitors</li><li>Embedded Hardware</li></ul><ul>
    +<li>Handhelds / PDAs</li><li>Laptops/Notebooks</li><li>Misc</li><li>Networking Hardware</li><li>New Users</li></ul><ul>
    +<li>Peripherals</li><li>Servers</li><li>Storage</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Software/" class="headerLink">Software</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Business Management</li><li>CYGWIN</li><li>Database</li><li>Development</li><li>Firewalls</li><li>Industry Specific</li><li>Internet / Email</li><li>Message Queue</li></ul><ul>
    +<li>Misc</li><li>MultiMedia Applications</li><li>Network Management</li><li>Office / Productivity</li><li>OS</li><li>OS/2 Apps</li><li>Page Layout</li><li>Photos / Graphics</li></ul><ul>
    +<li>Quality Assurance</li><li>Security</li><li>Server Software</li><li>System Utilities</li><li>Virtualization</li><li>VMware</li><li>Voice Recognition</li><li>Web Development</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/ITPro/" class="headerLink">ITPro</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Anti Spam</li><li>Anti-Spyware</li><li>Anti-Virus Apps</li><li>Apple Hardware</li><li>Chat / IM</li><li>Consulting</li><li>Devices</li><li>Displays / Monitors</li><li>Email Clients</li><li>Encryption</li></ul><ul>
    +<li>File Sharing</li><li>Firewalls</li><li>IDS</li><li>Laptops & Notebooks</li><li>Networking</li><li>Networking Hardware</li><li>Operating Systems Security</li><li>OS</li><li>Peripherals</li><li>Search Engines</li></ul><ul>
    +<li>Servers</li><li>Storage</li><li>Vulnerabilities</li><li>Web Browsers</li><li>Web Computing</li><li>Web Servers</li><li>WebApplications</li><li>WebTrends / Stats</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Developer/" class="headerLink">Developer</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Application Servers</li><li>Content Management</li><li>CYGWIN</li><li>Database</li><li>Dev Tools</li><li>File Sharing</li></ul><ul>
    +<li>Game Programming</li><li>Industry Specific</li><li>Office / Productivity</li><li>Programming</li><li>Protocols</li><li>Search Engines</li></ul><ul>
    +<li>Web Browsers</li><li>Web Development</li><li>Web Servers</li><li>WebTrends / Stats</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Storage/" class="headerLink">Storage</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Backup / Restore</li><li>Disaster Recovery</li><li>Grid</li></ul><ul>
    +<li>Hard Drives</li><li>Misc</li><li>Remote Access</li></ul><ul>
    +<li>Removable Backup Media</li><li>Servers</li><li>Storage Technology</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/OS/" class="headerLink">OS</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Apple</li><li>AS / 400</li><li>BeOS</li><li>Development</li><li>Linux</li></ul><ul>
    +<li>MainFrame OS</li><li>Microsoft</li><li>Miscellaneous</li><li>OS / 2</li><li>Security</li></ul><ul>
    +<li>Unix</li><li>VMS / OpenVMS</li><li>VMware</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Database/" class="headerLink">Database</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>4GL</li><li>Berkeley DB</li><li>Clarion</li><li>Contact Management</li><li>Data Manipulation</li><li>DB2</li><li>dBase</li><li>Filemaker Pro</li><li>FoxPro</li><li>GIS & GPS</li></ul><ul>
    +<li>Informix</li><li>Interbase / Firebird</li><li>InterSystems Cache</li><li>LDAP</li><li>Miscellaneous</li><li>MS Access</li><li>MS SQL Server</li><li>MUMPS</li><li>MySQL Server</li><li>OLAP</li></ul><ul>
    +<li>Oracle</li><li>PostgreSQL</li><li>Reporting </li><li>SAS</li><li>Siebel</li><li>Software</li><li>SQLBase</li><li>Sybase</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Security/" class="headerLink">Security</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Anti Spam</li><li>Anti-Spyware</li><li>Anti-Virus</li><li>Chat / IM</li><li>Digital Forensics</li><li>Email Clients</li></ul><ul>
    +<li>Encryption</li><li>File Sharing</li><li>IDS</li><li>Misc</li><li>Operating Systems Security</li><li>Software Firewalls</li></ul><ul>
    +<li>VPN</li><li>Vulnerabilities</li><li>Web Browsers</li><li>WebApplications</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Programming/" class="headerLink">Programming</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Algorithms</li><li>Automation</li><li>Database</li><li>Editors IDEs</li><li>Game</li><li>Handhelds / PDAs</li></ul><ul>
    +<li>Installation</li><li>Languages</li><li>Misc</li><li>Multimedia Programming</li><li>Open Source</li><li>Processor Platforms</li></ul><ul>
    +<li>Project Management</li><li>Signal Processing</li><li>System / Kernel</li><li>Theory</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Web_Development/" class="headerLink">Web Development</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Authoring</li><li>Blogs</li><li>Components</li><li>Digital Camera Software</li><li>Document Imaging</li><li>Fonts</li><li>Illustration</li></ul><ul>
    +<li>Images</li><li>Images and Photos</li><li>Internet Marketing</li><li>Miscellaneous</li><li>Scripting</li><li>Search Engines</li><li>Software</li></ul><ul>
    +<li>Web Frameworks</li><li>Web Graphics</li><li>Web Languages/Standards</li><li>Web Servers</li><li>Web Services</li><li>WebApplications</li><li>WebTrends / Stats</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Networking/" class="headerLink">Networking</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Apple Networking</li><li>Application Servers</li><li>Backup / Restore</li><li>Broadband</li><li>Content Management</li><li>Email Servers</li><li>File Servers</li><li>Grid</li><li>ISPs & Hosting</li><li>Java Editors & IDEs</li></ul><ul>
    +<li>Linux Networking</li><li>Message Queue</li><li>Misc</li><li>Network Management</li><li>Networking Hardware</li><li>Novell Netware</li><li>Operating Systems</li><li>OS / 2</li><li>Protocols</li><li>Removable Backup Media</li></ul><ul>
    +<li>Security</li><li>Servers</li><li>Storage Technology</li><li>System Utilities</li><li>Telecommunications</li><li>Unix Networking</li><li>Web Computing</li><li>Web Servers</li><li>Windows Networking</li><li>Wireless</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Other/" class="headerLink">Other</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Automotive</li><li>Business Travel</li><li>Community Support</li><li>Expert Lounge</li></ul><ul>
    +<li>Lounge</li><li>Math / Science</li><li>Miscellaneous</li><li>New Net Users</li></ul><ul>
    +<li>Philosophy / Religion</li><li>Politics</li><li>Puzzles / Riddles</li><li>URLs</li></ul></div><div class="clearLeft"></div><table class="rootHeaderNoImage"><tr><td class="left"></td><td class="middle"><a href="/Community_Support/" class="headerLink">Community Support</a></td><td class="right"></td></tr></table>
    +<div class="noLinkTree"><ul>
    +<li>Announcements</li><li>Beta Feedback</li><li>CleanUp</li></ul><ul>
    +<li>EE Bugs</li><li>Feedback</li><li>General</li></ul><ul>
    +<li>Input</li><li>New to EE</li><li>New Topics</li><li>Suggestions</li></ul></div><div class="clearLeft"></div></div>
    +
    +  <div class="clear"></div>
    +
    +</div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<div class="s shFFF5 sgray expGray sectionTwo"><table class="h"><tr><td class="l"></td><td><div class="t2i" style="background: url(http://images.experts-exchange.com/t/57-50.png) no-repeat;width:56px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><script type="text/javascript" src="http://images.experts-exchange.com/scripts/asyncInclude.js"></script>
    +<script type="text/javascript" src="http://images.experts-exchange.com/scripts/popupOverlay.js"></script>
    +<script type="text/javascript" src="http://images.experts-exchange.com/scripts/answerRating.js"></script>
    +
    +<script type="text/javascript">
    +function showSelfAccept(aid,experts){
    +   showPopupOverlay('selfAccept'+aid,600,200,'/shared/async/confirmAction.jsp?action=selfAccept&experts='+experts+'&aid='+aid);
    +
    +   var yWithScroll = 0;
    +   if (window.innerHeight && window.scrollMaxY) // Firefox
    +      yWithScroll = window.innerHeight + window.scrollMaxY;
    +   else if (document.body.scrollHeight > document.body.offsetHeight) // all but Explorer Mac
    +      yWithScroll = document.body.scrollHeight;
    +   else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
    +      yWithScroll = document.body.offsetHeight; 
    +
    +   document.getElementById(getBackgroundID("selfAccept"+aid)).style.height=yWithScroll;
    +   window.scrollTo(0, 0);
    +}
    +</script>
    +
    +   <div class="answers">
    +
    +<a id="17772692"></a>
    +       <a id="a17772692"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo17772692"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">10.20.2006 at 04:15AM PDT,<span class="answerID"> ID: 17772692</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_1006311.html">bigphuckinglizard</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +change the 255 to a 0 and you'll get the same number each time.</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="17773467"></a>
    +       <a id="a17773467"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo17773467"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">10.20.2006 at 06:27AM PDT,<span class="answerID"> ID: 17773467</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_2094137.html">gangwisch</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +rnd is a function for producing a random value</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="17774275"></a>
    +       <a id="a17774275"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo17774275"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">10.20.2006 at 07:55AM PDT,<span class="answerID"> ID: 17774275</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_3405391.html">OliWarner</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +&gt;&gt; Rnd() values are changing everytime in ASP.NET<br /><br />As gangwisch said, Rnd() gives a random number... Why would you expect a random number to stay the same?<br /><br />ROFL@ bigphuckinglizard's answer =)</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="17841507"></a>
    +       <a id="a17841507"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo17841507"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">10.31.2006 at 04:58AM PST,<span class="answerID"> ID: 17841507</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_990361.html">Jivlain</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Rnd() is a function for producing a value, as OliWarner said.<br /><br />Each time you call the Rnd() function you will get a different value.<br />However, you can get the numbers to come out in the same order each time by calling <br /><br />Try this:<br /><br />Randomize(25) 'whatever number here will affect which set of numbers will come up<br />for i=0 to 10<br />&nbsp;Response.Write rnd(100).ToString()+&quot;&lt;br&gt;&quot;<wbr /> 'print a number between 0-99<br />next<br /><br />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.<br /><br />Gosh, it's been a very long time since I've used VB ;)</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="17848755"></a>
    +       <a id="a17848755"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo17848755"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">11.01.2006 at 03:45AM PST,<span class="answerID"> ID: 17848755</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_990361.html">Jivlain</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Hmmmm, I've actually tested this version...<br /><br />Randomize(25) 'whatever number here will affect which set of numbers will come up<br />Dim i As Integer<br />For i = 0 To 10<br />&nbsp; &nbsp; &nbsp;Response.Write(CInt(Rnd() * 100).ToString()+&quot;&lt;br&gt;&quot;) 'print a number between 0-99<br />Next<br /><br />If you actually wanted to round a number, use CInt(x)<br /></div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18004815"></a>
    +       <a id="a18004815"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18004815"></div>
    +
    +<div class="s shF5FF so expOrange sectionTwo answer adminHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">11.23.2006 at 01:28PM PST,<span class="answerID"> ID: 18004815</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/63-50.png) no-repeat;width:161px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_858705.html">pinaldave</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +genesiscircle,<br />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. &nbsp;I would appreciate any comments by the experts that would help me in making a recommendation.<br /><br />It is assumed that any participant not responding to this request is no longer interested in its final disposition.<br /><br />If the asker does not know how to close the question, the options are here:<br /><a rel="nofollow" href="http://www.experts-exchange.com/help.jsp#hs5">http://www.experts-exchang<wbr />e.com/help<wbr />.jsp#hs5</a><br /><br />pinaldave<br />EE Cleanup Volunteer </div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18022926"></a>
    +       <a id="a18022926"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18022926"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">11.27.2006 at 01:44PM PST,<span class="answerID"> ID: 18022926</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_351551.html">Workshop_Alex</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Interesting addition: this question made it to the Daily WTF. See also <a rel="nofollow" href="http://thedailywtf.com/forums/thread/103463.aspx" target="_blank">http://thedailywtf.com/for<wbr />ums/thread<wbr />/103463.as<wbr />px</a><br /><br />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.</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18034247"></a>
    +       <a id="a18034247"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18034247"></div>
    +
    +<div class="s shF5FF so expOrange sectionTwo answer adminHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">11.28.2006 at 08:08PM PST,<span class="answerID"> ID: 18034247</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/63-50.png) no-repeat;width:161px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_858705.html">pinaldave</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +I will leave the following recommendation for this question in the Cleanup topic area:<br />&nbsp; &nbsp;Accept: Jivlain {<a rel="nofollow" href="http:#17848755">http:#17848755</a>}<br /><br />Any objections should be posted here in the next 4 days. After that time, the question will be closed. <br /><br />pinaldave<br />EE Cleanup Volunteer</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18044502"></a>
    +       <a id="a18044502"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18044502"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">11.30.2006 at 04:00AM PST,<span class="answerID"> ID: 18044502</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_1001750.html">simon_thwaites</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Try this function<br /><br />Function UnRnd()<br />UnRnd = 4 'my favourite number!<br />End Function<br /><br />IntTemp = Int((255 * UnRnd()) + 1)</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18044554"></a>
    +       <a id="a18044554"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18044554"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">11.30.2006 at 04:10AM PST,<span class="answerID"> ID: 18044554</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_3405391.html">OliWarner</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Yeah 4 is a good number<br /><br />Recommend simon_thwaites for the points =)</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18699461"></a>
    +       <a id="a18699461"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18699461"></div>
    +
    +<div class="s shF5FF so expOrange sectionTwo answer adminHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">03.11.2007 at 08:51PM PDT,<span class="answerID"> ID: 18699461</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/63-50.png) no-repeat;width:161px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_858705.html">pinaldave</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +No comment has been added to this question in more than 21 days, so it is now classified as abandoned.<br /><br />I will leave the following recommendation for this question in the Cleanup topic area:<br />&nbsp; &nbsp;Split: Jivlain &nbsp;{<a rel="nofollow" href="http:#17848755">http:#17848755</a>} &amp; simon_thwaites &nbsp;{<a rel="nofollow" href="http:#18044502">http:#18044502</a>}<br /><br />Any objections should be posted here in the next 4 days. After that time, the question will be closed. <br /><br />pinaldave<br />EE Cleanup Volunteer</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18700336"></a>
    +       <a id="a18700336"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18700336"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">03.12.2007 at 12:56AM PDT,<span class="answerID"> ID: 18700336</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_351551.html">Workshop_Alex</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +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.)</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18700376"></a>
    +       <a id="a18700376"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18700376"></div>
    +
    +<div class="s shF5FF sb expExpBlue sectionTwo answer answerHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">03.12.2007 at 01:11AM PDT,<span class="answerID"> ID: 18700376</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/59-50.png) no-repeat;width:108px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_3405391.html">OliWarner</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Very much agreed. This thread is just too silly.<br /><br />Suggestion: Move it to the lounge for more silliness to ensue or delete it.</div>
    +
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +<a id="18706506"></a>
    +       <a id="a18706506"></a>
    + <div class="answerRatingNoInfo" id="answerRatingNoInfo18706506"></div>
    +
    +<div class="s shF5FF sg expBlue sectionTwo answer acceptedHeader"><table class="h"><tr><td class="l"></td><td><span class="sectionHeaderExtra">03.12.2007 at 03:56PM PDT,<span class="answerID"> ID: 18706506</span></span><div class="t2i" style="background: url(http://images.experts-exchange.com/t/61-50.png) no-repeat;width:118px;height:19px;"></div></td><td class="r"></td></tr></table><div class="bl"><div class="br"><div class="bbg"><div class="empty"></div><div class="bc"><div class="underline"></div>
    +<div class="answerer"><a href="/M_990361.html">Jivlain</a>:</div>
    +          <div class="answerBody quoted" id="EchoTopic">
    +Aw, come on. I'm sure I could use the points for something ;)<br /><br />Even if I did come to this thread off The Daily WTF.<br /><br />Though it is a shame that Simon's alternate function didn't take advantage of the golden opportunity to include the number &quot;42&quot;.</div>
    +
    +<div class="footnote">Accepted Solution</div>
    +<div class="clear"></div>
    +<div class="clear"></div>
    +      </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
    +</div>
    +<script type="text/javascript">
    + function showSignUp(id)
    + {
    +    var select = document.getElementById("answer"+id);
    +    if (select != null)
    +       select.className = 'signUpSpaceVisible';
    + }
    +
    + function removeSignUp(id)
    + {
    +    var select = document.getElementById("answer"+id);
    +    if (select != null)
    +       select.className = 'signUpSpace';
    + }
    +</script>
    +<div class="clear"></div>
    +  </div><div class="empty"></div></div></div></div><table class="f"><tr><td class="l"></td><td>&nbsp;</td><td class="r"></td></tr></table>
    +      </div>
     <div class="qwID">
     20080716-EE-VQP-32</div>
     <!-- close the body column -->
    @@ -864,7 +1173,7 @@ s.eVar44=""
     s.eVar45="EE_Level3 - 2"
     s.eVar46=""
     s.eVar47=""
    -s.eVar48=""
    +s.eVar48="PAQ"
     
     
     /* Hierarchy Variables */
     



  • @DaveK said:

    entire source code
    Was that really necessary?


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.