Jump to content


Popular Content

Showing content with the highest reputation since 09/20/2019 in all areas

  1. 1 point
    No! It shouldn't make any difference. You either have a incorrect url to your external file, have not used required rel="stylesheet" for link element to stylesheet, have possible invalid css breaking the css following it. You did not clear history or cache before trying loading amended external css file. Note: the style tag is only required in html file NOT! External style sheet.
  2. 1 point
    I'm not able to reproduce this, the code looks fine. Can you test this code on its own? <style> a[href^="mailto"]:link:before { content: " < "; } a[href^="mailto"]:link:after { content: " > "; } </style> <a href="mailto:xxxxx@hotmail.com">xxxxx@hotmail.com</a>
  3. 1 point
    .team-members { width: 25%; display: inline-block; padding: 3.8em; vertical-align: top; /* add this */ }
  4. 1 point
    Just so you know, the LIMIT keyword indicates the number of rows to output. In this case, it is including Row 0 (first row) up to (but not including) Row 25 (26th row). Its quite common for it to be added to SQL browsers such as phpmyadmin and others. Just so if you have 70k rows (like I work with) you don't kill your program trying to look at all of them.
  5. 1 point
    Browser cache, or if you use save login details in the browser itself usually setting->Privacy->Manage Logins. You can clear all these by making sure you select saved logins option (maybe under advanced) when clearing history.
  6. 1 point
    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.
  7. 1 point
    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.
  8. 1 point
    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']), ','); }
  9. 1 point
    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.
  10. 1 point
    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
  11. 1 point
    No, that is incorrect. Each line is its own set of conditions completely independent from the other line of code. It is equivalent to the following code: if(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $str_browser_language = strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ','); } else { $str_browser_language = ''; } if(!empty($_GET['language'])) { $str_browser_language = $_GET['language']; } else { $str_browser_language = $str_browser_language; }
  12. 1 point
    Attention: Funce: This post is to acknowledge that you were correct with regard to the necessity of editing the hosts file, in order for the nginx-1.17.3 web server to serve up my web pages. It was necessary to create "www.mydomain.com; mydomain.com" pairs associated with my dynamically allocated ( i.e., using Dynamic Host Configuration Protocol ( DHCP )) Internet Protocol ( IP ) address, for each web page. Last Friday, I was able to successfully configure the web server ( i.e., the "nginx.conf" file ), and all of my web pages are served up ( you can visit "theholybible1.ddnsfree.com" ) if you like. Thank you ( see Colossians 3:15, for example ) for your help. Keep in touch. 🙂 Sincerely in Christ, Russell E. Willis P.S. - Please read Proverbs 23:23.
  13. 1 point
    Its always done that! Any floated element placed within a container element has no substance, so the container will collapse to height 0. Using property overflow reverses that condition for the container element.
  14. 1 point
    Ah , at last , it works: Ok Funce , I finally see what you meant . Thanks All . <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta charset="utf-8" /> <title>FreshDraft.StrippedDown></title> <style> @media print { .pageBreak{ page-break-after: always; } } </style> </head> <body id="bodyId" > <div> <br> <textarea class="copyFrom" spellcheck="false" rows="4" cols="12">textarea 1 line 1 textarea 1 line 2 </textarea> <br> <textarea class="copyFrom" spellcheck="false" rows="4" cols="12">textarea 2 line 1 textarea 2 line 2 </textarea> <br> <pre class="pageBreak">.</pre> <pre class="pageBreak">.</pre> </div> <br> <div> <br> <button id="printThisBtn" onclick="printAllThis()" style="display: block">Print This</button> </div> <script> var copyFrom = document.getElementsByClassName("copyFrom"); var pageBreak = document.getElementsByClassName("pageBreak"); var printThisBtn = document.querySelector("#printThisBtn"); function printAllThis() { collectedTextareas = ""; for (var i = 0; i < copyFrom.length; i++) { pageBreak[i].innerHTML = copyFrom[i].value ; } for (var i = 0; i < copyFrom.length; i++) { copyFrom[i].style.display = "none"; } printThisBtn.style.display = "none"; window.print(); console.log("window.printing"); for (var i = 0; i < copyFrom.length; i++) { copyFrom[i].style.display = "block"; } printThisBtn.style.display = "block"; } </script> </body></html>
  15. 1 point
  16. 1 point
    I wouldn't count on the filesystem returning data the way you want, I would get the list of all of the files and folders, sort them however you want to sort them, and print the sorted list.
  17. 1 point
    You've gotta modify this regex so you're using the entire string that matches as follows. (?=(.*\d){2})(?=.*[A-Z])(?=.*[a-z]).* Does this work for this one? And for this one, I've done a negative lookahead, that if it matches more than 3 digits, it won't be valid. ^(?=(.*\d){2})(?=.*[A-Z])(?=.*[a-z])(?!(.*\d){3,}).*$ Does this work for this one? Ab45 -> Match a4F8 -> Match aosjgHJ35 -> Match JsOsm4Osmf6 -> Match JsO2m4Os4f6 -> No match (3 numbers)
  • Create New...