Questions tagged [voting]

329 questions
1
vote
1 answer

Obtaining a winner from a table using a query

I have created a voting application in Borlands Delphi 7 that registers votes and updates an access table My access table consists of two columns, column 1 is the candidate's name, and column 2 is the number of votes he/she has obtained What would…
Keaton Pennells
  • 189
  • 2
  • 4
  • 15
1
vote
1 answer

cast vote using asp.net and sql

I m making an app on mobile voting on android.. to support that i have some pages in asp.net. now i am stuck where i have to make a page in which casting of vote is to be done... i came up with this... the program consists of three steps.. step 1…
1
vote
4 answers

Voting Functionality Ruby on Rails - Easy Question

I want to add a "like" functionality to a blog I am creating in Ruby on Rails to let people "thumbs up" a post. Then I would like to be able to display the most liked posts in the side bar. I am new to rails so rely heavily on tutorials and stack…
bgadoci
  • 6,363
  • 17
  • 64
  • 91
1
vote
1 answer

Django Voting Adding Reddit Style - Link model missing

I want to reuse any existing voting app in Django. I tried using Django Voting app - http://code.google.com/p/django-voting/wiki/RedditStyleVoting. This app has following code in models.py from django.conf.urls.defaults import * from…
Arovit
  • 3,579
  • 5
  • 20
  • 24
1
vote
1 answer

Stackoverflow-like comments voting SQL query

I'm developing a commenting system like Stackoverflow or Disqus has where people can comment and vote on the comments. I have three tables for this: USERS, COMMENTS, and VOTES. I'm having trouble figure out how to write the query to count votes and…
tim peterson
  • 23,653
  • 59
  • 177
  • 299
1
vote
1 answer

Implementing anonymous authentication and double voting prevention

I am thinking for ways to implement a mechanism which enables a user to vote,without logging any of his details. Each user has a set of attributes that enable him to vote. For eg. Id,name,email-id. Using these attributes we must guarantee that the…
Works On Mine
  • 1,111
  • 1
  • 8
  • 20
1
vote
2 answers

RoR voting system. Counting votes by condition vote = true or vote = false not working

I have these models Issue Vote Issue has_many votes and Vote belongs_to issue. The Vote model has a boolean vote attribute. On the issues index view I want to cycle through the issues and display the title, body, an up vote button, a down vote…
Dan
  • 641
  • 9
  • 25
1
vote
1 answer

Most efficient database design for this data

My database knowledge is reasonable I would say, im using MySQL (InnoDb) for this and have done some Postgres work as well. Anyway... I have a large amount of Yes or No questions. A large amount of people can contribute to the same poll. A user can…
Z-Mehn
  • 268
  • 1
  • 2
  • 12
1
vote
1 answer

Ranking system design

I need some help to figure out how to create a ranking system. For example, let's take music albums, I want to create and maintain three different rankings on each album; ranking in all albums, ranking in genre and ranking of the artist's own…
grasshopper
  • 1,381
  • 4
  • 19
  • 36
1
vote
2 answers

Ajax sends data multiple times

I made a simple Ajax vote script for the posts of users: + 1 and -1. Everything works fine, but sometimes with one click for some reason the data sent +3, +6, -2 etc. I made a screenshot of Chrome developer tool. It is seen that that one click is…
Astraport
  • 1,239
  • 4
  • 20
  • 40
1
vote
1 answer

No route matches {:action=>"vote_up", :controller=>"posts"} error for thumbs_up

I'm trying to implement the thumbs_up gem into my app and I keep getting this error even though I have a route for the vote_up action My posts controller looks like def vote_up begin current_user.vote_for(@post =…
0
votes
3 answers

jquery update html with returned mysql data after POST

I have a jquery/php voting system I'm working on. Once a user clicks a vote button a jquery modal pops open and they must confirm their vote by clicking "Confirm". This will send an ajax request to update the database and what not. After clicking…
MAZUMA
  • 913
  • 3
  • 10
  • 20
0
votes
1 answer

Structure for recurring unlimited voting contests

I am in the planning stages of building an app where all users (registered or not) can vote every minute or so. The voting window should last a set period of time (for ex. 1 month). At which point a winning entity is defined and the voting period…
Marc
  • 1,033
  • 2
  • 10
  • 28
0
votes
1 answer

Rails: current_user.vote_up(@micropost) undefined method

I am currently getting an undefined method for adding <% if current_user.vote_up?(@micropost) == true %>, I am unsure what is causing the error because I defined it here in the micropost controller. Any suggestions? Micropost Controller def…
Kellogs
  • 471
  • 1
  • 4
  • 17
0
votes
3 answers

Saving cookies for voting ASP.NET

My problem is simple yet I couldn't find the best solution to it. I want to know if someone voted on a post ON PAGE LOAD (not when they vote) and if they did, change the voting image so that they can see they already voted on it. Best solution that…
Pabuc
  • 5,528
  • 7
  • 37
  • 52