Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

C30N9

Members
  • Content count

    1331
  • Joined

  • Last visited

Status Updates posted by C30N9

  1. In an assignment, I created a simple memory game.

    Memory Game.

    Also, I have a question. Which is better to use to close the program? System.exit(0)? Or dispose() to destroy the window, which already terminates the program on close?

    1. scifista42

      scifista42

      There is a glitch: If you press "New Game" multiple times in succession, and then try to select a card, a random different card will be selected instead.

  2. Here is a code for a calculator using GUI and event driven programming. One annoying problem is that the numbered buttons call the action method twice. Suggestions to improve the program is much appreciated.

    EDIT: An error found. Putting 0s in front of numbers might manipulate the calculation a bit.

    code:
    Array

    1. Maes

      Maes

      Regarding the registering each action twice, that's because you're just listening for all events without filtering them out by type (e.g. button pressed, button released, etc.), and even buttons can generate many kinds of events, not just "pressed". Whenever you click on a button, you generate at least a "button pressed" and "button released" event, while I think there's also a "button clicked" event which only triggers upon a complete press-release cycle.

    2. C30N9

      C30N9

      It should invoke ActionPerformed(ActionEvent e) on press and release. The +, -, * and / buttons work fine.

    3. C30N9

      C30N9

      It turns out that I added the listener two times, that's why it happened. Still though the program does not work perfectly, as I said, when I write 0s in front of numbers, values are manipulated. There must be something faulty in the library I imported. Any suggestions?

  3. I've been asked to write a method which is public static Object max(Object[] a). It should return the highest Object in an Object array using compareTo method. However, with this method's parameter, since Object doesn't have compareTo method, I'm supposed to put several if statements to determine if the object is an instanceof Account, or Employee, or other classes that use compareTo:

    code:
    Array
    So I changed the function to this:
    code:
    Array
    Which works fine, and I think it's similar to java.util.Arrays.max(anArray). But I heard that it's not a very good idea to do that. Is it healthy to do this?

    1. TwinBeast

      TwinBeast

      Maybe it's slow? I did something like that to find the closest color from a 256 palette as a glsl shader and it made the game run 1 to 5 fps.

    2. AndrewB

      AndrewB

      Your solution is better. Tell your friend that he's stupid.

    3. Cacatou

      Cacatou

      If your class doesn't have the compareTo function then your method won't work but assuming that all your classes have compareTo then your method will work perfectly.

  4. I'm supposed to write a method that acts like java.lang.String.split, except that this new method returns a String array including the delimeters. For example:

    split("Java#HTML#Cpp", "#") would return "Java", "#", "HTML", "#" and "Cpp" in an array. I already done the hard part, which returns the array correctly. However, I don't how to make it work with regular expressions, such as:

    split("Java#HTML$Cpp%Python", "[#$%]"). It should return:

    "Java", "#", "HTML", "$", "Cpp", "%", "Python".

    Any ideas?

    Here is my code BTW:

    code:
    Array

    1. Show previous comments  2 more
    2. fraggle

      fraggle

      C30N9 said:

      Done it without using Pattern class.

      Assuming the assignment requires the second argument to be a regexp, if I was running the class you'd get a fail mark. What you have implemented is not a regexp.

    3. C30N9

      C30N9

      fraggle said:

      Assuming the assignment requires the second argument to be a regexp, if I was running the class you'd get a fail mark. What you have implemented is not a regexp.


      This problem is put very early in the book, probably a mistake, as it didn't discuss regular expressions at all in the chapter. My instructor limited me to making this, not an actual regex. I kept the method naming the same though, that's why I didn't understand "regex" at first.

    4. fraggle

      fraggle

      Fair enough then. Kind of weird though.

      My one criticism would be that isPartOfArray doesn't need to exist. Take regexChars as a substring and just check if regexChars.indexOf(whatever) >= 0. You should be able to get rid of indexOfRegexChar as well.

  5. So I want the output to be this:

    ____5 (four spaces)
    ___45 (three spaces)
    __345 (and so on...)
    _2345
    12345

    Using without more than 2 loops. Doesn't matter any language, but C or Java works.

    1. Show previous comments  2 more
    2. Ribbiks

      Ribbiks

      here's a python one-liner for ya:

      code:
      Array
      yay.

    3. Memfis

      Memfis

      lol being able to multiply strings like that is pretty neat

    4. andrewj

      andrewj

      C version using printf formatting:

      code:
      Array

      and C version using a char array:
      code:
      Array

  6. Yesterday, in my C programming lab, I was solving problems with recursions, the hardest part was that some of them required using variables inside recursive functions for better solutions. I tried to avoid declaring variables inside them as that would harm the memory, so I ended up declaring global variables, which ended in a mess. Here is an example of my functions:

    code:
    Array
    The number "10" in the above code is the size of the array I declared later in the main function. I could use a constant value of 10 in SIZE, but a better way is to put another integer variable in the function to store length value like the comment I wrote, but this will make it change its value to the new length, and it will keep declaring integer type variable.
    code:
    Array
    This messy function is supposed to check if a string is a palindrom string. length's value is the length of the character array "LeooeL", same issue as the first code (putting the length as a variable). z (didn't bother to pick a name for it) should be used to indicate whenever it should stop checking, but I didn't finish the function, so I put a comment for each statement concerning it, as it's the not the issue here. Notice where I declared the variables, not favorable.

    1. Show previous comments  4 more
    2. Jonathan

      Jonathan

      C30N9, that extra else if clause you inserted isn't necessary. The && logical operator is short-circuiting in C, meaning that if the left side evaluates to false, the right side recursive call will not be executed, and the result will be 0, which will be returned.

    3. C30N9

      C30N9

      That's new. Neat.

      Any solutions for the first function?

    4. fraggle

      fraggle

      Jonathan said:

      C30N9, that extra else if clause you inserted isn't necessary. The && logical operator is short-circuiting in C, meaning that if the left side evaluates to false, the right side recursive call will not be executed, and the result will be 0, which will be returned.

      And even if C didn't have short-circuiting, the c[0] == c[len - 1] part in the third return statement would be redundant.

      Actually you can simplify further to just:

      code:
      Array

  7. EDIT: Nevermind, I misunderstood it at first. I thought that when I add "6", it would add to array[5] (or the sixth element of the array). Problem solved.

    This is for an assignment. I'm not asking for the solution, but I'm a bit confused:

    Write a C program to create and manipulate a one dimensional array (list) of up to a hundred sorted (ascending order) numbers by using functions to insert, remove, or print elements as follows:
    - Function insert: will search for the appropriate position of a given element and if the element is already in the list will display an error message. If not, the function will shift all the elements starting from the position of the element to the right of the array and then insert the element into that position.
    - Function remove: will search for the element to be removed and if not found will display an error message. If the element exists, the function will remove it and shift all the elements that follow it to the left of the array.
    - Function print: will print the elements that exist in the array at that point.
    Your program should display a menu to the user that allows him/her to insert, remove, or print as many elements as they want until they want to stop. If an element is inserted into an already full list, an error message should be displayed. The array (list) at the beginning should be empty.

    Example of a sample run:
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    2
    List is empty, No change
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    1
    Enter element to insert
    6
    Element 6 is inserted
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    1
    Enter element to insert
    9
    Element 9 is inserted
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    1
    Enter element to insert
    7
    Element 7 is inserted
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    2
    Enter element to remove
    112
    Element 112 does not exist, No change
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    2
    Enter element to remove
    6
    Element 6 is removed
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    3
    Elements in list are:
    7
    9
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    1
    Enter element to insert
    7
    Element 7 already exists, No change
    Enter your choice: 1) insert 2) remove 3) print 4) exit
    4
    Goodbye


    It seems to me that the example is wrong, shouldn't element 7 become 6? And what if the 100th element (99) is shifted to the right? They didn't say anything about the limits.

  8. Today, in my Calc II exam, I've came across the question of finding the derivative of an inverse function when x = 2. The function was as I remember:

    f(x) = e ^ 2x + 4x + 1

    I didn't know how to solve for x algebraically after I substituted f(x) with 2 (or using ln or exp functions). So I put automatically x = 0 as it will satisfy the equation and then I proceeded. Luckily, it was a multiple choice question, so the method of solving isn't important.

    How do I solve this?

    1. Show previous comments  4 more
    2. Ribbiks

      Ribbiks

      code:
      Array
      Somehow I doubt that's how they expected you to solve it. Unless they actually teach kids the Lambert W function in Calc II nowadays? There's probably some simpler trick I'm not aware of, been ages since I touched this stuff.

    3. C30N9

      C30N9

      That's correct, I got 1/6 during the exam.

      They do teach complex numbers in Calc II, just not before transcendental functions. I don't know if it includes Lambert W function though.

      It's not fair to include such question in this exam if this is the only solution.

    4. Fredrik

      Fredrik

      You don't really need to know about the Lambert W function unless you're solving a more general version of the problem. Here you just need the inverse at one specific value, y = 2, and since it's an exam problem, this point was naturally chosen so that the input x = 0 can be found by just inspecting the equation.

      This is a typical feature of exam problems, less common in real world problems.

  9. This code is supposed to calculate e to the power x. It works fine at lower numbers, but then at x = 3.6, the output starts to decrease as x goes up. What's wrong?

    C language.

    EDIT: The problem was that "factorial" function was an int, so at high values, it won't work.

    code:
    Array

    1. Show previous comments  6 more
    2. C30N9

      C30N9

      ... wat???

      I just deleted the code without thinking out of speed. No, I wasn't embarrassed.

      I also might didn't get Phml's joke/post at first (if he was referring to leaving the post for others).

      Regardless, I edited the first post.

      (BTW, how could people reach this thread normally?)

    3. GreyGhost

      GreyGhost

      C30N9 said:

      (BTW, how could people reach this thread normally?)

      They need to login to the forums. The Google bot probably hasn't a Doomworld account so it can't index past the OP.

    4. scifista42

      scifista42

      C30N9 said:

      (BTW, how could people reach this thread normally?)

      Do you mean without manually typing /blogs in the forum url?

      1. Click the button "Blog" below any of your posts on the forum.
      2. Click "Comments".

      Step 1 can be done by anyone. Step 2 requires being logged on a forum account.

  10. I'm majoring in computer science (first year), and I'm thinking of taking minor in math. The reason is because of its connection to computer science (since it's a sub-field of math), and I like it a lot. The question is, are these a good pair?

    For CS degrees, math courses include Calculus I and II, Discrete Mathematics, Statistics, Linear Algebra and Numerical Methods. As for the mathematics minor, it includes Calculus III, Foundations of Mathematics, Normal Differential Equations, Mathematical Analysis I, Abstract Algebra I and other math courses in the choice of the student.

    I feel getting a minor in math is a waste of time. It's because where I live, computer scientists and engineers usually end up in programming jobs, or maintaining computers. So it's very likely that I won't work in the "theoretical" part of computer science, and I "assume" that math is applied more on the theoretical part than programming (or software engineering).

    Shall I forget it and pursue other minors, or am I being ignorant about how good it is to study such pair?

    1. Maes

      Maes

      Pretty much all oldschool CS profs I know started out as Math majors, with a specialization in CS acquired on top of that. That was before most universities introduced a separate/more technical CS curriculum, as well as the various "computer engineering" ones.

      So the two are definitively compatible, but the only reason for pursuing them together today would be if you're interested in an academic career or working in a specialized field such as cryptoanalysis or numerical computing (which usually point to an academic/research career anyway).

    2. Remilia Scarlet

      Remilia Scarlet

      When I was a CompSci major, I was required to minor in math (with a 2nd minor of my own choice; I chose Japanese). At first it didn't seem necessary, but as I got into tougher classes, such as Computer Security, I saw the reason. Unfortunately I can't math to save my life, and thus I switched to a BA in Applied Computing, which didn't require the math.

      However, the "BS in Computer Science" they offered didn't actually cover the things I'd need to be a programmer in-the-large. They said it did, but not really. They instead expected people in the BS program to think about things in a more academic way, then go off to do research or something. Sure, you learned some good programming skills (C/C++, C#, some basic x86 assembly in Intel syntax, Prolog, and how to construct certain data structures like lists and queues), but their focus was more on making you a computer scientist. This is why I switched to the BA, which was more along the lines of "we're teaching you to be a programmer". But that was my specific school, which didn't exactly have a stellar CompSci department.

      On the other hand, a good foundation in at least some of the science underlying programming is good to know. Plus, certain fields will require you to know some of the higher maths. 3d programming and linear algebra comes to mind.

      Disclaimer: I never finished college.

  11. I'm currently majoring in Computer Science, but it is possible to switch to Computer Systems Engineering. In general, CS should focus more on math, theories and software-related stuff than CSE, but after looking through my university's guide for BA degree, it seems that CS is a bit "contained" in CSE. For example, CSE students take several courses that are essential to get into software engineering (programming, data structure and management, and software engineering courses), with another courses related to Electrical Engineering and hardware stuff, but some share the same name of other CS courses (AI, Operating Systems, Algorithms). Plus CSE students can take some courses in CS as elective courses.

    You have to be good in Physics and Mathematics to switch or to do well, which I am good at both. I just keep feeling that I'm wasting a chance to study engineering and become good at both software and hardware rather than only focusing on Computer Science. At the end of the day, either degrees will likely get me the same job, but an engineer is usually generally known as being smarter (because he is an "engineer", plus the requirements to get engineering are harder than the ones to get into CS).

    Should I stop listening to people who keep telling me that I've took the wrong choice choosing CS over CSE even though I can make it through in the latter major?

  12. I have a form in html, but I don't know to make it perfectly aligned. I tried putting it in a table with two columns, but I still have problems:

    1. Phml

      Phml

      As the proud owner of a steakkin headmate, I see no problem with your code.

    2. exl

      exl

      A two-column table will not allow you to line everything up nicely. Try something like this: http://www.dvdflick.net/storage/form.html

    3. DOOM Anomaly

      DOOM Anomaly

      Gender: Steak.

      Now that's my kind of form.

  13. Styles aren't applied to the text. Why?

    code:
    Array

    1. Grazza

      Grazza

      Presumably the nested <<b></b>h<b></b>2> (etc.) and <<b></b>p> tags are the problem. It's probably force-closing the <<b></b>p> tags in those cases, and thus losing the style information.

      <<b></b>h1> (etc.) tags are kind of like beefed-up <<b></b>p> tags and shouldn't be nested with them.

      Also, you need to use straight quotes instead of angled ones. I've fixed these issues and pasted it below. Actually, I'm not sure which was the problem; maybe both were. Don't have time to check further at this point.

    2. Grazza

      Grazza

      <html><head><title>Personal Info</title></head><body><p><h1>Name:<br>ID:<br>Average:<br>Age:<br></h1></p><hr><h2 style = "color:green; text-align:center">Social status:<br>Phone Number:<br>Address:<br></h2><hr><h3 style = "color:red; text-align:right">Date:<br>Signature:</h3></body></html>

  14. 1- A car, initially going eastward, rounds a 90 degrees curve and ends up heading southward. If the speedometer reading remains constant, what's the direction of the car's average acceleration vector?

    2- A plane with airspeed 370 km/h flies perpendicularly across the jet stream, its nose pointed into the jet stream at 32 degree from the perpendicular direction of its flight. Find the speed of the jet stream.

    3- An object undergoes acceleration 2.3i + 3.6j m/s^2 for 10 s. At the end of this time, its velocity is 33i + 15j m/s. What was its velocity at the beginning of the 10 s interval? By how much did its speed change? By how much did its direction change? Show that the speed change is not given by the magnitude of the acceleration multiplied by the time. Why not?

    4- A particle leaves the origin with initial velocity v0 = 11i + 14j m/s, undergoing constant acceleration a = -1.2i + 0.26j m/s^2. When does the particle cross the y-axis? What's its y-coordinate at the time? How fast is it moving, and in what direction?

    5- A jet is diving vertically downward at 1200 km/h. If the pilot can withstand a maximum acceleration of 5g before losing consciousness, at what height must the plane start a quarter turn to pull out of the dive? Assume the speed remains constant.

    1. Show previous comments  5 more
    2. Memfis

      Memfis

      In Russia the government actually pays for your education if you do well enough on the entrance exams, so I don't need to pay anything hehe. I guess this is one of the cool things about my country. I was very lucky btw, got the total of 270 out of 300 (90 math, 92 informatics, 88 russian language) on the tests, which was the minimal total mark required to get free education on this speciality.

    3. C30N9

      C30N9

      I'm studying Computer Science and I'm forced to take biology classes with lab.

    4. printz

      printz

      C30N9 said:

      I'm studying Computer Science and I'm forced to take biology classes with lab.

      Maybe you're going to program actual brains in the high-tech future, so why not study that? Same with physics, maybe some of you are gonna work on qubits after 20-30 years, heheh.

  15. So much "free" time (1-2 hours) that I hate to sit lonely in public, so I went/hid in the library which is a very friendly environment for spending time yourself. This is gonna be boring if I'm going to do this everyday.

    1. Hellbent

      Hellbent

      You gotta find out where the party's at. To do that, you need to talk to some cute girls in your classes. "Excuse me, do you know where the ___ Hall is?" or.. "How are you liking your classes so far?" Or any other thing you need information about. Whenever you have a question, consider it a golden opportunity to ask a cute girl for the answer. You can stop random girls on your way to class, or sit next to girls in your classes and ask them before class starts. Don't blow those opportunities on professors or .. um, dudes. Of course making guy friends is also a good way to find out where the party is at, tho.

      Good luck, and make the most of it. Best four years of your life has just begun. Don't waste them! (And when I say don't waste them, I mean, don't spend the entire time being responsible and studying).

    2. Krispy

      Krispy

      Go up to a cute girl in the library and start sniffing her neck so she knows you're interested.

  16. ?

    Also how is doubling time calculated in general.

    1. Show previous comments  7 more
    2. Memfis

      Memfis

      let me try...

      ---

      1/x < 2

      we can see that 1/x = 2 when x = 1/2, and that increasing x will decrease 1/x, so the answer is

      x > 1/2 I guess

      or maybe you can just multiply both parts by x and then divide by 2, but dunno if you're allowed to do that??? maybe it will get tricky since x might be either positive or negative, dunno

      ---

      classic method here, multiply numerator and denominator by something so you can use the formula (x-y)*(x+y)=x^2 - y^2

      lim x→∞ (x − √ (x^2 + x − 1)) = lim x→∞ ((x^2 - x^2 - x + 1) / (x + √ (x^2 + x - 1)) = lim x→∞ ((1 - x) / (x + √ (x^2 + x − 1))) = lim x→∞ ((-1 + 1/x) / (1 + √ (1 + 1/x - 1/x^2))) = -1 / (1 + 1) = -1/2.

      ---

      x^3 - x - 1 = 0

      no idea, either I'm missing something trivial or you just have to take a lucky guess?

    3. C30N9

      C30N9

      Memfis said:

      let me try...

      ---

      1/x < 2

      we can see that 1/x = 2 when x = 1/2, and that increasing x will decrease 1/x, so the answer is

      x > 1/2 I guess

      or maybe you can just multiply both parts by x and then divide by 2, but dunno if you're allowed to do that??? maybe it will get tricky since x might be either positive or negative, dunno

      ---


      I actually solved this before (x < 0 or x > 1/2), but I wanted to double check.



      x^3 - x - 1 = 0

      no idea, either I'm missing something trivial or you just have to take a lucky guess?


      There is no "regular" way to solve this, instead there is the cubic general formula.

    4. Memfis

      Memfis

      Oh ok, in Russia they usually don't teach the cubic formula. Also lol at my fail at the first problem, let's say that was just me being too sleepy. (dunno how people can sleep in stuffy and noisy trains...)

  17. I'm spending all of my time at home, either I roll the chair around, or work on a video game, or watch some TV shows, and sometimes have a walk by myself. I'm kinda bored. Anyone?

    1. Show previous comments  3 more
    2. Pavera

      Pavera

      All of your time? You can always pick up a summer job while there's still time -- even let it carry over into the school semester. You'll definitely be less bored. Try applying to a place where there's some sort of physical labor involved but is also customer facing. Like a home/garden store, where you have to load customer vehicles with smelly bags of dirt and mulch. Ahh, the character building.

    3. Springy

      Springy

      50/M/Earth. Hit us up ;)

    4. C30N9

      C30N9

      Pavera said:

      All of your time? You can always pick up a summer job while there's still time -- even let it carry over into the school semester. You'll definitely be less bored. Try applying to a place where there's some sort of physical labor involved but is also customer facing. Like a home/garden store, where you have to load customer vehicles with smelly bags of dirt and mulch. Ahh, the character building.


      Well, I partly consider working on that video game a job, though I'm not sure if I'm gonna be successful at selling/distributing it. I also sometimes help my dad a bit in his work. In fact, everything that isn't wasting my time is a job to me.

      Springy said:

      50/M/Earth. Hit us up ;)


      Instructions unclear. Landed on Mars.

  18. I quit Doom.
    I quit mapping.
    I now discuss everything but Doom on the forums.

    Am I growing up?

    1. printz

      printz

      Yeah, sorry to say it, but yes.

    2. joe-ilya

      joe-ilya

      I think you just wanna take a break, I used to do that on all sorts of games and now I stay with doom.

    3. baronofheck82

      baronofheck82

      C30N9 said:

      I quit Doom.
      I quit mapping.
      I now discuss everything but Doom on the forums.

      Am I growing up?

      No you're just burnt out on Doom. Believe me, for a while there a few years back I didn't play Doom at all. But it's like a drug addiction - it keeps calling and calling and eventually you come back to it.

  19. 1- A toy racing moves with constant speed around the circle shown below. When it is at point A its coordinates are x = 0, y = 3m and its velocity is 6 m/s i. When it is at point B its velocity and acceleration are (respectively)?



    The answer is 6 m/s j and 12 m/s^2 i, respectively. I got the magnitudes right, and I understand why its velocity is in the direction of j. However, why is its acceleration is in the direction i?

    2- Two blocks (A and B) are in contact on a horizontal frictionless surface. A 36-N constant force is applied to A as shown. The magnitude of the force of A on B is?



    3- A 0.20-kg particle moves along the x axis under the influence of a stationary object. The potential energy is given by U(x) = (8.0J/m^2)x^2 + (2.0J/m^4)x^4, where x is in coordinate of the particle. If the particle has a speed of 5.0 m/s when it is at x = 1.0 m, its speed when it is at the origin is?

    (Any relations between potential energy and speed?)

    1. Show previous comments  6 more
    2. C30N9

      C30N9

      @Doom Marine: Wrong. The answer is 11 m/s.

      I'm gonna go and check my physics book and try to figure something out.

    3. Doom Marine

      Doom Marine

      Perhaps the relationship between potential energy and speed in this case is zero-sum. Another idea:

      m*U(x) + 0.5*m*S^2 + m*C = 0.

      I'll pursue that line after I'm done with work.

    4. C30N9

      C30N9

      No need. Found the solution.

      U(1) = 10 J. Kinetic Energy (x) = 0.5 * m * v ^ 2, so KE(1) = 2.5 J because v = 5 m/s when x = 1.

      Mech Energy = U + KE = 12.5 J

      When x = 0 then U = 0 and KE = 0.5 * m * v ^ 2.

      Mech Energy is conserved, so:

      E = 12.5 J --> 12.5 = U + KE --> 12.5 = 0 + 0.5 * m * v ^ 2, so v = 11.48 m/s.

      Thanks anyway.

  20. So I've been developing a very simple game on Unity. The basic idea is to avoid spawning obstacles controlling 4 ships. My current aim is to finish all the scripting before importing assets, that is why everything you see in the video is a cube.





    Might not look attractive, but this is my first good attempt to make a video game. I still have to script spawning obstacles, score and other few necessary stuff. What do you think?

    1. scifista42

      scifista42

      Maybe you should make all 4 ships controllable at the same time, perhaps by keys Q,A,W,S,I,K,O,L. Would be a nice practice of player's multitasking abilities, and you would afford to increase difficulty a bit, then. Or use key presses different for each ship, but allow moving only one ship at a time, maybe? But I'd personally prefer the former. I can imagine the left-right-select mechanic to get annoying when multiple ships needed to be moved. Nice game (I've already seen your video v2).

    2. C30N9

      C30N9

      Thanks.

      I changed the selection to use the 1-4 keys. It's because making all 4 ships move at the same time requires too many keys (Q-L). And I'll probably make the obstacles move faster as the player hit score milestones.

      Also, models (sadly the plane model is not mine).

  21. ... and I'm still stuck between CS and CEN as majors. I'm mainly aiming for CS as major and accounting as minor. But what do you think? Which major should I get? Which is better? Which one has bigger salary?

    1. Show previous comments  9 more
    2. C30N9

      C30N9

      Probably more jobs. I mean US has more companies that work with programming.

    3. fraggle

      fraggle

      I'd advise you to worry more about what you find more interesting and less about what salary you're likely to earn.

      Do you more an interest in (high-level) programming in general, or do you have a stronger interest in hardware: low-level programming, circuits, working with actual hardware etc.? If the former, go for CompSci, if the latter, go for CompEng.

      I myself have a CompEng degree.

    4. C30N9

      C30N9

      Got accepted in CS, hope I'm doing the right thing. :P

  22. I'm not totally depressed, but I keep getting weird random thoughts in my mind, and sometimes, I feel a little anxious in a few situations which is kind of ridiculous. There are also other stuff I go through other people do not. Point is, is this just me, or am I going through typical teenage?

    1. Show previous comments  27 more
    2. Sokoro

      Sokoro

      It did not get better for me. I dislike other people even more. Especialy after I learned about all that mess that is in this world.

    3. dg93

      dg93

      I'm turning 21 in less than a month and I gotta say that I really don't miss much of my teenage years. Looking back to my teenage years, I was pretty much an immature/insecure asshole. After you graduate from High School things will most likely be better. You will be in control of your life, which is by far the best thing about being in your 20's. You will also be more wise/knowledgeable than you ever were as a teen. Just remember to make good decisions and you should be fine.

      EDIT: Having those random thoughts (whatever they might be) is probably normal for teens.

    4. Clonehunter

      Clonehunter

      The boys and girls in the clique, The awful names that they stick, You're never gonna fit in much, kid



  23. animating is fun, right???

    1. Blastfrog

      Blastfrog

      Not bad so far. What program do you use?

    2. C30N9
    3. C30N9

      C30N9

      More rig tests:

  24. I have a .3ds file and would like someone to test it in Maya with textures.

    1. Krispy

      Krispy

      Do you even Doom, brah?

    2. C30N9

      C30N9

      Yeah, but I seem that I fell in love with modelling recently.

      I'm pretty sure there are modelers here somewhere, I mean aren't there any people who worked on Doom 3D models?

  25. ... And this is crazy
    But here's the code
    So give suggestions, ideas, feedback, thoughts, maybe?

    code:
    Array
    Anyways, I need help in several things:
    - How do I put limits for inputs to one kind of variables?
    - How do I convert variables? (Integers to Strings and vice-versa)

    1. Show previous comments  3 more
    2. C30N9

      C30N9

      Thanks fraggle, was looking forward to show it to you.

      I will go with the goto advice, that is when I find a way using a loop instead.

      BTW, could you please answer the first question?

    3. Maes

      Maes

      C30N9 said:

      BTW, could you please answer the first question?


      Either you create do...while loops for each variable that you are trying to input (quite honestly, a PITA) or you create a specific function for filtering numeric input, which handles the looping and user messaging. Parameter to include are the acceptable value range, customized entering/error messages, and you simply call that function whenever you need a filtered numerical user input with some specific message, rather than writing ad-hoc code all the time.

      Other less interactive solutions are automatically assuming some "default" value upon a wrong input, or exiting the problem.

    4. fraggle

      fraggle

      C30N9 said:

      - How do I put limits for inputs to one kind of variables?

      Inputs just give you a string; it's up to you to interpret what's in that string. If the user enters something that isn't in the form you want (eg. a number) then you need to prompt them to enter it again until they get it right. So what Maes says is correct: you need a loop that keeps reading input until it gets what it wants.

      This is a great example of how you can split up your code into smaller functions: think about how you'd write and use a function like this:

      code:
      Array

×