5,237 Posted Topics
Re: [URL="http://en.wikipedia.org/wiki/Tomasulo_algorithm"]Tomasulo[/URL] is a hardware thing isn't it? I don't think it's something you can retro-fit to any existing processor. Unless you're contemplating say modifying a compiler to simulate the effect. But modern optimising compilers already perform instruction scheduling and other things. > I would love to do it, the only … | |
Re: [url]http://www.daniweb.com/forums/post1157666.html#post1157666[/url] You're presuming that send() and recv() deal with complete messages and are error free. > printf(recvData); You will get your ass handed to you on a plate if someone sends you a % character. [url]http://en.wikipedia.org/wiki/Format_string_attack[/url] Further, recv() does NOT add a \0 to make it a string you can … | |
Re: > Any other better option available ? What's your definition of "better"? > How do I get start with it ? Read the manual. > I am not getting how to use these tools ? Read a tutorial, then read the manual. | |
Re: What about looking at the return result of send() to see how much you actually sent? - assuming that send() always sends the whole thing in one call is a bug. What about the recv() end as well? Messages can be fragmented in transit, and it's your job to reassemble … | |
Re: > He has to charge his clients for these adds based on this data.I want ideas on this. Are you being paid as well? | |
Re: > Reason for Corruption: Reinstallation for Operating System It isn't corrupted, it's encrypted. Having re-installed the OS, you lost the keys for decrypting it. Unless you can find a backup of the keys somewhere, chances of recovering anything from this seem to be slim to nil. | |
Re: [url]http://www.daniweb.com/forums/thread267064.html[/url] > Can anyone help me with finding the the time complexity of the following algorithm?? [url]http://www.catb.org/~esr/faqs/smart-questions.html#prune[/url] | |
Re: Your array initialiser needs curly braces, not round parentheses. | |
Re: [url]http://support.microsoft.com/kb/306986[/url] Found by pasting error messages into google. | |
Re: [code] parse(buf,args) char *buf; char **args; { [/code] This style of C code was made obsolete 20+ YEARS ago. Write something like this instead. [ICODE]void parse ( char *buf, char **args )[/ICODE] > I run and write it in Unix / pico and i get warnings (which i heard we're … | |
Re: > int main(array<System::String ^> ^args) What's this crud? This isn't C. It isn't even C++. It's microsoft's munged to hell managed c++, or whatever they call it. You need to decide which language you're actually using. Because this "pick any random syntax which seems to compile" approach will lead you … | |
Re: I can't wait for the mention of "Turbo C" that is about to happen.... | |
Re: > hope I can get some codes for my project here. [URL="http://www.imdb.com/title/tt0234215/quotes"]The Architect[/URL]: Humph. Hope, it is the quintessential human delusion, simultaneously the source of your greatest strength, and your greatest weakness. | |
Re: 8 posts, no code tags. You've got two more attempts to get your act together. | |
Re: > Last edited by krishnakrmsccs; 11 Hours Ago at 06:19. Reason: i need c++ codes for both this algorithm So slap in some curly braces and semicolons, and you're almost done. What lazyness! | |
Re: > Am I supposed to do a "looped free()" in this case too? Yes, every allocation you do must have a corresponding deallocation. In C malloc -> free And for C++ new -> delete new [ ] -> delete [ ] > *** glibc detected *** ./tee2: free(): invalid pointer: … | |
Re: Well it's the right idea, but file descriptor 0 is stdin, so the file you opened should be opened for reading, not writing. | |
Re: Ebay FAQ perhaps? [url]http://reviews.ebay.com/Frequently-asked-questions-about-Microsoft-Windows-OEM_W0QQugidZ10000000000087985[/url] > My intention is to install it on VM Ware and possibly try to virtualize it in the future. [url]http://arstechnica.com/hardware/news/2007/01/8730.ars[/url] You might have limited scope for "upgrading" your virtualisation. Nor do you get any tech support from Microsoft, since as an OEM, you're supposed to know … | |
Re: RSI -> [url]http://www.daniweb.com/forums/thread266666.html[/url] | |
Re: Lemme guess. You've found an example for your fossil C compiler (TurboC) that accesses the floppy disk (but it knows nothing about CDs, since it pre-dates them by a few 1000 years). On the other hand, your brand new machine is so new that floppies are ancient technology (last used … | |
Re: > cin >> str; This won't read a string with spaces - it uses spaces for a delimiter to begin with. Use getline() to read a whole line - spaces and all, then try. | |
Re: Interesting, how to be ignored in several places at once. [url]http://forums.devshed.com/c-programming-42/fseek-and-overwriting-data-683629.html[/url] > p.s. Someone else can describe the common gotchas in your code. I'm a little lazy right now. About half of this site should cover it ;) [url]http://sourceforge.net/apps/mediawiki/cpwiki/index.php?title=Main_Page[/url] | |
Re: > R1 - HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings,ProxyServer = http=127.0.0.1:5555 This is a loopback proxy. But without anything to act as a proxy, you don't go anywhere. [url]http://support.microsoft.com/kb/135982[/url] Follow the guide for you version of IE, and select the option for "direct connection" rather than via a proxy (which should list the same … | |
Re: > but in Windows it appears an annoying command window. (Terminal window) In Linux, you should be using fork() and exec(), rather than relying on system() to do the right thing for you. For windows, use [url]http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx[/url] | |
Re: But are you also aware of the inherent problems of floating point? [url]http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems[/url] Your code may be algorithmically correct, but from a computational view, the accumulation of inaccuracies is destroying your results. Look for places where you're trying to use a very large number with a very small number. Eg. … | |
Re: > ;determine the size of binary value In a loop, you - divide the number by 10 - increment a count When you reach zero, your count is how many digits the number needs to be printed. IIRC, the div instruction stores the division result in one register, and the … | |
Re: > And have you ever heard of periods? They are those little dots that end sentences. Hehe, perhaps the OP sorted the text in some way. > another id num..... please help There's a whole bunch at the end ;) | |
Re: Read this -> [url]http://www.daniweb.com/forums/announcement8-2.html[/url] > Press any key to continue I suggest ALT-F4 | |
Re: > unsigned unusedBits : (sizeof(short)*CHAR_BIT)-4; What is this for? What about specifying a width of zero? [quote=c99] A bit-field declaration with no declarator, but only a colon and a width, indicates an unnamed bit-field. As a special case, a bit-field structure member with a width of 0 indicates that no … | |
Re: So what do you need us for? We're not going to hand over a nice working answer for you just because you asked. How much C++ do you know? Have you read any tutorials specific to your compiler? What about some example programs which come with it - do you … | |
Re: My system doesn't have malloca() - so now what? > One has to keep in mind about allocation size here, as stack overflow exception may occur. Yeah, with the emphasis on "may", and that's the good side. The bad side, the OS just shoots your program dead. The ugly side … | |
Re: [quote=YOU in another spam post] I have been doing programming in C and C++ for two years. I fetch so many problems regarding to global variable and function prototype as well as return value. Try to do coding less complexity as possible as you can. use function to create a … | |
Re: Having a variable called 'output' for something which is plainly input isn't at all confusing :icon_rolleyes: To answer your question, read each line using getline() Then parse the line for the information you need. With your approach as it stands, if your code is off by even 1 character, the … | |
Re: How simple? This is simple [url]http://en.wikipedia.org/wiki/ROT13[/url] Effectiveness on the other hand depends on who you consider to be your adversaries (those who want to break your encryption). Computer illiterate Joe Public is one end. No Such Agency is another. | |
Re: > i have read that new line character gets converted to \r\n when writing characters to a file > and converted to new line again when reading. You heard wrong then. On *nix systems, there is no translation at all. Check again, your input file simply has two newlines at … | |
Re: First off, using a ** pointer is a waste of time in this case. The size of the minor dimension is a constant, so use it. > double tree[DIM][DIM]; Can be turned into this VERY EASILY. [code] double (*tree)[DIM] = malloc( DIM * sizeof(*tree) ); [/code] Now here's the real … | |
Re: Like this in the manual perhaps? [code] virtual OutputStream* audiere::AudioDevice::openBuffer ( void * samples, int frame_count, int channel_count, int sample_rate, SampleFormat sample_format ) [pure virtual] Open a single buffer with the specified PCM data. This is sometimes more efficient than streaming and works on a larger variety of audio devices. … | |
Re: Warning: user unable to post comprehensible question outlining the actual observations. | |
Re: [url]http://www.virtualbox.org/[/url] It's another VM that runs on Macs, and can host windows. I don't know about the specs though, that is something you would need to look into. On the plus side, it's open source, so you might be able to arrange your own custom hack on the video side. | |
Re: Arrays cannot be assigned. You must copy each element in turn - two nested loops ought to do it. | |
Re: So start with a simpler problem. Like - read in a temperature, then write out a temperature. When that works, it might be easier for you to see what you need to do to tackle the next step (calculating the difference). | |
Re: > I've a case where the parameter to be passed to the macro function is not known till the point it is called. Well you're out of luck then, because you can't generate C code at run-time. The ## operator in the macro expansion is a compile-time only thing. > … | |
Re: And make sure you name your source code as say prog.c and not the default it gives you of prog.cpp | |
Re: *yawn* [url]http://www.daniweb.com/forums/announcement9-2.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Topics such as - Don't flag your question as “Urgent”, even if it is for you - Send questions in accessible, standard formats - Don't post homework questions *woohoo* There goes the microwave beeper - food time! Good luck with the homework. Don't forget to include [URL="http://en.wikipedia.org/wiki/Happy_Vertical_People_Transporters#Happy_Vertical_People_Transporter"]VPT[/URL] … | |
Re: Basic research perhaps? [url]http://clusty.com/search?query=how+to+sign+a+PDF+with+a+digital+signature&sourceid=Mozilla-search[/url] | |
Re: > void main() It's int main ( ) > your code [code] for(pos; pos<list.size; pos++) { for(rev; rev<list.size;rev--) list.person[rev]=list.person[pos]; }[/code] You don't need TWO loops to do this, just one. [code] Insert at position 2, so from this +---+---+---+---+ | 1 | 2 | 3 | | +---+---+---+---+ To this … | |
Re: Well it really depends on what ACTUAL implementation you're talking about. There is no "one size fits all" answer. If your processor has only one IRQ level, then you're stuck with chaining. If you've got 256 levels say, then you can spread out a little. | |
Re: Give each state a name, not some meaningless number like 0 or 1 [code] typedef enum { CH_NORMAL, CH_IN_SINGLE_QUOTE, // found a ', skip until another ', but watch for ' CH_IN_DOUBLE_QUOTE, // found a ", skip until another ", but watch for \" CH_IN_OMMENT_START_OR_DIV,// found a /, could be … |
The End.