I have a problem with my HTML5 webpage that I haven't been able to research an answer for. Im using swedish letters in the text (åäö) and started out by using UTF-8 encodig as such:  &lt;!DOCTYPE html&gt; &lt;html lang = 'sv'&gt;  &lt;head&gt;     &lt;title&gt; &lt;/title&gt;     &lt;meta charset='utf-8'&gt;     &lt;meta name="description" content=' '&gt;     &lt;link rel = 'stylesheet' href = './css/auroracss.css'&gt; &lt;/head&gt;   This doesn't work for displaying the swedish letters in 3 out of 4 of my HTML5 pages, as I get the � chars when I preview. However, for the fourth page, using exactly the same head tag, the characters are displayed properly.   When I  switch out UTF-8 to ISO-8859-1 the opposite is true - displaying the characters will work fine for 3 out of 4 pages but the same one which displayed properly with UTF-8 will show  � chars when the ISO enconding is applied.  Everything validates.   I would like to stick to only one encoding choice here and not mix them even though that may be a quick fix. What is the cause for the problem?
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.
What would be the optimum design/structure for product data database, where each product have many variations and many attributes? Attribute sets vary between products, and some attributes have values common for all variations of a given product. A typical example of product variations &amp; attributes table is in the image below:    (The 'ATTRIBUTE X' is here to give you and idea of a different attribute type than for 'Product 1').   Would it be practical to try to 'group' some of the attributes (to save time and minimise errors when creating new product entries)? If so, how complicated would it need to be?  If it's relevant - I'm thinking of using mySQL engine, but I'd be happy to see any applicable example from other engines.  EDIT : More information: at the moment we have over 400 variations in a spreadsheet, each one about 15-20 attributes, so that would give about 6000-8000 'data points'. It would be great to be able to list all possible values for a given attribute (to create a dropdown menu when adding new entries), and also to have a choice of possible attributes for a given product. It would be great to be able to specify which attributes are applicable for product variations of each product. How can I get the source code of a Python function? Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above? SVM for unbalanced data I want to attempt to use Support Vector Machines (SVMs) on my dataset. Before I attempt the problem though, I was warned that SVMs dont perform well on extremely unbalanced data. In my case, I can have as much as 95-98% 0's and 2-5% 1's.   I tried to find resources which talked about using SVMs on sparse/unbalanced data, but all I could find was 'sparseSVMs' (which use a small amount of support vectors).  I was hoping someone could briefly explain:   How well SVM would be expected to do with such a dataset   Which, if any, modifications must be done to the SVM algorithm What resources/papers discuss this Difference between "theoretical computer science" and (beta) "computer science" Possible Duplicate:          Title says it all. From what I can see, "theoretical computer science" questions seem to be slightly more isolated to discussing algorithms, whereas "computer science" seems to have questions that are slightly broader and higher-level. Is there any place on the Stack Exchange sites where they give a longer description?  I'm just curious as to what niche the beta "computer science" site is meant to fill, as I see many topics in both forums that overlap. Convert audio stream to WAV byte array in Java without temp file Given an InputStream called in which contains audio data in a compressed format (such as MP3 or OGG), I wish to create a byte array containing a WAV conversion of the input data. Unfortunately, if you try to do this, JavaSound hands you the following error:  java.io.IOException: stream length not specified   I managed to get it to work by writing the wav to a temporary file, then reading it back in, as shown below:  AudioInputStream source = AudioSystem.getAudioInputStream(new BufferedInputStream(in, 1024)); AudioInputStream pcm = AudioSystem.getAudioInputStream(AudioFormat.Encoding.PCM_SIGNED, source); AudioInputStream ulaw = AudioSystem.getAudioInputStream(AudioFormat.Encoding.ULAW, pcm); File tempFile = File.createTempFile("wav", "tmp"); AudioSystem.write(ulaw, AudioFileFormat.Type.WAVE, tempFile); // The fileToByteArray() method reads the file // into a byte array; omitted for brevity byte[] bytes = fileToByteArray(tempFile); tempFile.delete(); return bytes;   This is obviously less desirable. Is there a better way? At  I've read that being $\sin(x)=\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)!}x^{2n+1}$ by using  we get $\sin'(x)=\sum_{n=0}^{\infty}(2n+1) \frac{(-1)^n}{(2n+1)!}x^{2n}=\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n)!}x^{2n}=\cos(x)$ but the page  says that if $f(x)=\sum_{n=0}^{\infty}c_n(x-a)^n$ then inside the radius of convergence of the power series we have $f'(x)=\sum_{n=1}^{\infty}nc_n(x-a)^{n-1}$ so shouldn't it be $\sin'(x)=\sum_{n=1}^{\infty}(2n+1)\frac{(-1)^n}{(2n+1)!}x^{2n+1-1}=\sum_{n=1}^{\infty}\frac{(-1)^n}{(2n)!}x^{2n}$?  Now I understand that this last result has a missing term due to the index of the series being $1$ and not $0$ but being the $1$ mandatory because of the above theorem and since trying to shift index doesn't help (we get $\sin'(x)=\sum_{n=0}^{\infty}\frac{(-1)^{n+1}}{(2n+2)!}x^{2n+2}$) how can the result that ProofWiki shows be rigorously justified?   (I mean, I think we can't just say "oh, there's a missing term!" after having applied the theorem and magically shift the index of the series to obtain the desired result) When closing a question as a duplicate there is a text box which says: "search, or enter a question link or numeric id". You can copy and paste a question link into here, but this fails if the URL starts with https:// instead of http://, with the message "Your search returned no matches; please try a different search". What is the best technique for long-exposure photography in good light? Opening a context menu (with the Menu key) I just watched a TV show and the guy says:     I ain't trying to fight with nobody with a baby.   So here, I can't understand the "nobody" since it make no sense to me, but it sounds like anybody, and if it's "I ain't trying to fight with anybody with a baby." that makes sense to me. If $q$ is coprime to $a$ then $a\mid nq-1,\,$ so $q$ is invertible mod $a$ How do we pass the field api name in lwc for a lightning data table? Permanently turn off new Google Maps and go back to old one I found new Google Maps slow, useless (routes with only two points) and wrong. Is there any way, I can turn it off completely and go back to favored old Google Maps? Or is this &mdash; as with everything in Google &mdash; one way trip?  I found  text on this matter, but it seems useless. I have the feeling, that it discuss something completely different. It says about lite indicator in bottom-right corner. I don't have something like that. And provided links, that should switch new Google Maps engine between WebGL and canvas-based, simply doesn't work. All of them opens new window with annoying advertisment about new maps.  I even tried pasing part of URL, they're talking about (force=canvas) into any URL that my new Google Maps uses. Of course without any luck.  So... is there any way, I can get rid of new Google Maps, once and permanently?  UPDATE: In these days (April, 2015) Google , that soon new Google Maps will be the only one available. To my extremely negative surprise, this question will become invalid soon! :( How do I round a number in JavaScript? While working on a project, I came across a JS-script created by a former employee that basically creates a report in the form of  Name : Value Name2 : Value2   etc.  The peoblem is that the values can sometimes be floats (with different precision), integers, or even in the form 2.20011E+17. What I want to output are pure integers. I don't know a lot of JavaScript, though.  How would I go about writing a method that takes these sometimes-floats and makes them integers? How do I determine how many spell slots I have when multiclassing? How do I determine how many spell slots I have if I multiclass into more than one spellcasting class? For example, I have a character that is a level 3 Wizard, a level 5 Eldritch Knight Fighter, a level 4 Arcane Trickster Rogue, a level 4 Paladin, and a 4 Warlock. How many spell slots do I have and how do I determine this? Is there any Android XML documentation? When a user who approved an edit is removed, an incorrect "-2 reverted" event appears in reputation history I am aware that . But now there is an extraneous "reverted" event to go along with user removal:     Source: .   The edit was not reverted, it's . In any case, I should not lose 2 points twice for the total of -4. And indeed, my reputation only dropped from 131 to 129 despite what the history suggests.   So the line with "-2 reverted" is a bug.     A more extreme example:  got 21 "reverted" events on 2017-06-30, none of which should be there. His rep loss is 42, not 84 as the reputation history says. In order to show $e^{x+y}=e^{x}e^{y}$ by using Exponential Series, I got the following:   $$e^{x}e^{y}=\Big(\sum_{n=0}^{\infty}{x^n \over n!}\Big)\cdot \Big(\sum_{n=0}^{\infty}{y^n \over n!}\Big)=\sum_{n=0}^{\infty}\sum_{k=0}^n{x^ky^n \over {k!n!}}$$  But, where should I go next to get $e^{x+y}=\sum_{n=0}^{\infty}{(x+y)^n \over n!}$.  Thanks in advance. How to get business map location displayed in the right hand sidebar of the Google search results page? Does anyone know how to get your business map location displayed in the right hand sidebar of the Google search results page? As in the screenshot below:      I already added my business to this link: .  Is adding detail in above link enough or do I need to change my website coding? Is it possible to assign a base class object to a derived class reference with an explicit typecast in C#?.  I have tried it and it creates a run-time error.