3,892 Posted Topics

Member Avatar for Matt Tacular

Yet another classic example of why globals should be best avoided. The culprit here is the iterator variable 'iter' which you chose to share among all your function calls resulting in side effects. The fact that the function mainTurn() along with all its sub functions like 'wordAffairs()' share the same …

Member Avatar for Matt Tacular
0
171
Member Avatar for The Dude

> even my little sister that is 4 y/o can do better cartoons than those... Please share her creations with us... > now, if we're talking about adult cartoons (the simpsons, family guy, southpark) tjose are pretty cool... If your little sis can do the stuff on cartoon network, she …

Member Avatar for ndeniche
0
75
Member Avatar for Sarah Lee

[code=javascript] <html> <head> <script> function loop() { var list = document.getElementById('list'); for(var i = 0; i < list.options.length; ++i) alert(list.options[i].value); } </script> </head> <body> <form> <select name="list" id="list"> <option value="India">India</option> <option value="US">US</option> <option value="Germany">Germany</option> </select> <br /><br /> <input type="button" id="btn" value="Button" id="btn" onclick="loop();" /> <div name="myDiv" id="myDiv"></div> </form> </body> …

Member Avatar for Sarah Lee
0
4K
Member Avatar for MattEvans
Member Avatar for ~s.o.s~
0
358
Member Avatar for Dejai

> And you dont necesarially need DirectX or OpenGL Explain and elaborate.

Member Avatar for jbennet
0
94
Member Avatar for dcc
Member Avatar for mjmythili

You need to have a solid understanding of Java to attempt something as advanced as Game Development. Next you would need to get conversant with the J2ME API if you are planning on J2ME game development.

Member Avatar for ~s.o.s~
0
51
Member Avatar for Cerberus

> but applets are not supported any more by windows, Says who? You just need the Java runtime environment (JRE) to run applets on you machine.

Member Avatar for Cerberus
0
216
Member Avatar for tech291083

XML, C, Java, VB.... ;) Girl, you sure are messing up pretty bad. At first concentrate on a single thing otherwise would end up being a jack of some trades and master of none. Too many languages will only confuse you.

Member Avatar for bala24
0
290
Member Avatar for aparnesh

> <a href="[URL="http://www.abc.com/"]www.abc.com[/URL]" style="cursor:hand">abc</a> That would be IE only. It won't work on Mozilla based browsers. To make you code cross browser compatible, you need to do: [inlinecode]<a href="_blank" style="cursor: hand; cursor: pointer;">Linky</a>[/inlinecode]

Member Avatar for aparnesh
0
203
Member Avatar for aparnesh

Plus you can safely do away with the language='javascript' attribute since Javascript is the default scripting engine for all browsers. Use this tag only when you are using two or more scripting languages. Eg. VBScript etc.

Member Avatar for aparnesh
0
194
Member Avatar for Eng Dina

DirectX is a graphics API. Read more about it [URL="http://en.wikipedia.org/wiki/DirectX"]here[/URL]. It can be used for graphical simulations, creating games and anything related to hardcore graphics. Also as far as C# with directx is concerned, see [URL="http://www.c-sharpcorner.com/Articles/ArticleListing.aspx?SectionID=1&SubSectionID=63"]this[/URL], [URL="http://fredfred.net/skriker/index.php/directx-9-csharp-3d-game-anime/"]this[/URL], [URL="http://einfall.blogspot.com/2005/02/using-directx-and-c-sharp-to-create.html"]this[/URL] and [URL="http://www.codersource.net/published/view/328/directx_programming_in.aspx"]this.[/URL]

Member Avatar for ~s.o.s~
0
109
Member Avatar for Matt Tacular

Just to let you know, there are two more methods of doing the same thing: (but still not recommended) [code=cplusplus] int arr[20]; //first, for(int i = 0; i < 20; ++i) arr[i] = 0; //second, better than first. memset(arr, 0, 20);[/code]

Member Avatar for ~s.o.s~
0
86
Member Avatar for tech291083

[quote=tech291083;296699]Hi[/quote] Hello. [quote]1. Are programmers the most frustrated lot among all the IT professional in the recent years?[/quote] No. With great powers come great responsibities, if you think you are frustrated for reasons known to you, the same might be applicable to your Project Manager or any other senior. [quote]2. …

Member Avatar for Ezzaral
0
191
Member Avatar for Matt Tacular

[inlinecode]std::vector<char> myVector(10, 'a');[/inlinecode] Creates a character vector filled with 10 copies of the character 'a'.

Member Avatar for iamthwee
0
259
Member Avatar for ptimoor

I will assume you are referring to [URL="http://en.wikipedia.org/wiki/Design_Patterns"]Design patterns.[/URL]

Member Avatar for ~s.o.s~
0
77
Member Avatar for Eng Dina

Don't spawn multiple threads with the same question. Your previous one has already been answered. Thread closed.

Member Avatar for ~s.o.s~
0
61
Member Avatar for Phaelax

If you are looking for a particular piece of information in that XML file, maybe [URL="http://www.ibm.com/developerworks/xml/library/x-tipstx3/"]this[/URL] would interest you. Also take a look at [URL="http://www.javarants.com/C1464297901/E20060501083853/index.html"]this.[/URL]

Member Avatar for jwenting
0
99
Member Avatar for MDGM

[inlinecode]<input type="text" name="txt" id="txt" value="Name" onblur="if(this.value.length == 0) this.value='Name';" onclick="if(this.value == 'Name') this.value='';" />[/inlinecode]

Member Avatar for MDGM
0
72
Member Avatar for justlukeyou

#1: Leave this Earth and make some other planet your home. Without this, no matter what one does, there is no hope to 'Save the Planet' as such.

Member Avatar for joshSCH
0
355
Member Avatar for uninvitedm

The page not found error is normally thrown when the container fails to find the file. It AFAIK, is in no way related to the session space since the session is limited by the amount of physical memory your server machine has. Without more code or explanation, it would be …

Member Avatar for jwenting
0
85
Member Avatar for aruna_k_2006

Post the entire code of the JSP file. Posting bits and pieces here and there would in no way help you out.

Member Avatar for jwenting
0
82
Member Avatar for Matt Tacular

You are creating an array of strings in which each 'cell' would contain a string and initializing those strings to contain 20 characters. (approx). You either need to do [code=cplusplus] string ar[21] = " "; //OR string ar = " ";[/code] And btw, you loop is off by one. You …

Member Avatar for ~s.o.s~
0
137
Member Avatar for joshSCH

> It's his child too. Not unless the child has come out. Till then, its the mother which owns the child.

Member Avatar for christina>you
0
249
Member Avatar for ssimkhan

You don't need to import java.lang. Its implicit. As for your problem, use the function to find the index of both the characters '&' and ';'. If both are not equal to -1 means that both the characters are present and the command is invalid. If any one of them …

Member Avatar for ~s.o.s~
0
118
Member Avatar for ongxizhe

Video tutorials are hard to find, not to mention they are pretty rare. Just google for 'C# tutorials', 'J# tutorials' and 'C++ tutorials' and you would get enough content to keep you busy for days.

Member Avatar for ongxizhe
0
111
Member Avatar for Matt Tacular

> What vector? I don't see any vectors. I guess he meant the list. [code=cplusplus] list<humanPlayer>::iterator iter; for(iter = jailHouse.begin(); iter != jailHouse.end(); ++iter) { //now dereference the iterator and you get access to your instance cout << iter->getPlayerName(); cout << (*iter).getPlayerTurnNum(); }[/code]

Member Avatar for Matt Tacular
0
132
Member Avatar for MattEvans

Since google seems to be ignoring ( ~ ) and ( . ) and [B]sos[/B] is a fairly famous term (the term used for help or call for help) I guess I am on my own.... ;)

Member Avatar for sk8ndestroy14
0
497
Member Avatar for peter_budo

Hehe, what an apt name given to that rogue of a smiley. ;-)

Member Avatar for WolfPack
0
249
Member Avatar for christina>you

> No employer is going to hire you just because you say you have > "good experience" backed up with no certifications. Thats an ass backward way of saying things. You need certifications only when you don't have enough experience to cover your back and that too, to fool employers …

Member Avatar for christina>you
0
806
Member Avatar for Matt Tacular

No need for a pointer. Just keep on passing the array name wherever you like, a pointer to the array would be automatically passed since the array name is the pointer to its first element. [code=cplusplus] void createArray() { int* myArr = new int[10]; useArray(myArr, 10); } void useArray(int arr[], …

Member Avatar for Matt Tacular
0
332
Member Avatar for roryt

Normally such a thing is almost always done using a server side script (you know why), but since you have been nice in your conduct on Daniweb, I would try something out for you. :) How about something like: [code=javascript] <!-- author: Sanjay aka ~s.o.s~ A simple redirection script which …

Member Avatar for roryt
0
112
Member Avatar for rdhiravani

> Also, if you need high performance concatenation of many strings use a StringBuffer instead. StringBuffer is thread safe. If programming in a single threaded environment, I would recommend StringBuilder.

Member Avatar for jwenting
0
136
Member Avatar for jaepi

Its bitwise OR operator. Read [URL="http://www.vipan.com/htdocs/bitwisehelp.html"]this.[/URL]

Member Avatar for jaepi
0
171
Member Avatar for blueskylvr7

In that case, instead of accepting the input from user in the form of integers, accept the input in the form of string. Parse to string and find out whether the user has entered one, two, three values. Extract the values from the string using a [URL="http://www.fredosaurus.com/notes-cpp/strings/stringstream.html"]string stream[/URL]. If he …

Member Avatar for thekashyap
0
97
Member Avatar for TonyRad

As for the randomness, you can store the text in a Javascript array. The same goes with images. Then generate two random numbers. If they are not equal display the combination, and if equal, then generate another set within the specified bounds. The positioning is more of CSS + XHTML …

Member Avatar for ~s.o.s~
0
80
Member Avatar for Squires

> In java, "==" is used as an "equal to" operator Only when you need to compare references or primitives. In case of objects, you use the function 'equals' to compare values.

Member Avatar for ~s.o.s~
0
477
Member Avatar for ongxizhe

Use third party API's if you want your application to be platform independent or use the Win32 API if programming under windows. If using Windows, using C# would be more like it if there is no compulsion on using Win32 API or MFC. [URL="http://www.wxwidgets.org/"]Here[/URL] is one of those third party …

Member Avatar for ongxizhe
0
380
Member Avatar for meiyantao

As answered by Stroustrup: [quote] In C++, the definition of NULL is 0, so there is only an aesthetic difference. I prefer to avoid macros, so I use 0. Another problem with NULL is that people sometimes mistakenly believe that it is different from 0 and/or not an integer. In …

Member Avatar for Narue
0
148
Member Avatar for Fungus1487

You need to post the entire code as it is for someone to help you out. Posting in bits and pieces would just make it difficult. And BTW, that kind of error is normally given when the variable 'w' doesn't refer to any window, i.e. function is called before window …

Member Avatar for ~s.o.s~
0
80
Member Avatar for Matt Tacular

Just replace each occurrence of 'char' with 'std::string' and you should be good to go.

Member Avatar for Narue
0
116
Member Avatar for heliumgas

Submit the form data to the php script only if the user clicks on OK. [code=javascript] function checkSubmission(form) { var ans = confirm("Are you sure you want to delete the row?"); if(ans) { //perform validation form.submit(); } } [/code] Call this function on the onclick event of the submit button …

Member Avatar for ~s.o.s~
0
126
Member Avatar for Jishnu
Member Avatar for jwenting
0
118
Member Avatar for Eko

I am not very sure what you need there. Are you in need of some C++ tips and tricks, or a good book which you can buy from Amazon?

Member Avatar for Narue
0
130
Member Avatar for mike.mclennan

There is as such nothing absolute when it comes to one's opinions. Better use the OS which suits your needs, thats the best advice someone can offer. If you feel like contributing to the community of OS developers and the idea of free OS, go with Linux. If you have …

Member Avatar for joshSCH
0
427
Member Avatar for Ancient Dragon

> string isn't a keyword in ANSI C. Neither in C++, its a class name. ;-)

Member Avatar for John A
0
150
Member Avatar for Racoon200

Maybe you need to post a bit more code, or atleast have stab at it. In case you are finding it difficult, I would recommend reading some good books and tutorials. If you have something concrete, do come back and we would definitely help you out.

Member Avatar for MidiMagic
0
175
Member Avatar for DavidB

You can always peek into the header files of the compiler you are using to find out the value of those in-built constants and put the same in a JS file and include that file. Something like: [code=javascript] // Vars.js var DB_EPSILON = 0.00000000123 var DB_MIN = 0.125[/code] [code=javascript] <html> …

Member Avatar for MidiMagic
0
166
Member Avatar for Fungus1487

If the server side interaction is required, you would need to use AJAX. If only client side, then Javascript would suffice the purpose. Also unless the third window is in some way related to the main "index.html" page, I don't think there is any way of passing data between two …

Member Avatar for ~s.o.s~
0
74
Member Avatar for machine

> [inlinecode]day=(x.day).operator- (day);[/inlinecode] There is a reason we do operator overloading. Don't you think the code above looks a bit illogical. Read up on some good operator overloading tutorials to actually understand what it is used for. And BTW, operator overloading is used as: [inlinecode]obj1 = obj2 - obj3;[/inlinecode] where …

Member Avatar for machine
0
250

The End.