Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. $row is clearly a string that begins with "r". You will have to show the code that is assigning a value to $row.
  2. Referring to C++ as a "blockchain programming language" is pretty inaccurate. C++ is not a programming language dedicated to developing blockchain applications, it is a general purpose object-oriented language designed to be close to the metal. I think you are mixing Java with Javascript, they are two completely unrelated languages.
  3. These are not issues, they are just suggestions of things that the machine couldn't not verify are good. As long as a human can verify that this is accessible you can just ignore these warnings. The first message "Link text may not be meaningful." means that the text inside the link should be meaningful even out of context. This message is in place because some people put text like "click here" and "this website" which are meaningless without more context. If you think your link text is meaningful then you can ignore this message. The second message "Anchor text may not identify the link destination." is shown when none of the words of the link text are found in the URL of the link. The computer thinks that this might indicate that the link text does not describe the page that you are linking to, however if you know for sure that the link text describes the target page then you can just ignore this message as well.
  4. getElementsByTagName does not return an array, that's actually an HTMLCollection object.
  5. That code uses <font> tags, <br> tags and alert(). It is a clear example of how not to write code.
  6. HTML without CSS is practically useless in the modern web. If you don't know CSS in depth then you might as well not know HTML. CSS appears simple on the surface but it is actually more difficult to master than many people think. If you intend to be a full stack developer, it is usually a good idea to master the front end before moving on to the back end.
  7. It is not easy. You will need to install a server on your computer and then use a server-side programming language to write data to a file.
  8. Your PHP code is calling an undefined function, so it's showing an error message which is not valid JSON.
  9. I tested on this page and there is enough space for the answer. There are three different text fields that you have to fill in, you can't just put the whole answer in just one of them.
  10. That's inside a string, so it's not python syntax, just text. Whichever library is using the string probably has documentation about its syntax.
  11. I'm not certain how frequently the staff visits the forum, but I'd say less than once a year. If you find an error on any page you can click the "REPORT ERROR" button at the bottom of that page to send a notice to the site owners.
  12. Sprites have limitations. For one, the container must be the same size in pixels as the sprite you're representing, otherwise other sprites on the same image are visible. Another limitation is that sprites cannot be repeating since background-repeat repeats the whole image file and not just a part of it. In short, you can't style a flexible box using sprites. On the other hand, you can use the border-image property in CSS to split an image into parts and use them to style a box.
  13. This sounds like a homework question. Have you given it a try yet?
  14. Yes, there's nothing preventing you from using execCommand() in more than one place.
  15. If you need another condition, use else if(), if not then just use else. Neither of them are required, you just use them if you need them.
  16. This line is missing an "if" else ($choice == 'writsEdit')
  17. filter_var() with the FILTER_VALIDATE_INT filter returns an integer, not true, so === true will always fail. By using The ! operator, they transform it into a boolean. This boolean, for any integer other than zero, is always false. This solution doesn't account for the integer zero which converts to true, but W3Schools also has a section talking about that. They could just use !!filter_var() or (bool)filter_var() and they wouldn't need the === false part. This would still not solve the integer zero problem, though.
  18. That depends on where you want it to appear. The code you write does exactly what you tell it to do. I don't know what you want, so I can't tell you how to do it.
  19. That code is literally in the first post that he made. It would do to read more carefully before replying. This topic is really old as well, most likely the person will never see your reply.
  20. I can't see what the exercise actually was, but for learning purposes, the alias you use should not matter at all. Most likely it was the syntax that was incorrect.
  21. Firefox shows all of the event handlers that have been assigned to elements in the document. "Bubbling" indicates that the event fires during the bubbling phase, meaning that events from child elements fire before it. DOM2 just indicates which DOM standard is being used. As for what the Matomo code does when the page unloads, I don't know, there are too many external elements that determine that.
  22. I'm not concerned about the intention behind the code, I'm merely indicating which logic would be equivalent to the original code.
  23. The shortest equivalent code you can make without conditionals would look like this: $str_browser_language = ''; if(!empty($_GET['language'])) { $str_browser_language = $_GET['language']; } else if(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $str_browser_language = strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ','); }
  24. No, they don't produce the same result because in your code you're skipping over some comparisons that have to be made. Regardless of whether $_SERVER['HTTP_ACCEPT_LANGUAGE'] was tested or not, you have to test $_GET['language'] in order for the statements to be equivalent.
  25. You need to understand how the conditional works. In the statement X = C ? A : B , X is either equal to A or equal to B based on whether C is true or not. In other words: if(C) X=A else X=B
×
×
  • Create New...