Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
72% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
3
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
~13.1K People Reached
Favorite Tags

34 Posted Topics

Member Avatar for _Nestor

I have a question about how the message loop works in a windows application [code] while ( GetMessage(&msg, NULL, 0, 0) ) { TranslateMessage(&msg); DispatchMessage(&msg); } [/code] Does the windows o/s maintain a message queue that the app retrieves a message from the front of then dispatch it bck to …

Member Avatar for shinejos
0
379
Member Avatar for _Nestor

Hi I'm wondering how you would write a function that could iterate through any stl container so it didn't matter what you were using e.g list, vector, deque and found an item that matched in that list so the function declaration would look something like this [CODE] template <class TypeList, …

Member Avatar for _Nestor
0
257
Member Avatar for _Nestor

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 [code=python] for line in logfile: for word in line.split(): if word in …

Member Avatar for pensaf
-1
211
Member Avatar for CeeY

These are two great sites for getting started with SDL with great practical examples on how to use it [url]http://www.sdltutorials.com/[/url] [url]http://www.lazyfoo.net/SDL_tutorials/[/url] Also if you're not totally set on SDL I would recommend looking into SFML [url]http://www.sfml-dev.org/index.php[/url]

Member Avatar for _Nestor
-1
138
Member Avatar for _Nestor

I wrote this code to convert from number in denary to a different base I was curious if anyone has any tips on a better way to write this code I'm always looking to improve my coding and I find others critiques to be a great way of improving. In …

Member Avatar for Schol-R-LEA
0
170
Member Avatar for _Nestor

This is a text based solitaire game I wrote. It tested it on Ubuntu Linux and Windows and it worked okay for me. Move cards between rows using their row number (7 for the deck) Let me know what people think. Critiques welcome..... don't be too harsh ;)

Member Avatar for _Nestor
0
4K
Member Avatar for _Nestor

I'm trying to change a char to an int using the stdlib.h atoi function It works perfectly on windows using VC++ however on Ubuntu Linux using g++ the value of [B]t[/B] is off and from is correct. [CODE] char from = '0', to = '0'; cout<< "From: "; cin >> …

Member Avatar for Salem
0
221
Member Avatar for Vandithar

This web page should help you [URL="http://www.w3schools.com/HTML/html_frames.asp"]http://www.w3schools.com/HTML/html_frames.asp[/URL] There is an example on it called navigation frame that does what you want

Member Avatar for Vandithar
0
206
Member Avatar for elitedragoon

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 it represents 5 thousand. The number 4 is three digits in …

Member Avatar for ArkM
0
146
Member Avatar for bhanu1225

[code=python] filename = "aFile.txt" thefile = open(filename,'r') # the second parameter is the # mode in which you want to open the # file in this case read mode thefilesText = thefile.readlines() thefile.close() for text in thefilesText: print text [/code] There are other methods such as read depending on how …

Member Avatar for _Nestor
0
103
Member Avatar for Duki

I think this should answer your question [URL="http://www.codeguru.com/forum/showthread.php?t=231056"]http://www.codeguru.com/forum/showthread.php?t=231056[/URL]

Member Avatar for tux4life
0
249
Member Avatar for punjabi

Post the code you have people are here to help with problems not to do your homework for you [URL="http://www.daniweb.com/forums/announcement8-2.html"]http://www.daniweb.com/forums/announcement8-2.html[/URL]

Member Avatar for jlm699
0
141
Member Avatar for cipherbeale

I'm gueessing this line will throw an exception if it is not a digit [code] int y=Convert::ToInt32(guessBox2->Text); [/code] so but this code in a try block and have a corresponding catch block to handle the exception

Member Avatar for _Nestor
0
106
Member Avatar for tksrules

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.

Member Avatar for jephthah
0
213
Member Avatar for Pramoda.M.A

If you post the code that is causing you problems someone may be able to help

Member Avatar for jephthah
0
84
Member Avatar for hunterm

I think this should work [code=python] import os # windows os.system("cls") # bash ( mac, linux ) os.system("clear") [/code]

Member Avatar for _Nestor
0
2K
Member Avatar for stardustmeri

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. endl as in the letter L stands for end …

Member Avatar for _Nestor
0
137
Member Avatar for Srinivasa007

[code=python] if string1.rindex(chr(32)) and string2.rindex(chr(32)): print "You have entered the special characters" [/code] That is how you would write the code however this probably isn't the best way as an exception is thrown if the case comes back false something like a for loop would probably be better [code=python] for …

Member Avatar for jlm699
0
75
Member Avatar for FaNtEcH

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

Member Avatar for tux4life
0
2K
Member Avatar for Liszt

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 recommend using ther hard drive serial number as you can have more than one …

Member Avatar for Liszt
0
239
Member Avatar for dav555

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 starting at the end of the string and multiply the number by …

Member Avatar for dav555
0
285
Member Avatar for xsxcn

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 modules [URL="http://www.pygame.org"]http://www.pygame.org[/URL]

Member Avatar for targ
0
161
Member Avatar for blackhawk9876

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 not assigned a value so i guess your assuming …

Member Avatar for _Nestor
0
93
Member Avatar for hunterm

First of all lose is not a tuple its a list a tuple is declared as follows [code=python] lose = ('fdasf','dfasf','asdf') [/code] for pseudo random numbers you import the random module [code=python] i = range(len(lose)) random.shuffle(i) [/code] The values of i are now shuffled and can be used to access …

Member Avatar for hunterm
0
118
Member Avatar for _Nestor

I was wondering how to change a url in javascript for example if i wrote an address [url]www.google.ei[/url] How would i get the script to change the address to [url]www.google.ie[/url]

Member Avatar for itsjareds
0
202
Member Avatar for CommanderOne

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 tutorial [code=python] for x in y: print y [/code]

Member Avatar for woooee
0
137
Member Avatar for tomtetlaw

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() [code=python] import platform if platform.system() == 'Windows': #Do something else: #Do something else [/code]

Member Avatar for _Nestor
0
64
Member Avatar for bobstein

I wrote your code in the one file like this and it worked [code=python] class MonsterStats: def __init__(self, name): self.__monName = name def setName(self, name): self.__monName = name def fileWrite(self): monFile = open('MonsterFile.txt', 'w') monFile.write(self.__monName) monFile.close() name = raw_input('enter name: ') monStats = MonsterStats(name) monStats.fileWrite() [/code]

Member Avatar for jlm699
0
110
Member Avatar for arpeggio54

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 [url]http://www.daniweb.com/forums/thread1769.html[/url]

Member Avatar for Narue
0
87
Member Avatar for _Nestor

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 [code] CSquare** tempArray = m_FocusBlock->GetSquares(); for(int i=0; i<4; i++) { m_OldSquares.push_back(tempArray[i]); } [/code] I get this error unresolved external symbol __imp___CrtDbgReportW referenced in …

Member Avatar for mitrmkar
0
78
Member Avatar for Race

since your only typing in one word you could have used [code] cin>> message1; [/code] but it doesn't really matter Your if statements are wrong try some nested if statements for example [code] if(len1 > len2 && len1 > len3) { cout<< message1 << endl; if(len2 > len3 ) { …

Member Avatar for Race
0
76
Member Avatar for _Nestor

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 [code] m_VideoName.Replace(m_VideoName[0],toupper(m_VideoName[0])); for(int i=1; i<m_VideoName.GetLength(); i++) { if(isspace(m_VideoName[i])) { m_VideoName.Replace(m_VideoName[i+1],toupper(m_VideoName[i+1])); } } [/code] however it keeps returning Once …

Member Avatar for _Nestor
0
100
Member Avatar for lizhiyuan

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 [code] for(i=0; i<10; i++) {} [/code] would be the same as [code] int i = 0 for(; i<10; …

Member Avatar for Lerner
0
104
Member Avatar for lizhiyuan

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 values if you say a[1] its the same as *(a+1) when you pass …

Member Avatar for Ancient Dragon
0
113

The End.