voting

Voting algorithm: how to calculate rank?

纵然是瞬间 提交于 2019-12-04 23:11:58
问题 I am trying to figure our a way to calculate rank. Right now it simply takes ratio of wins / losses of each individual entry, so e.g. one won 99 times out of a 100, it has 99% winning rank. BUT if an entry won 1 out of total 1 votes, it will have a 100% winning rank, but definitely it can't be higher that of the one that won 99 times. What would be a better way to do this? 回答1: Depending on how complicated you want to make it, the Elo system chess uses (or something similar) may be what you

What are the implications of offering a public voting system (no sign-in required)?

那年仲夏 提交于 2019-12-04 13:35:00
问题 I am wondering what are the technical hurdles involved with offering a voting system (or say ratings) without requiring the user to sign in. I know there are issues with robots, voting a bunch - but what if you keep the users IP address? Do proxies become an issue? I'd like to build a public voting system that is still reliable.. is that possible right now? EDIT The stakes are moderately high for correctness, that is human-verification, and one-vote-per-user. A full-fledged login will ask too

Best practice for comment voting database structure

被刻印的时光 ゝ 提交于 2019-12-04 12:28:38
问题 I'm working on a PHP app that has several objects that can be commented on. Each comment can be voted on, with users being able to give it +1 or -1 (like Digg or Reddit). Right now I'm planning on having a 'votes' table that has carries user_id and their vote info, which seems to work fine. The thing is, each object has hundreds of comments that are stored in a separate comments table. After I load the comments, I'm having to tally the votes and then individually check each vote against the

Best way to implement voting in a Rails application?

你说的曾经没有我的故事 提交于 2019-12-04 08:41:30
问题 What's the best plugin these days for implementing voting on a Rails site? Two I'm aware of are: vote_fu acts_as_voteable 回答1: There's no general 'best' solution. Check out how both work and see what best fits what you want and what fits your application's needs. In this case, acts_as_votable allows voting on models. vote_fu contains more as it ads the concept of 'acts_as_voter' to limit the models that may vote. It also adds 'has_karma' to give karma based on user voting. As you see, both

How should I order these “helpful” scores?

谁都会走 提交于 2019-12-04 05:24:49
Under the user generated posts on my site, I have an Amazon-like rating system: Was this review helpful to you: Yes | No If there are votes, I display the results above that line like so: 5 of 8 people found this reply helpful. I would like to sort the posts based upon these rankings. If you were ranking from most helpful to least helpful, how would you order the following posts? a) 1/1 = 100% helpful b) 2/2 = 100% helpful c) 999/1000 = 99.9% helpful b) 3/4 = 75% helpful e) 299/400 = 74.8% helpful Clearly, its not right to sort just on the percent helpful, somehow the total votes should be

Voting algorithm: how to calculate rank?

故事扮演 提交于 2019-12-03 16:13:37
I am trying to figure our a way to calculate rank. Right now it simply takes ratio of wins / losses of each individual entry, so e.g. one won 99 times out of a 100, it has 99% winning rank. BUT if an entry won 1 out of total 1 votes, it will have a 100% winning rank, but definitely it can't be higher that of the one that won 99 times. What would be a better way to do this? Depending on how complicated you want to make it, the Elo system chess uses (or something similar) may be what you want: http://en.wikipedia.org/wiki/Elo_rating_system Even if a person has won 1/1 matches, his rating would

Sorting A List Of Songs By Popularity

江枫思渺然 提交于 2019-12-03 09:44:53
问题 For student council this year, I'm on the "songs" committee, we pick the songs. Unfortunately, the kids at the dances always end up hating some of the stupid song choices. I thought I could make it different this year. Last thursday, I created a simple PHP application so kids could submit songs into the database, supplying a song name, artist, and genre (from a drop-down). I also implemented a voting feature similar to Reddit's. Click an upvote button, you've upvoted the song, incremented the

JQuery + thumbs_up gem render vote count?

╄→гoц情女王★ 提交于 2019-12-03 09:04:55
Plugins: Thumbs Up & JQuery 1.5.2 (needed for another old gem) I'm trying to render an updated vote count w/o a full HTTP request when a user votes on a post. Currently, it refreshes the page on every vote. Posts Controller def vote_up post = Post.find(params[:id]) current_user.vote_exclusively_for(post) respond_to do |format| format.js format.html {rRedirect_to :back} end end def vote_down post = Post.find(params[:id]) current_user.vote_exclusively_against(post) respond_to do |format| format.js format.html {redirect_to :back} end end Vote View (each post div has a vote div on the left (digg

What are the implications of offering a public voting system (no sign-in required)?

半城伤御伤魂 提交于 2019-12-03 07:39:35
I am wondering what are the technical hurdles involved with offering a voting system (or say ratings) without requiring the user to sign in. I know there are issues with robots, voting a bunch - but what if you keep the users IP address? Do proxies become an issue? I'd like to build a public voting system that is still reliable.. is that possible right now? EDIT The stakes are moderately high for correctness, that is human-verification, and one-vote-per-user. A full-fledged login will ask too much of the user given his role (voter) Also, if this is "impossible" to accomplish, how can you

Best practice for comment voting database structure

有些话、适合烂在心里 提交于 2019-12-03 07:09:39
I'm working on a PHP app that has several objects that can be commented on. Each comment can be voted on, with users being able to give it +1 or -1 (like Digg or Reddit). Right now I'm planning on having a 'votes' table that has carries user_id and their vote info, which seems to work fine. The thing is, each object has hundreds of comments that are stored in a separate comments table. After I load the comments, I'm having to tally the votes and then individually check each vote against the user to make sure they can only vote once. This works but just seems really database intensive - a lot