Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. I was just talking about his usage of the word ignorant. He was ignorant in the sense that he lacked knowledge about the meaning of the word "ignorant".
  2. No, that's being obstinate. Ignorance is simply lacking knowledge about something. Incidentally, you are being ignorant right now.
  3. If you make your own autoloading function, there will not be used any fallback.
  4. If it's on a gTLD you might be able to try your luck with ICANN if you can prove you've given them money for the domain name.
  5. <?php if (!empty($_SERVER['PATH_INFO'])) { header('HTTP/1.1 404 Not Found'); die('gtfo'); }
  6. Use sshfs.
  7. I tried it out back when it was in a closed beta. It was just annoying most of the time.
  8. http://en.wikipedia.org/wiki/IPv6
  9. It will undoubtedly slow down his web pages if he has to wait for the response of an external third party each time.
  10. Tell your server admin to install an NTP client and adjust the time zone manually in PHP as described in this tutorial: http://www.phpfreaks.com/tutorial/working-with-dates-in-php
  11. Win7 is already RTM. I'm running it right now (not a pirated one, mind you).
  12. Someone knocked you out and built a house with no windows and doors around you. Simple.
  13. Uh... I never liked statistics and probability much. The calculations are often annoying to make, and it's easy making mistakes. Anyways, if we let [imath]E_n[/imath] be the event that letter [imath]n[/imath] is in the correct envelope and we just consider having 3 envelopes (because I don't want to write this for 50 or one million), then [imath]P(E_1)=\frac{1}{3}[/imath] and [imath]P(E_1 \cap E_2) = \frac{1}{3}\cdot\frac{1}{2}[/imath], right? It is common to imagine the probability space as a set [imath]U[/imath] having cardinality 1, so [imath]\forall E_i \in U:0\leq|E_i|\leq1[/imath]. We say that the probability of an event occurring is the cardinality of the corresponding set. Note that you normally do not talk about sets that have a cardinality that's not a natural number because it normally not makes sense to say that a set has e.g. 0.42 elements. Iff two sets [imath]A[/imath] and [imath]B[/imath] are disjoint, the cardinality of their union will be the sum of each set's cardinality, i.e. [imath]A\cap B = \emptyset \Leftrightarrow |A\cup B|=|A|+|B|[/imath]. In probability terms, two disjoint sets correspond to two events that cannot possibly occur at the same time, and the union of two sets corresponds to the probability that both events will occur. In our case, it is indeed possible that two or more of our events can occur at the same time, so they're not disjoint. To find the cardinality of two non-disjoint sets [imath]A[/imath] and [imath]B[/imath] you do like before, but you have to remove the common elements (the intersection) to prevent double counting (you can draw a Venn diagram to see that this is true). So [imath]|A\cup B| = |A|+|B| - |A \cap B|[/imath]. This holds generally because if two sets are disjoint, their intersection will be empty (thus having cardinality 0). So this means, [imath]P(A \cup B) = P(A) + P(B) - P(A\cap B)[/imath] for some events [imath]A,B\in U[/imath]. Note that the union corresponds to "or" and the intersection corresponds to "and". For [imath]n=3[/imath] envelopes, we can then calculate [imath]P(E_1 \cup E_2 \cup E_3)[/imath], the probability that at least one of the letters are in the right envelope. [math]\begin{split} P(E_1 \cup E_2 \cup E_3) &= P(E_1) + P(E_2) + P(E_3) - P(E_1 \cap E_2) - P(E_1 \cap E_3) - P(E_2 \cap E_3) + P(E_1 \cap E_2 \cap E_3) \\ &= 1 - 3\left(\frac{1}{3}\cdot\frac{1}{2}\right) + \frac{1}{3}\cdot\frac{1}{2}\cdot\frac{1}{1} \\ &= \frac{2}{3} \\ &\approx 0.667 \end{split}[/math] This is pretty close to your 0.632 for n=50. My guess is that the probability converges towards that number as n goes to infinity (or I made an error during my calculations). Note to self: Need to install jsMath for better LaTeX support on the forums. Edit: Installed jsMath and updated post to use it.
  14. As long as they're the largest browser, they have no reason to care . Yes they do. Their market share is in a decline.
  15. No, an IP address is one 32-bit unsigned integer. The dotted notation is for humans, not computers. So to get a random IP address you just generate a random number lower than 4294967296 and convert it to dotted format.
  16. if you ran it...then where's the code the author wont let me post it neither tell me how he did, so i just took a quick screenshot ^^, wishing anyone could suggest how'd it could be done There is a program in my textbook that I don't understand how works. Can you tell me how it works? I won't show you the source code, but surely you can tell me how it works, right?
  17. What do you mean with "looks like ASCII"? ASCII is just a character set.
  18. I can set my user agent to whatever I want, so you cannot use the user agent for that.
  19. You can only specify a constant value as default for an argument.
  20. When finding a duplicate, just subtract 1 from $i and move on. That'll give you the required number of random integers.
  21. I've got a VPS. A dedicated server would be overkill for my needs.
  22. That's quite a surprise to me. As I said, it is something I would expect from any web host. Then again, I've never purchased shared hosting.
  23. I would expect all webhosts to have that.
×
×
  • 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.