Jump to content


Popular Content

Showing content with the highest reputation since 11/05/2019 in all areas

  1. 1 point
    Okay. Then see the link in my first reply.
  2. 1 point
    Comment when and where it's necessary. When it comes to methods, I'm a fan of always writing documentation but at least document the parameters, regardless the scope of the method - I've heard people say it's only important to document the public API of a class. This is utter bullshit. However, when it comes to initial documentation for a class if it does something weird, then yeah - document that sucker. For instance, your Formatter class seems simple enough - it formats a thing. However, if you're not using namespaces and your system formats both HTML and JSON, but Formatter only deals with JSON then document that. I'd argue you should use namespaces or rethink your class naming scheme, but sometimes you come into legacy code and have to do what you have to do.
  3. 1 point
    I don't put comments on classes. They tend to be somewhat self-explanatory just by reading the (namespace and) name alone. Unless there's something particular complicated about them... but most of the time any complexity is with what that happens inside a method. But definitely put comments on the methods.
  4. 1 point
    Looking for help with what part, exactly? Are you not sure what the SELECT query should be? Having problems integrating it into the code and displaying the results?
  5. 1 point
    SOLUTION: In order for the client to work over SSL you need to set the server certificate and private key and start a secure server as follows. Please see here: https://github.com/ratchetphp/Ratchet/issues/609#issuecomment-363743604
  6. 1 point
    Yeah. Because they're not your problem, and there's nothing you can do about them.
  7. 1 point
    if you use the simple session cart definition that has been given on a different forum, using the item id as the array index, and storing the quantity as the array value under the index, doing what you are asking only takes a couple of lines of code.
  8. 1 point
    And he's right. But what he may have neglected to mention is that adding the 'i' is not enough. Check out the documentation Barand linked to.
  9. 1 point
    Was the code using the mysql_* functions previously? And someone found out they needed to upgrade to the mysqli_* functions? Did they think it was just a matter of adding an 'i' in the function names? If it was and they did, they're wrong: it's almost just a matter of adding the 'i'.
  10. 1 point
    Having read the error message, were you not tempted to read the reference manual for mysqli_query() to see what the correct parameters should be?
  11. 1 point
    Perhaps it's just as well. That would take the relationship to 1-to-many or, potentially, a many-to-many.
  12. 1 point
    Send the JSON to a PHP script on the server using AJAX. The script decodes the JSON, verifies it looks good according to whatever criteria you haven't mentioned are important for this JSON, and then encodes and saves.
  13. 1 point
    Notion, is this another one of your famous unnecessarily abstract questions? Using it to get generic answers to a specific problem?
  14. 0 points
    If you are selling warships, why not indeed. Whatever your application requires.
This leaderboard is set to New York/GMT-05:00
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
  • Create New...

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.