I have this problem with the Danish letters ÆØÅ. I use the following script to arrange posts alphabetically when loading the page.  if($stmt=$mysqli-&gt;prepare("select `titel` from `ann` order by `titel` asc "))      {     $stmt-&gt;execute();     $stmt-&gt;bind_result($titel);     while($stmt-&gt;fetch())         {         $letter=substr($titel,0,1);         $res[$letter][] = array('titel' =&gt; $titel);         }          foreach($res as $key=&gt;$val)         {         ?&gt;         &lt;div class="&lt;?php $letter;?&gt;"&gt;&lt;/div&gt;         &lt;?php         echo "&lt;div class='group_letter'&gt;$key&lt;/div&gt;";         foreach($val as $reqvals)             {             echo $reqvals['titel'];              }         }     $stmt-&gt;close();     }     Unfortunately, the script is unable to handle the 3 Danish letters, which are in the end of the alphabet. They are placed first - before "A" hen loading the page.   � Åben dialog......  A Altid klar Astrids hemmelighed  B Bravo Klaus  D Den hemmelige klumme   How can I fix this?
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.
So basically as it stands I have a laptop which has no cd/dvd drive, and I don't have a usb drive.  The laptop has windows 7 installed with ubuntu 11.04 installed through wubi.  What I want to do is remove windows completely, and make ubuntu the only OS installed on the system.  Is there a way to do this without re-installing ubuntu? (i.e. can I take my wubi install away from windows?)  or is there a way to from inside ubuntu have it run the ubuntu iso somehow so I can just wipe the system and install it fresh? (even if it means I need to have an e.g. 2gb partition just for the image to reside in). Difference between Inheritance and Composition My Tier 5 YMS visa is set to start on September 30th, 2016 however, I want to get there earlier.  Can I enter the UK as a tourist, if I explain to border control/immigration that I am entering as a tourist and do not plan to work or do anything really until my Tier 5 visa starts?  I can find no official contact or information source on this with UK Visas Information, the British High Commission, etc. Is "chutzpah" used by non-Jewish English speakers? g++ undefined reference with a shared library is it safe to keep database connections open for long time I have a .net client application which is connected to a remote database. Is it safe to keep a single connection open for the lifetime of the client (hours)? Does the answer hold if I have multiple (10 or 100) clients running? How do I remove old kernel versions to clean up the boot menu? Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time.    I know I can manually search through the installed packages and remove them.  Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list? Double booked - User bookmarking question recorded twice In this  one user is shown as having bookmarked  twice:  This doesn't appear to be the same question as:  or  though it's certainly possible that the cause is the same. What exactly happens to the signals hitting a common mode choke? I'm trying to better understand the principles behind the common mode choke. I made a few drawings to clarify.  &nbsp; Differential Mode Signals  Differential currents (driven by differential voltages) create equal but opposite magnetic fields B in the inductor core:    These magnetic fields cancel each other out, so the net flux in the core is zero. As such, these differential currents don't "feel" any impedance.  &nbsp; Common Mode Signals  In contrast, common mode currents generate equal and additive magnetic fields in the core. That's why they "feel" a high impedance, and cannot get through (or getting through means they are highly attenuated).    But what exactly happens? I have several theories, which I will describe below.  &nbsp; Common Mode Signals - Theory 1  My first thought would be that the common mode signal hits the choke and creates a magnetic flux inside. By doing this, lots of energy is lost (hysteresis and perhaps other effects) as heat. Only a small part gets through:      What kind of common mode choke would behave in this particular way? "Burning up" the voltage spike seems a very desirable effect to me.  &nbsp; Common Mode Signals - Theory 2  Perhaps the voltage spike doesn't really get the chance to build up much magnetic flux in the core, or maybe the core is simply not "lossy" enough. The voltage spike bounces off the core and turns back. Only small part gets through:    Although the system on the right side of the choke is protected, the system on the left has to deal with reflected signals. Nasty things like standing waves might appear.  &nbsp; My questions  I've got a few questions for you:   Do you think theory 1 or theory 2 is most plausible? Do you think certain types of common mode chokes tend to behave as described in theory 1, others like in theory 2? Perhaps both of my theories are just plain wrong. If so, what actually does happen?   Please enlighten me. I always used to open a new VLC window; go to "open file"...etcetera when I wanted to watch something because when I click on a file in Windows Explorer and chose "open with" or just clicked on the file or right-clicked to choose "play with VLC" it always opened in an old already used VLC window.  Is there any way to get VLC to use a new one without always resorting to: Open VLC, "open file", find file etcetera? chrome disable or change keyboard shortcut ctrl+shift+c developer tools console? How can I disable the Keyboard Shortcut ctrl+shift+c in Google Chrome to bring up the Developer Tools console?  I find myself trying to copy+paste content from the browser and mistakenly typing ctrl+shift+c when I really want to do ctrl+c instead.  How can I disable the current keyboard binding or change ctrl+shift+c to do the same as ctrl+c in Google Chrome? Is there an upside down caret character? I have to maintain a large number of classic ASP pages, many of which have tabular data with no sort capabilities at all. Whatever order the original developer used in the database query is what you're stuck with.  I want to to tack on some basic sorting to a bunch of these pages, and I'm doing it all client side with javascript. I already have the basic script done to sort a given table on a given column in a given direction, and it works well as long as the table is limited by certain conventions we follow here.    What I want to do for the UI is just indicate sort direction with the caret character ( ^ ) and ... what?  Is there a special character that is the direct opposite of a caret?  The letter v won't quite cut it.  Alternatively, is there another character pairing I can use? Does Sheldon Cooper have Asperger's Syndrome? Where do the bipolar jets of black holes come from? Is it wrong to place the  tag after the  tag? Restore All Databases Script I am migrating SQL Server DBs to a new instance.  I have been told that it is possible to dynamically build a RESTORE script from available backups in the system catalog.  Does anyone know of a sample script to do this?  Thanks! How fast a (relatively) small black hole will consume the Earth? This question appeared quite a time ago and was inspired, of course, by all the fuss around "LHC will destroy the Earth".   Consider a small black hole, that is somehow got inside the Earth. Under "small" I mean small enough to not to destroy Earth instantaneously, but large enough to not to evaporate due to the . I need this because I want the black hole to "consume" the Earth. I think reasonable values for the mass would be $10^{15} - 10^{20}$ kilograms.   Also let us suppose that the black hole is at rest relative to the Earth.  The question is: How can one estimate the speed at which the matter would be consumed by the black hole in this circumstances? Relation between AB and BA Let $A$ and B be $n\times n$ matrices over a field $F$. Then prove or disprove  $(i)\, AB$ and $BA$ have same characteristic values.  $(ii)\, AB$ and $BA $ have same characteristic polynomial.  $(iii)\, AB$ and $BA $ have same minimal polynomial.  Proof of $(i)$   Let $c$ be an eigen value of AB and v be corresponding eigen vector. Then    AB(v)=cv,    B(ABv)=B(cv),    BA(Bv)=c(Bv),   this implies $Bv$ is an eigenvector of $BA$ corr. to eigen value $c$.  But this statement holds if $Bv$ is nonzero.  What if $Bv=0$?  $(ii)$ If $A$ is invertible then ($A$ inverse)$(AB)A= BA$, i.e. $AB $ and $BA$ are similar and hence have same charateristic polynomial.   Similar proof when $B$ is invertible.  But what if both $A$ and $B$ are not invertible?  I have no idea about $(iii)$.  Please help me to complete these proofs. How does background blur (bokeh) relate to sensor size? This is a somewhat theoretical question.  Suppose I first take a photo of a subject using a full frame sensor DSLR, with a given lens (say 50mm prime lens at f/3.5).  Now suppose I exchange the camera for an APS-C sensor DSLR (with a 1.6× crop factor). I keep the same lens (same focal length, same aperture) and I step back a few meters in order to maintain the field of view (at least keep the same magnification of the subject). I now take a second photo.  Clearly depth of field will have increased between the two photos. But what about background blur (for example, trees at infinity)? Will I have the same amount of background blur, or will that have changed?  I have read somewhere that background blur depends on the physical aperture size. In this case the physical aperture (physical focal length divided by f/stop) stays the same. But should this number be taken in relation to the sensor size? In which case with the smaller APS-C sensor, the physical aperture will be relatively bigger, which would mean more background blur. This would be rather counter-intuitive as we usually consider it to be more difficult to get background blur on an APS-C camera.  Please give the reasoning behind the answer. I would answer the question myself using this  but I can't manage to get it to run on my computer. I'm trying to create a functioning sub theme of Omega 4.4. I've worked  with Drush before with it, but the site is on a host that I'm not administrator of. I've tried the  but not succeeded in executing the Omega Wizard. In short, the Omega Wizard may be extremely helpful, but I can't get it to work.   Next, I've tried to manually create a sub theme using the . However, the results of this is a theme catalogue in the Themes-folder, but the theme not showing up in Drupal. Perhaps I'm using the wrong instructions for the wrong version of Omega?  Anyhow, does anyone have instructions for how to install an Omega 4.4 sub theme manually for Drupal 7?