Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. In UTF-8 encoding, any Unicode character with a code higher than 127 is split into multiple bytes. Each byte starts off with a number of 1s indicating how many of the following bytes belong to the same character. UTF-8 encoded bytes have structures like the following: 0XXXXXXX 110XXXXX 10XXXXXX 1110XXXX 110XXXXX 10XXXXXX Your character has to be split into two bytes because its Unicode value is highter than 127. Its binary representation is: 10111101. These bits are split into the following two UTF-8 bytes: 11000010 10111101. The hexadecimal representation of t
  2. I think it looks correct. It is passing a two-byte UTF-8 encoded character. The %## encoding in a URL can only have two characters following the %. If you have a multi-byte character, each byte will be encoded on its own. The server should be able to decode it without a problem as long as it is treating strings as UTF-8.
  3. It has an error because you forgot to declare i with the var keyword.
  4. This pattern should work: ([0-9]{9})?
  5. The best way to learn is to set yourself a project and try to accomplish it. Along the way you'll run into problems you don't know how to solve. When you do, you do research on those specific things and that is how you learn. You will find tools in Java which do what you need them to. The more problems you run into while developing something, the more things you will learn when researching the solutions to those problems. On the other hand, try not to start a project that is too far out of your reach.
  6. This is the behaviour I would expect to see from inline elements. Most likely setting them to display: block will solve the issue.
  7. What is self.view? It looks like you may be using some kind of framework. Without knowing which framework you are using and how the framework works I can't tell you how to solve this.
  8. Use an <a> tag, give it a class attribute and then remove the underline using the class as a seletor. <div class="w3-panel"> <a href="other-page.html" class="box-link"> ... </a> </div> CSS: .box-link { text-decoration: none; }
  9. You can use the border-spacing property to set the spacing between the cells horizontally and vertically. table { border-spacing: 0 5px; }
  10. The page loads in order from top to bottom and the Javascript runs as soon as it can even if the rest of the page has not loaded yet. One way to solve it is to always put scripts before the closing </body> tag. Another way is to have the code wait for the page to load before assigning the event listener. This can be done with the DOMContentLoaded event: window.addEventListener("DOMContentLoaded", attachEvents); function attachEvents() { var p = document.getElementById("btn"); p.addEventListener ("click", test); } function test() { alert("Test"); }
  11. That code won't work. The code that opens the popup is gone. Of course, you need to replace the "// Popup code here" comment with the actual code that makes the popup appear. The "if (localStorageDate == currentDate)" block would need to be removed since that is the part that was checking for the current day before. It seems like you are not familiar enough with Javascript yet. You should make an effort to understand what each line of code is doing. If there is a line of code that you don't understand, ask about it and I can explain it to you.
  12. HTML is not able to send emails, you will need to learn a server-side programming language for that. PHP can send emails using the mail() function.
  13. If you just want to display the button, an <img> tag will work. If you want it to actually do something when you click on it, that would be very complicated.
  14. This code would replace the part of your code which is calling DisplayDemoPopUp.
  15. You might get a quicker response if you report it to help@w3schools.com. I am not certain how frequently they check the forums.
  16. You can count whether seven days have passed by comparing the timestamps. The getTime() method converts each date into a number measured in seconds. var SEVEN_DAYS = 7 * 24 * 60 * 60; // How many seconds in 7 days if(localStorageDate.getTime() - currentDate.getTime() > SEVEN_DAYS) { // Popup code here }
  17. There seems to be an issue with the site. They might respond faster if you send an email to help@w3schools.com
  18. Ingolme

    PHP Tryit Editor

    I just had a bit of time and checked. There certainly does seem to be a problem. The problem is not on your computer, it's the server that has a problem. When the manual is talking about the operating system, it is referring to the server's operating system, not your computer's operating system.
  19. Ingolme

    PHP Tryit Editor

    Which tryit example are you referring to? By Tryit editor, I assume you're referring to something like this: https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_string_strlen
  20. Are you able to use the DOM inspector to see which styles are being applied? Edit: Considering Safari is the one with the problem, have you cleared the browser's cache? I am aware that Safari has a very aggressive cache.
  21. This should work: display: block; max-width: 100vw; max-height: 100vh; width: auto; height: auto; The element containing the image should take up the full size of the window for this to work correctly.
  22. The == was probably checking that both strings were pointing to the same space in memory, which they probably were not.
  23. See if shouldLoginNo.trim().equals("Yes") makes a difference.
  24. Ingolme


    XSLT can only deal with valid XML. If you have another programming language available to you, you could have it replace the entities before sending the XML to the XSLT engine.
  25. There may be invisible characters. What number do you get when you call shouldLoginNo.length() ?
  • Create New...