Results 1 to 2 of 2

Thread: Another new possible score....

  1. #1
    Member
    Join Date
    May 2013
    Location
    Davis, California // Beni Mekkoud, Morocco
    Posts
    30

    Another new possible score....

    Since the conversation seems to be about odd MM scores...I am suggesting another new score.
    A person gets a point for all trailing zeros at the end of their project credit scores. The scores would be truncated or floored to ignore any fractional-point score that may or may not exist.


    So a person with 10,300 cr for project x, 230,000 for project y, and 34,974 for project z would get a score of 6 (2 + 4 + 0).

  2. #2
    Administrator Bok's Avatar
    Join Date
    Oct 2003
    Location
    Wake Forest, North Carolina, United States
    Posts
    22,412
    Blog Entries
    13
    Quote Originally Posted by Werinbert View Post
    Since the conversation seems to be about odd MM scores...I am suggesting another new score.
    A person gets a point for all trailing zeros at the end of their project credit scores. The scores would be truncated or floored to ignore any fractional-point score that may or may not exist.


    So a person with 10,300 cr for project x, 230,000 for project y, and 34,974 for project z would get a score of 6 (2 + 4 + 0).
    An interesting concept. Unfortunately not easy at all to implement.

    Because the numbers are stored as decimals 99% of them have decimals, so would have to round down.

    Then convert to character string.

    Then count the number of zeroes on the right hand side of the character string

    Then sum these across all the projects for a user

    Finally, do this across all users.

    I can't figure out how to practically do the count of only zeroes on the right hand side with sql and not programmatically which would take too long

    This is a count of ALL instances of the char 0 in the score column for me

    Code:
    MariaDB> select sum(LENGTH(convert(round(metric1,0),char)) - LENGTH(replace(convert(round(metric1,0),char),'0',''))) as zeroes from boinc_user where cpid = 'd4c59e612bf4dfec53b7e6206990b3f5';
    +--------+
    | zeroes |
    +--------+
    |    130 |
    +--------+
    1 row in set (0.001 sec)

Posting Permissions

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