Activity Stream
48,167 MEMBERS
6875 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23
  1.     
    #11
    Member
    Just 2 participants ? guys plz start from a low level programing n language like c++ so that every can participate

    thanx y0....n yeah nice idea there by Hyperz n Jay will make people do something more than Css n php shit
    <3 Mikeee-Awesome Friend

    Respected: Faizann20


  2.   Sponsored Links

  3.     
    #12
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Decided to give this a go

    The code:
    PHP Code: 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;

    namespace 
    KWWH_RandomNumberGenerator
    {
        class 
    Program
        
    {
            static 
    Stopwatch sw = new Stopwatch();
            static 
    Random rnd = new Random();


            static 
    void Main(string[] args)
            {
                
    sw.Start();
                for (
    int i 0<= 10000000i++)
                {
                    
    getRand();
                }
                
    Console.WriteLine(sw.Elapsed.ToString() + " - Whoo");
                
    Console.ReadLine();
            }

            private static 
    void getRand()
            {
                
    int lol = ((rnd.Next() * 1103515245) + 12345) & 0x7fffffff;
            }
        }

    The result:
    I can always be contacted by sending a tweet @twilightws

  4.     
    #13
    ლ(ಠ益ಠლ)
    Website's:
    extremecoderz.com
    well the whole point is to do it over more than one thread - which is in fact riddled with obstacles - but great attempt - also, the reason we arent using static Random is because its slow as hell. Instead we use a known "pseudo random" algorythm.

    Hint 1: Using the same object "rnd" over multiple threads will yeild the same random number because it uses TickRate as the seed - and because the calculations are done so fast, the tickrate doesnt even get a chance to change before 50-100 random numbers are generated, and thus you get the same "random number" (assuming you already know PC's can only produce "fake random")

    But thanks for joining the challenge - keep going

  5.     
    #14
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Quote Originally Posted by jayfella View Post
    well the whole point is to do it over more than one thread - which is in fact riddled with obstacles - but great attempt - also, the reason we arent using static Random is because its slow as hell. Instead we use a known "pseudo random" algorythm.

    Hint 1: Using the same object "rnd" over multiple threads will yeild the same random number because it uses TickRate as the seed - and because the calculations are done so fast, the tickrate doesnt even get a chance to change before 50-100 random numbers are generated, and thus you get the same "random number" (assuming you already know PC's can only produce "fake random")

    But thanks for joining the challenge - keep going
    Thanks for the hint jaydude

    I posted it because even though I used the Random class, it still generates them a bit faster than the first results of Hyperz. I printed out a few numbers and they look like this more or less:

    1317421276
    1968034171
    612093081
    970587761
    1608097552
    1713051480
    85828884
    752998216
    Quite sufficient IMO but as you said it wouldn't be able to spread across different threads.
    I can always be contacted by sending a tweet @twilightws

  6.     
    #15
    Respected Developer
    10.000.001 != 100.000.000 Whoo .

    Btw, what's the logic behind:
    Code: 
    ((rnd.Next() * 1103515245) + 12345) & 0x7fffffff
    I mean, is that randomly hitting the keyboard or is there a reason for slowing it down?

    Edit:
    And also your function doesn't return the result(s)

  7.     
    #16
    ლ(ಠ益ಠლ)
    Website's:
    extremecoderz.com
    i think he was trying to randomize the seed maybe.

  8.     
    #17
    Respected Developer
    But there is no seed involved . Random uses Environment.TickCount by default. And the output of Next() is already random. Is ((rnd.Next() + 1) ^ 0) more random than random ?

  9.     
    #18
    ლ(ಠ益ಠლ)
    Website's:
    extremecoderz.com
    i didnt say it worked i was hazarding a guess.

  10.     
    #19
    Banned
    Quote Originally Posted by jayfella View Post
    BadLuckGuy - We are using Visual Studio 2010 - which compiles to exe yes.
    Ohh Thaaaaaaaaaanks for telling. Will give it a try when i am free
    ATM opening katz.cd to search and DL it

  11.     
    #20
    Banned
    Aaaaaaaahhhhh OMG OMG OMG
    Visual Studio Ultimate is of 12 THOUSAND DOLLARS
    Is there any software more expensive than this?

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. A Google +-challenge?
    By Daniel in forum General Discussion
    Replies: 2
    Last Post: 17th Jul 2011, 08:30 PM
  2. Challenge to GFX Genius !
    By softleaks in forum Graphics Area
    Replies: 21
    Last Post: 28th May 2011, 09:01 AM
  3. [c#] CHALLENGE - Beat the time!
    By jayfella in forum Web Development Area
    Replies: 18
    Last Post: 24th Jun 2010, 07:38 PM
  4. I Challenge U ALL
    By Chief-Editor in forum General Discussion
    Replies: 19
    Last Post: 2nd Mar 2010, 08:46 AM

Tags for this Thread

BE SOCIAL