Jump to content

Ingolme

Moderator
  • Posts

    14,894
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. I don't think anybody uses server-side includes anymore, since server-side programming languages do that and a whole lot more, and both solutions require having a server configured to execute instructions in the HTML document.
  2. The libraries are not faster than writing native Javascript, they are just coded in an optimal way. You could try to go through their source code if you want to learn some techniques. A common technique to make canvas appear faster is to draw on a buffer (a hidden canvas) and then use drawImage() to draw the contents of the hidden canvas onto the visible canvas. Without more information on how you are writing code for canvas, I can't tell you how to optimize it.
  3. You will need to use the assignment operator if you want to change the value of a variable. It should be x[0] = x[0] + 100; or x[0] += 100; There's also the issue that there is no key event listener in your code that I can see. You will need to add an event listener to listen for key presses. Your X and Y coordinates are mixed up according to convention. X should be the distance from the left, Y should be the distance from the top.
  4. You can try sending an email to login@w3schools.com, it is the email address that they provide in the login page.
  5. Don't worry. If you have any questions about design or development, be sure to ask.
  6. Server software, such as Apache or IIS, receive an HTTP request. The request goes to the domain w3schools.com and asks for a URI. In your first example, the URI is "/" while in the second it is "/js". The server software then serves the file which is found at the specified location within the server's folder structure. URL rewriting can be used to tell it to choose a different file to serve.
  7. Please, leave the moderating to the moderators. While the General forum is described as general discussion about W3Schools.com, we do allow topics that don't fit other categories to go there. The guidelines are just guidelines, not necessarily strict rules. The guidelines are written this way to make it more likely for somebody to have their question answered. With that out of the way, it's not a good idea to just sign up to the forums to recruit people. On these forums, what people can offer you is advice about coding, software design and even game design if you need it. To start, you will need to describe in which areas you need help. There's a whole lot more to game development than programming, in fact, programming is only a small part of it.
  8. Ingolme

    HTML form

    I haven't heard of "hackerrank" before. Is it a server-side programming language? The error message appears to be from a Python program.
  9. Ingolme

    Asterix?

    "Asterix" certainly is not an English word. If you see an error on a W3Schools page you can notify the site staff by clicking the "REPORT ERROR" button at the bottom of the page.
  10. It appears as if the reason they have separated them into two media queries is to put a comment above each one describing what it does. If you are writing your own code which is not for illustrative purposes, there is no need to separate them like that.
  11. If the <script> tag is before the elements in your document then it won't have access to the elements because they haven't been parsed by the browser yet. I recommend putting <script> tags at the bottom of the page, right before the closing </body> tag.
  12. It would be preferable to use a CSS stylesheet, but the answer to your question is to put all of the rules into the same style attribute, separated by semi-colon. <h1 style="font-family:verdana; color:white; text-align: center">
  13. I replied to your original topic earlier.
  14. I'm not sure if your SQL server supports it, but in MySQL you would be able to do this. In the UPDATE query, you would just have to concatenate a value onto the existing value like this: UPDATE `table` SET `field` = CONCAT(`field`, 'New data') WHERE id = 1
  15. Ingolme

    Maddy

    HTML cannot do that. HTML cannot generate or manipulate data, it is just a language which describes the structure of existing information. I'm not familiar with MailChimp, but most mailing providers have a system to add variables into the template and they offer a lot of different options for the content of the variables. You should ask MailChimp support about it.
  16. Ingolme

    expo help

    You cannot link to your websites because they do not meet the forum guidelines. If you continue to do so your account will have to be suspended. People on the forum can help you with schema, but only if you can indicate which schema you are referring to and why you need it.
  17. Ingolme

    expo help

    You probably don't need XML Schema. I can't be certain without more information, but my guess is that the Schema that you are thinking about is probably https://schema.org/ Can you provide more details about why you want to use schema? This way people can determine how to help.
  18. Ingolme

    schema help

    This topic is over 7 years old, please create a new topic for your question.
  19. Ingolme

    <textarea> to XML

    Due to security restrictions, browsers are unable to write to files on the computer. You can make a download prompt appear using a data URL. This code generates a download prompt for an XML file with specific contents: <script> var filename = "file.xml"; var content = "<?xml version='1.0' ?><element>XML code</element>"; var file = new File([content], filename, {type: "application/octet-stream"}); location.href = URL.createObjectURL(file); </script> I'm not sure if the original contents of an XSLT-transformed document are accessible to Javascript, but if they are, it should be simple enough to use DOM methods to modify the node you're looking for and then convert it into a string to be saved.
  20. I mean a block of code that will run on its own which displays the problem. I need to be able to see the problem happening on my computer in order to find out what is wrong.
  21. I can't see any obvious reason in the code that you have shown here. As your code is right now, for me both canvas look the same. Perhaps with a real use case example I could see where the problem is.
  22. If only A is filled, it means that B has to not be filled. The structure would like similar to the following, assuming A and B are booleans: if(A && !B) { // Only A } else if(B && !A) { // Only B } else if(A && B) { // Both A and B }
  23. It removes the "readonly" attribute on all form elements of the website. Which means that you will be able to fill in form fields which were disabled previously.
  24. The forum is currently run by volunteers, the site staff do not regularly interact here. On the Certifications page they provided exam@w3schools.com as a means of contact.
  25. I'm not sure which language you're programming in. The 32 clarifies that the returned integer uses 32 bits to represent the number. 32 bits can represent about 4 billion different numbers. Depending on the language, there can be 8-bit integers for up to 256 different values, 16-bit integers for up to 65536 values and 64-bit integers for an amount too big for me to remember.
×
×
  • Create New...