5,237 Posted Topics
Re: [url]http://faq.perl.org/perlfaq6.html#How_can_I_do_approxi[/url] | |
Re: Imagine you're NOT the first person to ever have that message.... [url]http://clusty.com/search?query=GENERIC+HOST+PROCESS+FOR+WIN32+HAS+ENCOUNTERED+AN+ERROR+AND+NEEDS+TO+CLOSE&sourceid=Mozilla-search[/url] | |
Re: Your posts become more cryptic with every reply. Like your other threads, you seem to be fishing for homework answers. | |
Re: That depends on your OS and compiler. With Linux / GCC for example, there is an additional utility call 'gprof', which does what you're trying to do automatically for every function (no need for you to edit code). | |
Re: You're already running AWK, make it do the additions [code] top | grep root | awk '{ sum += $10 } END {print sum}' [/code] Yes, you need that newline in the command > p.s - why when i run that command i need to press q to get the … | |
Re: > 1) I thought you couldn't do this!!?? For some reason it is working with no problem? Depends on your compiler. Some compiler extensions permit this, so you just get lucky. Enable whatever "strict ANSI" flags for a better idea of what is allowed and what isn't 2 million int's … | |
![]() | Re: [URL="http://www.daniweb.com/forums/thread78223.html"]Don't resurrect old threads![/URL] How about beginning with real basic stuff like being able to tell the time, and read intro threads. Then in a few years we can move on to the hard stuff like batch files. |
Re: Some mobile phone code is in C++, but whether you'll be able to access the APIs depends on what kind of developer you are. If you're an after market 3rd party developer, then it's probably going to be Java. | |
Re: Fine, I'll assume that you missed all the posts which tell you to post what you tried, and that we don't give you free homework answers just because you've mastered "ctrl-c" and "ctrl-v". | |
Re: By writing a function called sendAndReceive, which returns a boolean. | |
Re: > PLzzzzzzzzz HELpppppppppppppppp Loot at [url]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/url] > I am trying this since 4 days but nothing......... Yes, and nothing regarding your actual effort was posted either. | |
Re: Lets see - new poster (we've no idea who the hell you are, or what your intent is) - posting an executable - without the source code - which opens up ports on your machine - to allow remote access to your machine. JUST HOW DUMB DO YOU THINK WE … | |
Complaining about currency movements. [url]http://news.bbc.co.uk/2/hi/business/7501486.stm[/url] Not caring about what actually drives the production of the vast amount of money they get. [url]http://news.bbc.co.uk/2/hi/asia-pacific/7510862.stm[/url] "That was despite receiving a single anonymous donation of $14.3m" Face it, saving a few pennies in a cookie jar every day just isn't going to get you … | |
Re: Write the bitmap to a file, then send the file? That's pretty much what you'd have to send anyway using a bunch of API calls, namely - the overall dimensions and properties of the bitmap - the colour table - the bits. But saving to a file is AFAIK an … | |
Re: Sure, just start with #include "easy_way_out.h" and you're all set. Ah to hell with it, [URL="http://www.daniweb.com/forums/member5020.html"]the needle is at zero[/URL] | |
| |
Re: "Howto" is a key phrase in any search related to Linux [url]http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/index.html[/url] | |
Re: Old, yes. Good, not a chance! It can't even detect integer overflow. | |
Re: Recursion is never(*) used in embedded systems because of the indeterminate amount of stack space required. A stack overrun on an embedded platform just trashes something else, rather than killing the runaway process with an out-of-stack exception. Stacks are also of a fixed size; there's no VM to extend the … | |
Re: How about doing something like [CODE]string msg = "This server has been contacted time"; msg += hello; msg += "\n"; [/CODE] Then later, when you absolutely need a char array to call send(), do this [ICODE]send( fd, msg.c_str(), msg.length(), 0 );[/ICODE] | |
Re: Well how are you calling your C program? Does Java have anything like [URL="http://www.rt.com/man/popen.3.html"]popen()[/URL] as a call? | |
Re: Since you're going to stop at each newline anyway, reading a whole line into a buffer using fgets() would be simpler than reading each char into a buffer. | |
Re: [ICODE]awk '/ALTER TABLESPACE TEMP ADD/,/MAXINSTANCES 1/' file.txt[/ICODE] Or something like it. | |
Re: It might seem ironic, but did you think of typing "search engine" into a [URL="http://www.google.co.uk/search?hl=en&q=search+engine"]search engine[/URL] | |
Re: More duplicated effort - [url]http://cboard.cprogramming.com/showthread.php?t=106219[/url] Consider... [url]http://www.catb.org/~esr/faqs/smart-questions.html#forum[/url] | |
Re: After the command, put [ICODE]echo %ERRORLEVEL%[/ICODE] And observe the values printed in various outcomes. You can test this variable with if/else when you know the values it can have. | |
Re: > my idea is to find whether there is a free() for every malloc before exiting the function. Is this a memory leak? [code] void foo ( char *msg ) { char *p = malloc( 10 ); if ( strlen(msg) >= 10 ) { free( p ); p = NULL; … | |
Re: > I tried using visual 2008 but it didn't work Are you going to expand on "it didn't work". Do you go the the Doc's and mumble "it hurts" and then expect a cure right off the bat? Details man, details. | |
Re: Well posting some code which "doesn't seem to work" would be a big help. It would make it look like you were making an effort, and not looking to score some free homework. Oh, and let's see if you can post code and use code tags like endless readme's tell … | |
Re: > Both of my files are huge and to run this program it takes more than an hour > so I was wondering if there is a better way to do this. So you run it, then go have lunch, or find something else to do. The basic combination algorithm … | |
Re: In order. People don't use code tags People don't use code tags People don't use code tags People don't use code tags People don't use code tags People using leet speek Spammers It really doesn't matter how many times you poke the noobs in the eye with "please use code … | |
Re: Not to mention - 2 YEARS TOO LATE! | |
Re: If you can't write the code to copy a file correctly, what makes you think you'll fair any better at writing the code to check that you copied the file correctly? AD's simplistic approach would only confirm that the number of writes matched the number of reads, but you could … | |
Re: First of all, do you understand the maths involved? By that, I mean can you do this on paper. If you can't, then you first need maths help, not programming help. If you can do it on paper, try transferring that to a program and post what you can come … | |
Re: 1. Read all the copious introductions on how to use [c[b][/b]ode][/code] tags. 2. Make these the same int display(int*,int,int); void display(int (*a)[4],int rows,int column) 3. #include<iostream.h> Does your compiler warn about deprecated headers? | |
Re: That would depend on the complexity of the "language" you were attempting to parse? A C expression would probably be do-able. A C program would not. | |
Re: [url]http://mobilephonedevelopment.com/archives/492[/url] Perhaps a good look around that site in general will be of some use to you. You've already biased your answer by posting in the C++ forum. > Actually I decided to do in c++ but some of my friends say it is not a good idea to do … | |
Re: Oh goody, the technical future of the world is in good hands. It's nice to see a new crop of soon-to-be graduates full of fresh ideas for the future. Unfortunately, this won't be you. | |
Re: Yeah, that's pretty bad. If you want to loop, use a loop, not a recursive function call. If you go round enough times, you may end up using all your stack space. Try [code] void Manager ( ) { do { // some code to repeat a number of times … | |
Re: Well that really depends on what type _bpb is. If it's anything other than say [ICODE]unsigned char _bpb[512][/ICODE] then you're likely doing something wrong. Post some code, in particular, some declarations of the variables involved. | |
Re: > SquareDigits-stub.o ... > SquareDigits.o Both SquareDigits-stub.cpp AND SquareDigits.cpp contain a main() Only one of them should be there. What you do depends on what the situation is, but could include - removing one of the files from the project - renaming one of the main()'s - commenting out one … | |
Re: How about you suggest a bad algorithm, or maybe even a half decent algorithm first? Because this to me is just another homework dump with a whopping [B][COLOR="Red"]ZERO PERCENT EFFORT ON YOUR PART [/COLOR][/B] | |
Re: Well if you run the code in the debugger, it will trap the assert and point you at the line of code which is the problem. Since this is in the STL, you then bring up the stack trace window, and navigate up the stack a couple of levels to … | |
Re: Fill the array with unique values - a loop can do this. Then shuffle it (think deck of cards, a finite non-repeating set in a random order). [url]http://www.sgi.com/tech/stl/random_shuffle.html[/url] | |
Re: Run [ICODE]cmd.exe[/ICODE] and type '[ICODE]set[/ICODE]' at the prompt. You'll get a whole bunch of "VAR=VALUE" strings printed. One of these will be USERNAME. These (collectively) are called environment variables. All good languages at least have an API to access these variables. In C for example, it would be [ICODE]char *user … | |
Re: Did you bother to read the link? Did you get as far as "How to Apply These Terms to Your New Programs"? | |
Re: Sure. All you need to decide is which variables you have in your game which are necessary to restore the state of the game. | |
Re: > y = amplitude cos(2(3.14)/period) x - (2(3.14)/period) phaseAngle); Whereas multiply is implied in mathematical expressions, you need to be explicit in your code. Like amplitude * cos ..... Also, why use 3.14 when you already defined PI ? | |
Re: [code] i j +---+---+---+---+---+ | p | a | r | t | s | +---+---+---+---+---+ [/code] Draw it on paper, then run the code by hand. Add another variable to the paper called temp. |
The End.