Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. Technically the constructor is a method. The big difference between a constructor and other methods is that you never call the constructor, it is called automatically when you instantiate the object.
  2. Java programs almost always have many classes. If you don't have more than one class then you're not really taking advantage of Java's object-oriented nature and you might as well use a different programming language. As a beginner, you should make all your classes public. There are cases where private or protected classes are better, but you need a lot of experience to identify them and the code for an example would be too long for a forum post.
  3. I can't find the headline you are referring to on that page.
  4. I'm not sure to what extent it will affect the page on mobile, but the lack of a <!DOCTYPE html> tag on your page forces browsers into outdated rendering modes. The mobile devices may have an issue with this as well.
  5. Unfortunately, they're usually never checking the forums. This is just a community of people who use W3Schools.
  6. The error suppression operator is a very hacky solution to prevent warnings. If your code needs this then there is something wrong with your code.
  7. Please do not reply to old topics.
  8. Ingolme

    Node Naming

    What are you using to parse this XML file?
  9. Just put the code for one of the cards inside one of the <div class="column"> elements.
  10. Ingolme

    Columns positioning

    Yes, you're right, I missed that. In that case, the only change necessary is to set align-items to flex-start.
  11. I see. You will need some special logic to run between Thursday and Saturday. It will use 60 hours but only after 12pm on Thursday. var THURSDAY = 4; var minDate = new Date(); var offset = 36; if(minDate.getDay() > THURSDAY || minDate.getDay() == THURSDAY && minDate.getHours() >= 12) { // Add 60 hours instead of 36 after noon on Thursday offset = 60; } minDate.setHours(minDate.getHours() + offset);
  12. Please do not reply to old topics.
  13. I thought you did not want Saturday to be available after noon on Thursday. That would mean you have to extend the minimum permitted date to 60 hours from the current time.
  14. Ingolme

    Columns positioning

    Instead of grid, you could use flex box and set align-items to stretch. .wrapper { display: flex; align-items: stretch; } .sidebar { background-color: green; width: 10%; flex: 1 1 auto; } .archive-loop { background-color: red; width: 70%; flex: 1 1 auto; }
  15. Please keep your question to one topic. You can continue discussion in the following topic:
  16. It seems like Date.parse() returns the timestamp in GMT and so does the Date() constructor, which results in it selecting the previous day. Specifying hours seems to solve the issue. You can omit Date.parse() and just use the date objects themselves for comparison. var chosenDate = new Date(this.val() + " 00:00:00"); var minDate = new Date(); minDate.setHours(minDate.getHours()+36); if(chosenDate < minDate) {
  17. Yes, you can open an HTML file from the command line, but you cannot run commands from an HTML file.
  18. You forgot a closing </div> tag for the <div class="w3-top"> element, so the entire site is inside the nav bar which is attached to the top of the window and does not scroll.
  19. You cannot run commands from an HTML file.
  20. The <img> tag is self-closing, so it does not need a closing tag. Ending the tag with " />" is only necessary in XML, not in HTML.
  21. jQuery is being replaced by native Javascript features. It's probably for the best not to encourage its use. See section "JS vs jQuery" section of the W3Schools Javascript tutorial: https://www.w3schools.com/js/js_jquery_selectors.asp
  22. Please do not reply to old topics.
  23. Ingolme


    Where was $xml initialized? I can't say where the error is if I don't know what library you're using to read the XML.
  24. I would recommend getting very familiar with Javascript syntax and data structures before moving on to Node.js, but that's just my recommended approach. Some other people might recommend learning Javascript while using Node.js as a platform to learn it and I wouldn't say it's an invalid approach.
  25. It has to be in a <script> tag below the HTML that contains the active button, just as in the W3Schools example.
  • Create New...