I have a curious problem that has me stumped. I have a php page that has an include file for multiple languages. For some reason the foreign characters on the main PHP file display properly, but the foreign characters from the include file change into question marks.   The include sequence is index.php > languages.php (determines the language) > french.php (an array of French text for the site).   I am working in WAMP running on Windows 7. I have included   &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;   in the head of the main document. I have also confirmed that the editor is set to UTF-8. This is a small static site so there is no database.  I've never come across anything like this before and nothing similar has come up in my searches. I would really appreciate any suggestions on how to resolve this.  Thanks, Penny
I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
Obi-Wan left Anakin for dead, and one movie later (in A New Hope) he was saying Anakin had been killed by Darth Vader.  What exactly did Obi-Wan know about Anakin and Darth Vader before A New Hope started? Understanding of the theorem that all norms are equivalent in finite dimensional vector spaces The following is a well-known result in functional analysis:     If the vector space $X$ is finite dimensional, all norms are equivalent.     Here is the standard proof in one textbook. First, pick a norm for $X$, say  $$\|x\|_1=\sum_{i=1}^n|\alpha_i|$$ where $x=\sum_{i=1}^n\alpha_ix_i$, and $(x_i)_{i=1}^n$ is a basis for $X$. Then show that every norm for $X$ is equivalent to $\|\cdot\|_1$, i.e.,  $$c\|x\|\leq\|x\|_1\leq C\|x\|.$$ For the first inequality, one can easily get $c$ by triangle inequality for the norm. For the second inequality, instead of constructing $C$, the  is applied to construct a contradiction.   The strategies for proving these two inequalities are so different. Here is my question,      Can one prove this theorem without Bolzano-Weierstrass theorem?   UPDATE:     Is the converse of the theorem true? In other words, if all norms for a vector space $X$ are equivalent, then can one conclude that $X$ is of finite dimension? How can I get apt to use a mirror close to me, or choose a faster mirror? Number of ordered pairs $(a,b)$ such that $ab \le 3600$ Find number of ordered pairs $(a,b)$ such that $ab\le 3600$ and $a,b \in N$  My attempt : Well, all $a,b \leqslant 60$ are solutions. These 3600 solutions. After that I have no idea how to count the number of remaining solutions...   I have a feeling that my approach is $very$ bad. But I had to give as it would be marked as off-topic. I have a simple question regarding "conditional probability" and "Likelihood". (I have already surveyed this question  but to no avail.)  It starts from the Wikipedia . They say this:     The likelihood of a set of parameter values, $\theta$, given   outcomes $x$, is equal to the probability of those observed outcomes   given those parameter values, that is      $$\mathcal{L}(\theta \mid x) = P(x \mid \theta)$$   Great! So in English, I read this as: "The likelihood of parameters equaling theta, given data X = x, (the left-hand-side), is equal to the probability of the data X being equal to x, given that the parameters are equal to theta". (Bold is mine for emphasis).  However, no less than 3 lines later on the same page, the Wikipedia entry then goes on to say:     Let $X$ be a random variable with a discrete probability distribution   $p$ depending on a parameter $\theta$. Then the function      $$\mathcal{L}(\theta \mid x) = p_\theta (x) = P_\theta (X=x), \, $$      considered as a function of $\theta$, is called the likelihood   function (of $\theta$, given the outcome $x$ of the random variable   $X$). Sometimes the probability of the value $x$ of $X$ for the   parameter value $\theta$ is written as $P(X=x\mid\theta)$; often   written as $P(X=x;\theta)$ to emphasize that this differs from   $\mathcal{L}(\theta \mid x) $ which is not a conditional probability,   because $\theta$ is a parameter and not a random variable.   (Bold is mine for emphasis). So, in the first quote, we are literally told about a conditional probability of $P(x\mid\theta)$, but immediately afterwards, we are told that this is actually NOT a conditional probability, and should be in fact written as $P(X = x; \theta)$?   So, which one is is? Does the likelihood actually connote a conditional probability ala the first quote? Or does it connote a simple probability ala the second quote?  EDIT:  Based on all the helpful and insightful answers I have received thus far, I have summarized my question - and my understanding thus far as so:    In English, we say that: "The likelihood is a function of parameters, GIVEN the observed data." In math, we write it as: $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x)$. The likelihood is not a probability.  The likelihood is not a probability distribution.  The likelihood is not a probability mass. The likelihood is however, in English: "A product of probability distributions, (continuous case), or a product of probability masses, (discrete case), at where $\mathbf{X} = x$, and parameterized by $\mathbf{\Theta}= \theta$." In math, we then write it as such: $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = f(\mathbf{X}=x ; \mathbf{\Theta}= \theta) $ (continuous case, where $f$ is a PDF), and as $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = P(\mathbf{X}=x ; \mathbf{\Theta}= \theta) $ (discrete case, where $P$ is a probability mass). The takeaway here is that at no point here whatsoever is a conditional probability coming into play at all.  In Bayes theorem, we have: $P(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = \frac{P(\mathbf{X}=x \mid \mathbf{\Theta}= \theta) \ P(\mathbf{\Theta}= \theta)}{P(\mathbf{X}=x)}$. Colloquially, we are told that "$P(\mathbf{X}=x \mid  \mathbf{\Theta}= \theta)$ is a likelihood", however, this is not true, since $\mathbf{\Theta}$ might be an actual random variable. Therefore, what we can correctly say however, is that this term $P(\mathbf{X}=x \mid \mathbf{\Theta}= \theta)$ is simply "similar" to a likelihood. (?) [On this I am not sure.]   EDIT II:  Based on @amoebas answer, I have drawn his last comment. I think it's quite elucidating, and I think it clears up the main contention I was having. (Comments on the image).    EDIT III:   I extended @amoebas comments to the Bayesian case just now as well: Can't access my home directory "Encrypted private directory is not setup properly" Hi I'm trying to access my home directory on my laptop hard drive through a live usb. I cannot boot into the OS on the hard drive and the home and root directory is encrypted. I have the encryption key but when I try to run the tool to gain access it pops up for a second then disappears and when I run the command in Terminal it says "Encrypted private directory is not setup properly". What are my options on getting into the directory? I really need to get the data off my laptop. Proof by induction that $2 + 4 + 6 + \cdots + 2n = n(n+1)$ Inverse public-key encryption I'm in the need of an inverse public-key encryption method where you encrypt with the private key and decrypt with the public key. In other words an asymetric encryption where you can't generate the encryption key from the decryption key. Does such encryption exist? If yes which, and which would be the fastest?  If nothing like that exists I would be glad if you helped me out with my situation:    I need to authenticate users logging in from my Java application in the way that the response from the server cannot be falsified and thus giving the user full access to the application. Using public key encryption was an obvious method, I would decrypt data received from the client to confirm the credentials. This won't work because if someone manages to decompile and get the private key from the code, they would be able to generate the public key, which would make them able to crack my application again. So any ideas how I can get this secure? Can we simply rename an app if they are different versions and keep them both? For example, I have Xcode 4.4.1, and now Xcode 4.5 Golden Master (GM) version is available, but it is also called Xcode (when the .dmg is mounted as an disc image, it shows only one app (or folder), called Xcode)  I think the way is just to double click on the .dmg file, and then drag and drop that app into our Applications folder.  But since the current Xcode and Xcode 4.5GM have the same name, can the new one just be renamed and so we can have both versions on our machine?  I was worried that what if the app writes back data to the /Applications/Xcode folder, then the GM version can write unexpected data for the 4.4.1 version.  And will it work with other software, such as Xcode 3.2, Xcode 3.3, or even different versions of Microsoft Office and Adobe Photoshop? This is a trivial problem, but it annoys me that I can't get to the bottom of it:  I'm running Windows 8, Powershell version 3.0. By right-clicking on the title bar I can go into the Properties and change the font, size, background colour etc without any problems.  After closing and restarting Powershell, all of the changes I've made stick except that if I've set the font to Lucida Console then on reopening I get the Raster font.  (Note that all of the above applies to when I run Powershell as Administrator.)  So:   If I set the font to Lucida, then it switches to Lucida for the remainder of the session. If I set the font to anything other than Lucida, then it stays as that after closing and reopening. If I alter the window sizes or text colours or anything else, the changes persist after reopening. The only thing that goes wrong is that if I set the font to Lucida, it switches to 'Raster fonts' when I reopen. But cmd and powershell ISE don't have this problem - only the powershell console.   Can anyone suggest what might be going wrong?  (One observation I've made is that upon re-opening Powershell after setting the font to Lucida, at first the width of the window is what it would be if the font were Lucida, but then after a second, it widens slightly to accommodate the raster font.) I want to make a Launcher that will do privileged (requires root) commands, but I don't want to see the terminal or have to type my password into the terminal. So I found the command, gksudo that allows me to enter my password so that I can escalate my privilege level. Now I want to couple this, so that I can change the partition priority using this command cgpt add -i 6 -P 0 -S 0 /dev/sda (this command is privileged) and have it automatically reboot from this one launcher.  I setup a Luncher like this:  Name: ChromeOS  Description:  Command: gksudo gnome-terminal -e "cgpt add -i 6 -P 0 -S 0 /dev/sda;reboot"  Comment:  But it does not work. Any tips? CSS Transform Skew How to search for all questions with bounties across the network? I wanted to search for questions on all SE sites that had a bounty. I am not sure if it is possible, and if it is how can I?   I have seen other questions that show how to find questions on each individual site, but how can I find all of them in one search from the homepage stackexchange.com? If this has been asked already, please let me know.  It has been suggested that the question was already asked (click  for the question), but that question only showed how to find those questions on each separate site or some complex way to search. I am hoping to find a way to search for bountied questions easily or for someone to create a way to do this. No Time in Top Panel (Gnome Classic) I've been using Ubuntu with Gnome Classic for a while and I've noticed recently that in the "Indicator Applet Complete" in the Top Panel, my name and the clock have disappeared.    I think it happened a while ago when I was messing around with packages. Every time I did apt-get... it would say "the following packages can be removed by apt-get autoremove", so I did it and then the clock and my name stopped appearing.   Can anyone help me? Thanks. It would be greatly appreciated. Say I have 12 and have to factorize it in 2 factors. Now possible factors are 1, 12 2, 6 3, 4   Now 3,4 is such that value of maximum factor i.e. 4 is minimized among all pairs.  How to find the solution in generic case where a number N is to be divided in K factors minimizing maximum value. Seeking options for Spatial ETL (Extract, Transform, Load)? I am interested in the pros and cons of various spatial ETL (extract, transform, load) tools.  If you have used the items listed here (or add your own), I seek your opinions and experiences.  In particular I would like to see usability comparisons of:    (proprietary)  (proprietary, subset of FME features)  (open source)  (open source)  (I don't know that it is truly ETL, but more of a file translation toolset) Any additional lot listed   There is no need to give a review of ALL software mentioned.  If you are experienced with even one then that will be very beneficial in making a decision about which direction to go.  Example: I am looking to create a schema conversion function that will allow me to select the input layer, create a translation, and output to a new, pre-defined schema.  Optimally, after creating the translation script, I would like to have an interactive form where I can "map" fields in my input layer to the output layer (ie- The output layer will have a field called "Address", what is it called in the input layer?)  Some were mentioned in the Q&amp;A at   And here are a couple of related articles that I found. Calculating roundness/compactness of polygon? I am trying to find ways to quantitatively describe the shapes of various polygons. For my project, these polygons represent lakes, rivers, lagoons, and parks. So they can be almost any shape. One easy metric is to calculate perimeter vs. area, which is at best an only slightly useful metric. But I would also very much like to be able to say something about the 'roundness' of a polygon. Or how 'compact' the shape is on a map.  The only way I can think of doing this easily is to calculate the area of each polygon in relation to a bounding box for that polygon (which I already have). But this seems like a poor solution.  So now I am thinking of something more like this - take the centroid of the polygon, add on a series of buffers of increasing areas (say 50%, 100%, 150%), then compare how much overlap there is between each buffer and the original polygon. A perfect circle will have perfect overlap at 100%, and I can use the 50% and 150% buffers to judge how much and in what way each polygon differs.  But even that feels cumbersome, and like a poor workaround for what somebody else has probably already figured out far better.  For reference, at a minimum I will need to be able to look at the resulting indices for the shape of various polygons, and be able to make an educated guess as to their source (River? Reservoir with dendritic shape? Lake/Lagoon? Park?) Let $(M,d)$ be a metric space, and $A\subset M$. By definition, $A$ is said to be compact if every open cover of $A$ contains a finite subcover.  What is wrong with saying that, in $\mathbb{R}$, if $I=(0,1)$, we can choose $G=\{(0,\frac{3}{4}), (\frac{1}{4}, 1)\}$, which satisfies $I \subset \bigcup_{U\in G} U$, but we can't extract a finite subcover, so $I$ is not compact. Is $G$ a finite subcover of $G$, so it is not a valid cover for proving this? I would take $\cup_{n\in\mathbb{N}} (\frac{1}{n},1)$ in order to prove this, can we conclude that every open cover is necessarily a infinite union of open sets $\neq \emptyset$? What is a "year" in Westeros? I need a number of different full-page DOM samples for my qUnit test suite