Results 11 to 20 of 23
-
21st Jun 2010, 05:06 PM #11Member
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 Jaywill make people do something more than Css n php shit
<3 Mikeee-Awesome Friend
Respected: Faizann20
-
21st Jun 2010, 09:01 PM #12The Wise OneWebsite's:
twilight.ws ddlrank.comDecided 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; i <= 10000000; i++)
{
getRand();
}
Console.WriteLine(sw.Elapsed.ToString() + " - Whoo");
Console.ReadLine();
}
private static void getRand()
{
int lol = ((rnd.Next() * 1103515245) + 12345) & 0x7fffffff;
}
}
}
I can always be contacted by sending a tweet @twilightws
-
21st Jun 2010, 09:04 PM #13ლ(ಠ益ಠლ)Website's:
extremecoderz.comwell 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
-
21st Jun 2010, 09:17 PM #14The Wise OneWebsite's:
twilight.ws ddlrank.comThanks 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
752998216I can always be contacted by sending a tweet @twilightws
-
21st Jun 2010, 11:17 PM #15OPRespected Developer
10.000.001 != 100.000.000 Whoo
.
Btw, what's the logic behind:
Code:((rnd.Next() * 1103515245) + 12345) & 0x7fffffff
Edit:
And also your function doesn't return the result(s)
-
21st Jun 2010, 11:22 PM #16ლ(ಠ益ಠლ)Website's:
extremecoderz.comi think he was trying to randomize the seed maybe.
-
21st Jun 2010, 11:28 PM #17OPRespected 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
?
-
21st Jun 2010, 11:31 PM #18ლ(ಠ益ಠლ)Website's:
extremecoderz.comi didnt say it worked
i was hazarding a guess.
-
22nd Jun 2010, 07:19 AM #19Banned
-
22nd Jun 2010, 09:17 AM #20Banned
Aaaaaaaahhhhh OMG OMG OMG
Visual Studio Ultimate is of 12 THOUSAND DOLLARS
Is there any software more expensive than this?
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
A Google +-challenge?
By Daniel in forum General DiscussionReplies: 2Last Post: 17th Jul 2011, 08:30 PM -
Challenge to GFX Genius !
By softleaks in forum Graphics AreaReplies: 21Last Post: 28th May 2011, 09:01 AM -
[c#] CHALLENGE - Beat the time!
By jayfella in forum Web Development AreaReplies: 18Last Post: 24th Jun 2010, 07:38 PM -
I Challenge U ALL
By Chief-Editor in forum General DiscussionReplies: 19Last Post: 2nd Mar 2010, 08:46 AM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...