- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 64
- Posts with Upvotes
- 56
- Upvoting Members
- 25
- Downvotes Received
- 23
- Posts with Downvotes
- 17
- Downvoting Members
- 11
- Interests
- C++, Java, J2ME, JAVA Swing, JavaScript, PHP, AMXX, DHTML, Video Editing, Poetry, Digital Imaging, Art,…
Re: [QUOTE]please give me the solution of reversing number 523 into 325 by using for loop[/QUOTE] What did you think the posts above were trying to do, exactly? | |
Re: try changing the values of delay(int) in Snake::Move(); | |
Re: [U]we can[/U] does not imply [U]we have to[/U] First 2 is the only EVEN prime. Your program mentions it as Not Prime. Second unnecessarily checking torf for 1, when torf is just a replacement for boolean flag. You can pretty much use it as [CODE]if(torf)[/CODE] Third your program can make … | |
Re: [QUOTE]oh i got it....thank.[/QUOTE] In that case mark this thread as solve, please. | |
Re: [QUOTE]Can anyone tell me how can I install Turbo C++ on my computer.[/QUOTE] You can't without some hassles. Luckily, my friend faced a similar situation & I obliged him. You have to do follow the following: a) Install [URL="http://downloads.sourceforge.net/project/dosbox/dosbox/0.74/DOSBox0.74-win32-installer.exe?use_mirror=space"]DosBox[/URL] b) Run my app & set Targets to TC & DosBox … | |
Re: [QUOTE] [CODE] string = (char*)malloc(strlen(str)+1); [/CODE] [/QUOTE] But my dear friend, Index starts from 0, so 0-11 is infact 12. So the OP's method is correct minus the typecast part. | |
Re: Why not just sort the linear array by an algorith of choice (bubble, quick, etc.) then fill the 2-D array like that? If you hate the temporary array, then just apply selection sort and swap with the indexes starting from `rr[Len/2 -1][Len/2 -1]` | |
Re: Try this: pattern = (?P<data>[+\-]?(?:(?:\d+\.\d+)|\w+))|(?P<garbage>.) for m in re.finditer(pattern, garbled_text): print m.group('data'), m.group(garbage) # m.groupdict() will also work | |
Re: @pansquare, pyTony has provided the correct answer. However you seem to be not bothering to search the documentation on docs.python.org. s.partition(sep) returns a tuple which essentially is a set of 3 values (before, separator, after) `'foo[baz]bar'.partition('[')` returns a tuple `'foo', '[', 'baz]bar'` -> `(before, _, after)` `after.partition(']')` returns a tuple … | |
Re: Need to see the code, but I'm guessing you messed up ImageStrech option of PictrueBox. | |
Re: AFAIK Python stack/queue operations are done as: [CODE] l = list() # [] also works l.append(8) # Equiv. to push value = l.pop() [/CODE] Also your isMatching() function matches <head> with </body>. What you need is [CODE] def isMatching(tag1, tag2): return openTag(tag1) and not openTag(tag2) and tag1 == tag2.replace('/',''): [/CODE] | |
Re: You can just load a dict() & print it. [CODE] foo = {"alice" : "A+", "smith" : "A", "daemon" : "B+", "lily" : "B" } print foo [/CODE] | |
Re: [code] temp1=head; // temp1 = Head of list while (temp1->next!=NULL) { // Iterate till the last node (i.e., next != NULL) temp1=temp1->next; } temp->next=NULL; temp1->next=temp; // Add node to end. head=temp; // Head is the last added node! WHAT? [/code] 1. You are adding nodes to the end, not the … | |
Re: [QUOTE]Though could you tell me about problem on the style and code of programme..[/QUOTE] I hope you do happen to know that BGI Graphics are deprecated and obsolete. 16-bit DOS compilers shouldn't even be allowed to compile. Don't get it why schools still teach this stuff. | |
Re: Well this would just be my opinion. 1. Fill a Box 3x3 2. Move 2 Next Box's 1st column. 3. Create 3 arrays/vectors ___a. For that Box ___b. For Horizontal Line ___c. For Vertical Line 4. Select a random number & test to ensure it doesn't exist in any of … | |
Re: Try the [URL="http://en.wikipedia.org/wiki/Harmonic_series_(mathematics)"]sine series[/URL]. | |
Re: First try saving that file in Notepad with UTF-8/16/32 encoding, if you can really save them, then Unicode supports you req. char-set & there shouldn't be any problem reading it in binary form & displaying it(requires a font). | |
Re: @OP You are assigning values to locals. In your operator func. the LHS is your "this" pointer. You should be assigning to [COLOR="Green"]this->h & this->w[/COLOR]; >>you also have to explicitly call the base class' operator =() Nope. The default assignment operator(which shouldn't have been there in first place in C++) … | |
Re: You do realize you can only instantiate like [CODE]int arr[]={9,0,...,6};[/CODE] only upon declaration. Anything other than that, use a parameterized ctor. Instead you should alloc memiry to data inside the createNewBox() [CODE]data = new box(maker, height, width, length, 0.0);[/CODE] | |
Re: The best way is to call a post order traversal. Left->Right->Root [CODE]void DeleteAll(Node *myNode) { DeleteAll(myNode->LeftChild); DeleteAll(myNode->RightChild); delete myNode; }[/CODE] The above function is really post-order traversing but instead of just displaying we are deleting the value as well. | |
Re: A Syntax Highlighter. I'm pretty sure it's not yours. strchr() is defined in string.h/cstring | |
Re: If you manage to build a working browser just out of STDIO & CONIO, Einstein will walk this land once again. FYI: stdio = Standard Input Output conio = Console Input Output does that strike a bell? As for a browser try looking into Indy. Winsock2.h will help you, but … | |
Re: In your push function: [CODE]while(isfull())[/CODE] It should be [CODE]while([B][COLOR="red"]![/COLOR][/B]isfull())[/CODE] Silly mistake. Happens to all. | |
Re: >>Why this is 4 ? Because it's a ULONG type. A pointer stores Memory addresses, which in turn is stored as an unsigned long. | |
Re: Echoing with peter_budo, J2ME has no file locking mechanism. It however has a file hiding mechanism (javax.microedition.io.file.FileConnection) | |
Re: You really only have to include glu & glut headers making sure you have the required libraries. | |
Re: [B]>>Does VC++ Express 10.0 even support the ability to get text from a text box?[/B] Ask yourself, what's the use of a write-only text box. [CODE] CText myText; CString text = myText.Text; //Property //Go berserk with text. [/CODE] In case I wasn't clear - Yes. | |
Re: [B]>>Can anyone tell me why variables can have printed values of -858993460.[/B] Ever heard of "Garbage In, Barbage Out"? (pun intended) [B]>>Is it the size in bits of memory created for an int?[/B] No, it can be *any* data left in the memory. Data is stored as binary in memory. … |