Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
"People don't follow links, therefore we shouldn't make it easy to notice links." How does that make sense? The easier the links are to notice, the higher the chance of someone actually following them.
-
Yes yes, I used to browse them randomly to find interesting entries like these. You can just subscribe to php-bugs@lists.php.net.
-
That's because most people haven't bothered doing the research and keep confirming each other in their flawed views.
-
Well, seeing as HTML is a subset of SGML and not XML, there is no such thing as an unclosed element. It's technically incorrect doing things like <br /> in HTML. That's just not how the language works. I'm not really sure I understand the argument though. It's like saying PHP's foreach syntax is incorrect just because it's different in Java. Two different languages, two different syntaxes. Hopefully you'll have gathered from this topic that the difference is not just a matter of "style".
-
I've uploaded the new image.
-
If you opt for HTML rather than XHTML then you miss out on being able to declare additional namespaces to allow embedding things like SVG or MathML. However, this is only possible in the first place if you were serving your XHTML pages with the content-type application/xhtml+xml, which Internet Explorer doesn't support. If you were serving them like text/html then they were de jure HTML files and they were regarded as HTML files by the browsers.
-
Okay done. Finally. Sorry for the delay.
-
I don't think you got my point. Take phpfreaks.com for instance. With all the custom installations and configurations, there is no way shared hosting would work for us even if they provided us with enough resources (disk space, bandwidth, memory, CPU time, etc.). There is just not enough flexibility for our needs. This is completely regardless of resource usage and others might very well have the need for this kind of flexibility without having high resource needs. Setting up an SVN repo was just an example.
-
It'll work fine. It will just revert to the default values.
-
If you use progressive enhancement, you can make it work fast and you don't do stupid thinks like breaking the back button, a lot of Javascript is fine. Otherwise it's just annoying.
-
Normally, there is no way for people outside the PHP Freaks team to submit tutorials. If you have written one that you think is good you can always send me an email. We'll make no promises of publishing it though.
-
Man... I've always wanted to know what the last digit of pi is. Can you post it here? Besides, I wouldn't call calculating a lot of pi's digits or generating reverse lookup and rainbow tables for "normal usage". What makes you say that? What if you want to run custom services like your own SVN repository? What if you just don't want other people on your system for security/stability reasons? What if you just want to manage your own software or don't want to have to go through the hoops of various control panels to do something you can do efficiently from the shell? The minimal required RAM for a desktopless Debian install is 64 MB RAM. The recommended minimum is 256 MB. If you don't install some bloated cPanel or whatever (or even worse, a desktop environment), you'll do just fine starting out with 256 MB. To be honest, I don't see the point in paying for more when you can upgrade at any time you want.
-
Unfortunately, the tutorial you linked to is an example of these bad programming examples. The code is insecure.
-
I would be extremely careful with learning from existing scripts. PHP is "cursed" by having a lot of bad code out there, which other people read and learn from so they can write bad code themselves.
-
Then tell us what you need to do and we'll help you improve it. If you need to do something with all the "animals" you can use a loop.
-
I suspect there is something you could do better. Why would you want to define hundreds of variables? Why do you even want to redefine a lot of variables?
-
The % operator is the modulo operator. It gives the division remainder. You say that a divides b if there exist integers q and r such that b=qa and such that b >= q. If a does not divide b then b=qa+r for r != 0. The modulo operation returns what would be r. So if Sunday = 0, then (0 + 6) % 7 = 6 because 6=0*7+6. If Monday = 1, then (1 + 6) % 7 = 0 because 7=1*7+0. If Tuesday = 2, then (2 + 6) % 7 = 1 because 8=1*7+1. And so on... So essentially, you have Sunday = 0 Monday = 1 Tuesday = 2 Wednesday = 3 Thursday = 4 Friday = 5 Saturday = 6 Adding six to all of them and wrap when you reach 7: Sunday = 6 Monday = 0 Tuesday = 1 Wednesday = 2 Thursday = 3 Friday = 4 Saturday = 5 Rearrange: Monday = 0 Tuesday = 1 Wednesday = 2 Thursday = 3 Friday = 4 Saturday = 5 Sunday = 6
-
I never think, so I don't have that problem. I just do something random all the time.
-
You must be every salesman's dream. Easy to oversell. I bet you would do just fine with 256 MB. The benefit of a VPS is that you can change how much memory you're allowed to allocate while it's running, so it's just a matter of contacting the sales department asking for an upgrade. Why would you pay for something you don't need? Especially seeing as you've got a £20/mo max. Reaching that will be much easier if you scale down your requirements to something realistic. There is no way you'll need 1 GB (or even 2 GB) memory if you don't even have any traffic yet. Also, "unmetered bandwidth"? That's not going to happen. At least not within your price range.
-
Because there are 0 unread bytes. By the way, the unread_bytes count is an internal value for PHP that you shouldn't even use in your code in the first place. I don't know what your code does, and I have no intention of reading through 455 lines to figure it out.
-
There is nothing wrong with XHTML except that Internet Explorer does not support it.
-
Well, you're doing $buffer .= fread($this->socket, $status["unread_bytes"]); and $buffer2 .= fread($this->socket, $status["unread_bytes"]); Presumably, at some point $status["unread_bytes"] becomes 0 (or lower). Read the error message, it tells you exactly what is wrong!
-
So did you check that the length parameters was greater than 0?
-
Are you sure you need 1 GB memory? This server uses about 1 GB of memory right now. It has a semi-large database, an active forum, an IRC server and corresponding IRC services as well as a daemon for a live chat client. What kind of traffic do you have?
-
nope... cuz if you configure you're application correctly, let's say with Zend_Config for instance, you would be able to set up one configuration for testing, and another for production... MysqlStuffBlaBla::getInstance() That's a singleton. I suppose you could do this: $adapter = 'Mysql'; $class = $adapter . 'StuffBlaBla'; $foo = $class::getInstance(); // or $foo = call_user_func(array($adapter . 'StuffBlaBla, 'getInstance')); But that's some ugly looking shit. I think you're talking about a factory.