Jump to content

requinix

Administrators
  • Content Count

    10,619
  • Joined

  • Last visited

  • Days Won

    185

requinix last won the day on December 30 2018

requinix had the most liked content!

Community Reputation

723 Excellent

About requinix

  • Rank
    Backwards Administrator

Profile Information

  • Gender
    Not Telling
  • Location
    America/Los_Angeles

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. requinix

    Apply Hex Color To Div With JQuery

    #050709 is close to black. Could it be working but you aren't noticing? What about something like #FFFF00? Remove the bit causing it to fade out, then inspect the element in your browser. What CSS does it report?
  2. requinix

    Updating using name/value pairs

    If you still need the ability to customize various actions and it's just that those property1-4name ones all work the same way, public function __call($method, $args) { if (in_array($method, ['property1name', 'property2name', 'property3name', 'property4name'])) { $this->updateSomeStandardAction($args[0], $args[1], $args[2], $args[3], $method); } else { throw new \BadMethodCallException("No such method or property '{$method}'"); } }
  3. requinix

    Apply Hex Color To Div With JQuery

    There's no meaningful difference between those two. Are you sure you're seeing the color:blue from your css() and not from something else? Does it still seem to work with red, or green?
  4. And that sounds like a different problem. The issue of how you can store and access multiple connections is easy. PDO doesn't have a way to send errors to other PDO instances. Doesn't exist. So you'll have to come up with something to do it. How depends a lot on aspects of your system that I can't see, nor can really understand from your descriptions, but at some point it's going to boil down to needing to have all the connections available and an array can do that. How about this. What kind of code do you want to write that will need to make use of this thing?
  5. "Multiton" is a common term for this. The obvious answer seems too obvious: $connections = array( "mysql1" => new PDO(...), "mysql2" => new PDO(...), "postgres1" => new PDO(...), ... ); $connections["mysql2"]->whatever();
  6. You can't add anything $mail at the top of your script because that variable doesn't exist yet!
  7. requinix

    Moving from W7 to W10..... where is free Toad?

    "Ported"? It's Windows, not a cell phone game. Just try it.
  8. requinix

    Where should validation be performed?

    Less important than separation of concerns and the single responsibility principle. You can always propagate errors up through the stack. Exceptions are good for that, and with them you can wrap low-level exceptions as they come up.
  9. requinix

    3 Redirects: https, www, and root

    I kinda feel like being tricky. RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\.example\.com$ [OR] RewriteCond %{REQUEST_URI} ^/index\.html(\?|$) RewriteRule ^index\.html$|(.*) https://www.example.com/$1 [L,R=301]
  10. requinix

    IndentationError: expected an indented block

    Look at it def main(): phoneBook = {} and tell me what the #1 rule of Python code is.
  11. requinix

    Parse XML file to multidimensional array

    You don't need a literal array.
  12. requinix

    js encoding help utf-8

    You probably could but I wouldn't recommend it. This encoding this is going to hurt you over time. It'll be better if you buckle down and start fixing it now.
  13. I was rather hoping for you post the output instead of just describe it... I mean, I know $_SERVER has lots of stuff, what I don't know is precisely what that stuff is. But since file_get_contents is indicating that stuff is working then it's no longer necessary. filesize works with files. php://input is not a file. If anything there would be a value in $_SERVER that could get you the length, however file_get_contents is better.
  14. requinix

    Regex huh?

    You might think it says that, but nowhere in the explanation will it say that it'll match some thing or some other thing. It'll try them all in sequence which is not what you want. If you're talking about the basic principle then it's the same way you normally analyze passwords - contains letters, contains symbols, etc. - except you tell the user about how good the password is instead of enforcing it. So you do it all in Javascript. A regex to find letters, another to find symbols, one for each test, then you examine the results (eg, how many tests passed) and display a sort of rank to the user (eg, more passed tests the better).
×

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.