Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
Rising of oceans now apparently caused by god's tears..
Daniel0 replied to 448191's topic in Miscellaneous
Something that bothers me are stupid things like "Earth Hour". 1) Let's say that I throughout the year averagely use some sort of electricity 9 hours per day, i.e. 3285 hours per year. For the sake of simplifying calculations, let's assume that my electricity usage is uniformly distributed. By observing "Earth Hour" I'll then save about 0.03% of my total electricity consumption. OMFG I'M GONNA SAVE THE EARTH!!1one 2) Calling it "Earth Hour" is ridiculous. The Earth doesn't give a shit. It's survived far worse things throughout time. 3) "It's for awareness bla bla I'm an idiot". a) How can I possibly not be aware when I have to keep listening to this? b) Right, so lead people into believing they're making a difference so they needn't do anything else. They're already helping after all. 4) You want me to turn off my computer? GTFO. Sure, ants are small, but do you want an entire ant colony in your living room? -
Okay, so let me get this straight? Someone else did it. You don't know who, why and how? Sounds convincing...
-
Well, you are always downloading the file. The browser is free to do whatever it wants with the data you send it. An image cannot be shown to the user without having downloaded it and an HTML page cannot be parsed without having downloaded it.
-
And at that point, Tuesday becomes the nightmare that Monday used to be, and no-one will be bothered to do anything on a Thursday. So, in conclusion, we should only work on Wednesdays. Q.E.D.
-
I had a lecture from 8:00-10:00 today. I woke up around 11:15. What kind of cruel person schedules a lecture to be at 8:00 anyway? Isn't torture against human rights conventions?
-
And how would you manage to bribe so many people on such short notice? And what do you think would happen if hundreds of emergency services workers, all of whom had been working on ground zero, suddenly disappeared? Surely it wouldn't be with a public trial. Even if they bribed everybody, how would you be sure that someone wouldn't talk? If that person went on live television and then suddenly disappeared off the face of the earth, now that would conspiracy theory fodder. Even more so if it was multiple people. If you throw out the safety, what would be the point? You said that they would do it to control the collapse. An uncontrolled demolition with no planning whatsoever wouldn't exactly help. You would have no idea where the building would end up.
-
1) Who would volunteer to go into a burning and collapsing death trap building to make it collapse faster? 2) How did he manage to sneak these demolition teams inside the buildings without any of the firemen, police men, civilians around the buildings noticing?
-
Can you see the difference between these two things? In either case, A wants to get a book and in either case he asks you. Scenario 1: You tell A to go to the library and A drives from his home to the library to get it. (the book has to travel between two places) Scenario 2: You go to the library to get the book. Then you tell A he can pick up the book at your house. (the book has to travel between three places) Now consider this: A wants to get a file, he asks your server (B) for it. Your server knows where it is (on server C). Scenario 1: Your server tells A the URI for the file on C. A downloads it from C. (the file has to travel between two computers) Scenario 2: Your server downloads the file from B. Your server then allows A to download it from your server. A downloads it from B. (the file has to travel between three computers)
-
Indeed, so what is you trying to do, and how does your array look?
-
See my edited post. I wrote something else instead when I realized what you were trying to do.
-
I'm not sure you get the point of recursion. Recursion is a kind of divide and conquer which essentially involves three steps: 1) Divide the problem into subproblems. 2) Conquer the smaller subproblems. 3) Combine the subproblems. This is done recursively until you reach a base case that is so small or trivial that it can be solved by itself. Again it's the application of global variables that is doing someone disservice. It's really not useful for anything, and as I've said before, just makes more problems than it solves. What you want to do is to call the function recursively on the subproblems to get a partial solution. Consider this function: function myPow($a, $b) { if ($b == 0) return 1; return $a * myPow($a, $b - 1); } The base case is that $b = 0, then the result will be 1, always. Now, figuring $a$b is the same as figuring out what $a$b-1 is (divide and conquer), and then multiplying that with $a (combine solutions).
-
Just another reason why I refuse to use shared hosting.
-
Dunno, but I know that ZF 2, Symfony 2 and Doctrine 2 will all require at least 5.3.
-
What you are trying to accomplish is plain simply not possible.
-
Yeah. PHP Freaks is running a manual build of PHP 5.3.1 as well.
-
problematic post / preview display
Daniel0 replied to nrg_alpha's topic in PHPFreaks.com Website Feedback
Are you by any chance using the WYSIWYG editor? Try turning it off. -
For real though, something that concerns me more than terrorism is the fact that violation of privacy and liberty in the name of the "war against terror" is accepted in the general population.
-
Reminds me of Postal where Osama bin Laden frequently calls his friend George Bush.
-
Last I checked, RHEL based Linux distros were lame enough to only support 5.1.
-
http://www.joelonsoftware.com/articles/Unicode.html
-
Ah. In that case there is actually a function called array_rand: echo $arr[array_rand($arr)];
-
Exactly. Older versions of Firefox used to display the encoded URI in the address bar as well.
-
http://en.wikipedia.org/wiki/Indent_style Pick one and use it. Unindented/unformatted code is difficult to read for humans. How is it random when you've already decided that you want exactly those numbers? Maybe I'm missing something...
-
Firefox encodes the URLs as well. It just doesn't display it to you.
-
OOP is not about coding with classes, so maybe you should have a look at some WP articles as well As a matter of fact, one might design an object oriented language without the concept of classes.