Jump to content

Leaderboard


Popular Content

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

  1. 2 points
    I generally prefer to support the least common denominator to give the users of my website the best experience regardless of which browser they're using.
  2. 2 points
    class whatever { function func1 { do stuff } function func2 { do stuff } } object = new whatever(blah,blah2); object->funct1(); object->funct2();
  3. 2 points
    Gosh! you and rizwansyed must be working with identical school exercise book, both working with a circuit board, communicating with server and file on sd card, and now same identical form inputs requiring the SAME effect on selection, must be biggest coincidence in the whole milky way galaxy. hmmm Also you could use required attribute that will give a warning that selection is required if first option has empty value.
  4. 1 point
  5. 1 point
    It looks like captcha_sa is already a global variable, so just set it with the new value.
  6. 1 point
    They don't show on smaller devices, you are then stuck with using [ code ]....[ /code ] (without spaces);
  7. 1 point
    Any database supports multi-user access, the database will let several different applications connect at once. I don't know what you mean, what are you saving? That's what a database is for. Have page to update the header text in the database, and the other pages should get the text from the database and display it.
  8. 1 point
    Javascript running in a browser only has access to the current document. Trying to do anything else would be a series of hacks. You could put a bunch of hidden iframes or something on the page to point to different pages if they're on the same domain and try to access things through that. A much simpler and more useful solution would be to store your data in a database instead of in HTML files. Depending on what the purpose is, you can save the various values in localStorage or sessionStorage to access on other pages.
  9. 1 point
    Seems 'html, body' is correct but for desktop only, 'window' is used for mobile devices. See here: http://blog.jonathanargentiero.com/jquery-scrolltop-not-working-on-mobile-devices-iphone-ipad-android-phones/
  10. 1 point
    For that example, the easiest way would be to use different class names for your other slideshow. So use mySlides2 and dots2, for example, and make a copy of that Javascript code with a different function to run the second slideshow with the other class names.
  11. 1 point
    Do you know how to use lists? If so I think you might get a lot of mileage out of the string method .split https://www.w3schools.com/python/ref_string_split.asp
  12. 1 point
    There's also the problem that your code is using curly quotes instead of regular ones. You might need a different code editor.
  13. 1 point
    If you want to include files that also include files, you need to use a relative to root path. Otherwise, the context of your files will change. index.php at /myproject/ works fine, because you have /myproject/inc/ps.db_con.php, but when you go into inc/script.myinformation.php the link would instead need to be ps.db_con.php because they're in the same directory. Your relative to root path you've suggested above is incorrect, as the HTML style paths only works when you have a server to check the root against. Because this is the server processing, we have no such luxury. My solution I use is as follows. <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/relativeToRoot/path/to/file.php"; In your case it would be <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/myproject/inc/ps.db_con.php";
  14. 1 point
    You're not saving the return value of toFixed.
  15. 1 point
    Perhaps you meant to write $('#wm_container').width(),
  16. 1 point
    Svg tag has its own attributes to make it proportionally responsive by setting it original width height in viewbox.
  17. 1 point
    It's just the initial value. If you don't start off with an initial value then you make a new object every time and return it.
  18. 1 point
    It will return an array of the frequency of dates. The line that sets countDates[date] is equivalent to this: if (countDate[dates]) { countDate[dates] = countDate[dates] + 1; } else { countDate[dates] = 1; }
  19. 1 point
    Hi ShipMate, There isn't very many tools that can tell you what's wrong with an HTML document short of matching beginning and ending tags. Your source tag is self-terminating, you don't need </source> The only thing left to do is make sure there is CharleyFox.jpg inside your /images folder.
  20. 1 point
    It's not an issue of time. Cookies are sent as HTTP headers with either the request or the response. When your browser sends the HTTP request to the server, it includes any cookies that match the request as headers. You can use your browser's developer tools to see that. When the server is sending the response back, it will also send headers. If your PHP code sets a cookie, then the response headers will include a Set-Cookie header to tell the browser to set a new cookie. So when you set a cookie on one response you can't check the same cookie in that request. That request was sent before the browser was told to set the cookie. The cookie will be sent in the next request.
  21. 1 point
    I figured this out. It involves nothing more than inserting an img into the button tag, adding the full sized image and other content to the div with the class of "modal-content." Very easy solution. Thank you!
  22. 1 point
    Its possible its a computer issue. But I don't believe there's an issue in your code specifically. Maybe there's a bug with the plugin on Safari. Mac's aren't exactly the favoured operating system in the tech space.
  23. 1 point
    I personally would avoid the first way just because it's using an onload HTML attribute. As far as choosing whether to create the canvas with Javascript or have it right in the HTML, it doesn't make a big difference. You might want to not have a canvas on the page when Javascript is disabled and show something else instead.
  24. 1 point
    Give the table an alias each time and use that to refer to the different fields so that things aren't ambiguous. e.g.: left join drivers AS d1 ON schedule.dropOffID = d1.driverID left join drivers AS d2 ON schedule.pickUpID = d2.driverID Use the same aliases in the select list to make sure you're selecting the correct columns.
  25. 1 point
    You need to explicitly list each comparison. UPDATE crypto SET crypto_openssl_recommendation = 1 WHERE "%ECB%" LIKE UPPER(crypto_descr) OR "%RC2%" LIKE UPPER(crypto_descr) OR "%RC4%" LIKE UPPER(crypto_descr)... If your character set is case-insensitive then you don't need to cast to uppercase.
  26. 1 point
  27. 1 point
    Yes! Now it's working. I think this project was a bit too ambitious for me as a beginner with only 1 month study from the w3c-schools tutorials ... But in the process of trying to get it fixed I learned a lot of Javascript, much more than only by following the tutorials. Now a can fill in the rest of the code, hopefully without problems. Once again, thank you very much!
  28. 1 point
    Remove float: left from the gallery and add text-align: center. You're missing a semi-colon after width: 90%, so it's not being interpreted correctly.
  29. 1 point
    This reminds me of whatever reason of this scene: https://www.youtube.com/watch?v=G67eMq1YwmI Like Occam tried to explain, often the simple answer is correct. If a function is not defined in your environment, and it was introduced in a certain version, and you assume you're using that version, then your assumption is probably wrong. It's not a question of other code doing something mysterious, it's just the wrong version. And, like you've learned, don't assume that something you see in one environment (a console shell) is the same as in another environment (a web server).
  30. 1 point
    https://www.w3schools.com/code/tryit.asp?filename=FXDT0KA2GFBG
  31. 1 point
    The error message you showed earlier "Call to undefined function random_bytes()" is an indication that the code was not running on a server with PHP 7. Can you show me the file where those syntax errors are? They're not in the initial code you posted.
  32. 1 point
    Yes, it is automatically hidden with CSS by using display: none. .modal { display: none;
  33. 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.
  34. 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:
  35. 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; }
  36. 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.
  37. 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
  38. 1 point
    You need to get out of the habit of copying and pasting which is what tutorials teach, and into the habit of understanding and thinking. Why did you use this query: $q = "SELECT user_id, first_name, last_name FROM users WHERE email='$e'" ; Why are you looking up a record based on the email field and not the user_id field? The user_id is what you have in the session, right? So, why aren't you using that? Why are you telling it to look up a user based on the email? And what is $e? Where is it defined? You're telling it to look up a user based on an email with a value that is not defined, why are you doing that? Stop copying and pasting, and start understanding and thinking. Programming is not copying and pasting. You need to look at code and understand how it works, and then think about how you need to change it to make it work for you.
  39. 1 point
    https://stackoverflow.com/questions/12250403/vertical-alignment-of-text-element-in-svg
  40. 1 point
    Its still part of the menu, its just all but itself, is hidden .topnav a:not(:first-child), .dropdown .dropbtn { display: none; } Home anchor is first child, and it instructs that it should NOT be included when applying display: none;
  41. 1 point
    Go to the first link code and just adjust y position value and add text-anchor="middle" <text x="50%" y="60%" fill="white" font-size="45" font-family="Verdana" text-anchor="middle">THE NY TRIBUNE</text>
  42. 1 point
    The most information you'll be able to gather from my page, is that it updates every 5 minutes, is slow to load the first time, and works nearly instantly from thereafter until the next 5 minute rotation. Here's the link: https://www.championfreight.co.nz/currency (It has a note on when it was last updated) The slow loads are updating the Database with the API, then displaying the data. The fast page loads are loading from the Database without updating, as the Data hasn't aged enough for me to need to update from the API. A very high level overview: RAM vs Disk. Disk is slow, and updates the RAM. The RAM is fast, and can respond to multiple commands quickly, as it can access its own data very quickly, but would need to update from the Disk if it gets a request it isn't expecting, and lacks the data required. In this scenario: Your Matomo would be the Disk, with the absolute values required at any time. The RAM would be a database you create and host on your own server. Its super fast, due to it being hosted in the same place, but periodically needs to get the up to date values from Matomo. I store a timestamp with the values I retrieve, so I check the timestamp, and if its too old, I get new values. In your case: AJAX asks for Data from PHP PHP gets Data from Database and checks when it was received If its recent enough, PHP returns the data back to AJAX, If its not, PHP asks Matomo for the Data Matomo reports and returns the Data to PHP PHP updates Database with Data, and a timestamp for checking later PHP then returns the Data back to AJAX If you don't like the idea of a slow load, if your hosting provider allows scheduled tasks, just run the page on the scheduler. The page load from the Scheduler will pull all the Data required, and none of your users will experience any slowdown of experience.
  43. 1 point
    No, it is the same function. Every time the program enters a function, new memory is allocated for it. When the program leaves the function all of the memory used by the function is freed unless there are pointers to it from another part of the program, such as the array that was declared outside.
  44. 1 point
    The only way to show or remove using == or != is to place those values in an array ShowRemoveArray=[3,6,9,12] (use current for loop to push these values into this array), then use jQuerys, $.inArray() to identify if $(this).parent("td").attr("class") value that exists, is equal '==' array or not equal '!=' to -1 (not found returned value)
  45. 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.
  46. 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.
  47. 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;
  48. 1 point
    You just need to encode the "&", like this: &amp;amp;
  49. 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.
  50. 1 point
    This query should work SELECT first.*, AVG(second.rating) AS ratingFROM firstJOIN second ON first.id = second.relatedGROUP BY second.rating
×
×
  • Create New...