Showing posts with label randomly. Show all posts
Showing posts with label randomly. Show all posts

Monday, March 26, 2012

Please Help - WEB Application

Hi Everyone,

I have a VB script (.aspx) project that needs to produce nine unique,
randomly generated numbers that uses all nine of the numbers. I will greatly
appreciate either a recommendation of where to look on the web for my
answer, or your direct response.

Thanks a 1,000,000 for your ideas.
ChuckChuck Insight wrote:
> Hi Everyone,
> I have a VB script (.aspx) project that needs to produce nine unique,
> randomly generated numbers that uses all nine of the numbers. I will greatly
> appreciate either a recommendation of where to look on the web for my
> answer, or your direct response.
> Thanks a 1,000,000 for your ideas.
> Chuck

If I understand correctly, you want to generate a nine-digit
"random" code that uses all of the digits in 123456789.
(what about "0"?)

What you can do is
1) start with "123456789"
2) generate two random numbers from 0 to 8 (inclusive)
3) exchange the digits at those positions
4) repeat steps 2) and 3) a dozen times.

To generate a random number, see the System.Random class
(create *one* instance, then repeatedly get random numbers
from that class)

To generate nine of these codes, use this repeatedly
but check if you already have this particular code. If
yes, discard this code and generate again.

--
Hans Kesting

Saturday, March 24, 2012

Please Help - WEB Application

Hi Everyone,
I have a VB script (.aspx) project that needs to produce nine unique,
randomly generated numbers that uses all nine of the numbers. I will greatly
appreciate either a recommendation of where to look on the web for my
answer, or your direct response.
Thanks a 1,000,000 for your ideas.
ChuckChuck Insight wrote:
> Hi Everyone,
> I have a VB script (.aspx) project that needs to produce nine unique,
> randomly generated numbers that uses all nine of the numbers. I will great
ly
> appreciate either a recommendation of where to look on the web for my
> answer, or your direct response.
> Thanks a 1,000,000 for your ideas.
> Chuck
>
If I understand correctly, you want to generate a nine-digit
"random" code that uses all of the digits in 123456789.
(what about "0"?)
What you can do is
1) start with "123456789"
2) generate two random numbers from 0 to 8 (inclusive)
3) exchange the digits at those positions
4) repeat steps 2) and 3) a dozen times.
To generate a random number, see the System.Random class
(create *one* instance, then repeatedly get random numbers
from that class)
To generate nine of these codes, use this repeatedly
but check if you already have this particular code. If
yes, discard this code and generate again.
Hans Kesting

Please help DEPERATE page randomly stops loading

Hi

I am getting pretty frustrated here.
I have a simple page architecture that consists of a header web user
control, the main page content and a footer web user control

Every so often that page loads the header content and just stops. If I click
view source, I see that all the content has been pushed to the client. It
just doesn't render!!

This happens at random points often when doing postbacks. I am not using
smartnavigation.

Has anyone else seen anything similar?

Thanks,

SBad HTML is the problem.
You did not close the tag or the quotes.
Sometimes IE can recover sometimes not.

George.

"SamIAm" <samuel@.rubbachicken.com> wrote in message
news:%23ouR1T4$DHA.2348@.TK2MSFTNGP09.phx.gbl...
> Hi
> I am getting pretty frustrated here.
> I have a simple page architecture that consists of a header web user
> control, the main page content and a footer web user control
> Every so often that page loads the header content and just stops. If I
click
> view source, I see that all the content has been pushed to the client. It
> just doesn't render!!
> This happens at random points often when doing postbacks. I am not using
> smartnavigation.
> Has anyone else seen anything similar?
> Thanks,
> S