Jump to content

Ingolme

Moderator
  • Posts

    14,894
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. If you have multiple elements, you have to call the function multiple times. It could be done in a loop. var elements = document.getElementsByClassName("myClass"); for(var i = 0; i < elements.length; i++) { w3CodeColor(elements[i]); }
  2. The code from the TryIt example is actually running live in the browser, it is real output. 1, 3, 5 and 7 are correct. Every second node is whitespace.
  3. You'll have to learn to use the Canvas API. The simplest way to make a drawing application using canvas is to draw circles on each mousemove event while the mouse button is down, or on phones, using the touchstart, touchmove and touchend events. Once you managed to make a simple drawing application, then comes the difficult part: writing software to recognize shapes. There is an entire field of science dedicated to solving this one problem, it is not an easy task. It seems neural networks are the most common approach to solving it.
  4. This would take me hours. You have to replace all "\x##" in the strings the the ASCII character of that value. Then put line breaks on opening braces, closing braces and semi-colons. Then you have to indent all the code. Perhaps there are some automatic code deobfuscators out there but I've never looked for one. Why do you need to decode this? I'd sooner write new software from scratch then spend the time on this.
  5. If you read the thread instead of just the title, the question was regarding running Javascript from a local file.
  6. The file:/// protocol would be used for this, but browsers don't allow websites to load Javascript files from your filesystem for security reasons.
  7. Please do not reply to old topics.
  8. Wikipedia and other sources use images to represent mathematical expressions on a page. HTML is not well equipped to represent them. There is an XML-based language called MathML, but it is not well supported by browsers.
  9. You have a semi-colon ; in the middle of the statement which is causing the problem. data[i].eosTxPort; + "<br>"
  10. If instead of bootstrap you use CSS, you can use the flexbox: https://www.w3schools.com/css/css3_flexbox.asp With the align-items CSS property, you can make all of the items in the flexbox have the same height. To display a different amount of items per row, you can enable flex-wrap and give each box a percentage width using media queries.
  11. There is already a topic for this question here:
  12. It is valid HTML, but it would be better for search engines if the content between the <header> tags was also wrapped in <h2> tags. The tags in the article block would then be <h3>.
  13. It looks like you have two different variables, $oldnode and $oldNode.
  14. I'd suggest using an iframe instead.
  15. CSS preprocessors cannot do anything more than native CSS does, because they compile to native CSS. Only Javascript can do this.
  16. Create email accounts? That is pretty complicated, I'm afraid I wouldn't know where to begin with that.
  17. HTML cannot send emails, but a server-side programming language can. PHP is one of the easiest to learn. You can learn how to send mail from PHP here: https://www.w3schools.com/php/func_mail_mail.asp You can learn how to gather form data from an HTML page here: https://www.w3schools.com/php/php_forms.asp
  18. What is the path to your video file and what does your HTML look like?
  19. It's a mistake. Javascript does not require a semi-colon at the end of a line, but it is preferable to put one because you never know when your script might have it line breaks removed.
  20. Personally, I don't like to follow trends. I evaluate each technology and determine whether it fulfills my needs or not.
  21. A server-side language will be needed if you want to receive data from people filling out the form. Javascript would not be able to achieve it.
  22. I can only speak for myself, but my answer is: If the task you want to accomplish can be done in a browser, you probably don't need an app at all, PWA or otherwise. I notice a lot of companies trying to get users to download an app which is basically just an alternative way to navigate their website. If I was interested in building an app that works in the browser, I would not use PWA since I can build the app in native Javascript which allows more freedom and control over how the application is built. There is nothing that Google's PWA framework can do which cannot be done in native Javascript, because PWA was built with native Javascript. Generally, it's about using the right tool for the right job. Browser apps are certainly easier to develop, but don't have access to all of the features that native apps do. If you don't need those features, a browser application may be the better option for you. There are a few advantages to native apps: They can work without an internet connection (save the user's data and your server's bandwidth) They have access to sensors such as the gyroscope, compass and accelerometer. They may be able to read and write files on the device. They can interface with the user's contacts and messages (if the user grants permission).
  23. It sounds like you are importing some packages with another class named "String". You have to specify java.lang.String because you have imported a different String class and it assumes you meant that other one.
  24. I have not worked directly with it, but PHP has the IMAP extension to interact with mail servers. https://www.php.net/imap This page indicates how to open a connection: https://www.php.net/manual/en/function.imap-open.php This function returns message IDs for items in the inbox: https://www.php.net/manual/en/function.imap-search.php fetchbody() and other fetch functions will give you data about an email give its ID: https://www.php.net/manual/en/function.imap-fetchbody.php
  25. scroll-behavior is not a valid HTML attribute. If you want a link to scroll smoothly you can cancel the click event and use the scrollIntoView() method. Update You must be referring to the scroll-behavior CSS property: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior You need to put that in a CSS stylesheet, it is not HTML. It's also not properly supported by all major browsers.
×
×
  • Create New...