Search Results

Search found 289 results on 12 pages for 'polls'.

Page 7/12 | < Previous Page | 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Poll: What is stopping you from switching (from Java) to Scala ?

    - by Lukasz Lew
    What would make you to switch to Scala ? If you are negative on the switching to Scala, please state the reason as well (or upvote). As with all StackOverflow Poll type Q&As, please make certain your answer is NOT listed already before adding a new answer If it already exists, vote that one up so we see what the most popular answer is, rather than duplicating an existing entry. If you see a duplicate, vote it down. If you have interesting or additional information to add, use a comment or edit the original entry rather than creating a duplicate.

    Read the article

  • How to open python scripts directly by typing in their name in terminal (Mac OS X)

    - by Haffi112
    I'm working on installing django and running it on my system. I have a problem though, in this tutorial creating a project is explained by running the command django-admin.py startproject mysite My issue is that this doesn't work. I changed to the directory where django-admin.py is located and ran the command chmod +x django-admin.py with no results. I tried adding the directory with the file to my path without results. I ended up fixing my problem with this command python /location/of/django-admin.py startproject mysite which yielded the outcome I expected. My problem is: What do I need to change/configure such that command django-admin.py startproject mysite would be sufficient? Here are some experiments: 21:09~/Desktop/HI/NSN/Polls > django-admin.py startproject mysite -bash: django-admin.py: command not found 21:09~/Desktop/HI/NSN/Polls > ./django-admin.py startproject mysite -bash: ./django-admin.py: No such file or directory 21:09~/Desktop/HI/NSN/Polls > python django-admin.py startproject mysite python: can't open file 'django-admin.py': [Errno 2] No such file or directory 21:09~/Desktop/HI/NSN/Polls > /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1 -bash: /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py: /opt/local/bin: bad interpreter: Permission denied 21:09~/Desktop/HI/NSN/Polls > sudo /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1Password: sudo: unable to execute /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py: Permission denied 21:09~/Desktop/HI/NSN/Polls > sudo /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1sudo: unable to execute /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py: Permission denied 21:09~/Desktop/HI/NSN/Polls > python /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1 21:09~/Desktop/HI/NSN/Polls > ls mysite prufa1 Final edit: The problem is solved, see Ian C's answer for the right solution. Thank you everyone for helping my out, this was very fast!

    Read the article

  • Deploying Django at Dreamhost

    - by Imran
    I'm trying to get the Poll tutorial working at my Dreamhost account (I don't have any prior experience of deploying Django). I downloaded the script I found here (http://gabrielfalcao.com/2008/12/02/hosting-and-deploying-django-apps-on-dreamhost/) at my home directory and executed it. Now I have Python 2.5 and Django in ~/.myroot/ and my Django projects directory is ~/projects/ Here's the content of ~/projects/ directory (I copied the polls/ and and templates/polls/ directories myself). projects/ |-- admin_media -> /home/imran2140/.myroot/usr/lib/python2.5/site-packages/django/contrib/admin/media |-- dispatch.fcgi |-- polls | |-- __init__.py | |-- __init__.pyc | |-- admin.py | |-- admin.pyc | |-- models.py | |-- models.pyc | |-- polls.db | |-- urls.py | |-- urls.pyc | |-- views.py | `-- views.pyc |-- script_templates | |-- dispatch.template | `-- htaccess.template `-- templates `-- polls |-- detail.html |-- index.html `-- results.html 5 directories, 17 files Now what should I do to get the Polls app working? Update I finally got a "Hello World" Django app working with Passanger WSGI. It worked fine with both Server's default Python 2.3.5 and my installed Python 2.5.2. Passanger WSGI - Django at Dreamhost Wiki

    Read the article

  • Auto filling polymorphic table on save or on delete in django

    - by Mo J. Mughrabi
    Hi, Am working on an project in which I made an app "core" it will contain some of the reused models across my projects, most of those are polymorphic models (Generic content types) and will be linked to different models. Example below am trying to create audit model and will be linked to several models which may require auditing. This is the polls/models.py from django.db import models from django.contrib.auth.models import User from core.models import * from django.contrib.contenttypes import generic class Poll(models.Model): ## TODO: Document question = models.CharField(max_length=300) question_slug=models.SlugField(editable=False) start_poll_at = models.DateTimeField(null=True) end_poll_at = models.DateTimeField(null=True) is_active = models.BooleanField(default=True) audit_obj=generic.GenericRelation(Audit) def __unicode__(self): return self.question class Choice(models.Model): ## TODO: Document choice = models.CharField(max_length=200) poll=models.ForeignKey(Poll) audit_obj=generic.GenericRelation(Audit) class Vote(models.Model): ## TODO: Document choice=models.ForeignKey(Choice) Ip_Address=models.IPAddressField(editable=False) vote_at=models.DateTimeField("Vote at", editable=False) here is the core/modes.py from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Audit(models.Model): ## TODO: Document # Polymorphic model using generic relation through DJANGO content type created_at = models.DateTimeField("Created at", auto_now_add=True) created_by = models.ForeignKey(User, db_column="created_by", related_name="%(app_label)s_%(class)s_y+") updated_at = models.DateTimeField("Updated at", auto_now=True) updated_by = models.ForeignKey(User, db_column="updated_by", null=True, blank=True, related_name="%(app_label)s_%(class)s_y+") content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField(unique=True) content_object = generic.GenericForeignKey('content_type', 'object_id') and here is polls/admin.py from django.core.context_processors import request from polls.models import Poll, Choice from core.models import * from django.contrib import admin class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): inlines = [ChoiceInline] admin.site.register(Poll, PollAdmin) Am quite new to django, what am trying to do here, insert a record in audit when a record is inserted in polls and then update that same record when a record is updated in polls.

    Read the article

  • how can i allow user to create posts in website using ASP.NET [closed]

    - by Sana
    I am making a website "Online voting system" a part of my academic project ... besides allowing the registered voters to vote on the posts that I have created while developing the voting system ... I want to allow users to create polls by themselves too regarding any thing How can I implement this scenerio using ASP.NET and c# in VS 2010 .. with the user posting polls having: Post title label Description about poll Radio buttons for displaying various options to allow voting process to be carried out when user selects one option and submit his vote...

    Read the article

  • django ignoring admin.py

    - by noam
    I am trying to enable the admin for my app. I managed to get the admin running, but I can't seem to make my models appear on the admin page. I tried following the tutorial (here) which says: (Quote) Just one thing to do: We need to tell the admin that Poll objects have an admin interface. To do this, create a file called admin.py in your polls directory, and edit it to look like this: from polls.models import Poll from django.contrib import admin admin.site.register(Poll) (end quote) I added an admin.py file as instructed, and also added the following lines into urls.py: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', ... (r'^admin/', include(admin.site.urls)), ) but it appears to have no effect. I even added a print 1 at the first line of admin.py and I see that the printout never happens, So I guess django doesn't know about my admin.py. As said, I can enter the admin site, I just don't see anything other than "groups", "users" and "sites". What step am I missing?

    Read the article

  • problem in decoupling urls.py , while following a tutorial of django

    - by Nitin Garg
    http://docs.djangoproject.com/en/dev/intro/tutorial03/ I was at the step Decoupling the URLconfs where the tutorial illustrates how to decouple urls.py. On doing exactly what it says, i get the following error- error at /polls/1/ nothing to repeat Request Method: GET Request URL: http://localhost:8000/polls/1/ Exception Type: error Exception Value: nothing to repeat Exception Location: C:\jython2.5.1\Lib\re.py in _compile, line 241 Python Executable: C:\jython2.5.1\jython.bat Python Version: 2.5.1 Python Path: ['E:\\Programming\\Project\\django_app\\mysite', 'C:\\jython2.5.1\\Lib\\site-packages\\setuptools-0.6c11-py2.5.egg', 'C:\\jython2.5.1\\Lib', '__classpath__', '__pyclasspath__/', 'C:\\jython2.5.1\\Lib\\site-packages'] Server time: Mon, 12 Apr 2010 12:02:56 +0530

    Read the article

  • Wvdial randomly drops 3G connection - How to auto-reconnect?

    - by askvictor
    I'm using a 3G modem for a router running Ubuntu server 10.04. I have the connection established using wvdial, which works successfully, but sometimes the connection drops. I would like it to auto re-connect. I've set the "auto reconnect" in wvdial.conf, but this does not seem to work. Any ideas? Am I missing a config option, or should I try writing a script which polls the network status and resets if ppp0 has gone down?

    Read the article

  • Linux Under The Spotlight As We Prepare For A Chaos Bound National Elections

    <b>Tech Source:</b> "With less than a few days to go before the Philippines will hold its first ever fully automated national elections, it seems like we're in for a really bumpy ride. Serious, embarrassing, and idiotic technical glitches were discovered while testing the Precinct Count Optical Scan (PCOS) machines that will be used to count votes for the polls."

    Read the article

  • User Generated Content For SEO

    Among successful web pages, User Generated Content (UGC) is vital. Without page comments, uploaded videos and blogs, or polls and surveys, the website isn't as useful or successful. This post will provide some tips on how to get the best SEO benefit from the UGC on your page.

    Read the article

  • Can Cyber Stalkers Harass People on Myspace?

    There are countless areas on the Internet that many people go to meet new people, talk to their close friends and family members, and enjoy engaging in fun games, polls, and a variety of other exciti... [Author: Ed Opperman - Computers and Internet - June 02, 2010]

    Read the article

  • general learning methodology

    - by momo
    just wanted to hear on the different general learning paths people embark on when learning a new language/framework. the one i currently use, which is how i learned bash and am currently learning python, is: instant hacking tutorial (very short tutorial introducing the basic syntax, variable declaration, loops, data types, etc. and how they are generally used) in depth tutorial with good programming style and slightly topic-specific (e.g. Mark Pilgrim's Dive into Python), important topics for me personally are regex methods, file IO, and ways the different data types are utilized best (i wrote a very primitive bayesian spam filter using python's dictionaries to keep track of word occurrences) spaced-repition of syntax or short recipes (i use anki, with questions like 'create dictionary with filename and filesize metadata, human-readable' or simpler ones like 'match 0 - 3 occurences of the letter M in a string', or 'return/create an iterator from two sequences') the use of spaced-repitition has been invaluable, and i credit it with the ease that i can recall/create python algorithms. however, i've recently started looking into django, and i've found that spaced-repitition, at least in my case, doesn't work very well for learning a framework, it works best with short code recipes (either that or i should start looking into more basic django framework tutorials). the problem i'm encountering is that since framework programming is not only algorithms, but actually learning the API, which can be quite complex since you have to learn all the methods, modules, the places where they are stored, and the sequence of which things have to be done. for ex. in django to start a project that deals with polls (from the django tutorial), one has to create the project, edit the settings.py file, create the polls app, edit the models.py file (which requires knowing the classes that are present in the module models), edit the urls.py file, etc. i found that my spaced-repition method didn't work very well for this type of learning, so i wanted to ask you guys what method(s) you use for learning the different frameworks/APIs.

    Read the article

  • How do i map this in NHibernate

    - by Andrew Smith
    I Have two classes, Survey and Poll classes. Also I have Question and Question Choice classes. How do I map these so I come out with particular table formats. here is the classes involved. public class Survey { public IList<Question> Questions { get; private set; } } public class Poll { public Question Question { get; set; } } public class Question { public string Text { get; set; } public IList<QuestionChocie> Choices { get; private set; } } public class QuestionChoice { public string Text { get; set; } } The resulting tables that I'm shooting for include the following Surveys- a table of survey information. Polls - a table of polls information. SurveyQuestions -a table of survey questions. PollQuestions - a table of poll questions. SurveyChoices - a table of the question choices for the surveys. PollChoices - a table of the question choices for the survey. preferably i really want to know for fluent nhibernate, or just mapping xml is fine too.

    Read the article

  • Get XMMS2 to call outside script on automatic playlist advance?

    - by Alex Balashov
    Is there a way to get XMMS2 to call an outside script when it advances in a playlist - either automatically or via manual intervention (e.g. xmms2 next)? The goal is to have balloons pop up on my desktop to tell me what new song has started playing, and I really, really don't want to write a background daemon that polls 'xmms2 info' or 'xmms2 current' if there's a way to get it to issue the callback. Thanks in advance!

    Read the article

  • Architectural advice - web camera remote access

    - by Alan Hollis
    I'm looking for architectural advice. I have a client who I've built a website for which essentially allows users to view their web cameras remotely. The current flow of data is as follows: User opens page to view web camera image. Javascript script polls url on server ( appended with unique timestamp ) every 1000ms Ftp connection is enabled for the cameras ftp user. Web camera opens ftp connection to server. Web camera begins taking photos. Web camera sends photo to ftp server. On image url request: Server reads latest image on hard drive uploaded via ftp for camera. Server deleted any older images from the server. This is working okay at the moment for a small amount of users/cameras ( about 10 users and around the same amount of cameras), but we're starting to worrying about the scalability of this approach. My original plan was instead of having the files read from the server, the web server would open up an ftp connection to the web server and read the latest images directly from there meaning we should have been able to scale horizontally fairly easily. But ftp connection establishment times were too slow ( mainly due to the fact that PHP out of the ox is unable to persist ftp connections ) and so we abandoned this approach and went straight for reading from the hard drive. The firmware provider for the cameras state they're able to build a http client which instead of using ftp to upload the image could post the image to a web server. This seems plausible enough to me, but I'm looking for some architectural advice. My current thought is a simple Nginx/PHP/Redis stack. Web camera issues post requests of latest image to Nginx/PHP and the latest image for that camera is stored in Redis. The clients can then pull the latest image from Redis which should be extremely quick as the images will always be stored in memory. The data flow would then become: User opens page to view web camera image. Javascript script polls url on server ( appended with unique timestamp ) every 1000ms Camera is sent an http request to start posting images to a provided url Web camera begins taking photos. Web camera sends post requests to server as fast as it can On image url request: Server reads latest image from redis Server tells redis to delete later image My questions are: Are there any greater overheads of transferring images via HTTP instead of FTP? Is there a simple way to calculate how many potential cameras we could have streaming at once? Is there any way to prevent potentially DOS'ing our own servers due to web camera requests? Is Redis a good solution to this problem? Should I abandon PHP/Ngix combination and go for something else? Is this proposed solution actually any good? Will adding HTTPs to the mix cause posting the image to become too slow? Thanks in advance Alan

    Read the article

  • ElectionTracker v1.0 Screen Shots

    - by samkea
    The Election tracker as the name suggests, is a web application that will help in monitoring Election Polls in any particular country in real time so that interested stakeholders in any part of the world a can follow the progress of the elections in your country. It also has a mapping component incorporated that utilises ArcGIS ESRI shapefiles and one can also use it for map and kml files from googlemaps,  openstreetmaps and bingmaps. It is about tho be finshed and it will be piloted in many different countries. The system will be viewable on both PC or Mobile phone. Development teschnologies used include. SILVERLIGHT with C#, ASP.NET, IIS ( for Development Languages), SQL Server 2008, SQLite, XML( for Database), NUnit and Fiddler ( for Unit testing and Debugging), Silverlight Charts and Report Viewer, Visifire charts (Reporting) , Visual Studio 2010 and NET Framework 4.(for Development Tools). Screenshot 01:Map Visualisation On Click Screenshot 02: Zoomed in Province/District Map Development still continues.

    Read the article

  • SQLite with two python processes accessing it: one reading, one writing

    - by BBnyc
    I'm developing a small system with two components: one polls data from an internet resource and translates it into sql data to persist it locally; the second one reads that sql data from the local instance and serves it via json and a restful api. I was originally planning to persist the data with postgresql, but because the application will have a very low-volume of data to store and traffic to serve, I thought that was overkill. Is SQLite up to the job? I love the idea of the small footprint and no need to maintain yet another sql server for this one task, but am concerned about concurrency. It seems that with write ahead logging enabled, concurrently reading and writing a SQLite database can happen without locking either process out of the database. Can a single SQLite instance sustain two concurrent processes accessing it, if only one reads and the other writes? I started writing the code but was wondering if this is a misapplication of SQLite.

    Read the article

  • How Often do You Change E-mail Addresses? [Poll]

    - by Asian Angel
    Recently we ran across an article about a man who consistently changes his e-mail address every 20 months. Why? To throw off spam. With that in mind we became curious and decided to ask how often you change your e-mail addresses… Everyone has their own method for dealing with the bane known as spam whether it is heavy filtering, separate accounts to catch possible spam activity, abandoning swamped accounts, etc. Here is your opportunity to share how you deal with spam, protect your accounts, and to voice your thoughts regarding consistent timed changes to new accounts as mentioned in the article linked to below. How-To Geek Polls require Javascript. Please Click Here to View the Poll. How Frequently Do You Change Your Email Address? [Apartment Therapy] 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8

    Read the article

  • Building a chat-like functionality in iOS

    - by Mani BAtra
    I was planning to implement a functionality wherein a user can send data to a friend of his, similar to sending messages in WhatsApp. This is how I broke down the problem : The user registers for the app. This equates to user info being stored on a dedicated server. With the phone number as the key identifier. The user selects the friend to send a message to and pushes the data. The receiver polls the server regularly and acknowledges that the data has been received. I did a little bit of research and am thinking of implementing this using the XMPP Framework for iOS. Any pointers as to is this the correct implementation or some advice in general?

    Read the article

  • Recommended flexible website solution?

    - by Omega
    My site has a MyBB forums installation, and that is pretty much all I need. Forums. However, I need a homepage and a couple other static pages, for showing relevant information, links, etc. I don't need something fancy, all I need is something very flexible regarding theme and style editing, and just a couple simple modules, like public polls. That's all. I am very graphical, and I am looking for something to let me edit pretty much every aspect of the site. These are static pages, mainly, so I don't need something very complex. Some people tell me to use Dreamweaver, but quite honestly, that is not what I am looking for, even thought it does offer a lot of flexibility. I want something like, you know, Drupal or.. some other simple, deeply-editable in terms of graphics and style web platform. What would you recommend to me? Thank you.

    Read the article

  • Reader Poll: Are You Switching to Internet Explorer 9?

    - by Jason Fitzpatrick
    The recent release of Internet Explorer 9 polished up the IE line with a new interface, hardware acceleration, and more. Is enough to convince you to switch? Yesterday we gave you a full run down of the Internet Explorer 9 release and highlighted the major improvements including: a totally new interface that’s even more streamlined than that of Google Chrome, direct access to your video card for super fast acceleration, customizable menus for pinned sites, HTML 5 support, and a combined address and search bar, among other improvements. Is it enough to sway you? Cast your vote in the poll below and then sound off in the comments. How-To Geek Polls require Javascript. Please Click Here to View the Poll. How to Create an Easy Pixel Art Avatar in Photoshop or GIMPInternet Explorer 9 Released: Here’s What You Need To KnowHTG Explains: How Does Email Work?

    Read the article

  • Bind multiple events to jQuery 'live' method

    - by Will Peavy
    jQuery's 'live' method is unable to handle multiple events. Does anyone know of a good workaround to attach multiple events to a function that polls current and future elements? Or am I stuck using duplicate live methods for each event handler I need? Example - I am trying to do something like: $('.myclass').live('change keypress blur', function(){ // do stuff });

    Read the article

  • Django - 2 fields unique together

    - by webvulture
    Suppose, I want to record say poll choices by users everyday. In this case, i have a table named vote which has columns poll , choice and user-id . So how can i out the constraint (maybe in the django models or wherever possible) that poll and user-id both should not be the same for any entry but like the same user can vote for various different polls once and obviously various users can vote for the same poll. I hope I am clear.

    Read the article

  • Calculating percent of votes inside mysql statement.

    - by Beck
    UPDATE polls_options SET `votes`=`votes`+1, `percent`=ROUND((`votes`+1) / (SELECT voters FROM polls WHERE poll_id=? LIMIT 1) * 100,1) WHERE option_id=? AND poll_id=? Don't have table data yet, to test it properly. :) And by the way, in what type % integers should be stored in database? Thanks for the help!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12  | Next Page >