I have a php file which has to authenticate user login data against a database of a forum software. I have problems selecting the right row of the members table for usernames which use German special chars like ä, ö, ü - It can't find the according row. However if I do the same query with MySQL workbench I can find the according member. Thus I think there is a problem with the PDO connection or my php file.  PHP Part to select the member row:  /* Get all Member attributes for the username */ $query = $db-&gt;prepare("SELECT * FROM members WHERE members_l_username = :name"); $query-&gt;bindValue(':name', $username); $query-&gt;execute(); $member = $query-&gt;fetch(PDO::FETCH_ASSOC);   Creation of the PDO Object:  try {     $db = new PDO("mysql:host=$dbhost;port=3306;dbname=$dbname;charset=utf8", $user, $pass); }catch (PDOException $e) {     print "Error!: " . $e-&gt;getMessage() . "&lt;br/&gt;";     die(); }   Settings of the table column:   Why I can't find the row for $username="Mark Fröst" even though it exists (and the query works with MySQL workbench)?
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.
For $n$ a positive integer, let us write $\zeta_n = e^\frac{2 \pi i}{n}$, a primitive $n$th root of unity. It is clear that, if $m$ divides $n$, then we have an inclusion of cyclotomic fields $$ \mathbb{Q}(\zeta_m) \subseteq \mathbb{Q}(\zeta_n).$$ On the other hand, these inclusions are not always strict. For example, since $\zeta_3  = \frac{1+i \sqrt{3}}{2}$ and $\zeta_6 = \frac{-1 + i \sqrt{3}}{2}$, we have $$\mathbb{Q}(\zeta_3) = \mathbb{Q}(\zeta_6) = \mathbb{Q}(i\sqrt{3}).$$ Does this sort of thing happen infinitely often, or are there just some coincidences among small numbers? If this continues, is there some way to know when a particular inclusion of cyclotomic fields is strict? What is the default order of records for a SELECT statement in MySQL? Suppose you have the following table and data:  create table t (     k int,     v int,     index k(k)     ) engine=memory;  insert into t (k, v) values (10, 1),        (10, 2),        (10, 3);   When issuing select * from t where k = 10 with no order by clause, how does MySQL sort the records by default? The sum $\sum_{k=1}^nk(k!)$ can be easily calculated by noting $k(k!)=(k+1)!-k!$. Is there a way to calculate the sum nicely using a combinatorial argument. Is it possible to notice it is $(n+1)!-1$ combinatorially? Let's say I have Table A: BookingsPerPerson  Person_Id    ArrivalDate    DepartureDate 123456       2012-01-01     2012-01-04 213415       2012-01-02     2012-01-07   What I need to achieve with a view is the following:  Person_Id    ArrivalDate    DepartureDate    Jan-01    Jan-02    Jan-03    Jan-04    Jan-05    Jan-06    Jan-07 123456       2012-01-01     2012-01-04       1         1         1         1 213415       2012-01-02     2012-01-07                 1         1         1         1         1         1   The system is for events, so each hotel booking could take anything between 1 to 15 days but no more than that. Any ideas would be very much appreciated. We encountered a Vampire Spawn in the 10-foot-high basement of an old church. The first strike was mine, after which the creature attacked my ally and retreated onto the ceiling as the thundering roar of my Booming Blade punished its retreat. Still inexperienced and unsure about my reach, after a short consultation with my mind, I decided to spend my turn switching to my trusty crossbow and make some distance.  However this turned out to be a mistake, since right after, the creature was in in my face trying to gouge out my eyes. Due to my nimbleness I managed to avoid its attacks. Regretting my earlier choice to change weapons I was left with the options to switch weapons and miss another turn, attack with disadvantage, or use my crossbow as an improvised melee weapon and trust in Booming Blade to hold the enemy in place after I disengaged.  Perhaps I should have switched weapons, but I decided that 1d4 (improvised weapon) + 1 (magic ring) + 1d8 (booming blade) was good enough. I missed.  On the plus side, it was my crossbow's sneak attack assisted bolt that finally slayed the Vampire by piercing its heart.    In this situation, would it have been possible to just attack upwards instead of changing to the crossbow?  In session, this was something to be looked up later and decided against, but I haven't found any rules on attacking in 3D.  With me being more than 5 feet in height and my melee attack range considered to be 5 feet, I should have been able to reach the ceiling itself, not to mention the Vampire Spawn hanging from it.    As for exact measurements (read this part only if you enjoy pointlessly over-analyzing things):  My character is 5 feet 6 inches/5.5 feet, which gives an  (for a human, my character is a Kenku), . This should give me a height of 8.3 to 8.9 feet from standing statically.    Testing it in real life, my estimated and standing reach match to less than 0.2 inches of the estimation on the site and I'm just shy of reaching my ceiling standing statically. As a test I tried moving as if I was attacking my ceiling and based on where I could feel my hand touch the ceiling, the length of my fingers and how much distance I lacked to reach my ceiling, I estimate about 0.4 feet in additional height. Considering that I'm taller than my character, let's say that gives 0.3 feet, increasing the height to 8.6 - 9.2 feet and that's still without changing how you hold the handle of the sword. In addition, just lying on the ground, my torso and legs measure about 0.6 feet.  Because my Kenku isn't a human, only a humanoid, it's impossible to estimate arm length which influences standing reach, however, considering that birds usually have a high wingspan and long legs, I think it's reasonable to assume that the arms should be as long, if not longer than, a human's.    So that would require the Vampire Spawn to be flat against the ceiling without any parts hanging down more than 0.2 to 0.8 feet for it to be outside of my reach. I consider that unlikely.  What are the actual rules for this type of scenario, or how do you handle it in your group? Should I be allowed to melee attack an enemy that's on a ceiling or low in the air? "thanks for flagging" popup gets messed up when the comment is automatically deleted For some comments, the comment is automatically deleted when you raise a flag. This includes certain keywords and short +1 comments. But when you raise that flag with the new comment flag interface, the "thanks for flagging" shows up in the top right when the comment is deleted:      As opposed to what happens when you raise a flag on a comment that doesn't auto-delete: Getting the ID of the element that fired an event Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); &lt;script type="text/javascript" src="starterkit/jquery.js"&gt;&lt;/script&gt;  &lt;form class="item" id="aaa"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt; &lt;form class="item" id="bbb"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt;     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form. Software needed to scrape data from graph Anybody have any experience with software (preferably free, preferably open source) that will take an image of data plotted on cartesian coordinates (a standard, everyday plot) and extract the coordinates of the points plotted on the graph?  Essentially, this is a data-mining problem and a reverse data-visualization problem. How to change shortcut key for switching between virtual desktops in windows 10? In linux I use a shortcut to switch between 4 workspaces: win+1/2/3/4.   I would like to have something like this in Windows 10.  UPDATE SOLUTION 2017, WINDOWS 10x64   Update your windows version to most recent through this  . You may also need  Download and unzip this  (0.9.1) works for me. Change content of file settings.ini to    [KeyboardShortcuts] Switch=LWin Move=LAlt, Shift, Ctrl MoveAndSwitch=LAlt, Shift Previous=Left Next=Right PlusTen=     Run virtual-desktop-enhancer.exe as administrator. Can I visit the USA as a VWP tourist immediately prior to entry on non-tourist visa? Here's my situation: I'm a UK citizen. I have an H-1B visa to work in the US as of 1 August. I also have a valid ESTA.  I would like to go to the US in July for a holiday, immediately prior to beginning my work. The holiday would be at the other end of the country from my work.  I can't enter with the H-1B as I can only enter the US on that visa 10 days prior to starting work.  Specific question: Would it be possible to visit the US in early July on the VWP, visit Canada/Mexico for a few days in late July, and re-enter the US with my H-1B visa?  General question: Is it possible to visit the US on the VWP, leave briefly, and re-enter on a different status (e.g. H, F, J, K, etc), without ever returning to one's home country?  I have posted this in Travel rather than Expatriates because, although in my specific case I have an H-1B visa, my question is more generally about VWP and travel, and I believe that it is applicable to travellers with non-immigrant visas.  There's a similar question , although that's about going to the US and before having the H-1B visa. Show that if $a \equiv b \pmod n$, $\gcd(a,n)=\gcd(b,n)$ How to check if installing a package will require a reboot? I often install packages and updates for them, although sometimes it is not convenient to do a reboot if one of the packages needs it, so is there any way of telling BEFORE installing the package/update whether or not it will require you to do a reboot? I have already looked  and the solutions there don't solve my problem, nor the more or less same one described there. If $p\in\Bbb Z[X]$ show that: $ \max\limits_{x\in [0,1]}\left|p(x) \right| > \frac{1}{e^{n}}. $ This is problem 10 from the International Mathematical Competition for University Students of 2015, from day 2, in Bulgaria. I think it is an interesting problem!     Let $n$ be a positive integer, and $p(x)$ be a polynomial of degree $n$ with integer coefficients. Prove that   $$ \max_{x\in [0,1]}\left|p(x) \right| &gt; \frac{1}{e^{n}}. $$   Proposed by Géza Kós, Eötvös University, Budapest. Using conditional statements in ArcGIS Field Calculator? I have two fields, "P_Area" and "PC_Area", whose sizes I'd like to compare in a third field, "Areas_Equal". The "Areas_Equal" field should contain a "Yes" if the other two are equal and a "No" if they aren't.  How can I do this with Field Calculator and its Python Parser? Time traveler asks archaeologist for help in transporting a girl from dinosaur Earth to present day Many decades ago, I read a short story about a time traveler who asks an archaeologist for help.  He convinces the archaeologist that he can time travel by bringing him back a freshly killed dinosaur (small one.)  The time traveler needs help because when traveling back in time to the age of the dinosaurs he met a girl and wants to transport her back to the present.  However only one person can travel in time at a time so he needs the archaeologist at the other end to wait for the girl.  The archaeologist agrees to help.  Unfortunately after the traveler goes back he and the girl find themselves in the middle of a battle between aliens on Earth.  They are chased by a dinosaur and never make it back to the present.  The archaeologist meanwhile is digging for evidence that the traveler went back in time and the story or my recollection of it ends with that. Do gravitational waves slow down as they pass through matter? I've heard that gravitational waves travel at the speed of light, and have some parallels to electromagnetic waves.  EM waves slow down as they pass through matter (speed of light in glass is slower than in vacuum, for instance).  Do gravitational waves also slow down as they pass through matter?  If so, are there any effects like  when matter passes through a medium at a speed greater than the velocity of gravity in that medium?  Do large masses like stars or Jupiter act as ball lenses for gravitational waves? What are Unity's keyboard and mouse shortcuts? How to turn off the iOS-style character picker menu Sum over all non-evil numbers Today I updated to version 2.18.52 &amp; I can’t see the names of the people who send me a message. The only thing I see is the WhatsApp logo and the word “message”.    I can’t also see the status my friends posts, they all look black. I uninstalled the app, reset my phone &amp; nothing seems to work so far.