Rashakil Fol 978 Super Senior Demiposter Team Colleague

Yep, it's C++. It gives you better ability to make and use abstractions than almost any other language and better ability to micromanage the low level than any other language (and that includes C).

Tcll commented: at least you're trying :) -1
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Unfortunately your problem is not solved, you'll have to rewrite everything, your code is illegal for you to use. By posting your code, you have granted DaniWeb an exclusive copyright license to your code according to DaniWeb's terms of service. You may no longer use it and have no rights to you code. Please delete your code from your computer. As the Terms of Service say:

Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, or form, either on the Internet or in print, without prior written permission from Dani Horowitz.

Further transmission of your source code material, such as in a personal project or in handing in an assignment, may be prosecutable as criminal copyright infringement.

happygeek commented: sigh... +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hello Sean Fuoco. You are now prohibited from using your timer class. By posting your code, you have granted DaniWeb an exclusive copyright license to your code according to DaniWeb's terms of service. You may no longer use it and have no rights to you code. Please delete your code from your computer. As the Terms of Service say:

Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, or form, either on the Internet or in print, without prior written permission from Dani Horowitz.

Further transmission of your source code material, such as in a personal project or in handing in an assignment, may be prosecutable as criminal copyright infringement.

happygeek commented: pack it in +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hello Christopher Welborn. Thanks for posting your code. By posting your code, you have granted DaniWeb an exclusive copyright license to your code according to DaniWeb's terms of service. You may no longer use it and have no rights to you code. Please delete your code from your computer. As the Terms of Service say:

Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, or form, either on the Internet or in print, without prior written permission from Dani Horowitz.

Further transmission of your source code material, such as in a personal project or in handing in an assignment, may be prosecutable as criminal copyright infringement.

happygeek commented: yawn +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hello lostelf and speakon. Thanks for posting your code. By posting your code, you have granted DaniWeb an exclusive copyright license to your code according to DaniWeb's terms of service. You may no longer use it and have no rights to you code. Please delete your code from your computer. As the Terms of Service say:

Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, or form, either on the Internet or in print, without prior written permission from Dani Horowitz.

Further transmission of your source code material, such as in a personal project or in handing in an assignment, may be prosecutable as criminal copyright infringement.

Reverend Jim commented: Fudding -2
Ancient Dragon commented: that's all wrong -3
happygeek commented: more childish knee jerk over-reaction, sigh -2
Nick Evan commented: You'd think that at some point in time, you would grow up -3
almostbob commented: peanut -3
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hello silvercats. Thanks for posting your code. By posting your code, you have granted DaniWeb an exclusive copyright license to your code according to DaniWeb's terms of service. You may no longer use it and have no rights to you code. Please delete your code from your computer. As the Terms of Service say:

Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, or form, either on the Internet or in print, without prior written permission from Dani Horowitz.

Further transmission of your source code material, such as in a personal project or in handing in an assignment, is prosecutable as criminal copyright infringement.

happygeek commented: troll +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Software Development is something I enjoy but I feel like I am more of an ideas person and may not get all the satisfaction I require from work by simply writing code for years on end.

This is code talk that says you suck at programming. So I perused your posting history, and four months ago you couldn't write a recursive factorial function without asking for help. So indeed you do suck at programming and computer science in general.

What you need to do right now if you want to not suck at your job, be it in a management role that you eventually get, or a job as a programmer, is to stop sucking at programming. That's the path you need to venture on, otherwise you will be an incompetent who gets in other people's way. I don't know if you will actually achieve this, some people manage to improve themselves and others do not. Another option is to avoid software development as a career altogether.

Trentacle commented: a little blunt, but accurate and solid advice +0
Reverend Jim commented: This is just rude. +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Never mind. I can't see the point of replying to a question like this. These terms are obviously not specific to some particular sort of customer relationship, so your question is nonsensical.

silvercats commented: how about telling which part is not clear,other than posting a useless answer and wasting time? thanks +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

It's a^n b c^(n+2), and if you can't even use basic parentheses how are you even human?

PROTIP: a^n b c^n c c is the same thing.

mrnutty commented: no helpful input, OP already clarified that in his post -3
Rashakil Fol 978 Super Senior Demiposter Team Colleague

There is no restriction that the numbers must be integers for question 1.

Proof please.

That's the definition of "negative". FFS what did you think negative meant?

This is just wrong. If it were true then i would equal 1 or -1.

Instead of talking about stuff you don't have a clue about, you should try not talking about stuff you don't have a clue about. It's a good idea.

pyTony, on the other hand, manages to talk about mathematics without just making stuff up and then arguing with standard definitions.

And no it would simply mean that abs(i) equals 1.

Ssyxz commented: No need to be an ass. -1
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Obviously it's PHP.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I only met two university graduates who could not program their way out of a paper bag (in this environment). The only programmer I met who was not certified was a complete failure as a programmer.

Let me get this straight. Not counting the set of programmers who have certifications but no degree, you have met exactly three bad programmers.

And you have only met one programmer who didn't have a certification in something.

I have an alternate theory to explain your experiences: You're incapable of discerning between good and bad programmers.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Would you care to back up those sweeping generalizations with some actual facts?

Uh, they already are facts. You should try coming up with facts to support whatever beliefs you have. But I guess your beliefs are privileged, because they're yours, and they don't need to have any basis in reality.

Because in reality, the only meaningful predictor of a person's ability to code is examples of past code they've written and the ability to solve trivial problems (such as FizzBuzz or turning a binary search tree into a doubly linked list, in place) on a whiteboard. After all, there are MIT grads who can't grok recursion and there are people with associates degrees who are way better than most people here. There exist no institutions in the world that accurately label people with a "this is a good programmer" stamp, except for the institution of looking at their code on github and asking them to write code on the whiteboard.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The main disadvantage of OO modeling is that it implies a vastly inferior type system.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Memory limitations? What are you smoking? You're 100% wrong, there are no memory costs to OOP.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Speaking of worthless contrived examples, here's mine:

An O(n \log n) algorithm:

for (int i = 0, e = int(n * log(n)); i < e; ++i) {
    printf("ho ");
}

How illuminating!

all comparison-based sorting algorithms need at least O(n\log n) comparisons in order to complete the sort for most inputs.

This is not true at all. Comparison-based sorting algorithms need at least \Omega(n\log n) comparisons.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

print 55

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What? No it can't. You're totally confused and I don't know where to begin except to say look at what the flyweight pattern is.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

This is the dumbest news story ever written in the history of Daniweb.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Ah, there we go.

iamthwee commented: Face...Palm moment? +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

my question is
what does n - 1 mean (n minus 1)

That's the same kind of minus as the minus key on your calculator. Just put n - 1 into Mr. Calculator and you'll calculate running time.

what does n/2 mean (n over 2 or n divided by 2)

That's the same thing as n ÷ 2.

because stuff like this is being mentioned am soo confused when the being used i need to know what they mean, and why is it being used and when would you use them..

Yeah, it can get confusing, but you don't need to know this low level stuff. Just use your calculator.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Bugga - The Google Go language isn't in the Ubuntu synaptic package manager so tons of commands need to be done to install the Go compiler. And I can tell you now very few people would want to do that so this language will never be popular at this rate with a command line interface to install and an endless installation process depending on the OS. I might just stick with Java.

Honestly you deserve to be stuck with Java.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The real value of a forum like Daniweb is in how it helps the people who search for problems in the future. The needs of the OP are immaterial.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The reason it exists is because somebody put it there. Supporting the marking of threads as solved is like supporting the death penalty: innocent people will get executed, and threads with bad solutions will marked as solved.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Look, I could be trolling you back, or I could take your arguments to pieces, or quote recognized authorities and studies that confirm the lack of safety in C++, or point you to references on qualities of good programming language design... But would that get us anywhere? Would that make you accept any argument of any "authority" other than yourself? Or make you start talking to me on equal footing? Probably not.

The trouble with trying to argue with me is that you don't disagree with me about C++.

Edit: What you disagree with, apparently, is the practice of providing reasons for the things you say.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You don't know me, so you assume I don't know what I'm talking about. I'm not bashing about C++ because I don't know it. I'm doing it because I do know it. (I've been a C++ system programmer for 10+ years.)

I don't care about you or your appeal to self-authority. I'm going to assume you don't know what you're talking about because most people don't.

And stop having a chip on your shoulder, and I was comparing C++'s safety merits relative to Python's, because there are some.

To say "If you know how to use C++, it's a very safe language" is a no-statement. Everything, even assembler, is safe if "you know how to use it". That's not the point about safety in programming languages.

That's not true. Even if you "know how to use" assembler, there's still a high probability of yourself creating a memory error. Unless you're using a statically typed assembly language or something. If you "know how to use" C++, you can reduce the probability of memory errors in most of your code to zero. You of course have to restrict yourself to a subset of the language and standard library -- at mundane levels such as avoiding certain functions like std::vector's operator[], and at other levels such as using smart pointer types, avoiding pointers entirely, using non-cyclic data structures, just tolerating some copying, and avoiding STL-style iterators.

"C++ provides the best resource safety of any mainstream language"??? Yeah, dangling pointers, memory …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

4I just get tired of watching you post and complaining about what other people say, -rep them, down vote them, and generally antagonize people because you want to be an ass that day all the while you're contributing little.

I just don't want people to mark threads solved.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Please do us a favor and contribute or shut up.

Why do you get so butthurt when you see people with different worldviews than yours?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Well, since you're unwilling to think, I'm not going to do it for you.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

This poll is rubbish, how the hell am i winning?

You are popular the way Bill O'Reilly is popular.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Firstly, me...secondly, a fair few of the solvers i've seen here on the boards.

Really, you and other people? Who would have thought?

Marking a thread as solved indicates to others that the problem no longer requries attention,

No, it indicates that people think it no longer requires attention, but adds a presumption of the correctness of the answer -- and frequently a thread's OP isn't qualified to judge that matter.

and a reminder to mark seems to be a very common closing comment.

So?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Remember to mark the thread as solved.

Who cares?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Try understanding what the code does. This will allow you to find the fault. I suspect that I have made some stupid error in it, which you can easily figure out... :)

Bah, I meant to uprep this post with "complete win" while downrepping the first, but forgot you could only rep somebody once per day. :(

Rashakil Fol 978 Super Senior Demiposter Team Colleague

A Taylor series isn't really a good way to compute this function unless you're looking for asymptotic accuracy around a particular point, rather than general accuracy along the whole thing. Also, it's a good idea to start by folding the number down to the interval [0,pi]. But suppose we did want to go with a Taylor series because that's all we knew of.

static double cos(double x) //calculate cosine
        {
            // move x to value in [0, pi] with equal answer
            x = Math.Abs((x + Math.PI) % (2 * Math.PI) - Math.PI);
            const double tf = 1.0 / 24.0, vtz = -1.0 / 720.0, fzhtz = 1.0 / 40320.0, fukit = -1.0 / 3628800.0;
            double p = x * x;
            // use Horner's method instead, just because.
            return 1 + p * (-0.5 + p * (tf + p * (vtz + p * (fzhtz + p * fukit))));
        }
    }
}

See pages 115 and 116 here for a comparison of a Taylor approximation with one that strives for a different metric of accuracy.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm about tired of you. Do us all a favor and get banned again. Thanks.

Why don't you do yourself a favor and start charging money to do people's homework for them.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Rashakil why the hell did you insert the "retarded-mentally" tag in my thread?

Huh? I didn't insert any tags.

iamthwee commented: Bad rash. -2
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Do your own homework.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Yeah. i have just been noticing people putting things down for absolutely no reason.

Lawl.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I would recommend reading Code Complete, 2nd Edition.

This is like the most useless book I've ever purchased.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Thanks.. but can you be more clear by giving an example of what to make.

Make a poop simulator.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Honestly Java's obsolete; you should just use Scala or Clojure.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Though a majority of the developers out there regard HTML as a programming language,

What????? Maybe in bizarro world.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Fail it, and well you can guess the rest.

Fail it and you're on the road to having nothing to do with your life other than moaning at people on Daniweb about their futures?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Naked sex porn teens

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I disagree :(

John A commented: I agree. -4
Rashakil Fol 978 Super Senior Demiposter Team Colleague

The img tags are messed up.

serkan sendur commented: the answer was true damnit -1
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Definitely iamthwee.

iamthwee commented: Terrible suggestion. -4
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why the hell are you writing "two = 2.0"? That's retarded.

The problem with your code should be obvious if you stepped through the calculations by hand.

iamthwee commented: two? I see tow = 2.0, next time please be more careful honey! -4
Rashakil Fol 978 Super Senior Demiposter Team Colleague

You're acting completely ignorantly of the people who could answer your question.

WaltP commented: What are you talking about -3
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Erratic Genius

iamthwee commented: That doesn't translate to samuel hughes? -2