Questions tagged [voting-system]

179 questions
0
votes
1 answer

Limiting an action to once per guest user (without log in)

To aid engagement, it would be preferable to allow users who are not logged in to a website to vote on a topic. Obviously this should be limited to one vote per user per topic. I am well aware that the ideal solution would in fact be to force users…
enigma
  • 3,476
  • 2
  • 17
  • 30
0
votes
1 answer

Add 1 to total individually using JQuery Drag and Drop

Using JQuery UI, I have a list of items which for every individual drag and drop to the vote div I would like to add 1 to the span total. At the moment every drag and drop is adding 1 to the first list item, I have tried everything I…
0
votes
1 answer

Voting system from scratch

I'm new from rails and I want to do a voting system for my app where user can vote for post that I call "Idee". An user can vote only once for a post and a post can only be upvoted. I defined a column "like" for my post and I did this…
Simon M.
  • 2,244
  • 3
  • 17
  • 34
0
votes
1 answer

cannot update without specific objectId error using Swift and Parse

im using a gesture recognizer to increment votes in my backend and then using that to update the page and each cell. I am trying to link the image with the objectId as to having a way to update each images votes. issues keep coming up with my…
0
votes
2 answers

DRY voting methods

I have a prompt asking to write my up_vote and down_vote methods in only two lines using 'redirect_to' and the 'update_vote!' method as presented below. Implementing redirect_to is easy enough, but I'm not quite sure how to write my up/down_vote…
Kris
  • 123
  • 10
0
votes
1 answer

How do I write data into a mysqli database using a button

Hello Im writing a voting system for fun. The idea is that you vote on a music playlist, therefor the most popular song by vote gets played next. The track names as well as number of votes are stored in a mysql database. I am able to read data from…
0
votes
1 answer

my voting system is already fine but

i'm a beginner in java and i have these codes for my voting system: public void Result_Election(){ int vote1=Vote_President(); String pres1="Theo"; String pres2="William"; String pres3="Maxon"; String…
lel
  • 1
  • 1
0
votes
2 answers

voting system increment votes

if (vote1 == 1) { result[0] = result[0] + 1; i.println(pres1 + " " + result[0]); } my if statement are up to 4 (eg: else if (vote1==2...3...4)). every time i choose multiple candidates, the result will get wrong and sometimes, the output…
bruh
  • 79
  • 3
  • 13
0
votes
2 answers

How to get the id of a new post that was added to Firebase with `push`?

I'm trying to create a like/unlike voting system for a post. First I'm using .push to send a text input to Firebase: $('.btn').click(function(){ var post = $('.status-box').val(); var id = snapdata; ref.child("post").push({user: id, text:…
0
votes
1 answer

Blacklist model in Rails 4

I am using Act_as_votable to implement like/dislike voting system. It works just perfect. But now I am facing problem to blacklist exact that item that has received at least 30 downvotes. I have model Advertisement. That has column in_blacklist with…
Edgars
  • 913
  • 1
  • 19
  • 53
0
votes
0 answers

acts_as_votable NoMethodError (undefined method `comments' for nil:NilClass):

I'm trying to implement voting on comments within pits in my app and I keep getting a no method error. I've tried rearranging my code a number of different ways to get it to work but its not cooperating. My error in terminal shows this Parameters:…
Mark Hustad
  • 169
  • 1
  • 14
0
votes
2 answers

What methods are available to automatically deal with spammers with PHP/MySQL

I am currently creating a news ranking application wherein I have users connected to one another, and can post news items to a database. Users can vote on said news items within a rating of 10 - 1. 10 giving the item the highest possible vote and in…
Pixulated
  • 33
  • 1
  • 7
0
votes
1 answer

Need Rating and ranking Mysql tutorial

I would like a simple example tutorial on how to rank user votes Example: from a table of list of 20 people I would like for users to be able to vote on several categories of those people Vote for Best Eyes Vote for Best Face Vote for Best…
0
votes
0 answers

Voting-system wont pass on vote to database

I'm having difficulties on debugging why this voting-script I'm trying to adapt wont update the vote count and register the user's IP-address in the database. As of now neither of the two things seem to be working. The script consists…
Mojoe
  • 13
  • 3
0
votes
1 answer

Calculate the Ranks of Candidates based on Votes and Total Candidates

How can I claulate the rank of each candidate when I have the total candidates and votes secured by each? I've managed the percentage part, but calculating the rank has me stuck. I'll be using MySql in the end for this, but right now I only need the…
jmenezes
  • 1,888
  • 6
  • 28
  • 44