Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. An XML parser is a program that reads XML In XML, all elements must be closed, even empty elements. Empty elements are closed with a / at the end of the tag, such as <br />.
  2. jQuery is not really optimized for videogames. You'll need to use plain Javascript. Determine the position and size of all the sprites you want to interact with. The X and Y position can be found with the offsetLeft and offsetTop properties of the image, the width and height would be with offsetWidth and offsetHeight. Once you know that, you can use them in a rectangle collision detection. You can learn about that here: https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection
  3. The problem is that when you remove an option, options.length changes, and the indices also change. Here's your option list: 0. Option 1 <- i = 0 1. Option 2 2. Option 3 3. Option 4 After the first iteration: 0. Option 2 1. Option 3 <- i = 1 2. Option 4 After the second iteration: 0. Option 2 1. Option 4 <- i = 2 What you can do to solve it is this: while(sCatSelect.options.length) { sCatSelect.options.remove(0);}
  4. "id" is an integer, which is not an array. You can't access a property ['open'] or ['close'] in it.
  5. Put a call back on the animation to hide the element when it's completed: $(".apple").animate({top: "+=400px"}, 1500, function() { $(".apple").remove();});
  6. Ingolme

    C++

    Are you asking us to do your google searches for you?
  7. Forms need to be sent to a server-side script to process the data. This service just helps you style the form, but it doesn't provide any of the back end code. W3Schools has a section in the PHP reference about the mail() function: http://www.w3schools.com/php/func_mail_mail.asp
  8. Ingolme

    hash in PHP

    Here's the procedure: 1. User sends unencrypted password. 2. Encrypt the password. 3. Compare the encrypted password to the encrypted password that's in the database. 4. Log the user in if the two are the same.
  9. Setting left and right margins to "auto" is the way to do it. Your problem is that you're overriding it: margin-right:auto;margin-left:auto;margin: 50px 0 50px 0; This line overrides the previous two To solve it, put the auto declarations with the other one: margin: 50px auto; The first one indicates vertical margins, the second value indicates horizontal margins.
  10. You mean to close the window? Call the .close() method: http://www.w3schools.com/jsref/met_win_close.asp
  11. Blur doesn't make it disappear, it should just stop being focused. That's different.
  12. What happens when you click the second button is that you focus on the current browser window, causing it to go in front of the popup window.
  13. I think it has something to do with Wordpress. I would suggest going to a Wordpress forum to ask questions about Wordpress.
  14. There's no problem using the custom request option for POST requests, but cURL already has an option specifically for POST.
  15. It shouldn't matter where you put it. Perhaps 200 seconds isn't enough, try making the time limit higher.
  16. If there's some actual code you want to show, copy it and paste it here. I wouldn't trust opening a file from a suspicious source.
  17. Do you know any PHP? If you don't, I suggest going through W3Schools PHP tutorial first.
  18. There's a CURLOPT_POST option. CURLOPT_CUSTOMREQUEST is for when you want to use methods such as DELETE. There's no option GETFIELDS, but if you need a GET request you can put the data right into the URL as a query string.
  19. Ingolme

    cout in c++

    In C++. the + operator only is used to add numbers. It can't do anything with strings.
  20. Ingolme

    cout in c++

    Try cout << " "
  21. Ingolme

    C++

    W3Schools is dedicated to web design and web development. C++ is more for general software development. Most of us web developers don't use C++ on a daily basis, so we probably wouldn't be answering many questions even if the forum did exist for it. I'm sure there are many forums out there dedicated exclusively to C++ where you would get much better help.
  22. Ingolme

    Matrix 3d() help

    Why? Any transformation that the matrix can do can be broken down into a combination of translations, rotations and scalings. If you insist on learning how to use a 3D matrix, it's up to you to do the research for it.
  23. You can use the idate() function to find out what hour it is and use if() statements to show different messages.
  24. No, any function call will evaluate expressions before passing them to the function. In Python 2, writing input() was the same as writing eval(input()) in Python 3. I assume your version of Python is version 3. What happens is that if you write s = eval(input()) and the user writes abs(-5), instead of getting the string "abs(-5)" you would get "5"
  25. When I say that the user's input is evaluated as Python code I mean that the user can write python code into the input and your program will run that code. The different between raw_input() and input() is clear in the page you just linked to, what don't you understand? It seems raw_input() does not exist in versions of Python 3 and above, which means that you do need to use input(). You still need to cast it as an integer if you want to do integer operations with it.
×
×
  • Create New...