Slashdot Mirror


User: 1110110001

1110110001's activity in the archive.

Stories
0
Comments
328
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 328

  1. Re:CoralCached on How to Discover Impact Craters with Google Earth · · Score: 1

    Please use port 8080 for coral cache - it works much better behind firewalls.

  2. Re:Case in point: on The Trouble With Software Upgrades · · Score: 1

    Let me say a bit more about what others already wrote. Winamp 5 is not only 2 + 3, it's really Winamp 2 + Winamp 3. If you have the new interface there's also an invisible window running, that's nothing more but Winamp 2 without the bitmaps for the interface loaded. Nullsoft just took the Wasabi and Maki part from Winamp 3 and made an frontend for the old player.

    If you like the old version you can change in the preferences panel to classic mode (no need to reinstall - it's just a setting). And the trick with unloading the bitmaps for the interface is also used when minimizing Winamp.

    So you can have the nice new features without taking too much resources and also stay with the IMHO best player (what a pity it's not avaible for OS X).

  3. Awful use of regex on Going Dynamic with PHP · · Score: 2, Interesting
    The call method has a preg_match, which is not needed and doesn't match right:
    function __call($method, $args) {
      if(preg_match("/set_(.*)/", $method, $found )) {
        if(array_key_exists($found[1], $this->fields)) {
          $this->fields[$found[1]] = $args[0];
          return true;
        }
      } else if(preg_match("/get_(.*)/", $method, $found)) {
        if(array_key_exists($found[1], $this->fields)) {
          return $this->fields[ $found[1] ];
        }
      }
      return false;
    }
    There is so too much wrong with this simple method:
    • Double quotes altough single qoutes would do it
    • No circumflex at start of regex, thus somerandomshitset_foobar also matches
    • Code is duplicated (array_key_exists)
    • Null would fit much better if someone is trying to use a random name as getter, false could be a valid value for a field
    • $args is used but not checked
    • A string is splitted with an regex?!


    Let's see how it can be done better:
    function __call($method, $args) {
      list($type, $field) = explode('_', $method, 2);
      if(!isset($this->fields[$field])) {
        return null;
      }
      if($type == 'get') {
        return $this->fields[$field];
      }
      if($type == 'set' && isset($args[0])) {
        $this->fields[$field] = $args[0];
        return true;
      }
      return null;
    }
  4. Re:Experiences on Going Dynamic with PHP · · Score: 1

    A response in the Web enviroment shouldn't take longer than ~3 seconds and most of that is just transmitting data. So your script runs for less than a second - and you want thread for that short time? The only thing that needs to be async in PHP is IO and you can use http://pecl.php.net/package/event for that.

    Maybe you're used to programm in a specific way. But PHP won't be the language for that. I don't unterstand you argument for scaling, but maybe that's because of you not unterstanding scaling.

  5. Re:Experiences on Going Dynamic with PHP · · Score: 1

    There's a type hint for arrays. The other types need no explicit type hint as PHP is meant for web development and both HTTP and HTML only support strings. It would be bad to have a function call fail because your string of digits is not casted to an int. Of course you still can, but than there's still no use for a type hint in that case.

    Same goes for overloading. If you need to cast your parameters you could also write method_for_number and use a string of digits or an int or a float.

  6. Re:Ctrl+Z ??? on How Do You Store Your Previously-Written Code? · · Score: 1

    No, Mac OS X uses cmd+Z.

  7. Re:My Personal Showstoppers on Mozilla Camino 1.0 Released · · Score: 1

    No you can't - I know because I also don't like the Safari way. With every new Firefox release I've to hack the tabbrowser.xml to reenable ctrl+tab for easy tab switching. I've tried to change the shortcut to anything with the tab key via the pref pane and by changing the shortcut in mainmenu.nib. Both didn't work.

    So I tried to use the key above tab - it's ^ on my keyboard. Unfortunatly that's the code for the ctrl-key in the plist file and even when you use ctrl+tab, which results in "^^" it won't work. I also tried to write it as unicode char, which didn't work - changing the nib didn't work either.

    So here I'm - tried some shortcuts that aren't used already, are on the left side (right hand is used for trackpad) and are far enough away from q and w (cmd+q/w ...). None of the worked. Although Firefox is able to listen to key events with tab. Maybe I should use Butler to start an Applescript to tell Camino/Safari to switch tab. Sounds stupid, but seems to be the only way.

    b4n

  8. Re:XHTML? Not for IE on The Future is XHTML 2.0 · · Score: 1

    application/* has nothing todo with executed vs. processed. As XHTML can be mixed with other XML stuff like mathml or SVG it has to be in the application group.

    RFC 2045:
    For this reason, registered subtypes of text, image, audio, and video should not contain embedded information that is really of a different type. Such compound formats should be represented using the "multipart" or "application" types.

    RFC 2046:
    The "application" media type is to be used for discrete data which do not fit in any of the other categories, and particularly for data to be processed by some type of application program. This is information which must be processed by an application before it is viewable or usable by a user.

    You see - it says "processed". And your most people can't read markup, thus it needs to be processed to be viewable.

    b4n

  9. Re:I love broad statements on When Should You Stop Support for Software? · · Score: 1

    For Flash and Java you can use the Object tag with an alternative if it can't be rendered. Read the standard: http://www.w3.org/TR/html4/struct/objects.html#ede f-OBJECT

    For JavaScript you have the stuff to offer an alternative.

    It does work ... if you want to.

    b4n

  10. Re:Staying Competitive: Europe vs. USA on Galileo Sends Its First Signals · · Score: 1

    I couldn't find any figures for Austria in the article you linked. Or did you mean Australia? That's a bigger difference than US and Canada.

    b4n from Vienna, Austria

  11. Re:RSS + Coral Cache on Apple Laptop Reliability Survey · · Score: 1

    No I won't mod - I'll reply.

    The CDN need to switch to port 80 to be useful to everyone. Changing every link makes it hard for everyone behind a firewall.

    b4n

  12. Re:MySQL facists!! on WordPress 2.0 Released · · Score: 1

    It's not about supporting Postgressql. They should have used an existing DB (access) abstraction. ADOdb is very nice and still fast. Starting with such an abstraction helps supporting a different database. Instead they've written something with all the bells and whistle - there are even benchmark methods in their DB class.

    b4n

  13. Re:Nope. Not enough dimensions. on Glass Shapes Can Make Us Drink Too Much · · Score: 1

    Cliff has already answered that kind of questions in his FAQ: http://www.kleinbottle.com/acme_faq.htm - search for "wait a second" (no anchors for a direct link ...)

    b4n

  14. Re:Erm, hello on Ruby Off the Rails · · Score: 1

    Work on Java started in 1990, work on Ruby in 1993. That should be more important than a release date.

    b4n

  15. Re:Firefox has very serious problems. on Firefox Secrets · · Score: 1

    Did that. Got the last nightly (20051223).

    Ctrl+tab doesn't work with seamonkey either. It's the same line in tabbrowser.xml: this.mTabBox.handleCtrlTab = !/Mac/.test(navigator.platform);

    Only Cmd+Opt+[left|right] works. And there's no option key near the arrow keys on an Apple notebook.

    I guess it should be enough to add bool to about:config so I can enable it if I need or want it without hacking an xml in a jar in a bundle. Or it doesn't matter if all keys can be changed, which is planed anyway IIRC.

    b4n

  16. Re:Firefox has very serious problems. on Firefox Secrets · · Score: 1

    No ctrl+tab does nothing since Firefox 1.5. There is a regex that checks for Mac in the useragent to turn that of. There is no alternative that can be pressed with one hand on a notebook keyboard. And why? Because it's not "Mac-like". No power to the user.

    b4n

  17. Re:Java. on Learning Java or C# as a Next Language? · · Score: 2, Informative

    Mono has claimed they want to be .NET compatible. I don't think they ever can, because unlike the language, the platform is proprietary and heavily patented.

    So ... what? That's just one point of Mono. Look at the new apps in Gnome and how many of them are written in C#. And how much faster they were written and how easier they are to read.

    The .NET part is one thing that would be nice because you could take Windows software and run it under Linux. Still you don't need to and there are enough APIs that are not part of .NET to make Mono a useful project.

    Just because you hate Microsoft doesn't mean everything they do is bad. Maybe in twenty years we would even like them as much as IBM today.

    b4n

  18. Re:Firefox has very serious problems. on Firefox Secrets · · Score: 1

    I'd really like to fix the missing ctrl+tab on Mac myself. But I can't put my simple fix in CVS.

    Instead I have to fix it everytime a update replaces the tabbrowser stuff. And wrote a step by step guide here and to the task to it in bugzilla. And got ignored and also got ignored after writing a mail about it to the person that changed that sutff.

    So I spent my free time and get even less. And you're telling me I shouldn't complain?

    b4n

  19. Re:Gone on Woz Says Big Software Doesn't Work · · Score: 1

    Keyboard Viewer is still a normal App. It's hidden in a component. You can find it at /System/Library/Components/KeyboardViewer.componen t/Contents/SharedSupport/KeyboardViewerServer.app

    b4n

  20. Re:Really :o on PHP 5 Recipes · · Score: 1

    "Hello World" is already the code for displaying "Hello World" in PHP =)

    b4n

  21. Re:Mac OS X wizard? on VLC Media Player 0.8.4 is out · · Score: 1

    If you the option key while right-clicking on the icon in the dock (or clicking with option and ctrl key) you can kill the programm instead of just quiting it. If they don't want to work with you shoot them ;)

    b4n

  22. Re:Advances/Alternative to the server on PHP 5.1.0 Released · · Score: 1

    I know what I'm talking about. PHP is request based. That means before the request is after the request. Every zval gets freed by the GC. And while freeing the zval for a resource its destructor is called.

    Of course if you fork you inherit the zvals and therefore the open file handles. But in a web enviroment you're scripts don't run long enough to make that useful.

    You could write your own webserver in PHP (or fcgi server). But the GC is optimized for the request based approach. That means the memory only gets really freed when your script ends.

    If you know enough C to write an extension you could still write your own persistend file handle extension. It's not that hard.

    b4n

  23. Re:Advances/Alternative to the server on PHP 5.1.0 Released · · Score: 1

    Try APC with 5.1. It seems like Yahoo and Rasmus are focused on 5.1. and have skipped 5.0. That's why there can be problems with this version. There were some engines changes which makes 5.1. even faster than 4.3. and thus for the cache there can be some difference between 5.1. and 5.0.

    If you have a big server farm you could of course also talk to Zend. The Zend Platform is much more than just an accelerator. And if you are a good customer anyway why should the mind about a little price drop.

    b4n

  24. Re:Advances/Alternative to the server on PHP 5.1.0 Released · · Score: 1

    PHP scripts can't share file handles like every other program written in i.e. C. I don't see a problem with this. If you need data every time and need it fast you can use shared-memory. There's a nice extension that even works on Windows. If you need to share data between servers you have bigger problems than the time opening a file takes.

    b4n

  25. Re:Bug fixes should go into 5.0.x on PHP 5.1.0 Released · · Score: 2, Insightful

    Take a look at the changelog: http://www.php.net/ChangeLog-5.php#5.1.0

    The lines with Added, Changed or Improved are mostly new features, the lines with Fixed are Bugfixes. 1/3 of the Changelog are therefore new features.

    b4n