Forum: Python Aug 14th, 2009 |
| Replies: 7 Views: 363 |
Forum: Python Aug 14th, 2009 |
| Replies: 7 Views: 363 No matter how you do it, the fraction part is the result of the remainder / divisor so still need a division!
Could fake it somewhat.
In integer
part %
----- = -------
whole ... |
Forum: Python Jul 16th, 2009 |
| Replies: 5 Views: 255 using locks between threads when data contention is encountered.
Lock: Mutex, Semaphore, Critical-Section are three types of locks.
For example Let's say you have a list of numbers to determine... |
Forum: Python Jul 16th, 2009 |
| Replies: 5 Views: 255 If the multi-threaded script controls multiple threads simultaneously then the answer is yes.
For example if I want to write a program designed to crunch data and turn it from one form into... |
Forum: Python Jul 14th, 2009 |
| Replies: 5 Views: 255 I don't know Python but from an architectural point of view your answer is YES!
You said after hours, which implies that nobody is using the computer so it is free to use 100% of its time doing... |
Forum: Python Jul 5th, 2009 |
| Replies: 9 Views: 867 Post your code! Check your variables are properly set signed/unsigned! |
Forum: Python Jul 2nd, 2009 |
| Replies: 10 Views: 523 That will work as well. But close file then reopen it with the create upon open or you will merely be overwriting the existing file and have debris from the previous file at the end! |
Forum: Python Jul 2nd, 2009 |
| Replies: 10 Views: 523 A file is not elastic so two ways.
1) copy file A to file B but skip over the parts of file A you don't want copied!
2) invalidate the data! Write a 'bad' character code over fields in the... |
Forum: Python Jun 29th, 2009 |
| Replies: 5 Views: 295 Removed my post due to C response but it was a Python question! |
Forum: Python Jun 25th, 2009 |
| Replies: 3 Views: 256 Are you using a 32-bit compiler or a 16-bit?
If 16-bit then you have a problem!
100000000
is 05f5e100 in hex requiring 32-bits to store. Since you are being signed due to the -1, It seems a... |
Forum: Python Jun 18th, 2009 |
| Replies: 12 Views: 418 Technically you are writing a tool. In real life a tool is used repeatedly in the process of development. You do not want someone waiting for a tool so although there are a multitude methods of... |
Forum: Python Jun 18th, 2009 |
| Replies: 12 Views: 418 Alternatively how about each name in your list has a dynamic array of file offsets! Parse the file once and collect the file positions and store them in each's offset list. When done parsing, use... |
Forum: Python Jun 18th, 2009 |
| Replies: 12 Views: 418 The good news is computers have lots of memory and I've never seen a file that contains a billion lines. A couple million yes in an ASCII based data file, but never more then that! And that easily... |
Forum: Python Jun 18th, 2009 |
| Replies: 12 Views: 418 You can open and close one file for each name in the list sequentially, but not simultaneously. There is a limit as to how many file handles you have open!
It is unclear to me what the function... |
Forum: Python Jun 18th, 2009 |
| Replies: 2 Views: 209 Each nesting has to be self contained. It should pass (fall out) of the nesting with an error.
[CODE]
bool DoMyTask( .... )
{
...
if (!DoMyTask( ... ))
... |
Forum: Python Jun 17th, 2009 |
| Replies: 8 Views: 754 (ignore this response, accidental post) |