search for: votes

Displaying 20 results from an estimated 2155 matches for "votes".

Did you mean: notes
2012 Oct 11
2
survey package question
...lling station (in general schools where people vote, for a county, for example, there are 15 polling stations) 2) inside each polling station, there are voting units, where people actually vote (on average there are about 40 voting units for polling station) 3) for each voting unit I have the total votes by candidate (e.g., candidate 1 =322, candidate 2=122, candidate 3= 89) The initial sampling design is: 1) selection of 5 polling stations PPS (based on number of voters) 2) selection of 10 voting units (SRS) I am interested in estimating the proportion of votes by candidate (let's assume we...
2008 Feb 05
1
Functional Test has error when testing controller updates_attribute of its parrent.
I am working in Rails 2.0 and I have the following functional test. class VotesControllerTest < ActionController::TestCase def test_should_create_vote assert_difference(''Vote.count'') do post :create, {:vote => {:vote_value => 5, :user_id => users(:nick).id, :entry_id => ent...
2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#crea...
2009 Nov 09
3
How can I improve a Ruby on Rails code that hast a lot of SQL as strings?
...''user_id = ?'', user_id], but in a join or a select, how do I do it? - Does my use of class constants here make sense? - Is there any chance at all of using the ORM and less string? - Any other thing to do to it? The code is this one class Item < ActiveRecord::Base has_many :votes, :as => :voteable def self.ranking(user_id) Item.find(:all, # items.* for all the Item attributes, score being the sum of votes, user_vote is the vote of user_id (0 if no vote) and voter_id is just user_id for latter reference. :select => "items.*, IF...
2006 Aug 30
4
Users voting
...t it to one vote per day, for example. I could record the fact that they''ve voted in the session, but I''d really rather not have sessions for the portions of the site where voting is relevant. This idea also seems fairly fragile. So far, the best plan I have is to add a "votes" table that records an ip address and a time stamp. Whenever a "vote" link is hit, the controller could find and delete all records over 24 hous old, check the current ip address against those left in the table, then record the vote and ip address. However, this seems a little i...
2005 Jun 02
1
Re: Vote For CentOS :) -- yes, vote CentOS if it's what you like
From: Christopher Snow <cs at m0n0.co.uk> > If that's the case, shouldn't the credit vote go to Fedora? Disclaimer: This is 100% my _opinion_ (don't take it otherwise) 1. Credit At some point a lot of credit can go to a lot of projects. Yes, many are thanx to Red Hat -- by far the largest of any commercial entity. But then many are thanx to many maintainers in general.
2013 Feb 08
0
[Vote] Formal vote for Mirage to be accepted as Xen.org Incubation Project (deadliner Feb 15th)
Hi everybody, after the initial positive community review of the http://wiki.xen.org/wiki/Mirage_Incubation_Project_Proposal, it is time to have a formal vote. Who can vote? - Project leads of Mature Xen.org projects - Committers of Mature Xen.org projects - Others can register their vote in support of the project, but the vote is not binding. How to vote? - Vote via the voting form at
2006 Apr 10
4
Best way to propogate model rules to controller?
Hey everybody, I''ve got a model that represents kind of a turn-based games. Certain actions can only be made unders certain conditions. For simplicity, we''ll say that the only condition for a particular action is that the weekday be Tuesday. def add_vote raise ''You cannot vote today'' unless Date.today.wday == 2 ... end In my controller I want to show a
2007 Dec 20
3
ActiveRecords Eager Loading
...lted in this expensive query. After indexing, it take about 3 seconds to execute. (before indexing it is about 25 seconds) SELECT DISTINCT articles.id FROM articles LEFT OUTER JOIN assets ON assets.attachable_id = articles.id AND assets.attachable_type = ''Article'' LEFT OUTER JOIN votes ON votes.voteable_id = articles.id AND votes.voteable_type = ''Article''AND user_id = 2 WHERE (assets.parent_id is null) ORDER BY stat_final_ranking desc LIMIT 20 ----------------------------------- so, what I plan to do it is to cache the expensive query without including vote tabl...
2005 Jun 30
3
Vote for CentOS - AGAIN :)
The preliminary round voting is completed in the "2005 Readers' Choice Awards" at Linux Journal. CentOS was nominated in the "distribution:" category along with 18 other Linux distros ... and we finished in the top 3 (along with Ubuntu and FedoraCore). Thanks to every one who voted for CentOS. I really did not expect that we would be on the final ballot, though I am
2005 Sep 12
1
One day left to vote for CentOS
CentOS has been nominated for an award in the Linux User awards. Please vote for CentOS !! Voting finishes tomorrow - 13th September. Please vote at :- http://www.linuxawards.co.uk/index.php You will need to vote for all categories otherwise the vote wont count. Thanks Lance -- uklinux.net - The ISP of choice for the discerning Linux user.
2006 May 13
4
undesireable lazy loading
...not able to solve myself as a rails-newbie. The model code looks like this: class Link < ActiveRecord::Base has_one :user_vote end class UserVote < ActiveRecord::Base belongs_to :user belongs_to :link end I have a SQL query that is responsible for pulling out all links along with votes from a database: links = Link.find_by_sql( ["SELECT * FROM links LEFT JOIN user_votes ON links.id = user_votes.link_id" + " AND user_votes.user_id = ?", session[:user_id]] ) If a user hadn''t voted for a given link yet, an empty record is returned (NULL). The p...
2006 Feb 17
2
validate uniqueness of two fields
I have Proposals and Members and Members can vote for a proposal only once. So, I have "Vote belongs_to :member, :proposal", but to make sure a member only votes once, I want to make sure that there isn''t a vote in the db with that member_id and proposal_id. I can just put the appropriate find in a vote.valid? but I wanted to make sure I wasn''t missing a nice rails shortcut. In other words, can I do something with "validates_uniqu...
2008 Nov 20
1
binomial glm???
Hi everyone, newbee query! I've installed R 2.8.0 and tried to run this simple glm - x is no of cars in a given year, y is the number voted in an election that year while n is the population 18+: votes <- data.frame(x = c(0.62,0.77,0.71,0.74,0.77,0.86,1.13,1.44), + y=c(502,542,711,653,771,806,934,1123), n= c(1617,1734,1680,1793,1678,1751,1807,1879)) > votes$YM <- cbind(votes$y, votes$n - votes$y) > fml <- glm(YM ~ x, family = binomi...
2009 Jan 03
1
AppDB Voting System Wierdness
...get fully working on wine - "Company of Heroes (http://appdb.winehq.org/objectManager.php?sClass=application&iId=4506)". I can't understand why there isn't a global voting for this like all the other games. As it is, you can only vote on different versions of it. The combined votes of all the "versions" would be 41, which I think serves to highlight how much a game like this would be nice to get working proberly on wine. Instead its only sitting at a low 17. Doesn't this seem a bit wrong? P.S This could be me just having a moan because the only reason I still...
2007 Aug 23
0
How to get callee extension in applicationmap(features.conf)
hello, I use trixbox.I had define a feature code testfeature: [applicationmap] #include features_applicationmap_additional.conf testfeature => *3,callee,Macro,vote [featuremap] blindxfer => ## ; Blind Transfer disconnect => ** ; Disconnect Call automon => *1 ; One Touch Record atxfer => *2 ; Attended Xfer testfeature => *3 here is my macro-vote: [macro-vote] exten
2002 Jul 16
1
Vote Vorbis!
...ool category, so go vote for your favorite codec! Actually, you even have the choice of voting for "ogg123" or for "Vorbis Tools", since it seems someone at Linux Journal is not quite aware of what Vorbis Tools contain. I suggest voting for "Vorbis Tools", so that the votes are concentrated into one entry. The poll will close on August 12, 2002, and the results will be published in the November 2002 issue of the Linux Journal. The poll is here: http://www.linuxjournal.com/rc2002/ -- adrien.beau@free.fr - http://adrien.beau.free.fr --- >8 ---- List archives:...
2005 Feb 19
2
I have a odd question...
Hi all. I am going to do a simple "voting application" for a radiostation. The idea is to have listeners call in to vote on songs. What I want to do is to take a phonenumer for each song and present the result on a simple webpage. Eg. To vote on song number one, call 555-1111 To vote on song number two, call 555-2222 etc etc. When the listener calls in, a playback tells him:
2006 Feb 27
2
heckit with a probit
Hi I have data for voting behaviour on two (related) binary votes. I want to examine the second vote, running separate regressions for groups who voted different ways on the first vote. As the votes are not independent, I guess that there is an issue with selection bias. So, I think I would like to fit a heckit style model but with a binary dependent variable -...
2007 Jun 01
2
Ferret FileNotFound error after adding counter_cache to mode
I have a model that I''ve been indexing and searching with ferret with no problems. I just added a counter_cache for some voting functionality to the same model and now when I perform the voting fxn on an object from that model, I get the FileNotFound error as it looks for a file named "_1c_1.del" ...which breaks my voting function. I tried killing the server and my index