Weighted Means What?

1. Senior Member
Join Date
Dec 1969
Posts
167

## Weighted Means What?

Hello...<BR><BR>Take a look here:<BR><BR>http://www.aspmessageboard.com/forum/showMessage.asp?F=20&M=536261&P=1<BR><BR>I&#039;m planning to implement something similar. My question is this: If a "customer" were to come to me and ask me about puttig his banner on my site, how would I explain what the weight of the banner is? I know that the weight means it will be displayed more often than others depending on its value, but how do I quantify that weight? "It&#039;ll be displayed 7 times more than other banners if you decide on a weight of 7, and 2 times more than others if you choose 2," or, "With a weight of 7, it&#039;ll be displayed 70% of every page view."? I don&#039;t understand to what degree the weight affects the number of times or the percent of the views that the banner is displayed.<BR><BR>Any ideas?

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## First meaning

7 times more than banners with a weight of 1.<BR><BR>Couldn&#039;t possibly be 70%! Suppose you sold one at weight of 7 and another at weight of 5. Ummm...You&#039;re going to display just those two banners 120% of the time???? Are you going to display the excess 20% to your ASP admin console???<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
167

## Suppose they want...

Suppose they want a percentage figure...<BR><BR>Shot in the dark here: Find out the sum of the weights (the weight of each banner added up). Then, divide a given weight that the user picks to find out the number of times the banner will be displayed versus the total views.<BR><BR>If the above is correct, and I&#039;ve done my equations right, then if the "customer" paid me a given amount for a certain percentage, then I could find out the weight I would need to insert into the admin console by taking that total weight of the banners from above and multiply by the percentage (20% / 100 = .2, so multiply by .2) they gave me, right?<BR><BR>Thanks!

4. Senior Member
Join Date
Dec 1969
Posts
167

## And one last question...

I noticed you put some of the code in some subroutine called Application. I&#039;ve heard of this before, but am not very familiar with it. How does putting that code in that special subroutine affect it or anything else?

5. Senior Member
Join Date
Dec 1969
Posts
96,118

## Lost me completely...

...no idea what you are talking about.<BR>

6. Senior Member
Join Date
Dec 1969
Posts
96,118

## And how do you...

...handle it when you sell another 20%??? You have to go back an refigure everybody&#039;s absolute numbers.<BR><BR>And what about if you haven&#039;t sold enough to add up to 100% yet?<BR><BR>

7. Senior Member
Join Date
Dec 1969
Posts
167

## RE: Lost me completely...

The application object or what not...still confused?

8. Senior Member
Join Date
Dec 1969
Posts
167

## RE: And how do you...

Well, the first wouldn&#039;t be too hard to do via script. But I&#039;m not sure about the second one...hmm.

9. Senior Member
Join Date
Dec 1969
Posts
96,118

## Oh, sure...app *variables*...

10. Senior Member
Join Date
Dec 1969
Posts
167

## RE: Oh, sure...app *variables*...

Hi Bill. Thanks for your reply and sorry for the delay in response. I got busy with Christmas and all...<BR><BR>That&#039;s pretty neat! I would have never thought of doing it that way nor for that reason.<BR><BR>A couple questions: The first part, where you build the array. Where do you do all that? And then the part about Application.Lock, Application("bannerAds"), etc., where do you do that too? On each page?<BR><BR>I know that the second part, step 5, you&#039;d do that on each page. (I&#039;ll probably put that into a function and just call the function each time I need a banner. That&#039;ll make it easier to modify later on as necessary.)<BR><BR>So, assuming I can figure out when/where I do steps 1-4 and the code that followed, I think I can get this down without a problem.<BR><BR>Thanks,<BR><BR>Defiant

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•