Questions tagged [voting]

329 questions
1
vote
1 answer

Instant-Runoff Voting in JavaScript with Additional Votes

I was trying to implement IRV in JavaScript, but I only get 10 pairs of votes per 5 seconds (for development testing only), so it was impractical to add to an array each time that a new pair of votes arrive to a client. So I was wondering if there…
Rui Pedro
  • 95
  • 1
  • 8
1
vote
1 answer

Rails: Simple survey with json/xml output

I want to create a simple app with a webform interface for adding questions and answers. Something like voting. In one form I want to have a textfield for a question and several addable/removable fields for answers. Is there some gem for that? I…
rackom
  • 185
  • 3
  • 14
1
vote
0 answers

Looking for a way to disable Helix Swarm code review votes

I'm looking for a way to disable the voting system in Helix Swarm. Best case to completely remove it, or to set the required votes to 0. Thank you.
PeterSilie
  • 11
  • 1
1
vote
2 answers

Array query PHP + mongoDB - voting system ips

can you maybe help me please? I'm making my voting system in php + mongodb, and I would like to keep the ip addresses which already voted. What would be to best way? I was thinking about doing it like this: $ip=$_SERVER['REMOTE_ADDR']; $ipData =…
mrkva
  • 336
  • 2
  • 13
1
vote
1 answer

Polling Control in ASP.NET

I want to make a voting control that allow the user to vote on one option and view the result , I don't know if there is a ready made controls that make that in ASP.NET or JavaScript, or I have to build it from scratch, please if any one can help…
Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175
1
vote
1 answer

Select the maximum iterated name inside a list of names in python

I have a list of names, some names may be iterated. I want to make a counter for each name to select the maximum iterated one. For example my list is as follow: list = ['ABC', 'BCD', 'ASD', 'ABC', 'ABC', 'ABC', 'ZXC', 'BCD'] I want the program to…
hh tt
  • 395
  • 5
  • 22
1
vote
0 answers

Voting (increase counter) of the predicted class to select the maximum voting one in python

I have dataset with 100 class and want to make a prediction. My structure contains 8 classifier, each classifier refer to some class label. I want to make vote to each output class label from each classifier (each resulted class makes to increase…
hh tt
  • 395
  • 5
  • 22
1
vote
0 answers

Voter classes in Symfony 4

I'm taking over someone's code and I don't understand something about the voting. Here is the PhotosController class: class PhotosController extends Controller { /** * @Route("/dashboard/photos/{id}/view", name="dashboard_photos_view") …
Brent Heigold
  • 1,213
  • 5
  • 24
  • 50
1
vote
2 answers

Why doesn't this Ruby on Rails voting code work?

So I really thought this would work to create the voting system like we have here on SO: def create @video = Video.find(params[:video_id]) @vote = current_user.video_votes.find_or_create_by_video_id(@video.id) if @vote.value.nil? …
Justin Meltzer
  • 13,318
  • 32
  • 117
  • 182
1
vote
2 answers

Optimal voting solution

I have a simple blog webapp where users may vote. What would be the advantages of having a single integer that goes up or down(should negative numbers be allowed?), or having a likes and dislikes counts that only go up. Which is more flexible, which…
TheOne
  • 10,819
  • 20
  • 81
  • 119
1
vote
1 answer

Handling votes through forms

I installed django-vote which has a simple API: review = ArticleReview.objects.get(pk=1) # Up vote to the object review.votes.up(user_id) # Down vote to the object review.votes.down(user_id) I've got a Car page with multiple reviews that I wish…
steerr
  • 151
  • 2
  • 4
  • 13
1
vote
1 answer

Like/Dislike style Voting Database in Rails

I’m creating a voting feature for our website in the style of YouTube “Likes” and “Dislikes” and Digg using Ruby on Rails 3. I have having trouble coming up with the right scheme. I have three models, Users, Topics, and Votes. Each User will make…
1
vote
2 answers

Voting with Ajax in Rails

I'm trying to allow users to vote a record up/down with Ajax. I'm using the vote_fu plugin for the voting functionality, and everything works fine without Ajax. I'm now trying to figure out the best way to implement the asynchronous functionality…
Eric
  • 342
  • 1
  • 2
  • 12
1
vote
1 answer

Ensembling with dynamic weights

I was wondering if it is possible to use dynamic weights in sklearn's VotingClassifier. Overall i have 3 labels 0 = Other, 1 = Spam, 2 = Emotion. By dynamic weights I mean the following: I have 2 classifiers. First one is a Random Forest which…
1
vote
1 answer

Pairwise Comparison: comparing sublists within one list

Ok, so I'm trying to write a method of counting ranked ballots known as Pairwise Comparison. I should specify that I am a complete novice when it comes to writing code in every sense of the word. So far I have managed to create the ballots (thanks…