Forum: Python Apr 6th, 2009 |
| Replies: 3 Views: 566 You might find this is interesting: http://www.paulbutler.org/archives/python-debugging-with-decorators/ |
Forum: Geeks' Lounge Jan 22nd, 2009 |
| Replies: 1,376 Views: 147,071 Just finished fast noodle as my breakfast, delicious~~ |
Forum: Python Apr 25th, 2008 |
| Replies: 2 Views: 1,045 Please use [code=python] tag to enclose your code, so we can see the indent. |
Forum: Python Apr 25th, 2008 |
| Replies: 1 Views: 430 The following hints might be helpful:
0. raw_input will ask user for input.
1. eval will construct a list from user input (string) for you very easily.
2. Since for loop is required, range... |
Forum: Computer Science Apr 15th, 2008 |
| Replies: 5 Views: 1,073 I agree that busy wait is not good, but I could think of one rare situation that a process wants to busy wait instead of blocking:
When a process greedily wants to capture an event as soon as... |
Forum: Computer Science Apr 15th, 2008 |
| Replies: 2 Views: 722 a = b = 0 # shared counters
sem(0) # semaphore initialized to 0
func_A: # code for type A process
a = a + 1
sem.V
func_B: # code for type B process
b = b + 1
sem.V |
Forum: Python Apr 13th, 2008 |
| Replies: 4 Views: 526 If I remembered right, there are some working sample setup.py's (console app, gui app, windows services app, etc.) installed with py2exe.
Take a look into py2exe's directory, you might find... |
Forum: C++ Dec 12th, 2007 |
| Replies: 5 Views: 1,530 I've gotten the point and solution :)
Thank you guys! |
Forum: C++ Dec 12th, 2007 |
| Replies: 5 Views: 1,530 Thank you, vijayan121. I am going to take a look at the item. |
Forum: C++ Dec 12th, 2007 |
| Replies: 5 Views: 1,530 Thank you, Dragon. Does that mean that, on our side (not the client side), to restrict the location of object creation is pointless? I mean that it's client's responsibility to determine where... |
Forum: C++ Dec 12th, 2007 |
| Replies: 5 Views: 1,530 Yesterday I saw a question that was asking to prevent creating objects on heap.
After some thoughts, I came out the following:
class Foo
{
public:
Foo(const Foo& f) {}
static Foo... |
Forum: C++ Nov 27th, 2007 |
| Replies: 9 Views: 819 Hope you figured this out already. If not, what basically you need to do is use "get" or "ignore" to eat the word before the number, then you can do your summation as usual. |
Forum: C++ Nov 26th, 2007 |
| Replies: 9 Views: 819 What result are you expecting from the example data? 2004? |
Forum: C++ Nov 26th, 2007 |
| Replies: 9 Views: 819 |