Jump to content


Popular Content

Showing content with the highest reputation since 10/15/2018 in all areas

  1. 1 point
    So you thought us being so magnificent, we would magically know that! This is what i mean about giving only partial code! You being a copy and paste person, we naturally thought, you copied part but not all of the code from somewhere. GIVE ALL CODE RELEVANT to the problem, JAVASCRIPT and HTML.
  2. 1 point
    Yes, it is automatically hidden with CSS by using display: none. .modal { display: none;
  3. 1 point
    When clicked the link with '#ido1' acts as a bookmark to take you to the element with id 'id01', this becomes targetted . The 'modal' class styles the same element with 'id01' id, by default to display: none; but when it is targetted .modal:target takes precedence and changes from display: none; which makes it hidden, to display: table; which shows the modal. Clicking the modal close link with href="#", causes it to lose focus, and therefore no longer targeted, meaning it will return to default state style of display: none;.
  4. 1 point
    It uses ones single image to contain all images, the container is width 43px, you use -47px or -91px, to move the whole background left! To bring a specific portion of the background image into view and centre it.
  5. 1 point
    The questions is! can you retrieve ALL the names and values in one call? combined. If you can achieve that you are on your way to the answer.
  6. 1 point
    Well It would have it being more stupider to show the wrong! values even after reading the link, so because you being as stupid is as stupid does I thought I would point out the parts you did not follow, so others would not become confused, when the result showed different to what you had stated. I thought you might have got your rem and em mixed, and just pointed what it should be with what you gave. I just can't imagine you being that stupid that you didn't realise H# header tags have by default font-weight of approx 700, so yes! there will be a difference between it and text in a paragraph for example. em size relative to closest parent element font-size: rem size relative to root parent element (<html>...</html>) font-size:
  7. 1 point
    You've put the open() and send() methods of the second request inside of the onreadystatechange handler.
  8. 1 point
    You could replace that filter function with Array.splice. Generate the random number, use splice to remove and return the removed element, and then push the element onto the other array. function selectCubes(gates) { var cubes = ['cube_one', 'cube_two', 'cube_three', 'cube_four', 'cube_five', 'cube_six', 'cube_seven']; var selectedCubes = []; while (selectedCubes.length < gates) { selectedCubes.push(cubes.splice(Math.floor(Math.random()*cubes.length), 1)[0]); } return selectedCubes; }
  9. 1 point
    Hello i like to code php and looking forward to learn even more web techniques here. W3CSS works great
  10. 1 point
    No, n is the size of the data set. If you have a single loop over the data set, then the time complexity is linear because the time will grow at about the same rate as the data set grows. If you have one loop over the data set inside another loop over the data set (or equivalent, as in your case), the time complexity is O(n^2), the time will grow at a much faster rate than the size of the data set. If you have another nested loop, time complexity is O(n^3) and you're going to be restricted to pretty small data sets if you want to see it finish. Well, the several loops are at least still linear complexity instead of exponential.
  11. 1 point
    If you have nested loops, yes of course it increases. Look into algorithm time complexity, specifically big-O notation. The algorithm I posted has linear complexity, O(n), and your original one has exponential complexity, O(n^2). So, with mine, if the data set increases by 10 times, my algorithm will take roughly 10 times longer, but yours will take roughly 100 times longer. Determining algorithm complexity is one part of computer science. A great example of various complexities are the various sorting algorithms. It's really easy to come up with an exponential sorting algorithm, it's pretty easy to do things the wrong way. If you look into the various algorithms you'll see attempts to reduce time complexity to something less than exponential time.
  12. 1 point
    Hello everyone, I'm also trying to learn HTML and CSS and I've just discovered your forum that looks really cool and helpful ! I'm glad to be here and I hope to learn a lot from you guys ! Peace from Paris
  13. 1 point
    Hello All Can't remember if I've introduced myself, Martin54 or not? I'm just trying to learn HTML and CSS for my own personal use, I'm at a pretty basic level at the moment and have just been experimenting using some of the W3School templates.
  14. 1 point
  15. 1 point
    Just to get your terminology right, that's not a session cookie. A session cookie is a cookie with an expiration of 0, which the browser removes when you close the window. If you want to see what the browser has saved, in the Firefox developer tools, for example, there is a Storage tab where you can see things like the cache, cookies, local databases, etc. In the list of cookies, if the "Expires On" column says "Session", then that's a session cookie. A cookie with an expiration date is not a session cookie. If you want a cookie which stays until removed by the user, set an expiration date far in the future. You can also use localStorage to store the same information. Many websites do that, if you set cookies or localStorage then you can ensure that you're tracking individual web browsers instead of something more vague like entire IP addresses. Many sites that don't necessarily require a login store any individual user preferences in cookies. Otherwise, if a user is logged in then the site will usually use a database. Using the PHP session to track users works fine as long as you only care about saving data for that individual website visit. If you want the data to still be there the next time they visit, don't use the session, use cookies or localStorage. Also, there are ways to try to "fingerprint" a browser so that you can more accurately determine if they are unique, but again in a large organization with tight group policies, all of the browsers might be the same. But Javascript will expose a lot of information about a browser that you can use to try to determine if this is a new unique browser or not. You can learn more about that here: https://amiunique.org https://panopticlick.eff.org
  16. 1 point
    Thank you, Funce. Both of those were silly errors on my part. I have been a little overwhelmed with this entire task, and if this is all the errors that can be found, then I will be most elated. Already you have earned a trophy. Simply I have not added it yet out of fear that everyone will stop looking for more holes to poke. :-) Roddy
  17. 1 point
    change var slideIndex = [1,1]; to (add an additional for every slideshow added) var slideIndex = [1,1,1]; and src="img_mountains.jp" to src="img_mountains.jpg" The multiple modal has been asked for before, do a search for multi
  18. 1 point
    I was just thinking about this and had a question - specifically which parts of the book HAVE you read?
  19. 1 point
    With display: flex; you can do a column-reverse or row-reverse, while maintaining equal height between the two columns. https://www.w3schools.com/css/tryit.asp?filename=trycss3_flexbox_direction_row-reverse
  20. 1 point
    Its expecting a parameter variable not a actual number, that should be the argument passed on the calling of function (NOTE: without the actual 'function' at beginning).
  21. 1 point