I've set the PHP character set to utf-8:  header('Content-Type: text/html; charset=utf-8');   I've set the currency column in MySQL to varchar(1) with collation utf8_unicode_ci.  However, the following code in PHP:  $currency = '€'; $sql = "UPDATE myTable SET currency = '$currency' WHERE user = '$user'"; mysql_query($sql);   Produces the following character in MySQL:  â   How can I get the € symbol to store properly in MySQL?
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.
How many Avatars have there been? Out of Bag Error makes CV unnecessary in Random Forests? Symfony plugin sfDoctrineActAsTaggablePlugin not working Android App initial release date When you are viewing an app in Google Play store, it displays the following : Updated, Size, Installs, Current Version, Requires Android, and Rating.  I am trying to do some research and figure out the initial release / publish dates of different apps. Is there a way to get this information from Google Play, or perhaps a website with this information? What does an unprocessed RAW file look like? Similar to , what's the best way to stay up to date with the latest stable releases of Thunderbird? I messed up my system earlier, I was greeted with a black screen, when booting in to Ubuntu. When I started up my laptop, I selected the recovery option from the grub menu, and chose fallback at root terminal. I saw that I was able to use the add user command, with it, I probably could use to create a privileged user on my machine.   Isn't that a security issue?  One could have stolen my laptop and at startup chose recovery and add another user, I'm fudged then. Including my data.  Come to think of it, even if you somehow remove that entry, one could boot from a live-CD, get a chroot up and running and then add another user, with the right privileges that allows it to see all my data.   If I set the BIOS to boot at my HD only, no USB, CD/DVD, Network startup, and set a BIOS password, it still wouldn't matter, because you'd still have that grub recovery startup entry.  I am fairly certain that someone from China, Russia can't hack my Ubuntu Trusty Tahr, from the network, because it's secure like that. But, if one has physical access to my - your - machine, then, well, that's why I'm asking this question. How can I secure my machine so that hacking through physical access is not possible?    Bug Report: Can ubuntu be installed in intel kabylake 7th gen processor? I am using a 7th generation i5 processor(7200,2.50 ghz).The processor also have intel hd graphics 620 and nvidia geforce 940mx 2gb graphics card. I read previously that only windows 10 can be installed to this specific processor.  Is it true no version of ubuntu can be used with this processor?  If it's possible to install ubuntu using this processor, what additional steps other than the normal installation process should I undertake to get Ubuntu working? Find polynomials $A(x)$ and $B(x)$ such that $A(x)P(x) + B(x)Q(x) = x + 1$ for all $x$ where $P(x) = x^4 - 1$ and $Q(x) = x^3 + x^2$. I'm stumped on this question. I know that I'm supposed to apply the extended version of Euclid's algorithm for polynomials but I'm unsure of how to do that. I thought about trying to create some kind of linear system but guessing arbitrary coefficients but that wouldn't work as $A$ and $B$ don't have fixed degrees. How do I set bold and italic on UILabel of iPhone/iPad? With slapd.conf you could globally disable anonymous binding and require authentication with the following static directives:  disallow bind_anon require authc   How can I achieve the same global settings, but using the new cn=config live configuration method? The "Satellite Paradox": Twin paradox in orbiting satellites I want to simply eliminate the effect of acceleration, which is the cornerstone in resolving the traditional twin paradox, through the following thought experiment: Assume twins $A$ &amp; $B$ are located in the same orbital height, far away from the surface of a massive planet, on a long concrete column at rest WRT the planet. A rapid explosion that happens between the twins makes them orbit the earth with a high velocity, say, $0.6 \ c$, in the same orbital path but in different directions. According to relativity, since the orbiting satellites are completely inertial frames, each twin attributes a variable time dilation to the other one, and each twin expects the other one to be younger. Nonetheless, these twins are automatically reunited after traveling half of the orbit's circumference without being affected by additional accelerations. Which twin is younger in this case? Indeed, If each twin sees the other's clock as running slow all along the way, how can the clocks agree when they meet? For this configuration:  The acceleration due to the explosion does not affect the twins' clock rates since it occurs abruptly in the same place on the column where the twins are located back-to-back. The clocks have been synchronized just before the explosion.  The traditional gamma factor, attributed to one twin from the viewpoint of the other, is variable because the resultant velocity of one twin complying with the relativistic velocity addition is a variable measured from the viewpoint of the other one. However, whether or not the corresponding time dilation is varying, each twin anticipates the other one to be younger. There is no breaking of symmetry!  The $g$-field of the planet has nothing to do with orbiting satellites since they are inertial, and thus GR corrections are not inserted. (Remember the GPS settings!) Lagrange Multipler KKT condition I am looking at SVM, and reviewing Lagrange multiplier. Let's say with the constraint function $$g(x,y) = x^2 + y^2 -1 &gt; 0, $$ I am maximizing $$f(x,y) = x + y -1 .$$ Intuitively, since the constraint function does not provide a finite constrained region, there is no solution, and $f(x,y)$ can infinitely increase.  However, if I just plainly proceed with Lagrange multiplier calculation,  $$L(x,\lambda) = (x + y -1) +\lambda(x^2 + y^2 -1)$$ I get the solution: $$y,x = -\sqrt{2}/2, \lambda = 1/\sqrt{2}$$ And this still satisfies KKT conditions although the solution is wrong.  $$g(x) =&gt; 0 , \lambda =&gt;      0, \lambda g(x) = 0.$$  I expected that I would have some result that conflicted KKT conditions, but nothing was violated.   Does this mean that Lagrange multiplier under KKT conditions can produce a solution that cannot be solved, without giving any indication of intractability?  If functions are complicated, what's the systematic way to confirm that the optimization with inequality constraint functions is solvable using Lagrange multiplier? Android App sometimes loses answer drafts Markdown for ordered lists, starting with zero? I see that you can create an ordered list using Markdown notation like the following.  1. line 1 2. line 2 3. line 3 ... N. line N   The Markdown content supports starting each line with any arbitrary number and reorders the list starting with 1. I'd like to start an ordered list with zero. My use case for zero would be in describing capture groups from regular expressions where group zero always returns the entire string. So I'd like to display something like this:  # Groups 0. Entire string 1. The first capture group you were looking for 2. The second capture group 3. The third group with the string I heart Kittens   Markdown instead reorders the group and forces the ordered list to start at 1:    Trying to force the issue with inline HTML: &lt;ol start="0"&gt; or &lt;ol&gt;&lt;li value="0"&gt;entire string&lt;/li&gt;&lt;/ol&gt; doesn't work either. Any ideas on how I can create ordered list starting with zero?  If it's not possible to do so, then this is a feature-request. Let $\left| {{a_{ii}}} \right| > \sum\limits_{i \ne j} {\left| {{a_{ij}}} \right|} $.Why does $A$ is nonsingular? . Suppose $G$ is a group and $K\lhd H\lhd G$ are normal subgroups of $G$. Is $K$ a normal subgroup of $G$, i.e. $K\lhd G$? If not, what extra conditions on $G$ or $H$ make this possible?  Applying the definitions, we know $\{ghg^{-1}\mid h\in H\}=H$ and $\{hkh^{-1}\mid k\in K\}=K$, and want $\{gkg^{-1}\mid k\in K\}=K$. Clearly, the best avenue for a counterexample is if $gkg^{-1}\not\in K$ for some $k\in K$ and $g\in G-H$.  If no such element exists, $\{gkg^{-1}\mid k\in K\}\subseteq K$ implies $\{gkg^{-1}\mid k\in K\}=K$ because if $k'\in K$, $gk'g^{-1}=k\in K\Rightarrow k'=g^{-1}kg\in\{gkg^{-1}\mid k\in K\}$. Generating a range of numbers in MySQL How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table?  For example:  nr 1 2 3 4 5   I would like to use only MySQL for this (not PHP or other languages). How many integers between $1$ and $10^4$ contain exactly one $8$ and one $9$? I have this problem: How many integers between $1$ and $10^4$ contain exactly one $8$ and one $9$?, but i dont know if $18, 19, 28, 29...$ serve, else it could be $8$ y $9 = 2$ numbers, help please. End of javascript sidebar workarounds? (Salesforce Classic / Aloha) Reading through this doc:      We replaced the rich text editor in HTML Area home page components   with a new version that supports more markup but doesn’t allow HTML to   be manually entered.      In Summer ’15 we will start removing unsupported code from HTML Area   home page components. As a result, components that contain JavaScript,   CSS, iframes, or other unsupported markup might stop working properly.   To use JavaScript or other advanced HTML elements in your home page   component, we recommend that you use a Visualforce Area component   instead.   With Visualforce homepage component the best we could do is design fancy home page components, which has not been the big use of sidebar amongst developers. How do we do the fancy hack we do today using html components since visualforce is hosted in a different domain will the sidebar hacks even work after summer 15?     You can include JavaScript in your Visualforce page, but because the   component is rendered in an iframe on the home page layout, the   JavaScript can’t interact with the page that contains the component.   Finally why this move :(?