A friend of mine posted this little quiz on Google+ not too long ago, and I thought you guys might get a kick out of it if you haven't seen it before. I haven't seen C++ code in ages (I'm a Java-based code monkey myself), but I was still able to get some of the questions right. Fair warning: some of the code present is a major eye sore. Not quite THAT bad though.
Hey guys, I have a question that I can't seem to find a resolution to, and I'm not sure where to ask for help.
I'm trying to find out what would be the involved cost of changing a part of a programming language's standard. Say for example, if I were Oracle and wanted to change the interface of a class in the Java Programming Language, how much money would I spend to get that accomplished?
I tried searching on Google, but I can't find anything on the topic. I figure it might be some kind of a specialty topic that I'm better off asking about. Would anyone know where I can find such information?
I have a question that pertains to figuring out normal force. I seem to have a predicament that involves collision detection.
At the start I first sum all the forces acting on the object at hand. All external forces come from input or collisions that were maybe applied last cycle. Then all the internal forces: friction, gravity, and normal force. Gravity I can figure out, but figure friction requires me to know the normal but for that I have to know if I'm standing on a platform or not. My question is, is there some elegant way to solve this? For example, is it plausible to just omit the normal force on the first cycle, check collisions and apply the normal force on the next? Or should I make a deliberate check if player is standing on a platform?
In Java, does anyone know of some method by which I can let a layout manager resize components, but at the same time keep them in an aspect ratio? Currently the only way I found is to manually resize them, and I can't find a way to do this simply. My general way of constructing UIs is to set the properties of all the components before I add them to a container, and this gives me a lot of grief when it comes to resizing the components because I don't know how much space is available until I add the component to a container and the layout manager sizes it. I thought ComponentListeners would work, but I don't get a componentResized event unless I manually drag the border of the JFrame.