Search Results

Search found 11 results on 1 pages for 'rexe'.

Page 1/1 | 1 

  • Naming a predicate: "precondition" or "precondition_is_met"?

    - by RexE
    In my web app framework, each page can have a precondition that needs to be satisfied before it can be displayed to the user. For example, if user 1 and user 2 are playing a back-and-forth role-playing game, user 2 needs to wait for user 1 to finish his turn before he can take his turn. Otherwise, the user is displayed a waiting page. This is implemented with a predicate: def precondition(self): return user_1.completed_turn The simplest name for this API is precondition, but this leads to code like if precondition(): ..., which is not really obvious. Seems to me like it is more accurate to call it precondition_is_met(), but not sure about that either. Is there a best practice for naming methods like this?

    Read the article

  • Outlook: Displaying email sender's job title in message list

    - by RexE
    Is there a way to display the sender's job title in the Outlook email list pane? I would like to see something like: From | Title | Subject | Received Joe Smith | President | Re: Proposal | 5:34 Bob Chen | Engineer | Fw: Request | 5:30 I am using Outlook 2010. All my mail comes through an Exchange 2010 server.

    Read the article

  • Performance of Google Desktop Search on Windows 7

    - by RexE
    I have read that that installing Google Desktop Search on Vista can slow down the computer because Vista already has a search indexing feature, and adding Google's separate indexing feature results in a performance hit. (Google hints at this in their FAQ here.) Does this problem also exist in Win 7? Is there a workaround that improves performance?

    Read the article

  • Can I use Google Apps for mail but Exchange for calendar, tasks & contacts?

    - by RexE
    My parents' domain is registered with Google Apps (standard edition). Currently, the only service they are using is email (which they access via IMAP in Outlook). I'd like to register this same domain with a hosted Exchange service so that they can sync their Exchange calendar, tasks, and contacts with Outlook as well. I'd like to keep their email on Google for a couple of reasons. Is this possible?

    Read the article

  • Accessing local files through an http:// address

    - by RexE
    I would like to access a folder of mp3 files on my local Windows machine through http:// addresses. For example, typing http://localhost:9999/songs/test.mp3 into my browser would play test.mp3, which sits in a specified folder on my C: drive. What is the very simplest way to do this? (Background: a program I'm using wants me to enter the URLs of these files, but assumes they are remote and accessed over http. It doesn't accept URLs of the form file://C/Users.... So, I'd like to give these local files addresses that makes them "look" remote.)

    Read the article

  • Win 7: How can I resize a window to make it much bigger than my screen?

    - by RexE
    I have a window that I'd like to make much bigger than my physical screen (explanation of why below). I hit Alt+Space, M, and then press the Up arrow to move the title bar above the physical top of my screen. However, when I press Enter to set it, the title bar snaps back to the top of my screen. How can I prevent this from happening? Background: I want to get a hi-res image of a neighborhood map so that it can be printed to a poster. Google Earth has a "Save as JPG" feature, which will save the map in the window to a file. The bigger the window, the bigger the JPG; so, I'm trying to make the window as big as I can. Alternate suggestions welcome.

    Read the article

  • Dynamically expanding Django forms

    - by RexE
    I would like to create a form where a user can enter an arbitrary # of items in separate textboxes. The user could add (and potentially remove) fields as needed. Something like this: I found the following different solutions: http://www.eggdrop.ch/blog/2007/02/15/django-dynamicforms/ http://dewful.com/?p=100 Is there another best practice I might not be aware of?

    Read the article

  • Simple way to encode a string according to a password?

    - by RexE
    Does Python have a built-in, simple way of encoding/decoding strings using a password? Something like this: >>> encode('John Doe', password = 'mypass') 'sjkl28cn2sx0' >>> decode('sjkl28cn2sx0', password = 'mypass') 'John Doe' I would like to use these encrypted strings as URL parameters. My goal is obfuscation, not strong security. I realize I could use a database table to store keys and values, but am trying to be minimalist.

    Read the article

  • Django: where do I call settings.configure?

    - by RexE
    The Django docs say that I can call settings.configure instead of having a DJANGO_SETTINGS_MODULE. I would like my website's project to do this. In what file should I put the call to settings.configure so that my settings will get configured at the right time? Edit in response to Daniel Roseman's comment: The reason I want to do this is that settings.configure lets you pass in the settings variables as a kwargs dict, e.g. {'INSTALLED_APPS': ..., 'TEMPLATE_DIRS': ..., ...}. This would allow my app's users to specify their settings in a dict, then pass that dict to a function in my app that augments it with certain settings necessary to make my app work, e.g. adding entries to INSTALLED_APPS. What I envision looks like this. Let's call my app "rexe_app". In wsgi.py, my app's users would do: import rexe_app my_settings = {'INSTALLED_APPS': ('a','b'), ...} updated_settings = rexe_app.augment_settings(my_settings) # now updated_settings is {'INSTALLED_APPS': ('a','b','c'), 'SESSION_SAVE_EVERY_REQUEST': True, ...} settings.configure(**updated_settings)

    Read the article

  • Python sqlite3 and concurrency

    - by RexE
    I have a Python program that uses the "threading" module. Once every second, my program starts a new thread that fetches some data from the web, and stores this data to my hard drive. I would like to use sqlite3 to store these results, but I can't get it to work. The issue seems to be about the following line: conn = sqlite3.connect("mydatabase.db") If I put this line of code inside each thread, I get an OperationalError telling me that the database file is locked. I guess this means that another thread has mydatabase.db open through a sqlite3 connection and has locked it. If I put this line of code in the main program and pass the connection object (conn) to each thread, I get a ProgrammingError, saying that SQLite objects created in a thread can only be used in that same thread. Previously I was storing all my results in CSV files, and did not have any of these file-locking issues. Hopefully this will be possible with sqlite. Any ideas?

    Read the article

1