Forum: JavaScript / DHTML / AJAX May 22nd, 2009 |
| Replies: 4 Views: 697 This web page should help you
http://www.w3schools.com/HTML/html_frames.asp
There is an example on it called navigation frame that does what you want |
Forum: C May 21st, 2009 |
| Replies: 10 Views: 1,034 Also if your looking for large numbers lets say 5400 and you want to write five thousand you could count the digits. So the number 5 is the forth number from the end which makes it easy to determine... |
Forum: Python May 21st, 2009 |
| Replies: 1 Views: 556 filename = "aFile.txt"
thefile = open(filename,'r') # the second parameter is the
# mode in which you want to open the
... |
Forum: C++ May 20th, 2009 |
| Replies: 14 Views: 596 I think this should answer your question
http://www.codeguru.com/forum/showthread.php?t=231056 |
Forum: Python May 20th, 2009 |
| Replies: 6 Views: 489 Post the code you have people are here to help with problems not to do your homework for you
http://www.daniweb.com/forums/announcement8-2.html |
Forum: C++ May 20th, 2009 |
| Replies: 2 Views: 329 I'm gueessing this line will throw an exception if it is not a digit
int y=Convert::ToInt32(guessBox2->Text);
so but this code in a try block and have a corresponding catch block to handle the... |
Forum: Python May 19th, 2009 |
| Replies: 16 Views: 1,307 I think this should work
import os
# windows
os.system("cls")
# bash ( mac, linux )
os.system("clear") |
Forum: C May 19th, 2009 |
| Replies: 5 Views: 246 If you post the code that is causing you problems someone may be able to help |
Forum: C++ May 19th, 2009 |
| Replies: 18 Views: 1,080 There are a few problems but one of the biggest ones that should get rid of most of the errors is that you wrote end1 but it should really be endl i didn't even notice until i tried to compile it.... |
Forum: C May 19th, 2009 |
| Replies: 11 Views: 811 Somebody may have a look if you attach the document (though I'm not sure since it's multiple choice questions) but no one will have a look if they have to download it from rapidshare. |
Forum: Python May 18th, 2009 |
| Replies: 2 Views: 222 if string1.rindex(chr(32)) and string2.rindex(chr(32)):
print "You have entered the special characters"
That is how you would write the code however this probably isn't the best way as an... |
Forum: C++ May 15th, 2009 |
| Replies: 15 Views: 974 To be honest you're right I think what I meant is get the ID of some piece of hardware you don't intend on changing and that can be the identifier.
You could also generate some unique ID and keep it... |
Forum: C++ May 15th, 2009 |
| Replies: 15 Views: 974 You could use your hard drives serial number as a unique ID as you probably won't be removing it or you could use your MAC Address from the installed network interface card (NIC) however i would... |
Forum: C++ May 15th, 2009 |
| Replies: 5 Views: 781 I don't know if there's a pre defined function but it shouldn't be too hard to code yourself.
Ignore the first two charactes and then convert from base sixteen to base 10.
You could use a for loop... |
Forum: C++ May 14th, 2009 |
| Replies: 1 Views: 185 The best way to understand these is to get a compiler and step through while it is debugging or get it to print out at certain steps.
One thing the pointer p is assigned the address of x but x is... |
Forum: Python May 14th, 2009 |
| Replies: 3 Views: 307 That sounds like it would be a lot for python to handle.
Personally I'd use something like c++ for this kind of program but if you really want to use python you should have a look at the pygame... |
Forum: Python May 14th, 2009 |
| Replies: 6 Views: 289 To explain the previous code a bit clearer
i = range(len(lose))
This returns a list to i so if lose is
lose = ('efesef','esfes','asefe')
then i is |
Forum: Python May 14th, 2009 |
| Replies: 6 Views: 289 First of all lose is not a tuple its a list a tuple is declared as follows
lose = ('fdasf','dfasf','asdf')
for pseudo random numbers you import the random module
i = range(len(lose))... |
Forum: Python May 13th, 2009 |
| Replies: 11 Views: 548 Yeah python code reads nice my code was probably more of a c++ style. I guess old habits die hard
The easiest thing would probably be to split the string
word = "Once upon a time"
wordList =... |
Forum: Python May 13th, 2009 |
| Replies: 11 Views: 548 word = "Apple"
modWord = ""
for i in range(len(word)):
found = False
for j in range(len(modWord)):
if word[i] == modWord[j]:
found = True
if not found:
... |
Forum: C++ May 13th, 2009 |
| Replies: 18 Views: 703 I found the SDL libraries to be great for graphics. They are really easy to use and there are lots of great tutoials on using them |
Forum: Python May 13th, 2009 |
| Replies: 2 Views: 240 You could find out the os by importing the platform module
platform.system() should give the os or if your looking for a particlar release you could use the platform.release()
import platform
... |
Forum: Python May 13th, 2009 |
| Replies: 11 Views: 548 Have you tried coding anything yourself?
Things like printing the contents of a list are fairly basic and you should be able to find out how in the python documentation or some basic python... |
Forum: Python May 8th, 2009 |
| Replies: 7 Views: 369 I wrote your code in the one file like this and it worked
class MonsterStats:
def __init__(self, name):
self.__monName = name
def setName(self, name):
self.__monName = name |
Forum: C++ May 8th, 2009 |
| Replies: 6 Views: 395 The probem is that you have to see seed the random generator with the srand function
I believe this thread has the answer your looking for
http://www.daniweb.com/forums/thread1769.html |
Forum: JavaScript / DHTML / AJAX May 8th, 2009 |
| Replies: 2 Views: 1,658 I was wondering how to change a url in javascript
for example if i wrote an address
www.google.ei
How would i get the script to change the address to
www.google.ie |
Forum: Python Apr 10th, 2009 |
| Replies: 2 Views: 1,780 Hi im doing a basic script to parse a text file
I want to look for a particular set of words. When i find the word then record the lines until there is a line that is blank
for line in logfile:... |
Forum: C++ Jun 1st, 2008 |
| Replies: 5 Views: 518 Thanks it builds now but i got this warning
warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
I'm using SDL thats why i changed the runtime... |
Forum: C++ Jun 1st, 2008 |
| Replies: 5 Views: 518 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MD /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /ZI /TP /errorReport:prompt |
Forum: C++ Jun 1st, 2008 |
| Replies: 5 Views: 518 I keep getting errors when i try and use the vector class I have an object
vector<CSquare*>m_OldSquare;
however when i try and add elements to the list
CSquare** tempArray =... |
Forum: C++ May 7th, 2008 |
| Replies: 1 Views: 1,966 I have a question about how the message loop works in a windows application
while ( GetMessage(&msg, NULL, 0, 0) ) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Does the... |
Forum: C++ Apr 3rd, 2008 |
| Replies: 5 Views: 634 So this is what i went with in the end
i used AppendChar because i kept getting an error when i tried
m_VideoName += toupper(m_VideoName[i]);
It wasn't letting me use the toupper with the... |
Forum: C++ Apr 2nd, 2008 |
| Replies: 5 Views: 634 Thanks for the help that's way better than my way |
Forum: C++ Apr 2nd, 2008 |
| Replies: 4 Views: 544 do you mean a pointer as an argument
well the syntax obviously changes but they are similar.
when an array is passed its actually a pointer to the address of the first element of the array of... |
Forum: C++ Apr 2nd, 2008 |
| Replies: 3 Views: 466 the ; just means it is being to taken from where sPtr currently is pointing to
the first value in a for loop is just assigning a value to start looking from
for(i=0; i<10; i++)
{} |
Forum: C++ Apr 2nd, 2008 |
| Replies: 7 Views: 654 since your only typing in one word you could have used
cin>> message1;
but it doesn't really matter
Your if statements are wrong try some nested if statements for example
if(len1 > len2... |
Forum: C++ Apr 2nd, 2008 |
| Replies: 5 Views: 634 The reason I used the replace method was that when I use
m_VideoName[i] = toupper(m_VideoName[i]);
I get an error '=' : left operand must be l-value |
Forum: C++ Apr 2nd, 2008 |
| Replies: 5 Views: 634 I was trying to format the string of type CString so that when you input for example
once upon a time in Mexico
it would return Once Upon A Time In Mexico
... |