Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hello Qonquest, unfortunately you no longer have the legal right to use the code you have written. 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

Note that I fixed a few other issues as well... :-)

Oh really? Now Valgrind can't catch uninitialized value errors when somebody forgets to initialize the object with setvolume.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That is a low-specced laptop by modern standards, but it's not a cheap piece of trash by merit of being made by Lenovo, your classmate is an idiot. It's cheap because Lenovo's Ideapad line is a bunch of cheap laptops. Obviously if you're going to get the laptop that costs the least, it's going to be one of the worst laptops out there.

Also the CPU is two generations old, assuming I'm reading you correctly. I assume you mean an i3-370M, and 2.4GHz. It will suffer from significantly worse battery life that it would get with a later generation. However, it's powerful enough for any modern need, unless you want to play graphics-intensive video games.

It's a laptop, not part of your identity, so you shouldn't care if it gets insulted.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The answer is that yes, exploiting security holes requires programming. And finding them requires knowing how to code, too.

(Or we could get butthurt and chatter on about how one person could write the code and another might deploy it, and gosh, some people are morally wrong, how dare they be so? But that's boring and we might as well find something more entertaining like watching the paint dry, or arguing about what the definitions of words should be.)

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Start with Cryptography Engineering.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Koenig & Moo's Accelerated C++ is the standard recommendation for people who already know how to program in a language.

Personally I didn't have the mental capacity to learn C++ until I was 18. Other people could certainly learn it at a younger age.

He could always learn Python. Or Haskell.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You could also figure out your problems by reading the Common Lisp hyperspec.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If you package it right you can make something with no dependencies. You just have to distribute a Python exe with your application.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Java or Python would suffice.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What do you know about linked lists? Can you implement a linked list? Do you know what you can do with one?

Surely you understand what polynomials are and how adding them works.

One part of the question is, how would you represent a polynomial using a linked list? The other part is, what's the algorithm that would add two polynomials that are represented thusly?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm going to college with a computer science degree in mind, but I ask myself am I ready for the math.

There's also the question of whether you're ready for the programming.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

There does exist this notion of "front-end developer". There is a market for those skills. How much money you could make depends on how good you are and how good you are at getting people to give you money.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The people in this thread are apparently completely wrong, ignorant hicks.

Can I use my own code that I slapped a GPL on and provided to sourceforge in my own commercial application?

Yes.

In that way, does the GPL somehow relinquish my own rights to my IP?

No. It only gives other people rights to your IP.

Yes. You could use the code to a certain extent and with sufficient changes not be legally bound by the GPL, but by placing the code under the GPL you've given up your right to make a verbatim copy under closed source.

This is completely wrong.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

A flat text file could have an index too. You can't be too strict about these sorts of definitions.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> Moreover, I somewhat find the way in which the depth (height) relates to the number of nodes at each level confusing to me. Perhaps because I think of how the Heap is represented both as an array and as a tree. But I know that with every deeper i, the Heap splits children such that its got 2^i nodes at each i.

Okay. It seems to me that you get it. At the end of this post I will show an exact calculation of the heap's height.

> The while loop runs in O(log n) time because the worst case depth an element could have is the whole height of the tree.

Also there's implicit in your argument the fact that the body of the while loop takes O(1) time. It's perfectly reasonable that you omitted this obvious fact in writing down your explanation. This and the rest of your argument are correct.


Now here's how I would calculate the exact height of the complete binary tree. Let's first note that the first k levels of the tree can hold 1, 2, 4, 8, ..., 2^(k-1) nodes, respectively. Then the first k levels of the tree can hold a total of 1 + 2 + 4 + 8 + ... + 2^(k-1) nodes. That sum equals 2^k - 1. So, if we have a complete tree with n nodes, where 2^k <= n < 2^(k+1), the first k levels of the tree cannot …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

So it seems like you understand most things, but you are thinking somewhat fuzzily and imprecisely. You say "around O(log n)", you count some leaf nodes as internal nodes in your answer to the second question, and you said a balanced binary tree is log n height with a question mark.

So I have to wonder these things: Why are you unsure? Why are you saying "around" O(log n)?

Why can't you compute the running time of that function?

is what I am wondering. If you know the height of a balanced binary tree, you should be able to compute the running time of the while loop. If you know the running time of Extract-Min, you should be able to compute the running time for the entire function. If you don't know what running time means, or don't know the math, you need to learn that.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why aren't you sure it's O(log n)? (It seems totally obvious to me, of course I'm very familiar with this sort of thing.)

Specific questions I have to probe your understanding:

- Do you know the running time of Extract-Min? What is it?

- Do you know what shape a heap's tree looks like?

- Do you know the depth (i.e. height) of a balanced binary tree?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If a heap is stored in an array, you can access the element at a given index in constant time. I think this is what the question assumes. I don't know what it would mean by "its index" if the heap is stored using an old fashioned tree with nodes and child pointers.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I think you misunderstand the question. What are you using the hash table for?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

No they don't. Not ones you'd want to work for.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

No, certifications are worthless, especially Microsoft certifications.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Just learn to deal with Logo's syntax.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Do something involving computers.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Taywin is basically incredibly confused.

If your algorithm does n^2/2 + n/2 operations then its running time is Theta(n^2).

As a general rule the polynomial a*n^k + b*n^(k-1) + ... + c*n^0 is Theta(n^k).

In particular, (1/2)*(n^2) <= n^2/2 + n/2 <= n^2, for all n >= 1. (Can you prove this yourself?) This by definition means that the function taking n to n^2/2 + n/2 is in Theta(n^2).

Edit:
You could also say that your formula n*(n+1)/2 is Theta(n*(n+1)/2). This is never incorrect. Of course the idea is to simplify it, since Theta(n^2) = Theta(n*(n+1)/2).

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That depends on how your program is written. Does it take the file name as a command line parameter? Does it read the file as standard input? It depends.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You'll need to use map or write a recursive function that is like map.

Note that your output requires O(n^2) work to construct, which means you'll need an O(n^2) algorithm here, not one of these obviously-O(n) algorithms.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If it's supposed to be impossible for a value to be null, don't check if it's null. But if it's possible and all you want to do is exit the function, either way is fine. Do what you want.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Obviously it's PHP.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

1. I'm not telling you my name. My job is "Systems Engineer" but "Software Engineer" or "Software Developer" or "Computer Programmer" would also fit.

2. Every day.

3. Not very important, because usually it's code comments and IRC messages, which is far less important than the actual code. Discussions are a more important form of communication at my company, but that's partly because it's small. As you grow you need more in writing.

4. Not really.

5. See #3.

6. This question makes no sense.

7. There are none. The only thing that matters is that the writing says what is needed to be said.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Yes, Common Lisp is a general purpose programming language, and you can do pretty much anything with it (except things that really need to run without garbage collection).