Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
Please Read before posting here for PHP Help
Daniel0 replied to revraz's topic in PHPFreaks.com Website Feedback
To be honest, I think it's best to just ignore the "bad posts". If it's a downright rule violation then just report it and someone will take a look at it. -
I heard that if you yell loud enough, the speakers sort of reverse and turn into an "audio in" device instead.
-
Please Read before posting here for PHP Help
Daniel0 replied to revraz's topic in PHPFreaks.com Website Feedback
I once heard about an EULA where it was written, in the middle of everything, that the reader could receive a monetary gift by contacting the company. They received ONE response. -
That sort of depends on how many resources the script uses. The act of simply executing it won't.
-
I'd argue it's illegal. They're selling something they do not have and can never have.
-
Well, consider this. Imagine a hotel with an infinite number of rooms that are all occupied, i.e. the room number range is N1 (i.e. all positive integers). We'll use n to denote the current room number of an individual. Now someone comes into the hotel asking for a room, so the hotel manager rings a bell and asks all the other guests to move to room number n+1, shifting all of them one room upwards. This makes room number 1 available. Now a party of infinite people wants a room. The hotel manager rings the bell once more and asks everybody to move to room number 2n. This leaves all the odd room numbers free, and there are an infinite number of odd, positive integers. So even though he had used all of his infinite number of rooms, he can still make room for an infinite amount of new guests, and again, and again. This is Hilbert's Paradox of the Hotel for you. It's supposed to illustrate that having or reaching infinity is not possible using a technique called reductio ad absurdum. We first assume it is possible, but it turns out that if it is, then reality contradicts that, so the initial assumption must be false, which makes the opposite case (that reaching infinity is not possible) true. It should be easily understandable for everybody, probably even DreamHost's support/sales reps (though I didn't try).
-
Hah... yeah I remember that from last year where they rickroll'd people.
-
Really though, you should do $auto=false and then if (!$auto). It makes more sense seeing as it's a question of yes (true) or no (false).
-
Or considering it's used as a boolean, default it to false. No you're not. Test it out.
-
Looks to be JSON. Why don't you just decode it?
-
The upload speed can be no faster than the lowest of either the server's download speed and the client's upload speed. Showing a fancy progress bar won't make it upload faster, but it is of course better for the user as he will be able to figure out how long time there is left.
-
It can, on a large scale. The problem is just that many of the things that hurt the climate are things we need.
-
PHP Course(Model view Controller & Classes) in Cape Town
Daniel0 replied to 9911782's topic in Miscellaneous
No, they all live in huts made of mud and dance around like savants with spears hunting animals. -
Right, okay. No offense, but that's a pretty stupid design. Nobody is going to wade through a list containing hundreds or thousands of users. It's simply to cumbersome. You might want to check up on HCI. It'll also result in poor performance. Your list of combinations will be growing exponentially, and with a sizable user base this will quickly become a bottleneck. Why not simply allow users to add a username as friend (and return an error if they don't meet the friend requirements). Assuming you're able to view other users' profiles, you could add a "Add as friend" link if the formal requirements are met. Again, check the requirements when the link is clicked.
-
You want your users to check off several thousands of users?
-
Then you have to store it in the database. What exactly are you trying to do though?
-
The array stored in the session would be the remaining items. The array from the POST request would be the indexes that were checked. The session variable is transferred on each request without need to use a database. See this tutorial.
-
Well, say you have an array like this: $_SESSION['stuff'] = array( 'foo' => 'bar', 'hello' => 'hi', 'somebody' => 'me', ); You can then generate your checkboxes using the key-value pair, i.e. foreach ($_SESSION['stuff'] as $key => $value) { echo "<input type='checkbox' name='stuffRemove[]' value='{$key}' id='stuff_{$key}'> <label for='stuff_{$key}'>{$value}</label>"; } When the form has been submitted you'll have $_POST['stuffRemove'] which you can use to delete elements from the $_SESSION['stuff'] array: foreach ($_POST['stuffRemove'] as $index) { if (isset($_SESSION['stuff'][$index])) { unset($_SESSION['stuff'][$index]); } } Repeat as many times as you need.
-
Store them using sessions and remove indices as you go.
-
Please Read before posting here for PHP Help
Daniel0 replied to revraz's topic in PHPFreaks.com Website Feedback
Things like proper formatting and placement of topics is covered here: http://www.phpfreaks.com/page/forum-rules It's the users' own responsibility to stay updated with the rules, so everybody should check that page frequently. If they don't then they might miss changes and unknowingly violate the rules. -
Please Read before posting here for PHP Help
Daniel0 replied to revraz's topic in PHPFreaks.com Website Feedback
Hmm... I'm not sure. Everybody should read this though: http://catb.org/~esr/faqs/smart-questions.html -
AFAIK, a lot of scientists disagree about that subject, so it's sort of a stretch to make a huge list of "facts". (I didn't actually read the page you linked to)
-
http://catb.org/~esr/faqs/smart-questions.html#id307781 (read the rest of that page as well)
-
Haha, yeah I'd actually be inclined to do that. Just to protest against the immense amount of stupidity this "project" involves. It's like those people who wish to lose weight. They eat healthily and/or exercise for a while, but when they've lost a few pounds they return to their old habits, which ultimately voids whatever effort they put into it. They need to do it all the time. Same goes with energy consumption. If you want to cut it down then it won't matter just to do it one hour each year. It's a completely retarded idea that was made for people who suck at math by people who suck at math. Then of course some people claim that it's for raising awareness, but that's even more stupid. In doing that you give some people the illusion that this actually helps, so because they did something "good" during Earth Hour then it won't matter so much if they don't think about it otherwise.
-
http://www.boston.com/bigpicture/2009/03/earth_hour_2009.html