How to get the client IP address in PHP
What is the most accurate way to retrieve a user's correct IP address in PHP?
Is there word for this, other than know-it-all? Just wondering, if there's a word for:  One who makes it appear as if they're an expert on a subject while there are also signals (subtly or blatantly noticeable) that this person doesn't know very much on the subject or at least as much as they're acting like they do on the subject; pretending to have much knowledge on a subject matter.  I found pedantic but I don't suppose it's the right word. I have looked through several questions and answers on EL&amp;U, and often there is an indication that American English prefers "have" while British English prefers "have got". In addition, there are several references to "have got" being more informal than "have" (e.g.: , ). But where is it considered more informal? In American English alone or both American and British English?   This point may seem obvious to those who made the above mentioned references, but the fact is that even the most fluent users of English in my country will say without a doubt that 'have got' is the preferred usage in the UK and, therefore, it must also be more formal. Why? Because in an academic environment, the more informal structures are generally frowned upon, outside some specific spoken exercises. And if the teachers insist on using "have got", it follows it isn't informal.  So, is the teaching of (British) English in our schools transmitting the wrong idea?  EDIT: I'm adding some information in answer to the comments.  I'm mainly concerned with the idea of possession:      I have got a cat vs. I have a cat and She has got a dog vs. She has a dog   As mentioned in the comments, every (Portuguese) student will be told that "have" and "have got", when it comes to the idea of possession, are absolute synonyms, the only two differences being:    "have got" is preferred by British English, "have" is preferred by American English   the negative and interrogative structures differ    I have never heard of any distinction in formality. In fact, I was rather surprised when I went through the EL&amp;U archives and read about it.  So, would "I have got a cat" be as formal/informal as "I have a cat"?   And how do British and American English look at its formality/informality? Is it the same? What makes some laser beams visible and other laser beams invisible? How can I fix an out-of-focus blurred photo in Photoshop? How can I fix this picture?  Somebody else took this picture and well he wasn't able to do it very well, and it's blurred.    I have photoshop Error in fontspec (my first question here) I'm using xelatex to compile this code:  \documentclass{book} \usepackage{fontspec}  \begin{document}  %This is a Greek text ``Ελλάδα'' text  \end{document}   and receive this error :  ("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg") ! Undefined control sequence. &lt;argument&gt; \LaTeX3 error:                             Erroneous variable \c__fontspec_shape_n_n_tl used! l.3806 \emfontdeclare{ \emshape, \eminnershape }   My aim is to make LaTeX compile greek letters properly in my pdf, but that's a different issue. I am considering buying my first DSLR.  How do I know whether I need a 18-200 lens, 17-85, or 18-55? Or something else? Solve a system of equations with Euclid's Algorithm Find the MLE of the unknown parameter $\theta$ when $X_1,X_2,...,X_n$ is a sample from the distribution whose density function is: $$f_X(x) = \frac12e^{-|x-\theta|}, -\infty&lt;x&lt;\infty$$ What I did so far: $$\text{maximize }(\frac12)^ne^{-|x_1-\theta|-|x_2-\theta|-...-|x_n-\theta|} \\ \text{thus we want to minimize }|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|$$ Since $|x_i-\theta|$ is positive for all $i$, we want to solve for $\theta$ so: $$|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|=0$$ What do I do from here? What happens if you use Polyjuice potion after saving hair or nails? Suppose you cut a five year old's hair, save it for 10 years, and then use it for a Polyjuice transformation. What age do you turn into: The toddler or the teenager? List of Stored Procedure from Table I have a huge database with 100's of tables and stored procedures. Using SQL Server 2005, how can I get a list of stored procedures that are doing an insert or update operation on a given table. Hill cipher, unknown letter value I've been struggling on this problem for a while now : the Hill cipher is well-known to be vulnerable to known-plaintext attack due to its linearity. Given a key matrix $K$ of size $n\times n$, one can retrieve the key with as little as $n^2$ plaintext/cipher text couples.  All examples found on the Internet assume an alphabet where $A=0, B=1 \dots Z=25$, but how could we break the Hill cipher using a know-plaintext attack without any clue over the alphabet permutation nor the key matrix ?  I've tried several things such as  the whole set of equations together, however it requires several divisions in $\bf{Z}_{26}$ which aren't possible (i.e. division by even numbers or 13) Let $p$ be prime and $(\frac{-3}p)=1$. Prove that $p$ is of the form $p=a^2+3b^2$ Let $p$ be prime and $(\frac{-3}p)=1$, where $(\frac{-3}p)$ is Legendre symbol. Prove that $p$ is of the form $p=a^2+3b^2$.   My progress:  $(\frac{-3}p)=1 \Rightarrow$ $(\frac{-3}p)=(\frac{-1}p)(\frac{3}p)=(-1)^{\frac{p-1}2}(-1)^{\lfloor\frac{p+1}6\rfloor}=1 \Rightarrow$ $\frac{p-1}2+\lfloor\frac{p+1}6\rfloor=2k$  I'm stuck here. This is probably not the way to prove that.  Also tried this way:  $(\frac{-3}p)=1$, thus $-3\equiv x^2\pmod{p} \Rightarrow$ $p|x^2+3 \Rightarrow$ $x^2+3=p\cdot k$ stuck here too.  Any help would be appreciated. ML estimate of exponential distribution (with censored data) In Survival Analysis, you assume the survival time of a r.v. $X_i$ to be exponentially distributed. Considering now that I have $x_1,\dots,x_n$ "outcomes" of i.i.d r.v.'s $X_i$. Only some proportion of these outcomes are in fact "fully realized", i.e. the remaining observations are still "alive".   If I wanted to perform a ML estimate for the rate parameter $\lambda$ of the distribution, how can I utilize the non-realized observations in a coherent/appropriate manner? I believe they still contain useful information for the estimation.   Could someone guide me to literature on this topic? I am sure it exists. I am however having trouble finding good keywords/search terms for the topic. How do I photograph a wedding in the rain? I've shot weddings before, but being in Minnesota they almost always have an indoor venue available due to the long cold winters that we have. I am coming up on a wedding that I will likely be shooting outdoors and in the rain. I'm not as worried about my equipment, I am more concerned with how to capture the shots that I need such as b&amp;g alone, the wedding party, family posed portraits, etc while potentially being stuck in poor weather.   Should I come prepared with 10 umbrellas? Should I make all possible attempts to find a sheltered area for the posed portraits? Do I have an assistant hold an umbrella out of the frame to protect the b&amp;g during alone shots? Just some ideas I've had, but I've never actually shot an outdoor ceremony during the rain. count vs length vs size in a collection From using a number of programming languages and libraries I have noticed various terms used for the total number of elements in a collection.  The most common seem to be length, count, and size.  eg.  array.length vector.size() collection.count   Is there any preferred term to be used? Does it depend on what type of collection it is? ie. mutable/immutable  Is there a preference for it being a property instead of a method? Split $n$ into nontrivial factors via a nontrivial square-root of $1\!\pmod{\!n}$ Coming from an understanding of Fermat's primality test, I'm looking for a clear explanation of the Miller-Rabin primality test.  Specifically: I understand that for some reason, having non-trivial square roots of 1 mod p means that p is definitely composite; and I gather that you can find these non-trivial square roots by squaring x, but I don't really understand what these reasons are. Specific examples of non-trivial roots of a composite number would be helpful.  Cheers! We have been using this result without proof in my class, but I don't know how to prove it. Could someone point me in the right direction?  $$|1-e^{i\theta}|\le|\theta|$$  I believe this is true for all $\theta\in\mathbb{R}$. It is easy to show that the left side is bounded by 2 (triangle inequality), but I'm stuck otherwise. Invalid variance: The type parameter 'T' must be contravariantly valid on 'UserQuery.IItem.ItemList'. 'T' is covariant In how many different ways can we place $8$ identical rooks on a chess board so that no two of them attack each other? In how many different ways can we place $8$ identical rooks on a chess board so that no two of them attack each other?  I tried to draw diagrams onto a $8\times8$ square but I'm only getting $16$ ways.  Does that sound right?  Thanks for the help! I want to append this text:  &lt;Directory "/var/www/*"&gt;     Order allow,deny     Allow from all     AllowOverride All &lt;/Directory&gt;   to the file /etc/apache2/apache2.conf  I have access via SSH but I don't know how to use VIM. I would like to do this via a command.