Jump to content


Popular Content

Showing content with the highest reputation since 08/16/2017 in all areas

  1. 2 points
    There's nothing formal to tell you things like that. People do it themselves, and it tends to illustrate the Dunning-Kruger effect. People who just recently started tend to rate themselves highly, and only when you get more into something do you realize how much you don't know. I wouldn't put any weight on things like that. If you want to evaluate someone's capabilities look for a portfolio or things they've actually finished.
  2. 2 points
    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>
  3. 1 point
    Have you tried printing the stmt and result objects after the match attempt to see for errors? Also not sure if this may be the issue but I don't think you need to call the first line below because when calling 'prepare' it returns a stmt object for you. $mysqli_stmt = $this->mysqli_obj->stmt_init(); $mysqli_stmt->prepare($sql_select); So instead try: $mysqli_stmt = $this->mysqli_obj->prepare($sql_select); Also noticed: $match = mysqli_num_rows($mysqli_result); Looks like calling procedural function calling attempt? Instead for number of rows, try: $mysqli_stmt->num_rows Use in the if condition instead of $match > 0. Also noticed and just to note, when calling a function from another function within the same object, use $this->update_record(); instead of just update_record(); Good luck! I'm sure some of the others will be here to assist as well!
  4. 1 point
    You can't do that! As Cascading in Cascading Style Sheet (css) means it cascades down from parent to children or sibling to below sibling elements. it never goes up. Only with JS can that be done; The space between ':hover .text' means the element with class 'text' must be within element div with class 'buttonbottom' to cascade down to .buttonbottom:hover .text{display: none;} You can place these above .text element, adding padding-bottom:, and position: relative; to bottom of box class element to allow space for these elements, then add position: absolute; and bottom: property to these bottom buttons. this will position them to where they are now, even though they are above .test class element. Then use .buttonbottom:hover ~ .text{display: none;}
  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
    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.
  7. 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.
  8. 1 point
    You can change the width of the row class to be a percentage smaller than 100%, but you're going to need to add various rules for the different page sizes so that on a smaller device it would either be full width, fewer items per row, etc.
  9. 1 point
    There's no uncertainty. When you click on a link like that and the browser is building the URL to request, if the link only contains a querystring then the browser will use the current page, add the querystring to it (or replace an existing one), and use that as the URL for the request. There's honestly not a lot to say on this topic, it's pretty basic. It's just a link to the current page with a new querystring. It wouldn't matter whether or not someone managed to actually create a file with that name on the server because the browser wouldn't request that file anyway, it's going to request the current page again.
  10. 1 point
    I haven't tested how jQuery handles that, but I assume that it's only going to execute whatever code was just added to the page. The rest of the code on the page will be executed when the browser gets to that point. I'm referring to the 2 links you posted above. The direct link does not have that link to #60, the "proxy" link does even though they go to the same page. Why, because it's longer? There's nothing unmistakable about 60, as far as the computer is concerned. 60 is also unique and unmistakable. Both 60 and any hash will convert to binary values that are unique, the computer will not confuse them with each other. So they are both values in the same address space of all binary numbers, one of them is just an enormous number but that's the only real difference, they're just numbers. Why would one of them be said to be a quantitatively "better" number than another? Hashes are really only used for one thing - verification. Passwords are stored as hashes and then the hashes are computed to verify that the entered password matches the stored one, or a file might be distributed along with a checksum hash to verify the integrity of the file, that the file you actually saved is the one they distributed, there was no error in transmission. Hashes don't really offer anything as identifiers that you can't get with any other numeric value, and a hash is just a numeric value represented in a different base. One problem I see with using both a hash and an ID is that people cannot find the pages if they only know the ID. If I think you said something great in podcast 60 and I want to share it with someone else, I can't just check the URL and figure out where the ID goes in the URL, I also need to know some long hash that I can't calculate just by knowing that the podcast was number 60. So the only thing I can do is try to find a link to that page somewhere else, I can't just type it in manually. If that's your goal, if you're trying to add some sort of protection against people being able to figure out the URL for any podcast, if you're trying to control access in some way where they need the specific URL and not just the ID, then that would be the result of requiring the hash to be in the URL. Don't think of it like that, PHP and Javascript don't share any values or anything like that, the only relationship is that you're using PHP to output Javascript code. They don't run in the same address space, they don't even run on the same computer (PHP runs on the server, Javascript runs in the browser). As far as PHP is concerned, it's all just text being sent to the browser, PHP doesn't care whether it's Javascript text or HTML text or any other kind, it's just output. So all you have to do is output that Javascript code outside of the element that is being cloned or copied. I can't specifically tell you how to do that, I'm not looking at everything that you are. I assume you have templates or something with all of that stuff in it, so just make sure the Javascript code to copy the content is not part of the content that gets copied.
  11. 1 point
    The call stack exceeded error is because you've created an infinite loop, and Javascript quits when the maximum recursion limit has been reached. It's because you have some Javascript code to get the #podcast_insert HTML, and replace the contents of #main with that HTML. The HTML includes the Javascript code to do that replacement, so each time you replace the code it tries to replace it again and again until Javascript hits the recursion limit. The Javascript code to do that should not be inside that div, it shouldn't be part of the content that you're moving. The title tag issue is probably in a template somewhere. If you open the page in your browser and view the page source you can see that tag before the doctype.
  12. 1 point
    You're also trying to loop over n. What's n?
  13. 1 point
    Using href="#" will have side effects compared to button in that it will reload the page, taking you to top of page with address bar url having '#' at end. You can prevent this using javascript: void() in href OR by passing 'event' as function called argument you can within that function use event with preventDefault() to stop the anchors normal action triggering. https://www.w3schools.com/jsref/event_preventdefault.asp https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_oper_void Display Name is a username? doubt anyone but moderator would have permission to do that, IF allowed.
  14. 1 point
    Use a separate field in the table to specify the sort order, and when you insert the data make the sort order field whatever order you want to retrieve the data.
  15. 1 point
    No, I can't, because there's not a single way for every laptop and every fingerprint reader to communicate with a web browser. Maybe some of them have drivers or features to do that, I don't know. Maybe browsers will start to add APIs to access fingerprint readers the same way they can with webcams, maybe that will happen over the next couple of years. There's no standard for that now that I'm aware of. There may be third-party resources you can use though, I haven't done any research on this company or looked carefully at what they offer but maybe they'll have something that works for you: https://www.voltapass.com/index2.html
  16. 1 point
    All you have to do is set the divs inline style display to display: none; make sure it has the id reference, and you are there.
  17. 1 point
    .et_pb_row_1 { max-width: none; width: auto; }
  18. 1 point
    Last time i checked GET is for query strings (using <a> tag, although can be applied to form via method get) which is what you mentioned in your post. But okay man.
  19. 1 point
    Actually No, there are several ways to do this, and I did not which had been chosen, but the how the querystring and value are used is the important part to get it to work.
  20. 1 point
    You have been caught by the same error I made but I was tired, that statement flows on to next line, it end with that second line semi colon; post #4 and #5
  21. 1 point
    Maybe you didn't do the port fowarding thingy correctly, or maybe your ISP is just blocking incoming traffic on port 80.
  22. 1 point
    You need to add the second parameter when you call currentDiv, like you did with plusDivs. In order for the function to highlight the correct dot, each of those dot elements needs to specify which slide show it belongs to, so that showDivs can get the correct set of dots. One way would be to add a class name or data attribute to the dot container elements, or to the dot elements themselves.
  23. 1 point
    Yes. <?= ?> is a shortcut for <?php echo ""; ?> All of the above will translate as follows: <?php echo ++$a; ?> <?php echo ++$b; ?> <?php echo $private_id; ?> <?php echo session_id(); ?>
  24. 1 point
  25. 1 point
    SublimeText works best for me