Jump to content


Popular Content

Showing most liked content since 11/16/2017 in Posts

  1. 1 point
    In your HTTPS page all the Javascript files should also be loaded with the HTTPS protocol because the browser does not allow loading unencrypted content on an encrypted page. This file on your page is still using unencrypted HTTP: http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  2. 1 point
    Well, if you're saying that the chance is greater than 0, then I guess I would agree that would have to be the case, but I wouldn't expect that to work. I believe the ea in that mime type stands for EasyApache, which is how WHM/cPanel servers update and configure Apache and PHP. If you aren't using EasyApache, then I doubt your server is going to have that particular mime type set up for it. But, like I said, I would have to admit that the probability of it working is at least greater than 0. Instead, try to figure out, from documentation or program settings, what mime type your server is actually using for PHP. That will get you a lot closer than a guess.
  3. 1 point
    I meant display: properties not just display: inline-block. I think you are after a type of sticky footer effect, with rest of content vertically aligned middle and centre <!DOCTYPE HTML> <!-- Aerial by HTML5 UP html5up.net | @ajlkn Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) --> <html> <head> <title>High Intensity Records</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!--[if lte IE 8]><script src="http://highintensityrecords.com/assets/js/ie/html5shiv.js"></script><![endif]--> <link rel="stylesheet" href="http://highintensityrecords.com/assets/css/main.css" /> <!--[if lte IE 8]><link rel="stylesheet" href="http://highintensityrecords.com/assets/css/ie8.css" /><![endif]--> <!--[if lte IE 9]><link rel="stylesheet" href="http://highintensityrecords.com/assets/css/ie9.css" /><![endif]--> <style> body, html {height: 100%;} #footer {display: block;} #footer {position: relative; margin-top: -6em; overflow: hidden;} #wrapper {height: 100%; display: table;} #main { display: table-cell; padding:0; text-align: center; vertical-align: middle; } #main::before {content: none;} #main::after { content: ""; display: block; height: 4em; position: relative; } </style> </head> <body class="loading"> <div id="wrapper"> <div id="bg"></div> <div id="overlay"></div> <div id="main"> <!-- Header --> <header id="header"> <h1> <img src="http://highintensityrecords.com/images/hirwhite.png" alt="HTML5 Icon" width="500" height="250"></h1> <p>Bringing the <span style="font-weight:bold">highest quality </span>and <span style="font-weight:bold">intense beats</span> to flow inside your mind.</p> <p><span style="font-weight:bold">DEMOS </span>highintensityrecords@live.com</p> <p><span style="font-weight:bold">LICENSING </span>licensing.highintensityrecords@live.com</p> <nav> <ul> <li><a href="https://www.facebook.com/Highintensityrecords/" class="icon fa-facebook"><span class="label">Facebook</span></a></li> <li><a href="https://twitter.com/highintenrecs" class="icon fa-twitter"><span class="label">Twitter</span></a></li> <li><a href="https://soundcloud.com/highintensityrecords" class="icon fa-soundcloud"><span class="label">SoundCloud</span></a></li> <li><a href="https://soundcloud.com/highintensityrecords" class="icon fa-youtube"><span class="label">YouTube</span></a></li> <li><a href="https://www.beatport.com/label/high-intensity-records/28820" class="icon fa-headphones"><span class="label">Beatport</span></a></li> <li><a href="http://www.highintensityrecords.com/" class="icon fa-spotify"><span class="label">Spotify</span></a></li> </ul> </nav> </header> <!-- Footer --> </div> </div> <footer id="footer"> <span class="copyright">&copy; High Intensity Records 2017.</span> </footer> <!--[if lte IE 8]><script src="http://highintensityrecords.com/assets/js/ie/respond.min.js"></script><![endif]--> <script> window.onload = function() { document.body.className = ''; } window.ontouchmove = function() { return false; } window.onorientationchange = function() { document.body.scrollTop = 0; } </script> </body> </html>
  4. 1 point
    OR words = ['book', 'superficial', 'nostradamus'] for w in words: print(w, len(w)) for w in words[:]: if len(w) > 6: words.insert(0, w) print ('words'+ str(words)) It will print a string representation of words array and its values.
  5. 1 point
    You will find the last part is not part of code, but what will be the result when the code is run and finishes. replace last line with: print words
  6. 1 point
    I wasn't referring to the for loop, I was talking about the variable definition. The error message says you are using a tuple, and like it points out tuples do not have an insert method (you misspelled that in the error message). If that's true, then it sounds like you've defined the variable using parentheses instead of square brackets, which is why I was asking if that is the actual code you are executing or if you copied and pasted that code from another source.
  7. 1 point
    Use inline elements inside the paragraph, like <span> instead of <div>.
  8. 1 point
    It's probably better to use reply-to only, some services will block email if the from address isn't associated with your server. For example, gmail might block a mail if your server claims that the email is from some other gmail user when gmail knows that your server is not gmail.
  9. 1 point
    I don't have ipad so i can't test it. I did notice that you have a block element div within a paragraph? THIS is NOT allowed, and being a block element it WILL force a new line. The only elements allowed in paragraph element are inline elements i.e span, strong, a (anchor) etc.
  10. 1 point
    IF it works in ipad with tutorial example, I would go through each of your additional code and disabling with web developer tools or commenting out, try reinstating one at a time to identify the code which is causing the problem.
  11. 1 point
    You need to add from: and reply to: to header as discussed here http://foundationphp.com/tutorials/email.php https://www.w3schools.com/php/func_mail_mail.asp
  12. 1 point
    Elements hidden by CSS are still in the DOM and can still be accessed by Javascript. If there are values in the AJAX response that shouldn't be on the page, then don't put it on the page. You can store the result of an AJAX request in a variable instead of printing it.
  13. 1 point
    inline elements such as span, strong act how text acts when alignment is used, they shrink to content so height and width can't be used. Block elements by default fill the width available to them, and by adding text-align to this block element which fills the available width, any inline elements within it or child block elements along with text will be aligned to the specified text-align: left/center/right; of this parent element. The player container div is a block element, with fixed set width, by default it will position itself left as it not defined as a inline/inline-block element. In this current state a block element with fixed width will only centre itself if margin: 0 auto; is used. IF the player container because it has a fixed width was defined as display: inline-block; would be set to defined width and align as text would, following the text-align: rule set out on parent container.
  14. 1 point
    You are using position: fixed; outer container to surround your content, this will take it completely out of flow with other content, so because it occupies no space and with addition of overflow: hidden; on body, no scrollbars WILL appear to allow scrolling. You will get same on desktop, if you shrink the browser window to smaller size, or view it in responsive layouts under developer tools.
  15. 1 point
    If you decide to go with that approach, it is. The server would return a JSON structure a bit like this: { "html" : "<div class=\"something\">Some content</div>", "stylesheet" : "/css/style.css" } There are hundreds of potential solutions, that's just one of them. Programming is about identifying and solving problems. I'm not saying this is the best solution for your project, it is just one of them.
  16. 1 point
    I'm don't know how your entire website is structured. Are you using a content management system? Whichever system you're using, it should provide a way to modify content in the head of the page. The browser should only see one <head> element per document, otherwise your HTML is invalid. If you want to add a stylesheet after an AJAX call, you can generate it using Javascript. Have the server return the URL of the stylesheet and have Javascript use the URL to generate a <link> tag. // Assuming AJAX returned a JSON object in the data variable if(data.stylesheet) { var link = document.createElement("link"); link.rel = "stylesheet"; link.href = data.stylesheet; document.getElementsByTagName("head")[0].appendChild(link); }
  17. 1 point
    You cannot substitute identifiers like table or column names in prepared statements, the placeholders are only for the data. The reason for that is because when the database prepares the statement it creates an execution plan, and it cannot create an execution plan if it doesn't know what tables, columns, etc are going to be used. If you need to use dynamic identifiers you should make sure to surround them with backticks, and it's also a good idea to validate everything (especially if those identifiers get submitted from a user).
  18. 1 point
    You can add argument to function to identify if input, or select to give same result. With the select, you can identify if blank or not and filter or clear filter depending on value. The highlight IF related to td cell can be applied if found equals true when looping through each cell, IF tr is can be applied when found is true same as you have to show row.
  19. 1 point
    I disagree. From my experience, general-purpose content management systems often fail to meet requirements and often get in the way when trying to code a solution. Their main purpose is to provide a way to make website to those without coding skills.
  20. 1 point
    I don't think your question is worded correctly, $_POST is available on every request but your browser will only send one request at a time. Meaning you can only submit one form at a time. Anything that you want to be submitted all needs to be in the form. Of course, you can use Javascript to add or remove form elements if you want to build an interface like that. But each request to the server is only 1 request, you don't send multiple requests at the same time other than if you're using ajax to send a bunch of requests, but even so that's not the best idea. If you find yourself sending multiple requests in a short period you probably need a more efficient design, requests have overhead. If you're just asking how you can structure a page with multiple forms where you can figure out which form was submitted, there's a post about that here: http://w3schools.invisionzone.com/topic/12509-php-tips-and-tutorials/ I would assume that the trigger would update the timestamp, but the final word there is to just test it.
  21. 1 point
    Use ALTER, its described here https://dba.stackexchange.com/questions/62051/alter-table-rename-a-column
  22. 1 point
    It just sets a variable to another value. That value comes from $_GET, which holds all of the values that were included in the URL.
  23. 1 point
    I misread what you wrote, I thought you wrote "there is no such thing as scope". Yes, SQL queries have a scope.
  24. 1 point
    Yes, you need the same number and type of columns returned. You don't need to use the same table aliases necessarily, but it makes sense to use the same column names. That's not a correct assumption, if you remove the table aliases but keep them in the list of columns you'll get an error indicating that it doesn't know what p or c is. In that specific example, I don't think so, I think those aliases only apply to the select query where they are used. I could be wrong about that though, you might be able to use one in the other select query, but I don't think that would work. Yes. It won't, it's just being explicit about what you're asking for. If you wanted each ID from the two tables separately, for example, you should give each one a unique alias instead of returning 2 columns with the same name. If you change the data type of a column and there is existing data, MySQL will attempt to convert the data to the new data type. There are various rules for converting data between types. This is also called casting. You can also explicitly convert data during a SQL query, there are functions to do that. Those are the same functions that MySQL would use if you change the data type of a column.
  25. 1 point
    You had wrongly referenced a JavaScript function, and wrongly named a css selector so very important position: relative was not applied. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * {box-sizing:border-box} body {font-family: Verdana,sans-serif;margin:0} .mySlides {display:none; width: 100%;} /* Slideshow container */ .slideshow { /*NOT slideshow-container*/ max-width: 1000px; position: relative; margin: auto; } /* Next & previous buttons */ .prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; } /* Position the "next button" to the right */ .next { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a black background color with a little bit see-through */ .prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); } /* Caption text */ .text { color: #f2f2f2; font-size: 15px; padding: 8px 12px; position: absolute; bottom: 8px; width: 100%; text-align: center; } /* Number text (1/3 etc) */ .numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } /* The dots/bullets/indicators */ .dot { cursor:pointer; height: 13px; width: 13px; margin: 0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .active, .dot:hover { background-color: #f44336; } /* Fading animation */ .fade { -webkit-animation-name: fade; -webkit-animation-duration: 1.5s; animation-name: fade; animation-duration: 1.5s; } @-webkit-keyframes fade { from {opacity: .4} to {opacity: 1} } @keyframes fade { from {opacity: .4} to {opacity: 1} } /* On smaller screens, decrease text size */ @media only screen and (max-width: 300px) { .prev, .next,.text {font-size: 11px} } </style> </head> <body> <div id="wrapper"> <div class="slideshow w3-container w3-half"> <div class="w3-content w3-display-container"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_nature_wide.jpg"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_fjords_wide.jpg"> <a class="prev" onclick="plusDivs(-1, 0)">&#10094;</a> <a class="next" onclick="plusDivs(1, 0)">&#10095;</a> <!-- Extra plusDivs parameter refers to first (0) slideshow (start from 0) --> </div> <br> <div style="text-align:center"> <span class="dot" onclick="currentDiv(1, 0)"></span> <span class="dot" onclick="currentDiv(2, 0)"></span> </div> </div> <hr> <div class="slideshow w3-container w3-half"> <div class="w3-content w3-display-container"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_nature_wide.jpg"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_fjords_wide.jpg"> <a class="prev" onclick="plusDivs(-1, 1)">&#10094;</a> <a class="next" onclick="plusDivs(1, 1)">&#10095;</a> <!-- Extra plusDivs parameter refers to second (1) slideshow (start from 0) --> </div> <br> <div style="text-align:center"> <span class="dot" onclick="currentDiv(1, 1)"></span> <span class="dot" onclick="currentDiv(2, 1)"></span> </div> </div> <script> var slideIndex = 1; var z = document.getElementsByClassName("slideshow"); for (i = 0; i < z.length; i++) { //set custom data attribute to first current image index z[i].setAttribute("data-currentslide", 1); showDivs(z[i].getAttribute("data-currentslide"), i); } function plusDivs(n, j) { //get custom data attribute value of current image index to slideshow class index j slideIndex = parseInt(z[j].getAttribute("data-currentslide")[0]); showDivs(slideIndex += n, j); } function currentDiv(n, j) { showDivs(slideIndex = n, j); /* showDivs Not showSlides*/ } function showDivs(n, j) { var i; var z = document.getElementsByClassName("slideshow")[j]; var x = z.getElementsByClassName("mySlides"); var dots = z.getElementsByClassName("dot"); if (n > x.length) { slideIndex = 1 } if (n < 1) { slideIndex = x.length; } //set custom data attribute to current image index z.setAttribute("data-currentslide", slideIndex); for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } x[slideIndex - 1].style.display = "block"; dots[slideIndex - 1].className += " active"; } </script> </div> </body> </html>