Re: [ADVANCED-DOTNET] Notify

2004-11-11 Thread Robert Hurlbut
Protected message is attached. +++ Attachment: No Virus found +++ Panda AntiVirus - www.pandasoftware.com === This list is hosted by DevelopMentorĀ® http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and comp

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Matthew Wills
Vijay, Flipping a coin has a probability of .5. Its either the head or the tails. But when you have to choose a number out of a set of 10^8 integers, getting the same number again within a span of say 1 trials seems ridiculous. A few minutes in Excel tells me there is only a 60% chance of n

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Sebastian Good
Here is a layman's explanation of this phenomenon: http://www.cut-the-knot.org/do_you_know/coincidence.shtml Again, I would caution against applying brute-force engineering solutions (hashtables of numbers). While human intuition is often very powerful, it can be extremely misleading when statist

Re: [ADVANCED-DOTNET] loading assemblies

2004-11-11 Thread jon
got it! http://www.hanselman.com/blog/PermaLink.aspx?guid=4d0ef4fb-f8ae-4355-a658-3c0432c98dbe for v1.1 only it seems: http://weblogs.asp.net/jgalloway/archive/2003/10/28/34343.aspx jon --- jon <[EMAIL PROTECTED]> wrote: > Hello again, > > We have an ASP application with many > sub-applicatio

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Chad, I ran the program and it does give me 997, 995, 953 repeated values on 3 successive runs. I have a similar check written down as part of my test suite and the statistics of repetition does seem to be high. But why not recalculate the random number if it repeats ?! Well to check whether it r

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Sebastian Good
Random numbers are expected to repeat. It would be decidedly unrandom if they did not. Flip a coin for a few moments and you'll find out that you see many streaks of heads and tails. While it would take some time to determine whether the 900+ duplicates was more or less than expected out of 2 milli

[ADVANCED-DOTNET] loading assemblies

2004-11-11 Thread jon
Hello again, We have an ASP application with many sub-applications. One of the sub-applications is to be converted to ASP.Net. Now we have made it work by moving the bin/ directory and web.config of the sample asp.net project in the application root. We were wondering if it is possible to keep the

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Chad M. Gross
First off I want to mention that it was a long day today and that "299" comment I made was something I remembered from a while back. It was really the limitation of the Console window for displaying my dups :-). Anyway, here is a little code snippet to show how the Random class duplicates in .NET:

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread J. Merrill
If you've been testing using seed X and have hit a bug / issue / bit of unfinished code based on the sequence of (pseudo-random) values returned by your generator, you want to be able to modify the code and re-run with the same seed, knowing that you'll get to that same point in your code. Once

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Reed, Thanks a lot for sharing your thoughts ! Some of the things you said about the seed selection seemed weird the first time but then after some thought, makes sense. So now, are you saying that i use the same seed for my final calculations once i find the results of the test runs to be satisf

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Daniel Croft
What is this, the Heisenberg uncertainty principal list or what? Fundamentally a computer cannot generate a random number where there's deliberate programming involved IMO. It's a contradiction in terms. Dan -Original Message- From: Vijay M [mailto:[EMAIL PROTECTED] Sent: Thursday, Novem

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Andrew, You miss the point. The world is purely random by all means but once you try to detect it, the error of measurement is definite and produces a standard variance in the resulting data. Hence anything measured, simply cannot be random. My 2 cents on the subject. If you feel like thinking mor

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread James
-Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Kristoffer Sheather Sent: Wednesday, November 10, 2004 9:11 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Random number generation. Is a random number calculated by kno

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Christopher Reed
Based on my own experiences with random number generators, the two main items you need to look at are the initial seed and the period of the generator. A RNG is usually designed to recreate the same sequence over and over given the same seed value. The key is that the sequence of numbers do not r

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Larry O'Brien
>>I would not use the .NET Random for sure. You indicated you want values >>honest out to 30 Million, the .NET framework Random is not going to give >>it to you. The SSCLI source seems to be Knuth's Ran3 algorithm. According to http://www.shadlen.org/ichbin/random/generators.htm, that algorithm h

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Steve Johnson
On Thu, 11 Nov 2004 15:05:08 -0500, Chad M. Gross <[EMAIL PROTECTED]> wrote: > As for the RNGCryptoServiceProvider sample someone sent off to you, that > may work for you but you need to make a change to the code to use a byte > [8] and an Int64 to get more randomness and minimize repetition. Good

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Fabian, I found out that the Mersenne Twister algorithm seems to be widely used to create pseudo-random numbers of high volume in lots of places. Been reading on it from the morning and seems promising ! There is also a port of the algorithm written by Trevor Misfeldt in C#. http://www.c-sharpcor

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Chad M. Gross
I would not use the .NET Random for sure. You indicated you want values honest out to 30 Million, the .NET framework Random is not going to give it to you. My guess when you say "true to 30 Million", you mean random numbers generated from a non-repeatable number sequence that has a period of at l

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Larry, The first thing i did before posting the message here was to check out the source code in SSCLI on how the Random class has been implemented. But even after that, i still wasn't sure on how good it might perform for very huge numbers that i am dealing with. It is one thing to work well for

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Dominick, Thanks for site link .. Looks pretty neat. Havent looked at the code though. But involves quite a few perl source to get the job done. Not sure whether it would be feasible to port this to .NET for getting what i want. Thanks anyway :) And Jason, radioactive decay is not exactly random.

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Steve, Half-million random numbers is good news ! I havent really tried this class yet for any of my purposes but i guess it might be useful. Will let you know by end of day on how this works out. Thanks. >On Wed, 10 Nov 2004 21:34:10 -0700, Steve Johnson <[EMAIL PROTECTED]> wrote: >> The follow

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Christopher Frazier
Excellent discussion, everyone! Incidentally, I've been looking for a Monte Carlo example/kickstart for a while, and recently found Math.NET[0] which made it to version 2.0 last month. I haven't had a chance to dig in to the code, but it has several pseudo-random generators based on Numerical Recip

Re: [ADVANCED-DOTNET] GetType on non-mscorlib, gac assembly

2004-11-11 Thread Frans Bouma
> How can I make Type.GetType("SqlException") work? > I have tried > "System.Data.SqlClient.SqlException,System.Data" and > "System.Data.SqlClient.SqlException,System.Data.dll" > and it doesn't work. What does 'doesn't work' mean? Exception? No type? dull error? System.Data.dll should wo

Re: [ADVANCED-DOTNET] GetType on non-mscorlib, gac assembly

2004-11-11 Thread jon
Thanks to both of you, got it! jon --- Richard Blewett <[EMAIL PROTECTED]> wrote: > Type.GetType("System.Data.SqlClient.SqlException, > System.Data, > Version=1.0.5000.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089" ); > > In other words you have to specify both the fully > qualified type

Re: [ADVANCED-DOTNET] GetType on non-mscorlib, gac assembly

2004-11-11 Thread Ivan Towlson
You need something like: System.Data.SqlClient.SqlException, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The reason for this is that there could be multiple System.Data assemblies in the GAC, e.g. different versions. -- Ivan Towlson White Carbon -Origi

Re: [ADVANCED-DOTNET] GetType on non-mscorlib, gac assembly

2004-11-11 Thread Richard Blewett
Type.GetType("System.Data.SqlClient.SqlException, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" ); In other words you have to specify both the fully qualified type name and the fully qualified assembly name Regards Richard Blewett - DevelopMentor http://www.d

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Andrew Marshall
A perfect random generator can never exist, ever ! Unfortunate but true ! But what i am looking for is a good pseudo random number generator in .NET ! That's not strictly true, certain quantum phenomena are thought to be truly random ( although there is some argument that that's just because we don

[ADVANCED-DOTNET] GetType on non-mscorlib, gac assembly

2004-11-11 Thread jon
Hi How can I make Type.GetType("SqlException") work? I have tried "System.Data.SqlClient.SqlException,System.Data" and "System.Data.SqlClient.SqlException,System.Data.dll" and it doesn't work. FWIW, I'm trying to use the Exception Management Block from MS and I was thinking to do something like