Forum: Coder's Corner Lounge
Jun 13th, 2006, 5:16 PM
|
|
Replies: 127
Views: 2,745
|
Forum: Python
Aug 28th, 2005, 9:26 AM
|
|
Replies: 19
Views: 440
|
Forum: C
Aug 26th, 2005, 9:47 AM
|
|
Replies: 8
Views: 284
|
Forum: Python
Aug 23rd, 2005, 9:32 AM
|
|
Replies: 6
Views: 412
I think the mid function returns a part of a...
I think the mid function returns a part of a string. In python, you can consider a string as a list of characters and use the [] notation to get slices. See this tutorial on Python string handling...
|
Forum: Python
Aug 19th, 2005, 11:07 AM
|
|
Replies: 17
Views: 830
The spaces versus {} trips up a lot of...
The spaces versus {} trips up a lot of programmers when they first start using python. But it is amazing how quickly you adjust and then actually start to like it.
|
Forum: C
Aug 11th, 2005, 5:46 PM
|
|
Replies: 3
Views: 1,291
|
Forum: C
Aug 10th, 2005, 6:37 PM
|
|
Replies: 3
Views: 1,291
|
Forum: C
Aug 9th, 2005, 10:44 PM
|
|
Replies: 3
Views: 1,291
Windows FILETIME examples
I created a function that converts between a Windows FILETIME timestamp and a UNIX time_t timestamp.
My problem is that I don't have a Windows machine that I could use to come up with some test...
|
Forum: Python
Aug 4th, 2005, 4:58 PM
|
|
Replies: 32
Views: 1,068
|
Forum: Python
Aug 4th, 2005, 4:55 PM
|
|
Replies: 32
Views: 1,068
I don't pirate games either, but that doesn't...
I don't pirate games either, but that doesn't mean I don't understand the security issues surrounding them.
You need to realize that a program is just a file on a computer. If you think of it as...
|
Forum: Python
Aug 3rd, 2005, 12:21 PM
|
|
Replies: 32
Views: 1,068
|
Forum: Coder's Corner Lounge
Jul 22nd, 2005, 8:53 AM
|
|
Replies: 23
Views: 762
|
Forum: Coder's Corner Lounge
Jul 12th, 2005, 1:07 PM
|
|
Replies: 2
Views: 147
Vocab! It really helps in all the non-math...
Vocab! It really helps in all the non-math areas. You simply can't do some of the sections if you don't know what a word means. All those books should have word lists for you to memorize. Start...
|
Forum: Python
Jul 11th, 2005, 10:14 AM
|
|
Replies: 15
Views: 664
I'm not sure, what does the man page say? You...
I'm not sure, what does the man page say? You could run a little test. When you know there are some NIS clients logged in, run the "who" program. It does exactly what I suggested, it reads the...
|
Forum: Python
Jul 6th, 2005, 9:51 AM
|
|
Replies: 15
Views: 664
Ok then, check out /etc/init.d, it is full of...
Ok then, check out /etc/init.d, it is full of scripts that start programs on boot. They are somewhat simple bash scripts, I would make a copy of one of them and change what you need. Then use the...
|
Forum: Python
Jul 5th, 2005, 4:55 PM
|
|
Replies: 9
Views: 407
|
Forum: Python
Jul 5th, 2005, 3:03 PM
|
|
Replies: 9
Views: 407
Why not just use a list? Tuples don't have...
Why not just use a list? Tuples don't have append() functions because you are not supposed to change a tuple once it is created. In other words, tuples are "immutable" and for that reason they are...
|
Forum: Python
Jul 5th, 2005, 2:52 PM
|
|
Replies: 15
Views: 664
What *nix are you using? FreeBSD is very...
What *nix are you using? FreeBSD is very different from RedHat which is different than Gentoo. They all involve creating some type of script.
I'm not sure how you would do that. You could make it...
|
Forum: Python
Jun 28th, 2005, 9:16 AM
|
|
Replies: 6
Views: 348
I recommend Dive into Python...
I recommend Dive into Python (http://diveintopython.org/), especially since you have a lot of programming experience. There is a free online version as well as paper one.
|
Forum: Python
Jun 23rd, 2005, 9:53 AM
|
|
Replies: 3
Views: 268
Could you explain why round() isn't working? ...
Could you explain why round() isn't working? Works fine for me:
E = [1.1111111111, 2.222222222, 3.33333333, 100.5555555, -341.99]
E = [round(i, 1) for i in E]
for num in E:
print num
It gives...
|
Forum: Other Programming Languages
Jun 15th, 2005, 5:02 PM
|
|
Replies: 9
Views: 564
|
Forum: Python
Jun 14th, 2005, 4:22 PM
|
|
Replies: 11
Views: 452
|
Forum: C
May 23rd, 2005, 5:59 PM
|
|
Replies: 10
Views: 390
Most programming books, especially those that...
Most programming books, especially those that introduce a language, never touch on these subjects. For example, never ever use gets() and always use printf("%s", var) instead of printf(var). Google...
|
Forum: C
May 23rd, 2005, 4:06 PM
|
|
Replies: 10
Views: 390
Also, your program has a buffer overflow...
Also, your program has a buffer overflow vulnerability. Whenever you use scanf() to read a string, you should always specify the length of the buffer. In this case it should be:
scanf("%19s",...
|
Forum: C
May 23rd, 2005, 3:44 PM
|
|
Replies: 10
Views: 390
|
Forum: Python
May 19th, 2005, 9:35 AM
|
|
Replies: 19
Views: 628
Python can be surprisingly easy to pick up. If...
Python can be surprisingly easy to pick up. If you want to get a good taste of the language before diving into it, try the Instant Python (http://www.hetland.org/python/instant-python.php) tutorial....
|
Forum: Python
May 5th, 2005, 10:04 AM
|
|
Replies: 10
Views: 417
Well al1986 already gave you an answer a few...
Well al1986 already gave you an answer a few posts back:
IOW, vars() returns a dictionary of the local symbol table. You could check if it contains the symbols character1, character2, ... by...
|
Forum: Python
May 4th, 2005, 9:45 PM
|
|
Replies: 10
Views: 417
Ok, I ran your code and got the NameError...
Ok, I ran your code and got the NameError exception. The quick solution is to just add the following right after the import statement:
character1 = None
character2 = None
character3 =...
|
Forum: Python
May 4th, 2005, 9:29 AM
|
|
Replies: 10
Views: 417
|
Forum: Python
May 3rd, 2005, 10:02 AM
|
|
Replies: 8
Views: 413
|
Forum: Python
May 2nd, 2005, 4:31 PM
|
|
Replies: 8
Views: 413
|
Forum: Python
Apr 28th, 2005, 12:42 PM
|
|
Replies: 4
Views: 288
|
Forum: Python
Apr 27th, 2005, 9:12 PM
|
|
Replies: 12
Views: 453
|
Forum: Python
Apr 26th, 2005, 7:44 PM
|
|
Replies: 3
Views: 334
|
Forum: Python
Apr 26th, 2005, 1:45 PM
|
|
Replies: 3
Views: 334
It's easier to just showing you some working...
It's easier to just showing you some working code. If you still have questions, repost it.
import xml.dom.minidom
# the xml contents
sheet = """\
<row version="1.0">
<cell>Name</cell>
...
|
Forum: Coder's Corner Lounge
Apr 26th, 2005, 10:34 AM
|
|
Replies: 6
Views: 275
I would not recommend an online college. A lot...
I would not recommend an online college. A lot of people do not respect any degree offered by these schools and your education is probably going to be second-rate. Go to a traditional college and...
|
Forum: Python
Apr 25th, 2005, 9:22 AM
|
|
Replies: 28
Views: 796
Why not profile the programs? Check out the...
Why not profile the programs? Check out the profile module (http://www.python.org/doc/2.2.3/lib/module-profile.html), it should give you plenty of info on how to measure the programs.
|
Forum: Python
Apr 20th, 2005, 9:48 PM
|
|
Replies: 4
Views: 382
Ok, I was intrigued enough to dig a little...
Ok, I was intrigued enough to dig a little deeper. You need to check out the popen2 module.
It allows you to start a program and get a reference to its input and output. It's really easy to read...
|
Forum: Assembly
Apr 19th, 2005, 2:56 PM
|
|
Replies: 6
Views: 332
It will definately help you better understand...
It will definately help you better understand some concepts in high level languages. For example, the difference between call-by-reference and call-by-value is a lot clearer after you learn...
|
Forum: Python
Apr 18th, 2005, 6:49 PM
|
|
Replies: 12
Views: 453
|