789 Posted Topics
Re: using one of my other nicks rather than my name yielded this: [URL]http://www.kennyliu.com/brainfart/source/20060712/weather.jpg[/URL] which ironically was posted on my B-day :eek: using this nick yieldied [url]http://www.yourheart.org.uk/images/myocardial_infarction.jpg[/url] | |
Re: Wont buy it myself until it's been patched and/or proven. Might end up using it at work depending on where I end up working, but won't be getting it for my personal machines any time soon. | |
Re: I agree with joe and Walt. And we had about as much snow here as we've had the last several years, meaning a smidgen right at the beginning of December and nothing after. Correction, we had a little more than usual. Maybe I should start worrying about global cooling... ;) | |
Re: 1) I do not watch TV 2) I love fishing, but don't like eating fish (with a couple exceptions) 3) I'm getting my Bachelor's in Comp. Sci. in only 3 years, which means that 4) I'll be out of school before I'm of legal drinking age 5) I almost always … | |
Re: This looks to be homework. We don't do your homework. Learn what a serial connection is and the answer is quite easy. | |
Re: you could do a rand()%36, take 0-25 as letters and 26-35 as numbers (subtract 25 from them if you want values in [1,10]). Probably use an if to determine if it's a letter or number, since the letters and numbers need to be adjusted ([inlinecode]theValue + 'a'[/inlinecode] for letters, numbers … | |
Re: Just like your other posts, do your own homework. You might consider a little research on file transfer (FTP) for this. I'd also recommend you learn about TCP. | |
Re: Never smoked, never will. Don't have asthma, but I do find my lungs being somewhat sensitive to smoke and exhaust fumes. Probably too much exposure when I was a little kid. As long as the smoke doesn't get to me though, I don't really care what other people do. | |
Re: gah. This one's hard. 1600 so far :cry: [edit:] 2600 now... ok, back to studying :o | |
Re: 1) Why do you use not1, when you could just use [inlinecode]sum <= 1.0 && sum > 0.75[/inlinecode] for the where loop condition? 2) Do you need to record or output the random numbers you're summing? 3) What happens if the sum is over 1 before you have 10 numbers? … | |
Re: and [URL="http://www.daniweb.com/techtalkforums/announcement8-2.html"]this link[/URL] will help you get more replies ;) | |
Re: well, I guess I'd have to start posting "illegal" stuff anonymously on MSDN, Sun's forums, etc..., till the corporate lawmakers decided it was a bad law ;) | |
Re: 1) Where is _strdate() defined? I'm not finding it... 2) Why are you using <iostream> and <stdio.h> (which should be <cstdio>)? | |
Re: Well, I doubt any of them would disagree if you said they were hot, but I don't see this being the best place to meet women... ;) | |
Re: didn't notice anything particularly wrong with either... 'cept for the ads :p | |
Re: 1) How would you do this if you were doing it by hand? Probably something like this: - scale B by 5. - subtract that matrix from A 2) what do you mean? It looks to me like you need to define subtractMatrices and scalarMultiply, but otherwise I don't understand … | |
Re: [URL="http://www.daniweb.com/techtalkforums/post285021.html"]here[/URL] is your old thread, as a reference. What did you try and what went wrong with it? | |
Re: [url=http://en.wikipedia.org/wiki/Dijkstra%27s_shortest_path]Wikipedia[/url] Look around some... the internet has lots of information readily available ;) | |
Re: That's assuming the language parses like most other languages... ;) | |
Re: [quote=viv_mbbs;287856]Hi!! can anybody gimme an algo for reversing the words in a string in O(n) time.... Eg..i/p:I love Linux o/p: Linux love I[/quote] Do you mean reversing the string or reversing the order of words? If it's the string, then you'd get: [code]I love Linux -> xuniL evol I[/code] versus … | |
Re: I think you're looking for something like this: [code] #include <iostream> #include <cmath> int main() { std::cout << M_E << std::endl; std::cout << std::pow(M_E, 3) << std::endl; return 0; }[/code] | |
Re: What exactly is wrong? There's a few minor errors e.g. change <stdio.h> to <cstdio> (why do you need this *and* iostream?) and put a space between `using` and `namespace`, but it runs. Here's the output I get: $ ./a.out cout base 10 17 0 -17 2147483647 -2147483648 cout base 16 … | |
Re: Working with these lists of number is most easily done with an array. I think (if I understand this assignment correctly) that it could be done without them, but in a very cumbersome, roundabout manner. Here's 2 ways to do this: - Use arrays. Take your input, put all of … | |
Re: A seg fault typically refers to when you start touching memory you shouldn't be. As Niek mentioned, this often occurs when an invalid index into an array. It also happens when using uninitialized pointers, or pointers which have already had their data deleted or freed. | |
Re: That really depends on what you're serving. If you have pages that average 10k in source and, say, 30k in images (40k total), 10 gigs would give you about 250,000 visits. Rough numbers I just popped out of my head though ;) | |
Re: Gotta agree with sharky on 5 and 6, and a large part of 7... I've spent (and will likely continue to spend) waaay too much time watching anime... :eek: | |
Re: um... what is different between being male and female, except for the value of gender? I don't see what the problem is... | |
Re: I usually get 8 hrs of rack time... almost always, even... doesn't always add up to 8 hrs of sleep though ;) | |
Re: Seems like you'd so something like this: - Read a line. I'm assuming this'll have the route and the number of passengers. An alternate format might be a route on one line and the passengers on the next. - Determine if the flight was canceled. - Update any statistics you're … | |
Re: Try making a vector of Tree*, and add elements which are Oak* and Elm*. Of course, this means you'll be working with pointers, but I'm assuming that you'll be fine with that... | |
Re: [quote=Narue;286317] >In life you either contribute to purity or decay You should be a politician. Oh, by the way, your statement is a logical fallacy. ;)[/quote] Sounds perfect for the job ;) | |
Re: I'm not seeing any logic to determine which commisions rate to hand out. Seems that it should be in getCommissionRate(), but there's nothing there. That said, what was the disallowed boolean operation you were trying, and why was it not working? And a few comments on the code: - you … | |
Re: I'm guessing it would be the semi-colon at the end of the function declaration. Remove that and see if it works... though your method should be contained within curly braces {} too... | |
Re: Now you need to read in the file. You could probably do something along these lines: - read in a line (I recomment using `getline()` - parse that line to get the student's name. - continue parsing to get a list of scores. Add these together, probably as you read … | |
Re: I tend to favor odd numbers... but not odd in the sense of 2n+1, but rather numbers like pi, phi, e, sqrt(2), 1/7 (don't ask why), and [I]i[/I]... the last of which is really fun to italicize in bbcode... :p and of course, one of my favorite formulas would have … | |
Re: I think what Narue meant was, how is it not working correctly? | |
Re: How would you solve if it you were doing it by hand? A basic process might go something like this: [code] - Keep a set of 3 markers for each of high and low. - Go over the array(s), and at each new value: - Determine if the new value … | |
Re: Seems there's as many people from the US as not in this thread, so what the hay... I've lived in the greater Seattle area all my life, and I guess I'm one of those "melting pot" kinda guys as well... culturally I'm a mix of Irish, Scots, Welsh, English, Greek, … | |
Re: I'm surprised your teacher isn't allowing for lazy deletion. That said, here's one method (I don't remember the best way though) for deleting from a BST: Find the node to be deleted. From there you have two ways to get it's replacement: - go left one node, then right all … | |
Re: What exactly is the problem you're having? Unfortunately, "please help" does not give us enough information to actually help. That said, a few observations: - you're missing the closing brace ('}') for main() - when you pass the array to GetInfo, you should also pass the size of the array … | |
Re: [quote=FireSBurnsmuP;285448]while I'm at it, for the [inlinecode]#ifndef[/inlinecode] stuff, should I be putting the class name in there instead of a TGA_H? I thought I had seen it done that way before...[/quote] Leave it as TGA_H. The #ifndef followed by the #define are a way to tag your file uniquely so … | |
Re: [quote=Ancient Dragon;285308]I presume SOS may not have the fast internet access we have here in USA. 50Mg can be a lot for slow dial-up modems or whatever people in India use.[/quote] LOL here in the USA we have slow internet connections... relatively speaking of course... :rolleyes: | |
Re: slight correction to the page ~s.o.s~ linked to: strstr returns a char*, not a char. They did mention that in the description, but it was incorrect in the function declaration. | |
Re: 1) You need to be saving your random letters to sequence, not changing letters. Like this: [code] for(int index=0; index<20; index++) { random_integer = lowest+int(range*rand()/(RAND_MAX + 1.0)); random_integer = rand() % 4; sequence += letters[random_integer]; cout << sequence << endl; // this should probably be out of the loop though … | |
Re: When you run a program, the program starts with the main() function by definition. You need a main() somewhere in your project, and whatever file contains main() should be the one you compile to create your executable. You can just put main in another file (e.g. main.cpp) and that way … | |
Re: You'll need to write a parser for the file. For instance, if you read the first line "Year: 2005" you know the following set if or that year. The next line has has "Number of Employees: n" (let n be a number), so you know that you'll have that much … | |
Re: The most basic way to keep them together is to do as ~s.o.s~ did by having them ordered the same, so that a given index into one array will correspond to the same index into the other array. If you're just starting in C, this is probably the best way … | |
Re: [quote=beatle555;252890]SO YOU WILL NOT HELP NEWBIES:sad:[/quote] We will help newbies who show some effort, through code or otherwise. We will not write code for newbies. We will not do research for newbies. And, as Grunt pointed out, if you really are a newbie, you probably should not be expecting to … | |
Re: I find IDEs to be helpful for larger projects, but if it's just a few files I use a text editor (vim). IMHO, everyone should start with a text editor though, and move to an IDE once they're comfortable with the language. |
The End.