Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by requinix

  1. Use your browser to watch the AJAX request happen, and see what the response to it was.
  2. requinix

    mySQL and rebuilding keys

    This may be a bit more technical than you're expecting, but it answers essentially what you're asking about. Have MySQL describe the table and its indexes for you after each command. Look for the difference.
  3. requinix

    mySQL and rebuilding keys

    1. Because MySQL updates the index automatically. After all, having to manually rebuild the index every time data changes would be incredibly tedious. 2. Same thing. One key is named automatically, one key is named manually. And no, the name does not matter. But adding the primary key after the table is created is annoying - do it when the table is created, inside the table definition.
  4. requinix

    Trouble with showing image in url

    What is your real problem? Because allowing there to be HTML markup in the query string that you then display on the page is very much not the right solution.
  5. e is an event object. e.target is the object firing the event (the select). You can get the files from it.
  6. requinix

    issues with Libreoffice

    Help for what? I told you not to run it from the command line, which you're still doing, but now you've posted part of your kernel log which I can only assume you're doing for a reason that I can't figure out.
  7. requinix

    Service to support different types of resources

    Can you decouple the storage mechanism from the chart? Entirely? The general chart service would lookup the basic chart information, determine the data source, and inject that into the chart.
  8. requinix

    Service to support different types of resources

    RemoteChart sounds like it's more of a data thing than a chart thing. Sounds like you need to abstract out the data retrieval/storage process. Probably specialized for the way charts will use it, but more or less separate from the actual chart business.
  9. requinix

    Service to support different types of resources

    "Service" is probably a more accurate term. It may be functioning like a controller in that it has various actions called for requests, but it isn't directly interacting with the request or response so it's not quite entirely a controller. You're talking about single-responsibility with the chart creation bit? You're still observing it: the single responsibility of creating charts is in one central location. Your method seems more or less right: single place to look up chart data, chart identifier maps into a class through a factory, class handles the precise work of the various operations. Chart types are not dynamically created (eg, no user-defined types) so hardcoding identifiers and class names is acceptable.
  10. requinix

    changes in the UUID - how to achieve that !?

    Have you seen /etc/fstab?
  11. The problem isn't that you have to intval() things. The problem is that $var1 and/or $var2 are not proper numeric values. You need to figure out why that might be the case, then probably add or edit input validation so that the non-numeric values are not being allowed.
  12. requinix

    issues with Libreoffice

    Don't start it from the command line.
  13. The AJAX request failed. Use your browser's developer tools to see what happened with it.
  14. Use mt_rand() to generate a random number.
  15. That's a new warning for PHP 7.3. Your composer is 1.4.2, current is 1.8.5.
  16. requinix

    Arrays: concatenation operator .= vs =

    Either you use it everywhere or you don't use it at all. I'm in the latter camp: I like the automatic conversions, and I'm already aware of and careful with value types. I would probably opt-in if I could do it globally, but there were good reasons not to support that and to only make it per-file.
  17. requinix

    Arrays: concatenation operator .= vs =

    According to Andrea (the original author of the scalar type hints RFC where strict_types came from), Shrug.
  18. requinix

    obtain last apache restart time with php

    No, there is no such function.
  19. As with most things in Linux, you install one program for the data and another program for a graphical utility. Try install psensor.
  20. requinix

    Site Won't Submit Multiple Variables

    You probably didn't see that I edited your first, and now second, post: please use the Code <> button when posting code. You can't simply change the value in your <option> and expect it to work. If you want to support multiple values then you have to have code that supports multiple values. And this // check vars if(!is_numeric($query_city_id)) { die('Wrong city id'); } $query_city_id = (int)$query_city_id; and this $query = "SELECT city_name, state FROM cities WHERE city_id = :query_city_id"; $stmt = $conn->prepare ($query); $stmt->bindValue(':query_city_id', $query_city_id); do not. Decide whether you want "3,1" or "3;1" or "3 1" or whatever, then adjust the code so it can support one or more city IDs at a time.
  21. requinix

    Site Won't Submit Multiple Variables

    using 3;1 or 3,1 could work if your code knew that it had to handle those. But I don't see where that code is...
  22. opcache is for code, not data. Don't serialize: whatever you use to cache will serialize for you. A real memory cache like memcached or redis would be best. Can you?
  23. requinix

    SELECT QUERY from table with no relationship

    How do you know how many points a user has?
  24. requinix

    array in mysql database?

    No. The backslashes are optional but okay. It does not matter if they are there. Do not try to manipulate the JSON string like that.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.