Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. How does Windows manage to address a memory address above 2^32 with a 32-bit pointer? How does it manage to say "yo, your shit is at 0x400000FF8F" when it cannot even represent an integer so large?
  2. The bug has been fixed in SVN. I think it should be available in the next release of 5.2 and 5.3.
  3. You may still have issues with your web server buffering output. If you've turned something like gzip encoding on, the web server will buffer it regardless of your usage of flush().
  4. An easy way of doing it would be to expose an API on the servers and then fetch information from that file routinely. PHP.net does something similar for checking the status of their mirrors. If you go to something like http://dk.php.net/mirror-info you'll see that it gives various information. This is just downloaded once in a while and can then be seen from an admin panel listing all mirrors and their statuses. See this: http://svn.php.net/viewvc/web/php/trunk/mirror-info.php?view=markup You would want to cache the information locally if you have many mirrors though. This prevents you from having real time updates, however.
  5. Well, it already shows the URL in the status bar, and you can press 'o' to go to a new URL (or 't' to do it in a new tab). All the GUI elements that it hides by default can be shown again though.
  6. Does anyone else use the Vimperator addon for Firefox? I just discovered it yesterday and I love it. Vim in my browser = awesome. It's navigational features are brilliant. There are still some things I have to figure out, but so far it's been great. Anyone who is just a little proficient with Vim should try it out. You can even edit text fields using an external editor (Vim of course!) by using <C-i>.
  7. To get around that restriction, try searching for *a*. Your post probably contains an 'a'.
  8. Daniel0

    If It Exists

    You can also use REPLACE INTO ... or INSERT IGNORE INTO .... I'd use thorpe's suggestion, though I might do ON DUPLICATE KEY UPDATE firstname = firstname so it can optimize the update statement away.
  9. Expiring links, perhaps?
  10. I hate those people who scream "SKIP!!" into the mic. If I want to skip the level I'll click the damn vote button myself. Seeing as I haven't voted, I probably want to play that map so STFU. There should be some sort of law prohibiting children from owning microphones, or even better prohibit them from online gaming.
  11. You could try services like Akismet, which use various heuristics for detecting spam instead of trying to prevent it.
  12. I'm playing on PC with the name "Daniel". I have no need nor desire to be known as something like "iPwnYouPewPew42".
  13. It's probably humans filling out your form. Humans tend to pass a "Completely Automated Public Turing test to tell Computers and Humans Apart" (aka CAPTCHA).
  14. Actually, they're not even strings, but SimpleXMLElement objects. Try explicitly casting them to strings.
  15. I've filed a bug report here: http://bugs.php.net/bug.php?id=50558 Feel free to comment on it. instanceof works like is_a, so it would fail if is_a() does.
  16. This is a bug in PHP itself apparently. This code: <?php class cMyTidy extends tidy { // foo } function doSomething(cMyTidy $o) { var_dump($o); } $o = new cMyTidy(); var_dump(is_a($o, get_class($o)), get_class($o)); doSomething(new cMyTidy()); results in bool(false) string(7) "cMyTidy" PHP Catchable fatal error: Argument 1 passed to doSomething() must be an instance of cMyTidy, instance of tidy given, called in /home/daniel/test.php on line 15 and defined in /home/daniel/test.php on line 7 Catchable fatal error: Argument 1 passed to doSomething() must be an instance of cMyTidy, instance of tidy given, called in /home/daniel/test.php on line 15 and defined in /home/daniel/test.php on line 7 That is obviously an error. An object is always an instance of its own class. This code: <?php class foo {} class bar extends foo {} $foo = new foo(); $bar = new bar(); var_dump( get_class($foo), is_a($foo, get_class($foo)), get_class($bar), is_a($bar, get_class($bar)) ); results in string(3) "foo" bool(true) string(3) "bar" bool(true) as expected.
  17. Use a language that requires compiling to machine code instead.
  18. Try making sure that display_errors is set to "on" and that error_reporting is set to E_ALL. You can do this by placing the following at the top of your script: ini_set('display_errors', true); error_reporting(E_ALL); Then you should be able to get an error message.
  19. Oh sorry, I completely forgot about this. Seeing as I suck at graphics, if someone makes me a button in similar style (possibly with a PHP logo) I'll see if I can add a button.
  20. What kind of error do you get?
  21. Re: http://www.phpfreaks.com/forums/index.php/topic,281354.msg1333298.html#msg1333298 Doing this: if (!@require_once($page_path)) { // something } is not a good idea. include and its relatives return whatever the file returns; it doesn't return true on success and false on failure. A file may very well return false.
  22. The destructor method name is still __destruct() (with two underscores) in PHP 5.2.9. It's always been like that in all 5.x releases. Things prefixed with double underscores are reserved for what PHP calls "magic" functionality.
  23. You may use ceil to do this.
  24. You could program a web API on the server that has the database, but it would be a suboptimal solution compared to having direct access.
  25. YOUR SHIFT KEY SEEMS TO BE STUCK.
×
×
  • 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.