« first day (649 days earlier)      last day (1539 days later) » 

1:40 AM
0
Q: Mapping different classes to the same database table

FelipeI have several very similar subclasses that I (think I) want to be stored in the same database table. Most of the fields are identical, with each subclass adding 1 or 2 custom fields. My code is using the Django ORM, but I think the question is more general than that. Problem specification The ...

 
 
10 hours later…
11:35 AM
0
Q: Django Horror Story and possible Flask conversion

Sandra GI recently tried Python and Django for quick billing, customer management and support web applications. So far we always used pure PHP which worked quite well having created some sort of in-house-developed framework for our requirements, but Django promised quicker developmemnt time and elegant ...

 
12:26 PM
0
Q: Project-Euler Problem 12: how to compute upper limit?

PignaThe following is my python solution of project euler 12. It works fine and runs in half second. I fixed a random upper limit for the search of primes (using the sieve of eratosthenes). How can I change my code so that the program can find the first triangle number with more than n divisors and s...

 
12:38 PM
0
Q: If statement improving

Jide KosoFor some reason, I completely lost my reasoning with this code. I can't hold this simple logic for too long in my head. Actually, I want to improve this code, making it a little concise. The if (so.scan_complete and force) or not so.scan_complete: is just not a KISS thing. Please any suggesion to...

 
 
1 hour later…
2:03 PM
0
Q: Handling a large amount of possible inputs for a python function

KronoSI'm working an open source project written in Python that is a wrapper to the Pushover API called py_pushover. The main function of this wrapper is the push_message function which allows the user to push a notification. The API has 10 possible parameters with only 3 being required. I've hand...

 
2:35 PM
Holy crap, how can 40" display be considered as a monitor
 
1 message moved from Java::chat (Fish and chips)
 
 
2 hours later…
5:01 PM
0
Q: Listening from Mongodb always and triggering

Nikhil ParmarI am using classes for the first time.In this program I want the object to run infinitely so that any change in the MongoDB will trigger the function and do the necessary processing. I am little confused about the using of the self.Please give me a feedback on my code.Thanks! class first_level:...

 
5:12 PM
Anyone with an italicized name is a room owner
 
@Ben everyone with an italic name.
 
user1596138
2 messages moved from [JavaScript ](chat.stackoverflow.com/rooms/17/javascript)
 
8:20 PM
0
Q: Extracting array elements between two values in Python

DaveI am very new to python and I want to extract some elements from a 1911 x 2 matrix such that when elements in column 1 are between two values they will be extracted along with their corresponding element in column 2 to a separate matrix. Unfortunately I cannot just code the matrix indices as the...

-4
Q: Why do we build unneeded similar programming languages?

Mohammad NabilImagine that there was no standard for network communication, and it is your duty to build application with an interface that tells your Operating system how to communicate with another Operating system over two different network protocols, just Imagine! Well no programmer can imagine this, but ...

 
8:55 PM
0
Q: Searching the number with the biggest amount of odd divisors in an interval

Silent ShadowI wrote this program for school (first year in college) and it works, but it's too slow. I wondered if anyone could help me optimize this a bit, because I've been trying and trying, but it just won't get better. If I choose a lower limit of 5000 and an upper limit of 10000 it my program 10 times...

0
Q: Code academy tutorial

Brian EbalI am new to programming and learning Python on codeacademy. emphasized textI'm currently doing the take a vacation tutorial and they ask that one defines a function called rental_car_cost with an argument called days. renting the car daily costs $40. If you rent the car for 7 or more days you get...

 
9:07 PM
0
Q: Transform Python math game to OOP

Mr. MBackground: I'm trying to learn basic OOP with Python. I have this program I wrote to help my son practice math problems. It does addition, subtraction, multiplication, and division. He can choose easy, medium, or hard for each operator. Here's an excerpt of the code. It's the "easy" additi...

 
 
2 hours later…
11:05 PM
0
Q: MongoDB - Find records in one collection that match string in 2nd collection

thatkindofmattI have a MongoDB collection of product IDs/unique products attributes and a second collection of codes that relate to attributes common for products whose IDs are prefixed with those codes. For example, two product IDs might be aaa17859 and aaa98542 so their code prefix is aaa. I have several t...

 
11:35 PM
0
Q: Celery API and Database Tasks

user1234259@celery.task(rate_limit="1/s") # limit as per Valve's specification def add_match(match_id): """Queries a match from the Steam API and adds it to the database.""" match = api.get_match_details(match_id)["result"] if "error" in match: return "PLACEHOLDER: Invalid query. Most ...

 

« first day (649 days earlier)      last day (1539 days later) »