Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: More useful "best" and "worst" nodes display

by hossman (Prior)
on May 12, 2004 at 06:20 UTC ( #352655=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        sub weight {
           my $age = shift;
           return $age / $FACTOR;
        }
    
  2. or download this
         $score = $item->totalVotes() * weight($item->age());
    
  3. or download this
        $score = 0;
        foreach $vote ($item->votes()) {
           $score += $vote->value() 
                     * weight($item->age() - $vote->age());
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://352655]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2023-05-28 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?