Jump to content


Popular Content

Showing content with the highest reputation since 10/23/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. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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)
  9. 1 point
    Use ^ at the start a character class to negate it. [^0-9] means any character other than a digit.
  10. 1 point
    The page is read from top to bottom, if you cal a function that references a specific element in JavaScript before the reading of page reaches it, too JavaScript it does not exist! that is why in the tutorial it says Also you just require html content that you want to include, NOT doctype, head, html or body tags.
  11. 1 point
    I guess I don't understand why you're not setting the value initially, I don't understand what the barrier to doing that is. How about just calling the reset function when the thing loads? That's what I'm talking about for the reset button doing the same thing as when it initially loads.
  12. 1 point
    From the manual: u (PCRE_UTF8) This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern and subject strings are treated as UTF-8. An invalid subject will cause the preg_* function to match nothing; an invalid pattern will trigger an error of level E_WARNING. Five and six octet UTF-8 sequences are regarded as invalid since PHP 5.3.4 (resp. PCRE 7.3 2007-08-28); formerly those have been regarded as valid UTF-8.
  13. 1 point
    Add the u modifier to your pattern: /[^A-Za-z0-9!\"#%£&()=@\s]/u
  14. 1 point
    You can put that tag in the head to load that file, and the code in that file should use the DOMContentLoaded event to make sure the code runs after the page finishes loading.
  15. 1 point
    Add a return statement before the recursive call. You want to return the value of the recursive function.
  16. 1 point
    Try it and see what happens. You can use array indices with a string to access different characters of it, e.g.: $string = 'some string'; $string[4] = '-'; echo $string; But you're trying to use an array index which is a string: $string = 'some string'; $string['r'] = '!'; While it shouldn't be hard to figure out which character in that string is in the 4th position, it doesn't make much sense to try and figure out which character is in the rth position.
  17. 1 point
    The ">>> 0" part converts the signed integer into an unsigned one, so that you can get the computer's actual representation of negative numbers. The ".toString()" part is the one that does the conversion to binary. When you put "2" as an argument it indicates that you want a base 2 representation, which is binary. If you gave it "10", it would give you the number in our familiar decimal system. For negative numbers, what you'll get is the way computers represent negative binary numbers. A negative binary number is represented by subtracting 1 from its positive value and then flipping all the bits, which means switching 0s for 1s and 1s for 0s. The reason they subtract 1 is because if they did not, there would be such thing as negative zero, which doesn't make sense in regular math. Keep in mind that this is only how computers represent negative numbers. In real binary a negative number is just a positive one with a "-" preceding it just as in the decimal system. If you want the mathematical binary representation then remove the ">>> 0" part.
  18. 1 point
    dsonesuk Here's what I mean , see image :
  19. 1 point
    The second argument of the Object.create() method contains property definitions which follow a specific format. In your code, the definition of getFoo is saying that its value is a function and that it is enumerable. You can see all of the different features that a definition can have here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties#Parameters If you want your code to behave as you predicted, just drop the Object.create() method and assign the object directly: var jsonLinkObj = { getFoo: { value: function() { return this.foo = 1; }, enumerable: false } }; The purpose of Object.create() is mainly for copying existing objects, if you are just creating a new one you probably don't need it.
  20. 1 point
    Iframes pose their own problems, one of the biggest ones being that the pages in the iframe don't have their URL shown in the address bar, which means that people (and search engines) cannot link back to them.
  21. 1 point
  22. 1 point
    Hello everybody, I'm Paolo. Everytime I need something about all html world i fall into w3schools, so nice to join. Now developing under Filemaker which has a good support for html
  23. 1 point
    Potato and knife? Banana and fork? Apple and spoon? Or maybe chalk and cheese. 😁
  24. 1 point
    I'm not sure what else it would be, there might be another animation playing still. It seems like there are competing animations. The fact that it doesn't do it if you wait (presumably until after any animations finish) suggests that's the issue.
  25. 1 point
    This seemed to me to be an easier solution to your problem. Check the reference links for further information or look up the new Set() function of ES6 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width-device-width,initial-scale=1.0, user-scalable=yes"/> <title> Unique Object Entries </title> <!-- From: http://w3schools.invisionzone.com/topic/59291-eliminating-objects-of-an-array/ --> </head> <body> <script> var visitData = [ {'visitorID':'6b77f74d969f0254','fullDate':'2019/01/01'}, {'visitorID':'6b77f74d969f0254','fullDate':'2019/01/01'}, {'visitorID':'8305d1d7c98cfe07','fullDate':'2019/01/03'}, {'visitorID':'8305d1d7c98cfe07','fullDate':'2019/01/03'}, {'visitorID':'8305d1d7c98cfe07','fullDate':'2019/01/03'}, {'visitorID':'8305d1d7c98cfe07','fullDate':'2019/01/03'}, {'visitorID':'8305d1d7c98cfe07','fullDate':'2019/01/04'}, {'visitorID':'470b11ecb96f51a8','fullDate':'2019/01/04'}, {'visitorID':'470b11ecb96f51a8','fullDate':'2019/01/05'}, {'visitorID':'7783172ce39cd663','fullDate':'2019/01/05'}, {'visitorID':'1834494d8537012d','fullDate':'2019/01/06'}, {'visitorID':'3321037b66164959','fullDate':'2019/01/06'} ]; /* Following solution from: https://stackoverflow.com/questions/36032179/remove-duplicates-in-an-object-array-javascript */ var uniq = new Set(visitData.map(e => JSON.stringify(e))); var res = Array.from(uniq).map(e => JSON.parse(e)); console.log(JSON.stringify(res)); </script> </body> </html>
  26. 1 point
    Here's a version if you're not into the whole brevity thing: function getUnique(inputArr, comp) { const unique = inputArr.map(function (e) { // return an array of only one property from the original array of objects (if defined) console.log(e[comp]); return e[comp]; }).map(function (e, i, final) { console.log("final", final); console.log("e", e); console.log("i", i); // return an array of either false values or indexes // this will result in an array where each value is listed only once, in the first position it appears, // and any other appearances will be false // the array will be the same length return final.indexOf(e) === i && i; }).filter(function (e) { console.log("e", e); console.log(inputArr[e]); // this will create an array of objects from the original array in each index from the previously mapped temp array // this will exclude the duplicates because those indexes in the previous array are set to false return inputArr[e]; }).map(function (e) { console.log("e", e); console.log(inputArr[e]); // this will reindex the array to remove "holes" return inputArr[e]; }); console.log(unique); return unique; } var ar = [ { 'prop': 1 }, { 'prop': 2 }, { 'prop': 1 }, { 'prop': 3 }, { 'prop': 1 }, { 'prop': 4 }, { 'prop2': 1 }, { 'prop3': 1 } ]; getUnique(ar, 'prop'); What's the purpose? This function takes an array of objects, and will return an array of those objects that have unique values for a particular property. How do multiple values fit into that? Do you have an example?
  27. 1 point
    Post some code, and lets see where you've gone astray.
  28. 1 point
    You're not saving the return value of toFixed.
  29. 1 point
    If that is the full contents of the function, then yeah it doesn't actually do anything.
  30. 1 point
    Svg tag has its own attributes to make it proportionally responsive by setting it original width height in viewbox.
  31. 1 point
    Temporary add img tag with matching src to image, if you can see the image the path is correct, else correct the path to correct then use same correct path for video. Another problem is that video tag is for html5 doctype, you a using html 4 strict.
  32. 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.
  33. 1 point
    So, in the end, the table was corrupted, and I had no back up. Alas, I reconstructed the entire table with UTF-8 encoding. The result was nothing but spectacular. I now have an in-tact Mecab parser that parses Japanese. Not only this, but the Mecab parser does not interfere with the parsing of French, English, and German., or likely any other language that using blank spaces to separate words. Arabic will be my next challenge, but I am fairly confident that it will work just like English with no additional encoding required. Roccy
  34. 1 point
    You need to go to another page OR refresh current page to see the new current cookie value, that is always been the case.
  35. 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!
  36. 1 point
    Hi there, I wouldn't recommend attempting to use the browser functions for printing webpages. They were definitely made for old websites in mind. You may get more luck out of an extension which takes screenshots of the page. To answer your question: You're looking for this element <div class="sticky-wrapper" style=""> Its a mobile advertising banner.
  37. 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.
  38. 1 point
    Hi Roddy, Here's what I can piece together from the help file. (If I'm not mistaken, it may be the one you are referring to) https://matomo.org/docs/setup-auto-archiving/ `core:archive` is the command being run, much like 'mkdir' or 'cat' in other command lines. I am unsure of whether the command is in two parts and parsed together (archive command of core module) or otherwise. At the bottom of the page, you can see the help output of the command.
  39. 1 point
    The controls are all different in size and icons depending on browser used. You can create customized controls using images, css, but this will require you recreate each custom button with JavaScript functions to reproduce same results the browser controls provide. google "html5 video custom controls css"
  40. 1 point
    I wouldn't say that is true, as new features are introduced Firefox is usually pretty quick to implement them. Also if you have the superhuman power to force everyone to use Chrome, go for it! But! Wouldn't be better to use the option of using the grid-auto-row: and grid-template-row: in this order that will end up giving the same result in all browsers.
  41. 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!
  42. 1 point
    Other than what I described? I'm sure you could come up with something that is more complex, but I don't know why you would. If you're looking for a built-in recursive object key search, I don't believe there is one. You would need to roll your own.
  43. 1 point
    If you want to start removing possibilities you can do that, but if I saw something that wasn't making sense I wouldn't rush to say that certain things are definitely not the cause. You have indications that it is installed correctly, but I wouldn't switch from "indication" to "proof" too quickly, especially considering the lack of success of some of your past assumptions. That being said, maybe everything is fine and the plugin just doesn't work. I haven't been watching you do everything so I can't say what is or is not likely. So, fix it. Create a second table that is set to the correct character set. Export the data from one table, and then import into the other table. Or, even better, start with clean data and only add your test data. No reason to add a possibility of incorrect data import. The fewer variables the better. This is why people say to create a minimal example showing the problem. The more variables you can eliminate, the easier it will be to figure out. If you have something you suspect might be the problem that you want to test, then test it. Create a test case and test it. Eliminate other variables. In fact, you should start with the absolute minimal setup required and make sure that works. If it doesn't work at all then it's either not installed correctly or it doesn't work. This is another reason to contact the developers or their community, although I would be surprised if it was anything other than UTF-8.
  44. 1 point
    If that is the only output of your script then you can make the browser interpret it as an image by sending a content-type header: header('Content-type: image/png'); echo $image_content; If you try to print anything else, like HTML or even just spaces and line breaks, then the image will appear corrupted in the browser.
  45. 1 point
    Thank you all, but especially Ingolme, for she answered my question in the most thorough manner possible. I am currently testing Peppe Occhi's CRON Scheduler routine and have yet to decide whether I will take Funce's suggestion to pass my results to a database or Dsonesuk's suggestion to write to an XML file. After all this time, I am still not comfortable with the data that I am able to extract from the Matomo data base via its reporting APIs, and more research is still ahead before I can decide how to fetch and store the data on a routine basis. At least now I know better what my options are and how to proceed with them once I have decided. Have a great weekend. Mine will be spent on the internet, as nearly always until I have launched. Roddy
  46. 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.
  47. 1 point
    You've put the open() and send() methods of the second request inside of the onreadystatechange handler.
  48. 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
  49. 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).
  50. 1 point
    Unfortunately this site has no connection with the administrators of w3shools.com, posting this error here, won't receive any attention to fix this error, but I suggest you go to 'About' page on W3schools.com then at bottom of page, click report error link.
  • Create New...