Questions tagged [voting]

329 questions
2
votes
1 answer

Star Rating with Facebook Connect?

I would like to add the possibility for users to rate my content - after authenticating with facebook connect. The rating should be (optionally) posted to the users facebook wall, like comments on an item. Is there any such thing (like a facebook…
Jens
  • 177
  • 1
  • 1
  • 8
2
votes
2 answers

Displaying total votes count with thumbs_up

I am trying to display total votes cast on a post with thumbs_up gem but it does not seem to work. Here is my code def vote_up begin post = Post.find(params[:id]) current_user.vote_for(post) redirect_to :back …
Dev R
  • 1,892
  • 1
  • 25
  • 38
2
votes
1 answer

Can't figure out the system for "approve post once 10 users like it"

I have a voting system for articles. Articles are stored in 'stories' table and all votes are stored in 'votes' table. id in 'stories' table is equal to item_name in 'votes' table (therefore each vote is related to article with item_name). I want to…
Ilja
  • 44,142
  • 92
  • 275
  • 498
2
votes
1 answer

How to perform majority voting from a data frame with ranking criteria

I have the following data frame: dat <- structure(list(model_name = c("Random Forest", "XGBoost", "XGBoost-reg", "Null model", "Plain LM", "Elastic LM", "LM-pep.charge", "LM-rf.10vip" ), RMSE = c(0.853, 0.886, 0.719, 2.41, 16.6, 0.731, 1.16,…
littleworth
  • 4,781
  • 6
  • 42
  • 76
2
votes
0 answers

SelectedItem changes on postback for Dynamically loaded Radiobuttonlist

I have the Radiobuttoncontrol definition static in the design page but loading the contents dynamically from db. But whenever i do postback, my selection vanishes and the first dynamic item is selected by default for instance if i have 3…
Sams
  • 21
  • 2
2
votes
2 answers

Inconsitent behaviour with computation of "greatest product given 'n' adjacent digits" (D language)

I'm working on a solution for Project Euler (problem 8) which involves working out the largest product of thirteen adjacent digits. I wrote a solution (below) but it doesn't seem to be outputting the correct answer when the length of the slice is…
Aleksey
  • 65
  • 4
2
votes
1 answer

C# Voting Simulator (How to count zeros or non-voted items/countries)

I'm working with an Eurovision Voting Contest Simulator. 26 countries have to randomly vote other 10 countries (without duplicates nor itself). So I do a for (Countries.Length) and inside a for (PossibleVotes.Length) For assigning the votes. Even…
2
votes
1 answer

Why the voting classifier has less accuracy than one of the individual predictors that made it

I have a simple question concerning the votting classifier. As I understood, the voting classifier should have the highest accuracy than those individual predictors which built it (the wisdom of the crowd). Here is the code from sklearn.ensemble…
Fethi
  • 21
  • 3
2
votes
2 answers

How to secure a gallery with voting functionality

I plan to prepare a gallery (in php) with a voting option. However, I've got security problems and do not know how to resolve them. I would like it to be possible to vote only one time per 24 hours. I tried to use IP address verification, but…
Lormitto
  • 477
  • 2
  • 7
  • 19
2
votes
2 answers

Ordering results by total vote count

I'm building a voting system. There are two tables - one for votes, other for items being voted on. In this example, the items are threads. First, I get the items. Second, I get the votes for the items & count them. Third, I'd like to display the…
thekodols
  • 475
  • 5
  • 13
2
votes
1 answer

JQuery + thumbs_up gem render vote count?

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 =…
ahuang7
  • 804
  • 1
  • 11
  • 26
2
votes
1 answer

How is upvote functionality done while staying on the same page? (PHP/MySQL)

I have a relational database and a thread/comment system. I'm having trouble thinking of a way of tackling upvoting, as the page would have to be refreshed for the server to notice any changes. I've created a new table, UPVOTESTHREAD which consists…
theupandup
  • 335
  • 3
  • 14
2
votes
2 answers

Weighted voting algorithm

I'm looking for information on which voting algorithm will be best for me. I have a basic 'Up/Down' voting system where a user can only vote the product up or down. I would like to make it weighted so that a product that is a year old will not be…
Bot
  • 11,868
  • 11
  • 75
  • 131
2
votes
1 answer

Drupal: Inserting fivestar widget in an external php file

I have been trying to load fivestar module and show the rating widget of the selected node in an external php file. I have gotten the rating widget displayed on the page but it only displays degraded version of the widget (non-JavaScript, dropdown…
RickyS
  • 21
  • 2
2
votes
2 answers

Rendering an Edit partial while selected a defaulted value

I have a partial in my rails app that loads the vote form (It's just a select with numbers ranging from 1-5). I'm now making another partial that loads up if the user has already voted it's suppose to be an EDIt partial where you get selected the…
Gotjosh
  • 1,019
  • 4
  • 13
  • 34