Infarction 503 Posting Virtuoso
All You Need Is Love ;)
9000 developers "relax" with love computers...
how about return result;
?
The problem with lawyers making the laws is that they don't know how anything else works... or so I am often led to believe...
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 ;)
are scalarMultiply and subractMatrices returning anything? ;)
didn't notice anything particularly wrong with either... 'cept for the ads :p
That's assuming the language parses like most other languages... ;)
will you give me $1million?
gah. This one's hard. 1600 so far :cry:
[edit:] 2600 now... ok, back to studying :o
up, up, and away!!
Wouldn't know for sure... all the ones I know are fellow students :D
I think you're looking for something like this:
#include <iostream>
#include <cmath>
int main()
{
std::cout << M_E << std::endl;
std::cout << std::pow(M_E, 3) << std::endl;
return 0;
}
matter it does not.
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... ;)
Nah, that's me playing this game on my laptop :p
Well, I am supposedly studying at the moment... only I'm studying Daniweb instead of statistics :o
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
11
0
ffffffef
7fffffff
80000000
itoa_3 base 2
10001
0
-10001
1111111111111111111111111111111
0000000000000000000000000000000
itoa_3 base 10
17
0
-17
2147483647
itoa_3 base 16
11
0
-11
7fffffff
0000000
itoa_3 base 32
h
0
-h
1vvvvvv
000000
itoa_3 base 36
h
0
-h
zik0zj
Are these results correct?
PS - nice try on the [code] tags. Edit it if you can, and maybe preview next time? ;)
Out of curiosity, did you see the announcement thread titled "We only give homework help to those who show effort?" What have you tried, what do you think is wrong with it?
nah, I use paint for taking screenshots :p never got the hang of graphics....
[edit:] and yes, a mouse helps a bit :p
Degrees are becoming very important for starting a career.
Satisfied customers will usually lead to return business
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 what you need to define.
3) You do need to do the extra calls in main() to get the A-5B result.
4) You should use code-tags when you post so we can read your code easily.
PS - it's int main()
not void main()
Lurk if you want
just looking through it quickly (sorry I'm not putting much time into it), I think you want something like this:
bool next = getdata(score, weight);
while(next)
{
cout << score << " " << weight << endl;
next = getdata(score, weight);
}
Just a guess though
So, I was busy studying for my own finals, but now that I look at this, you never change the value of next in the loop, so it'll never exit the loop if next is true.
wanna post the code you have so far?
I hate it when people thing that money can get them through whatever problems are in front of them... that said, I'll do it for $200, 1/2 of it up front (after I go sign up for paypal)...
"Youself" is a difficult word with which to start a sentence.
For what reason do we strive for perfection?
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
Do you mean reversing the string or reversing the order of words? If it's the string, then you'd get:
I love Linux -> xuniL evol I
versus the sample you gave for reversing word order.
all folks innocently or guiltily love daniweb
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 ;)
Up-chucking is gross...
fit -> tantrum
soul music just doesn't do it for me
you guys shouldn't be so worried about post count
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 storing.
- Repeat until EOF.
Nasty beer tastes nasty :p
The fact that some of you defend her says alot about you and tell me what kind of people I'm dealing with. To excuse the actions of people like her is very sad.
I'd say your impression of her is heavily skewed by a single bad experience (drawn out though it has been). If I may offer a different perspective, the fact that so many people defend her should show that she has somehow managed to earn the respect of all those people. I'm sure that it isn't due to her sadistic hobbies... ;)
Hopefully you'll get to see what the rest of us do as well
I'm glad you have a sense of humor? I'm sorry your first post didn't leave me with a clear impression of how familiar you are with C++? Do you need anything else? Maybe a few question marks?
You're changing the value of commissionRate, but there's 2 problems. First, you don't ever return this value, so any changes will be lost. Second is that you're setting the value of a single variable, where you [probably] want to be using an array of commission rates.
Ok, I just looked over the code real quick, and one question really stands out: what does the BankAccount class have for methods? I'd assume there's going to be a getBalance() or somesuch, in which case you can just return that.
Mr. Infarction, making a innocent post of mine into something which attracts more criticism to me is really not good....
First let me say sorry for misunderstanding. Then let me show the post as I read it:
*sigh*
Yeah, I realize that this is a sick sad little world...But if everyone followed the same thinking process....
I personally think that is what seperates a human being from a good human being...
It came across as an attempt to say that everyone should think according to What Is Right(TM) and doing so would make them a "good human." As noted, it was a misunderstanding, but that is the reason why I interpreted it as I did.
That said, if you're going to quote yourself, please don't add new text to it. Expound on it if you wish, but don't make it look like I misquoted you intentionally.
And personally, I don't think any of us has the right or privilege to decide who is a "good" person on an objective or universal scale. We can have our own favorite people in life, or those we dislike, but we shouldn't be saying whether someone is "good" or not.
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 open a Scanner to the file in main, pass it to getData, only to open a new Scanner. Take one of them out.
- I recommend using ArrayList<String> for names and ArrayList<double> for sales and totalAmountEarned. Unless you know for sure that the file has 100 entries, but it's still considered poor practise to hardcode array sizes. You can use the add() method to append to the list.
- As mentioned, getCommissionRate needs to be, well, written
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...
just put code tags before and after it, like this:
int main(){
cout << "Hello world" << endl;
return 0;
}
See how it keeps the indentation? :)