Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 08/24/2018 in all areas

  1. 1 point
    Did you check iphone support at bottom? Did you try using the whole code they supplied which covered all the different options to break the word, instead of breaking it up individually? Its done that way to cover all versions of iphone.
  2. 1 point
    Again, npm is just a package manager, it is not a build tool. We use webpack, for example, to build the actual file we deploy. npm does not do that, it just gathers the required packages and handles dependencies. Actually building the project to deploy is another process. If you open your Chart.js file and look at it, what do you see? Does it define a Chart object? Yes, all of our servers use that environment. We have 7 servers online right now, as the CTO part of my job is running them. Our servers don't crash, but occasionally one fills up its hard drive or something else fun happens. Why not download and save a copy of the file that you then serve locally?
  3. 1 point
    Is it not possible to just include the Javascript file with a <script> tag?
  4. 1 point
    Thank you for your reply Funce! I will check out xml parsing in python right away! I also had no idea I had to worry about security, so I really apreciate you told me that! Even though there won't be any valuable information on that Raspberry Pi, securing it seemes like a good idea! Thanks again for your aid.
  5. 1 point
    That's because you're using mysqli_real_escape_string. You don't need that function, that's only for databases and it's also only used in really old code. If all you're doing is sending an e-mail, remove the entire database connection file. For escaping things in an HTML e-mail, use htmlspecialchars(). That semi-colon is correct, it separates two of the components of the Content-Type header.
  6. 1 point
    That's true about localStorage and sessionStorage, I just said that because previous questions by this user were about sessions in ASP.
  7. 1 point
    If you've already managed to pull the RSS feed, and you know WHERE to get this XML from on your local file system(or otherwise), what you want is to find out how Python can parse XML strings/files for you. Just note that the inbuilt abilities of python are vulnerable to maliciously constructed XML so I recommend checking some of these out. For Python3: https://docs.python.org/3/library/xml.html https://pypi.org/project/defusedxml/ You seem pretty onto things, so don't hesitate to ask questions. There are loads of knowledgeable people here. Welcome to the W3Schools Forum!
  8. 1 point
    Indeed Roddy, That sounds about right. And then defining cat. I get what you mean in regards to languages! I guess I'm more cursing my forgetfulness than the language itself. Thank you for the insight.
  9. 1 point
    Add 'w3-mobile' class to 'w3-dropdown-hover' div class
  10. 1 point
    This is more logical responsive way to do this <!DOCTYPE HTML> <html> <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://use.typekit.net/qkv6kzb.js"></script> <script>try { Typekit.load({async: true}); } catch (e) { }</script> <script src="https://use.typekit.net/qkv6kzb.js"></script> <script>try { Typekit.load({async: true}); } catch (e) { }</script> <meta charset="UTF-8"> <title>Barton's website</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <style> html { background-color: white; } body { width: auto; margin: 0 auto 0; } .parallax { /* The image used */ background-image: url("img_bckgd_bio.jpg"); /* Set a specific height */ height: auto; /* Create the parallax scrolling effect */ background-attachment: fixed; background-position: center; background-repeat: repeat; background-size: cover; } h2 { font-family: "europa",sans-serif; color: black; text-align: center; font-size: 250%; font-weight: 600; letter-spacing: 2px; padding-top: 10%; margin-bottom: 10%; } body p { font-family: "europa",sans-serif; text-align: left; font-size: 170%; font-weight: 600; color: black; line-height: 150%; } .flex-container { display: -webkit-flex; display: -ms-flexbox; display: flex; justify-content: center; padding: 0 5% 5%; border-top: rgb(180, 37, 37) solid 2px; } .flex1 { width: 25%; margin-top: 5%; } .flex1 p { font-family: "europa",sans-serif; text-align: center; font-size: 150%; padding-bottom: 10%; } .flex2 { width: 50%; margin-top: 5%; } .flex2 p { padding-bottom: 10%; } a { font-family: "europa",sans-serif; text-align: left; text-decoration: none; font-size: 110%; color: black; } a:hover { color: blue; text-decoration: underline; } footer { background: #827e90; height: 25%; } footer p { padding: 5%; font-family: "europa",sans-serif; font-size: 100%; letter-spacing: .8px; color: white; } .flex-container_footer { display: -webkit-flex; display: -ms-flexbox; display: flex; justify-content: space-between; align-items: center; } .flex-container_footer>div { margin: 0px 5%; } .fa { padding: 2%; /*font-size: ; width: ; Don't know what going on here? never leave half finished'*/ text-align: center; text-decoration: none; border-radius: 50%; } .copyright p { font-family: "europa",sans-serif; color: black; font-size: 110%; letter-spacing: .8px; line-height: 135%; font-weight: 500; padding: 10% 0; } /* Add a hover effect if you want */ .fa:hover { opacity: 0.7; } /* Set a specific color for each brand */ /* Facebook */ .fa-facebook { background: #3B5998; color: white; } /* Instagram */ .fa-instagram { background: #3B5998; color: white; } @media screen and (max-width: 1366px) { /*h2 { font-size: } .flex2 { font-size: } Don't know what going on here? never leave half finished'*/ } @media screen and (max-width: 1024px) { h2 { font-size: 200%; } .flex2 p { font-size: 150%; } } @media screen and (max-width: 768px) { h2 { font-size: 175%; } .flex1 p { font-size: 125%; } .flex2 p { font-size: 125%; } @media screen and (max-width: 480px) { h2 { font-size: 155%; margin-bottom: 5%; } .flex-container { display: -webkit-flex; display: -ms-flexbox; display: flex; flex-direction: column; justify-content: center; padding: 0 5% 5%; border: none; } .flex1 { display: -webkit-flex; display: -ms-flexbox; display: flex; flex-direction: row; justify-content: center; /* margin: 5% 5% 0; removed by dsonesuk*/ width: auto; /*added by dsonesuk*/ } .flex1 p { font-size: 105%; /* margin: 0 8% 0; removed by dsonesuk*/ padding: 2px 2px 0; /*added by dsonesuk*/ flex: 1 1 auto;/*added by dsonesuk*/ } .flex2 { width: 100%; border-top: rgb(180, 37, 37) solid 2px; } .flex2 p { font-size: 105%; padding-top: 6%; } } </style> </head> <body> <header> </header> <div class="parallax"> <div> <h2>Barton Lewis - Bio</h2> </div> <section class="flex-container"> <div class="flex1"> <p><a href="index.html" title="home">home</a></p> <p><a href="bartons_film_site_works.html" title="works">works</a></p> <p><a href="bartons_film_site_bio.html" title="bio">bio</a></p> <p><a href="bartons_film_site_cv.html" title="c/v">c/v</a></p> <p><a href="bartons_film_site_contact.html" title="contact">contact</a></p> </div> <div class="flex2"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vel diam at justo maximus facilisis vel auctor sapien. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer purus arcu, pharetra quis libero sit amet, luctus bibendum metus. Aliquam orci metus, consequat nec malesuada in, condimentum ac nisi. Duis vulputate sem lacus. Fusce justo lorem, scelerisque sit amet suscipit sed, sodales at est. Sed quis ante vitae tellus ultricies ultricies quis nec lacus. Aliquam ac neque vitae nulla eleifend egestas eu at urna. Morbi metus velit, tempus eget ornare at, aliquet id nisl.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vel diam at justo maximus facilisis vel auctor sapien. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer purus arcu, pharetra quis libero sit amet, luctus bibendum metus. Aliquam orci metus, consequat nec malesuada in, condimentum ac nisi. Duis vulputate sem lacus. Fusce justo lorem, scelerisque sit amet suscipit sed, sodales at est. Sed quis ante vitae tellus ultricies ultricies quis nec lacus. Aliquam ac neque vitae nulla eleifend egestas eu at urna. Morbi metus velit, tempus eget ornare at, aliquet id nisl.</p> </div> <div class="flex1"> <p></p> </div> </section> </div> <footer> <div class="flex-container_footer"> <div class="copyright"> <p>copyright © 2017 by Barton Lewis</p> </div> <div> <a href="https://www.facebook.com/profile.php?id=1410465690" class="fa fa-facebook"></a> <a href="https://www.instagram.com/bartonlewis2328/" class="fa fa-instagram"></a> </div> </div> </footer> </body> </html>
  11. 1 point
    Unless you want the navigation to stack above each other as it was with two column layout then OK, the width can remain at 25%, but you need to change flex-direction: row; to flex-direction: column in media query to reflect this. IF Not, the problem is you are trying fit combined width of all navigation 100% of 480px, into now 25% width of 480px (120px reduced even more by using margins). That width is fine for a 2 column layout, but when the width begins to reduce to a single column for 480px not so much you will and have found. For a responsive layout for smaller devices all container widths usually become for non block elements width: 100% OR block elements width: auto; so they fill the total width available to them.
  12. 1 point
    The width still is 25%, 25% of its parent container. Just like before. Its just now the navigation is above the main content. Look at the Blue box in my pictures to see how big the flexbox is.
  13. 1 point
    I think what you need to do is when it is a single column set .flex1 width: to auto; remove margins from .flex1 and .flex1 p and use flex:1 1 0; for paragraphs.
  14. 1 point
    You have set the width to 25%, it is centring to that width, it will align to the left, the overflow of width 25% and margins extends beyond the left edge, out of view.
  15. 1 point
    Let's compare! The blue area shows the container that your text is being centred off of. The orange area represents your margins. Compare it with this And you can see the difference
  16. 1 point
    Hi there Roddy, I tested using Chrome (In its mobile emulation form) and using Chrome on my Samsung S9+. From what I remember from my cursory observation yesterday (or earlier today) one of your scripts, though I cannot remember which, was importing a new stylesheet which applied styles to your #middle element. The styles were never unapplied or otherwise overridden elsewhere. That would be the main issue for the colour changing. Have you seen the Jquery function AddClass? It's pretty helpful when you want to apply predefined CSS styles through Javascript. https://api.jquery.com/addclass/ https://api.jquery.com/removeclass/ I was unable to click on the links today to test, your overview.js has an error at line 423. You've commented out the beginning of a multiline comment block.
  17. 1 point
    There is no command to end the program, but if there are no event listeners, you can wrapall of your code in a function and call "return" when you want it to end. If you do have event listeners then you will have to remove all of the event listeners before stopping the program.
  18. 1 point
    With most browsers that are not IE, you can also use a template literal: var str = `text more text yet more text`;
  19. 1 point
    The trouble with replacing \n with space is if a space already exists you will create a double space. str = str.replace(/(\r\n\t|\n|\r\t)/gm, ""); str = str.replace(/\s{2,}/g, " ");
  20. 1 point
    And then, if you want to replace each \n with a space, you simply write: var output = str.replace(/\n/g, " "); element.innerHTML = output; Roddy
  21. 1 point
    If you want to detect that a string has a line break, you just search for "\n". In the following code, the variable "hasLineBreak" will be true when the string has a line break in it. var hasLineBreak = str.indexOf("\n") >= 0; You might want to split a string by its line breaks. The following code creates an array of strings, each string is one of the lines of the first string. var lines = str.split("\n"); When printing a string to HTML, if you want the line breaks to still be visible, you have to replace them with <br> tags. Here's how you would do that: var output = str.replace(/\n/g, "<br>"); element.innerHTML = output;
  22. 1 point
    @Funce Thanks, that is a great solution. I test this on the server and locally, and with that one line there is no configuration. Where were you yesterday? I was futzing around with .htaccess for hours (never got it to work locally, and it can be frustrating playing 20 questions). I would give you a like, but I this w3schools.invisionzone site does not work very well (can't get any of the icons to function - firefox popup: "Sorry, there was a problem reacting to this content.")
  23. 1 point
    You just need to encode the "&", like this: &amp;amp;
  24. 1 point
    Hello my name is Ryan. I am passionate about web design and app development. I have a working knowledge of HTML5, CSS3 and JS. I am new to the forum but I have been learning on W3 Schools for about 4 months now. I am a big fan of W3CSS and I think it works excellently.
  25. 1 point
    If this product was actually manufactured and sold to you by your ISP, instead of being manufactured by a company like Huawei which is not an ISP, then I imagine some customer complained and refused to pay a bill for service they weren't actually using. I don't think you do, because you're suggesting that you have "5 gigabyte internet in an internet USB stick", and that's not how this works. You don't have "gigabytes of internet" in a USB anything. The only thing the USB device does is connect to some provider. How much traffic you actually use is measured from the other end. And, if you have a bunch of things running in the background that you don't know about, then you may use it. What if you leave your laptop online and leave, and in the background Steam decides that it's going to download a 1GB update for Team Fortress 2? Now you come back and you've used another 1GB of data that you weren't expecting. Believe me, I know what I'm talking about.
×