I have a mysql table with hungarian words, so accents are expected. This column full of words must be a UNIQUE one, so I need a charset which treats e.g.: "a" and "á" different.  I read on forums, that my best choise for character collision is utf8_unicode_ci. So my create database command looks like this:   CREATE DATABASE db_name CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;   After testing is with "mar" - "már" and (with a german word, more popular language) "straße" - "strasse", it still doesn't work. INSERTing gives unique warning, and SELECT with accent results without accent (and vise versa).  Everywhere I looked says it should work. What am I missing then?  Update  Somehow I managed to make this, but work only with command prompt. Php still thinks SELECT "a" = "á" is TRUE.
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 can I change Blender's theme? I just downloaded blender and its very bright. I want it darker. How can I change the color of it? Batch renaming files with pattern I have some files named like these:  63018933.mp4?token=1325697436_b0c3e70c6e339380b4a484c576a8c287  63808488.mp4?token=1325697401_4ae5f7a68d93873c8881b303e7655e14  How do I rename all them to, for example 63018933.mp4(remove characters after mp4)? BBWC: in theory a good idea but has one ever saved your data? I'm familiar with what a BBWC (Battery-backed write cache) is intended to do - and previously used them in my servers even with good UPS. There are obvously failures it does not provide protection for. I'm curious to understand whether it actually offers any real benefit in practice.  (NB I'm specifically looking for responses from people who have BBWC and had crashes/failures and whether the BBWC helped recovery or not)  Update  After the feedback here, I'm increasingly skeptical as whether a BBWC adds any value.  To have any confidence about data integrity, the filesystem MUST know when data has been committed to non-volatile storage (not necessarily the disk - a point I'll come back to). It's worth noting that a lot of disks lie about when data has been committed to the disk (). While it seems reasonable to assume that disabling the on-disk cache might make the disks more honest, there's still no guarantee that this is the case either.  Due to the typcally large buffers in a BBWC, a barrier can require significantly more data to be commited to disk therefore causing delays on writes: the general advice is to disable barriers when using a non-volatile write back cache (and to disable on-disk caching). However this would appear to undermine the integrity of the write operation - just because more data is maintained in non-volatile storage does not mean that it will be more consistent. Indeed, arguably without demarcation between logical transactions there seems to be less opportunity to ensure consistency than otherwise.   If the BBWC were to acknowledge barriers at the point the data enters it's non-volatile storage (rather than being committed to disk) then it would appear to satisfy the data integrity requirement without a performance penalty - implying that barriers should still be enabled. However since these devices generally exhibit behaviour consistent with flushing the data to the physical device (significantly slower with barriers) and the widespread advice to disable barriers, they cannot therefore be behaving in this way. WHY NOT?  If the I/O in the OS is modelled as a series of streams then there is some scope to minimise the blocking effect of a write barrier when write caching is managed by the OS - since at this level only the logical transaction (a single stream) needs to be committed. On the other hand, a BBWC with no knowledge of which bits of data make up the transaction would have to commit its entire cache to disk. Whether the kernel/filesystems actually implement this in practice would require a lot more effort than I'm wiling to invest at the moment.  A combination of disks telling fibs about what has been committed and sudden loss of power undoubtedly leads to corruption - and with a Journalling or log structured filesystem which don't do a full fsck after an outage its unlikely that the corruption will be detected let alone an attempt made to repair it.   In terms of the modes of failure, in my experience most sudden power outages occur because of loss of mains power (easily mitigated with a UPS and managed shutdown). People pulling the wrong cable out of rack implies poor datacentre hygene (labelling and cable management). There are some types of sudden power loss event which are not prevented by a UPS - failure in the PSU or VRM a BBWC with barriers would provide data integrity in the event of a failure here, however how common are such events? Very rare judging by the lack of responses here.   Certainly moving the fault tolerance higher in the stack is significantly more expensive the a BBWC - however implementing a server as a cluster has lots of other benefits for performance and availability.  An alternative way to mitigate the impact of sudden power loss would be to implement a SAN - AoE makes this a practical proposition (I don't really see the point in iSCSI) but again there's a higher cost. Why is there a diode connected in parallel to a relay coil? In most electrical circuits with a relay, a diode is connected in parallel to the coil of the relay. Why? Is it always a good practice? Java URL encoding of query string parameters How to prevent applications from discovering my phone as being Rooted I have to install an application that has discovered my device to be rooted.  So this is a two part question.   How did it discover in the first place that my phone has been rooted How to prevent the application from discovering my phone as being rooted I am using k-means clustering algorithm to cluster a given dataset into two. I took two different initial points and run k-means clustering algorithm for each initial points. With the first initial points I got “within cluster sum of squared distances” (error) =23874.341. With the second initial points I got “within cluster sum of squared distances” (error) = 42913.684. 23874.341 is less than 42913.684. So, can we say the first one is the better clustering quality? If yes, is it always hold true? Or can we say less within cluster sum of squared distances is always the better clustering quality? I was reading a book and this sentence seemed a little odd to me:     At approximately 19.45 hours the two men rose, stretched and yawned. They picked up their gear and stood at the door, ...   What does the first part mean? If it's the exact time, shouldn't it be 19:45? And if it's duration, shouldn't it be "After 19.45 hours"?  (The story here happens at an airbase, if it's of any relevance)    Edit: The book I've quoted is this:   by John Creed.   The author is Irish and the text is set in northern England/Ireland. Suppose $\sum{a_n}$ converges. How do I prove that $\sum{\frac{\sqrt{a_n}}{n}}$ converges.  So I know that just because  $\sum{a_n}$ converges, do not mean I can say anything about the converges of its square root. So I know that I can prove that if  $\sum{\sqrt{a_n}}$ converges then $\sum{\frac{\sqrt{a_n}}{n}}$ converges by Abel's Test, but I do not know where to start for the case where  $\sum{\frac{\sqrt{a_n}}{n}}$ diverges newenvironment: error with \begin{align} and \end{align} Why is there no absolute maximum temperature? If temperature makes particles vibrate faster, and movement is limited by the speed of light, then I would assume that temperature must be limited as well. Why is there no limit? I have tried to dig around for this, but I can't find a way (other than stepping one by one through past reviews) to see what proportion of my review decisions match the eventual outcome of the review.  This stat would give me confidence that I'm in line with the review guidance and not becoming too lenient in my old age. If it gets too low, I can then double check individual reviews to find out why I'm missing the mark. I need to label the four corners of a dataframe as shown in the image. Can this be done with dynamic text scripts? How could towns restrain a magic user? The modern concept of crime and punishment is very reliant on the ability to disarm and restrain and control an individual (think handcuffs, the dividers in police cars, and jails).  How can that be replicated in a world where even a wizard's apprentice has a much power as an armed man with a handgun?  I've seen stories where magical restraints are present, but you can't write that into every thorp and hamlet, even in Eberron.    How can you restrain a magic user in a fantasy setting?   Either answers that conform to modern concepts of crime and punishment or answers about restraining a magic-user in a psuedo-medieval setting are acceptable. SO Blog icon has partial white background when tab is inactive When you open a tab on the , and switch to another tab, the icon has a partial white background: Firefox (Most obvious) - note the difference between that and the normal Stack Overflow logo  IE  Edge  Tested on Windows 10 with Firefox 41.0.2, Internet Explorer 11 and Microsoft Edge v20.10240.16384.0. (If someone could test this on chrome that would be great) My chooser (file-picker dialog) goes under the dock so I can't see buttons. What can I do? I am trying to lock some boxes in a map of mine, and I used this command:   /blockdata 10 4 9 {Lock:Elyiana's Mage Key}   At first it worked, but then when I logged back on the next day it gave me this error message:    Data tag parsing failed: Expected '}' but ''' at: {Lock:Elyiana'&lt;--[HERE]     I don't know why it doesn't like the apostrophe in the key's name. I would change it, but it already worked and locked some other items. My version is 1.12, does anyone have an answer to my problem? Maximum of $|\sin(z)|$ as $\{z: |z| \leq 1 \} $  So according to the Maximum Principle, the maximum is when $|z|=1$. I tried using the fact that $\sin z= \dfrac {e^{iz}-e^{-iz}}{2i}$, but didn't know how to continue from there. Setting $z=e^{it}$ doesn't help much.  I saw this question was answered before, however the answer uses hyperbolic functions ($\sinh, \cosh$) which I haven't actually studied.  Thanks in advance for any assistance! I'm using a BooleanToVisibilityConverter in WPF to bind the Visibility property of a control to a Boolean. This works fine, but I'd like one of the controls to hide if the boolean is true, and show if it's false. Is there a way to simply splice in an additional length of 12/2 NM-B cable? Is there a way without using junction boxes to simply splice in additional length of 12/2 NM-B cable? Can I use twist caps?  I'm putting in a dog door and as it so happens, there is some 12/2 right in the way of the location I've chosen. There's no additional slack in the cable, and I don't want to rip up more drywall than I have to. I'm tempted to just cut it and splice in an additional foot or two with twist caps to get it out of the way. I don't know if this is safe or legal. Do I need to get junction boxes? Attached some pictures for fun.  Also, there is a 1-gang electrical outlet box that is going to the outside. I'm moving that up a bit.