Questions tagged [voting]
329 questions
0
votes
0 answers
Vote-up / Vote-down SQL Query returns "FAILED!" each time
I'm trying to add vote up / vote down functions for each item I have in a table. I am currently working on implementing this one here: www.technabled.com/2009/02/reddit-style-voting-with-php-mysql-and.html
But, it doesn't work for me. Once action is…

Mafia
- 792
- 2
- 19
- 39
0
votes
2 answers
PHP on a site with dynamic content
SO FAR I have made a website which is connected to a MYSQL database. On the website I have many buttons, each button corresponds to a table in my database. When I click the button, a javascript function opens my php file in this form…

slaw
- 611
- 2
- 7
- 20
0
votes
1 answer
rails with ajax, respond_to confusion
i have a voting system which i would like the voting response to be asynchronous.
in my 'show' view i have...
<%= render 'score' %>
which renders
<% if @user.voted?(@lesson) %>
<%= render 'voted' %>
<% else %>
<%= render 'unvoted' %>
<%…

Sasha
- 3,281
- 7
- 34
- 52
-1
votes
1 answer
Voting system that being run at the same time not all saved
so i am working at voting system that have code like this
public function storeVote(Request $request)
{
$voting = Voting::findOrFail($request->voting_id);
if($voting->status == 1){
$checkVote =…

PamanBeruang
- 1,531
- 5
- 27
- 64
-1
votes
1 answer
How to make a variable name dependant on input in python?
I need to create multiple variables based on int input so that if input is 5 then variables are created like: worker1, worker2, worker3, etc.
Is there any way in which I could generate variables like these and then add points to them dependant on…

muchuu17
- 5
- 1
-1
votes
1 answer
How to get results from txt file and then sum it?
I'm writing an electronic voting system and in the end, I want to show on the screen percentage results, not the numbers for candidates. So I collected everything in a file. It looks like this: "results.txt"
Jessica: 2
Amanda: 3
Michael: 0
Sam:…

Nastya Osipchuk
- 3
- 2
-1
votes
1 answer
Laravel : Prevent the user from voting twice
I want to stop a user from voting twice and redirect them to the result page.
Controller
public function view_survey(Survey $survey)
{
$survey->option_name = unserialize($survey->option_name);
$answers = \App\Answer::pluck('Answer',…

Salem loress
- 359
- 1
- 5
- 13
-1
votes
1 answer
Jcreator Voting Program
My teacher wants us to make a program that counts the total number of votes for two candidates from a variable number of precincts. So the user inputs the candidates’ names as strings and is then prompted to enter the number of precincts prior to…

imnottellingyou
- 1
- 4
-1
votes
5 answers
How do I create a simple vote up / down php script in php?
I want a simple non-MySQL PHP script that allows viewers to vote up or vote down a page. If it has to be MySQL database driven, then that's just how it has to be. Ideally, not though.
So basically if you were to view source of this page in a web…

Garry
- 251
- 2
- 13
-2
votes
1 answer
Is it possible for an ensemble classifier to return bimodal vote?
Knowing fully well that Majority and Plurality voting of ensemble classifiers for prediction of a class label returns the modal prediction by each base classifier, if there's an ensemble of about 4 classifiers and above, is it possible to get a…

David Otoosakyi
- 3
- 2
-2
votes
1 answer
Software to optimise people's preferences
Say I have two colours of lollipops, and five lollipops of each colour (so ten in total), and I want to distribute these among my friends. We each submit some ranked preferences:
Ben: 1 - Orange, 2 - Green, 3 - Red
Joe: 1 - Green, 2 - Blue, 3 -…

Jack Nagy
- 3
- 1
- 5
-2
votes
1 answer
Thumbs Down - YouTube style voting system where user can only vote once but can change from like to dislike vice versa
I am making an application where users can post/comment/ and like posts. I would like to implement a thumbs up/down similar to YouTube. I currenlty have two IBActions for like and dislike buttons. My question is, how to deselect the button when the…

suitescripter123
- 65
- 9
-2
votes
3 answers
Online Voting Application. How to avoid repeated voting from same user
Possible Duplicate:
Unique IPs in a voting system
I am developing a small web app where it needs an online voting system using php for my college event. I was obtaining IP Address and storing it in database to prevent repeated voting from same…

aayush shrestha
- 1,858
- 2
- 17
- 33
-4
votes
1 answer
Self ordering voting system
I need some javascript based code that can help my voting system. Basically I am struggling to work out how to get my items that receive votes to move into order by itself LIVE. So If an item had 52 votes and the item below gained 2 votes to make 54…

kris
- 1
- 1