Search Results

Showing results 1 to 40 of 128
Search took 0.01 seconds.
Search: Posts Made By: LaMouche
Forum: C++ May 29th, 2009
Replies: 10
Views: 812
Posted By LaMouche
I think Ancient Dragon was suggesting that you learn win32 for PC first because it will be easier to learn since it's easier to debug and there are more tutorials available for it. Once you have...
Forum: C++ May 29th, 2009
Replies: 4
Views: 403
Posted By LaMouche
Are you interested in writing programs for your pocket pc in c++, or are you trying to run compiled programs on the device?
Forum: C++ May 24th, 2009
Replies: 3
Views: 577
Posted By LaMouche
Leopold, the issue you're having with "too few arguments" is occuring because you are calling functions with zero inputs that require three inputs.

You call the function radius like this:...
Forum: Community Introductions Sep 3rd, 2008
Replies: 2
Views: 335
Posted By LaMouche
Welcome. Hope you can get the help you need here at DaniWeb.
Forum: PHP Jun 25th, 2008
Replies: 2
Views: 478
Posted By LaMouche
To add images, you just use HTML:

<img src="SOURCE OF IMAGE" alt="TEXT IF IMAGE DOESN'T SHOW"/>

Is that your only problem? I can't quite understand what you are asking for.
Forum: Game Development Dec 5th, 2007
Replies: 8
Views: 2,458
Posted By LaMouche
Thank you. That's exactly what I'm looking for. I'll keep looking into it, but would it be possible for you to explain how exactly I could implement this? It seems that the decorator classes would be...
Forum: Game Development Dec 5th, 2007
Replies: 8
Views: 2,458
Posted By LaMouche
Hmmm.. that sure seems complicated.

So, have you ever played WoW, Runescape, MapleStory or an RPG similar to those? In those games, there are many skills that you can have. You can only use them...
Forum: Game Development Dec 4th, 2007
Replies: 8
Views: 2,458
Posted By LaMouche
Hello,

I worked with Python for about a year. Then I moved on to C/C++. Now I'm learning Java. I know the basics of programming really well, and I'm starting to get a good grasp of OOP.

I'm...
Forum: C++ Nov 14th, 2007
Replies: 11
Views: 2,151
Posted By LaMouche
If userInput is an int, it's never going to be an empty string.
Forum: C++ Nov 5th, 2007
Replies: 6
Views: 1,779
Posted By LaMouche
Read this for more info on rand():
http://www.cplusplus.com/reference/clibrary/cstdlib/rand.html

More info on srand():
http://www.cplusplus.com/reference/clibrary/cstdlib/srand.html

You need...
Forum: C++ Nov 5th, 2007
Replies: 1
Views: 634
Posted By LaMouche
This is where you input -1 in the second time:



cin.good() evaluates to true and the while loop exits.

Wouldn't it be better to do something like this?

(psuedo code)
Forum: Java Oct 25th, 2007
Replies: 2
Views: 786
Posted By LaMouche
Yeah, just change the numbers in the if statements.

Fyi, you don't need the first boolean comparison in the if statements.

Example:


if (numGrade > 3.7)
grade = "A+";
else if (numGrade...
Forum: Posting Games Feb 12th, 2007
Replies: 3,341
Views: 178,963
Posted By LaMouche
Forum: Python Feb 11th, 2007
Replies: 16
Views: 2,989
Posted By LaMouche
Cool. It was fun to help. I'd love to see the finished products. When you finish them, post in a new post because it won't be about "scanning a string?" ...

Later.
Forum: Python Feb 11th, 2007
Replies: 16
Views: 2,989
Posted By LaMouche
Several syntax problems:

- You have "for triplet in range(0,1,3):" but later reference "triple", which is not a variable

- You create output as an empty string, and then never reference it....
Forum: Python Feb 11th, 2007
Replies: 16
Views: 2,989
Posted By LaMouche
Oh. I was unaware of that. I'll have to rework the loop. Gimme a minute.

edit:
x += 1 is equivalent to x = x + 1. It's a shorter method of incrementing the variable.
!= means "does not equal."...
Forum: Python Feb 11th, 2007
Replies: 16
Views: 2,989
Posted By LaMouche
Okay.

Code:


d = {'a':'a','g':'c','c':'b'} # key is actually talking about a triple 'aaa':'a'

while True:
stuff = raw_input("string: ").lower()
if stuff == "exit":
Forum: Python Feb 10th, 2007
Replies: 4
Views: 4,318
Posted By LaMouche
Well... it seems to be using the older command prompt--the one that doesn't accept spaces.

If you know much about DOS, you might have seen this before:

C:\Progra~1\

Try that.

This seemed...
Forum: Python Feb 10th, 2007
Replies: 16
Views: 2,989
Posted By LaMouche
Yeah, ouch. That's a lot less efficient. Look up dictionaries. ;)

Do you need me to explain mine, or do you understand?
Forum: Python Feb 10th, 2007
Replies: 4
Views: 4,318
Posted By LaMouche
So you only got an error with execv? It looks like you need arguments with that. What's wrong with using os.system()?

My ie7 is in "c:/windows/ie7/"

This works on my computer:


import os...
Forum: Python Feb 10th, 2007
Replies: 16
Views: 2,989
Posted By LaMouche
Would you mind posting your code so we can see how you did it and change it from there?

Here's a little program I made to do the same thing:


d = {'a':'a','g':'c','c':'b'} # key is actually...
Forum: Python Feb 7th, 2007
Replies: 8
Views: 1,854
Posted By LaMouche
You need two underscores on both sides of the "init" method of your Point class.


#classify "Point"
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
...
Forum: Python Feb 3rd, 2007
Replies: 7
Solved: primes
Views: 1,991
Posted By LaMouche
Oh, excellent. Thank you.

I ran across this one method where you have a list of divisors and you remove all of the multiples as you go through. For example, say you're doing 1-100. It adds '2' as...
Forum: Python Feb 3rd, 2007
Replies: 7
Solved: primes
Views: 1,991
Posted By LaMouche
I know printing primes isn't anything new, but (like always) I'd love to hear some feedback on how I can make my code more efficient and other constructive criticism.


def print_primes(r=10):
...
Forum: Python Jan 28th, 2007
Replies: 2
Rpg
Views: 2,235
Posted By LaMouche
RPG = Role Playing Game... right now I'm implementing locked doors to open and a "look" command to look at things.
Forum: Python Jan 22nd, 2007
Replies: 2
Rpg
Views: 2,235
Posted By LaMouche
Rpg
Zonr and I have been working on a fun text game containing different rooms, monsters (with a D&D-esque battle system), and save/load functions.

Here are the files. You need to have all of them...
Forum: Python Dec 13th, 2006
Replies: 6
Solved: Tic Tac Toe
Views: 5,854
Posted By LaMouche
So, I created this fun little Tic Tac Toe game all on my own. It was a tough project, and I know I used some inefficient strategies in the coding. Just like the other things I've posted, this could...
Forum: Python Dec 10th, 2006
Replies: 5
Views: 2,065
Posted By LaMouche
Well.. if you wrote your own classes like Tkinter, I guess you could. Why would you?
Forum: Python Dec 8th, 2006
Replies: 8
Views: 2,893
Posted By LaMouche
This works:
http://en.wikipedia.org/wiki/Unununium_(operating_system)
Forum: Python Dec 8th, 2006
Replies: 5
Views: 2,065
Posted By LaMouche
Here's a good example of startswith:


# Declare some values (strings...)
codes = ["00123","00332","40325","00455"]

# Print out an error message if a code doesn't have the right prefix: "00"...
Forum: Python Dec 5th, 2006
Replies: 19
Views: 6,135
Posted By LaMouche
Wow, ghostdog. That's short code. Talk about clean. I can understand that... the list comprehensiong stuff, but I have yet to implement it into something of my own. I don't think about using it when...
Forum: Python Dec 5th, 2006
Replies: 2
Views: 2,055
Posted By LaMouche
That seems like the obvious solution.
Forum: Python Dec 5th, 2006
Replies: 19
Views: 6,135
Posted By LaMouche
I tried it out myself and came up with the following code. It adds to a new string created in the functions to create the encoded or decoded text.


def encode(text):
encoded = ""
for...
Forum: Python Dec 1st, 2006
Replies: 8
Solved: Python Code
Views: 1,789
Posted By LaMouche
Seeeing if I could just get it to pick up all the coins without errors, I wrote some working code EXCEPT that it had no random thing, so if in its path going back and forth it saw no coins, it got...
Forum: Python Nov 23rd, 2006
Replies: 3
Views: 1,381
Posted By LaMouche
I would suggest creating the box in one string or several strings and then print that string.
Forum: Python Nov 9th, 2006
Replies: 12
Solved: Loops in Python
Views: 2,555
Posted By LaMouche
That looks interesting! Would you mind posting your entire tic-tac-toe program?
Forum: Python Nov 8th, 2006
Replies: 9
Solved: Newton's Method
Views: 4,522
Posted By LaMouche
Mawe, could you explain this piece by piece?

In [1]: import re
In [2]: pattern = re.compile("(\d)([A-Za-z])")
In [3]: formula = "6x+3x^2"
In [4]: re.sub(pattern, r"\1*\2", formula)
Out[4]:...
Forum: Python Nov 7th, 2006
Replies: 9
Solved: Newton's Method
Views: 4,522
Posted By LaMouche
Wow. Thanks a LOT for your input. I wasn't aware of eval()'s function before this. Also, I looked into regex. Thanks. Yeah, trig functions will be used.
Forum: Python Nov 7th, 2006
Replies: 14
Solved: Guess a word
Views: 3,812
Posted By LaMouche
I couldn't get it to work and then realizeed that you need python 2.4; 2.5 doesn't work. oh well...
Forum: Python Nov 7th, 2006
Replies: 9
Solved: Newton's Method
Views: 4,522
Posted By LaMouche
Yes.



I realized that.



I'm pretty new to complicated problems like this problem. I've mostyl been doing basic stuff. This sounded like a fun thing to do. My friend in Calculus asked me...
Showing results 1 to 40 of 128

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC