Lately I'm working with a lot of Wordpress themes. When I have to edit a particular element, I usually use Firebug to see the element's name so I can change the CSS. I think I understand the difference between IDs and Classes, Classes are used for a group of elements that you want to share the same styling, and ID is usually used for a single element.  Here's the thing, I'm seeing so many elements in these Wordpress themes that are only used once, but they are assigned to a class. A good example is the website logo. Isn't the logo only used once? Shouldn't it be assigned to an ID? Why is it always assigned to a class?
What's the difference between &lt;div class=""&gt; and &lt;div id=""&gt; when it comes to CSS? Is it alright to use &lt;div id=""&gt;?  I see different developers doing this in both ways, and since I'm self taught, I've never really figured it out.
I am non-EU citizen working in Germany. Can I travel to UK without a visa? Resize image in Python without losing EXIF data I need to resize jpg images with Python without losing the original image's EXIF data (metadata about date taken, camera model etc.). All google searches about python and images point to the PIL library which I'm currently using, but doesn't seem to be able to retain the metadata. The code I have so far (using PIL) is this:  img = Image.open('foo.jpg') width,height = 800,600 if img.size[0] &lt; img.size[1]:     width,height = height,width  resized_img = img.resize((width, height), Image.ANTIALIAS) # best down-sizing filter resized_img.save('foo-resized.jpg')   Any ideas? Or other libraries that I could be using? Have the Linux kernel bugs that caused data loss when using a Samsung 850 Pro SSD been resolved? I just got a brand new Samsung 850 Pro SSD, and I would like to install Ubuntu 14.04 onto it.  I have read some pretty ugly stories of data loss with the 850 series SSDs when using Linux due to bugs in the kernel, as well as bugs in the TRIM operation.  I have done my research, but most of what I'm finding is very outdated. For example, see , and , as well as .  My question is, what is the current status? Have all major the bugs been worked out yet? Do you add Proficiency bonus AND the stat modifier to skill rolls? I know this basic knowledge, but I seemed to have missed this info in the player's manual.  Say someone makes an stealth check: do I add their Dexterity modifier and their proficiency bonus in Stealth to the roll? In other words, does the Dexterity modifier apply to all Dex-related skills, including ones with a proficiency? Does there exist a smooth approximation of $x \bmod y$? I'm looking for a function $m(x,y)$ that smoothly approximates $x \bmod y$, and I'm assuming there would be some $n$ or $\varepsilon$ in the body of $m(x,y)$ that defines the degree of approximation such that as $n$ goes to infinity or $\varepsilon$ goes to zero,  $$ m(x,y)= x \bmod y. $$  I've looked at, for example, $\sin(x/y)$ and have been trying to figure out ways to make $\sin(x)$ more "steep" so that I can apply such techniques to $\sin(x/y)$ in order to perhaps more closely approximate $x \bmod y$.  The analogy I'm looking at is the approximation of $\mid x\mid$ as $\sqrt{x^2 + \varepsilon)}$ where epsilon is some small quantity.  Does a similarly smooth function exist for $x \bmod y$? Why is King Tommen Baratheon the "First of his Name" rather than at least third? Motivated by , can one prove that the order of an element in a finite group divides the order of the group without using Lagrange's theorem? (Or, equivalently, that the order of the group is an exponent for every element in the group?)  The simplest proof I can think of uses the coset proof of Lagrange's theorem in disguise and goes like this: take $a \in G$ and consider the map $f\colon G \to G$ given by $f(x)=ax$. Consider now the orbits of $f$, that is, the sets $\mathcal{O}(x)=\{ x, f(x), f(f(x)), \dots \}$. Now all orbits have the same number of elements and $|\mathcal{O}(e)| = o(a)$. Hence $o(a)$ divides $|G|$.  This proof has perhaps some pedagogical value in introductory courses because it can be generalized in a natural way to non-cyclic subgroups by introducing cosets, leading to the canonical proof of Lagrange's theorem.   Has anyone seen a different approach to this result that avoids using Lagrange's theorem? Or is Lagrange's theorem really the most basic result in finite group theory? 20GB of Temporary Files, Only 50MB in Temp Folder I recently discovered that the Settings app is showing around 20GB of space used by temporary files. But when I go to remove them I can only remove about 28MB. When I open the temp folder by using Run and then %temp% it only shows around 40-50MB of files right after boot. How can I remove these 20GB of invisible files? I only have a 240GB SSD so space is quite scarce. Here are a few photos:    I run Windows 10 Home Activated. I have tried Disk Cleanup but this removed only around 30MB of files.  UPDATE: After turning on hidden items I found a folder name WINDOWS-BT, after doing some research it turned out to be a folder for the previous windows version. I deleted it using TakeOwnerShip pro and this removed around 12GB of temporary files, but 8GB still remain. I am currently downloading TreeSize free to find out where the other 8GB is.  UPDATE 2: Hi, I downloaded TreeSizeFree and I didn't really find anything there.   The biggest folder is 87GB of Program Files which mainly consists of my GTA V install. The Program Files (x86) folder was mainly made up of my Steam games (CS:GO, Besiege, etc). The 5.5GB [3 Files] location was noted as being my pagefile.    The Windows folder shows up as 25GB when in Settings it is only 18GB, this could explain where the other 8GB are coming from. What are some things I should look for in there?  FINAL UPDATE: After deleting the Windows-BT folder it reappeared a few hours later. I decided to check from system updates and surely enough one was downloaded and pending to be installed. After installing the update the Windows-BT folder disappeared on it's own and a new folder taking up 20GB called Windows.old was created. I then followed this  to remove the .old folder and I had all my disk space back! NOTE: Disk Cleanup wasn't able to find the Windows.old folder, this is why I had to delete it from the settings app. Book about almost extinct warrior race with three castes: sen, kaa, ker The aliens in this book are an humanoid alien mercenary race, fighting for some other aliens, against humans?.   The Ker are the fighters, the sen are the wise ones, and the kaa the family/non-fighters.  Their clan gets almost wiped out because both their employers and humanity fear them, and the last survivors head towards their race' home planet, together with a human captive, who learns about their ways.  The other aliens are some blob-like aliens with little genetic variety.  Ring any bells? Subgroup of $\mathbb{Q}$ with finite index Consider the group $\mathbb{Q}$ under addition of rational numbers. If $H$ is a subgroup of $\mathbb{Q}$ with finite index, then $H = \mathbb{Q}$.  I just saw this on our exam earlier and was stumped on how to show this. Any ideas? Is true that $\sum_{k=1}^n\frac{[kx]}{k}\leq[nx]$, for every $x\in\mathbb{R}$ and for every $n\in\mathbb{Z}^+$? Is true that $\displaystyle\sum_{k=1}^n\dfrac{[kx]}{k}\leq[nx]$, for every $x\in\mathbb{R}$ and for every $n\in\mathbb{Z}^+$?  My work:  Let $x\in\mathbb{R}$ be given. For every $k=1,\dots,n$, define $i_k\in\{0,1,\dots,k-1\}$ such that  $$ [x]+\frac{i_k}{k}\leq x&lt;[x]+\frac{i_k+1}{k}\hspace{20mm} (*). $$  On one hand, we have that $[kx]=k[x]+i_k$ for every $k=1,\dots,n$.  So  $\displaystyle\sum_{k=1}^n\dfrac{[kx]}{k}=n[x]+\displaystyle\sum_{k=1}^n\dfrac{i_k}{k}=[nx]+\displaystyle\sum_{k=1}^n\dfrac{i_k}{k}-i_n$  Thus  $$\displaystyle\sum_{k=1}^n\dfrac{[kx]}{k}\leq[nx]\Leftrightarrow\displaystyle\sum_{k=1}^n\dfrac{i_k}{k}\leq i_n\,.$$  On the other hand, from $(*)$ is direct that $i_k=[k(x-[x])]$. Thus  $$\displaystyle\sum_{k=1}^n\dfrac{[kx]}{k}\leq[nx]\Leftrightarrow\displaystyle\sum_{k=1}^n\dfrac{[k(x-[x])]}{k}\leq [n(x-[x])]\,.$$  In other words, we can assume that $x\in[0,1)$.   Now the questions is:  Is true that $\displaystyle\sum_{k=1}^n\dfrac{[kx]}{k}\leq[nx]$, for every $x\in[0,1)$ and for every $n\in\mathbb{Z}^+$?  Any simpler approach? Any thoughts? So I've been pulling my hair out over this for the last couple days now, I can't seem to find any solutions that work. I've fresh installed Ubuntu Gnome 16.04 on my system which has no other OS's running on it. Everything's fine aside from the fact that the default Nouveau display driver seems to be causing the UI to freeze sporadically every now and then. No problem right? Just install the proprietary drivers for my GPU and we should be golden? Well here's the thing, no matter how I try to get my GPU's drivers installed I always seem to hit some sort of issue. Here's what I've tried so far:   Switch to the proprietary driver from within the 'Software &amp; Updates' app in Ubuntu. For me the only option available is the 'NVIDIA binary driver - version 375.66 from nvidia-375 (proprietary, tested)'.    After selecting this driver it goes through the install process, asks me to 'configure secure boot' by entering a password, etc. This all seems to work fine initially until I reboot, but then before I see the login screen it seems to open a virtual terminal (usually accessed via alt+shift+F1), but then immediately boots me back to a black screen where it will flash this terminal for a split second every 4 seconds or so. I can access this terminal by using alt+shift+F1, and go on to use it as normal, but it will continually boot me back out to the black screen every few seconds. The only way I can solve this is to keep accessing the terminal each time it boots me out while I purge the nvidia drivers using sudo apt purge nvidia-*. After purging I'm then able to access the login screen and access my Ubuntu again as normal, besides having to reboot to presumably activate the Nouveau drivers again otherwise the resolution is all messed up and only one of my three monitors has anything displayed on it.    Using the steps listed  I download the latest stable/certified driver for my GPU (which as of writing this is version 384.69). However on step 3 where it instructs me to run the driver using sudo sh, I reach an issue where the installer informs me that I need to disable the Nouveau driver in order to continue. I've tried everything from uninstalling Nouveau using 'sudo apt-get remove --purge xserver-xorg-video-nouveau` to blacklisting Nouveau using the steps listed , by editing the 'nvidia-graphics-drivers.conf'.    Unfortunately no matter what I do to try and disable Nouveau the installer always informs me that the Nouveau driver is enabled and needs to be disabled in order to continue. What's funny is that I managed to install the driver using this method once before, but for the life of me I can't get it to work again.    Finally, I've attempted to install the driver by installing the PPA. I run sudo add-apt-repository ppa:graphics-drivers/ppa, sudo apt update, and finally going back into the 'Software &amp; Updates' app and select the 384.69 driver. However after going through the install process the same issue as described in my first method (1.) occurs.    I've also tried switching between gdm3 and lightdm with all 3 methods to no avail. I'm at a complete loss as to what to do. If anyone has any possible solutions I'd love to hear them, because right now I'm at the end of my tether.   If you require any further information just let me know and I'll be more than happy to provide it.   System info:   AMD FX-8350  Nvidia GeForce GT710 1gb  16gb RAM  Ubuntu Gnome 16.04 LTS What was Natsume hiding in her closet in episode 11? In episode 11 of Tokyo Ravens, what was Natsume hiding in her closet? Loading OpenStreetMap data in QGIS? In QGIS 1.8 I used the openstreetmap plugin to request data from the server, or open a .osm XML file, which produced 3 layers (polygons, polylines and points) in QGIS.  This was great (give or take the 64bit bug which highly affects the freshly mapped area I work on), but how do I do that in QGIS 2.x?   I can't find any updated documentation about it.  In the vector menu, I've tried importing from osm servers, I get a .osm file, but then I'm stuck. There's a menu option for loading an XML file, but it produces a spatialite db, which apparently only has non-geometry tables when I try to add it as a spatialite layer. If I open the attribute table, I can see node ids, ways and so on, but I can't figure out how to actually make use of them.  I've also tried adding a vector layer from a .osm XML file. I get a gpsbabel window that shows nothing, then finally an invalid data source message in QGIS. What's a common interjection for the reaction to something creepy and disgusting (like some insects or spooky places, etc.)? Inequality with complex numbers Consider the following problem.  Fix $n \in \mathbb N$. Prove that for every set of complex numbers $\{z_i\}_{1\le i \le n}$, there is a subset $J\subset \{1,\dots , n\}$ such that   $$\left|\sum_{j\in J} z_j\right|\ge \frac{1}{4\sqrt 2} \sum_{k=1}^n |z_k|.$$  I believe I proven have a stronger statement. Is this proof correct, and if so, what is the optimal constant?  My proof. Consider all the $z_i$ with positive real part. Call the real part of the sum of these numbers $X^+$. In a similar way, form $X^-$, $Y^+$, and $Y^-$. Without loss of generality, let $X^+$ have the greatest magnitude of these.  Note that because $|\operatorname{Re}(z)|+|\operatorname{Im}(z)|\ge |z|$, we have  $$ \left(\sum_{k=1}^n  |\operatorname{Re}(z_k)|+|\operatorname{Im}(z_k)| \right) \ge \sum_{k=1}^n |z_k|.$$  But note that $\sum \limits_{k=1}^n  |\operatorname{Re}(z_k)|+|\operatorname{Im}(z_k)| = X^+ + |X^-|+ Y^+ +|Y^-|$, so we have  $$ 4X^+ \ge \sum_{k=1}^n |z_k|.$$ By choosing $J$ to be the set of complex number with positive real part, this proves a stronger statement, because the factor of $1/\sqrt 2$ isn't needed. What does A a() mean? iCloud says Password is Wrong Even Though I Know It's Right iCloud says that my password is wrong - even though I know it's right.  Here's whats happened: Yesterday, I reset my iCloud password. Got the reset email, changed password. Tried to log in to the account, didn't accept it. I thought that maybe my finger had slipped typing in the password (twice). I called support, got the reset email.  Now, here's the really, really weird thing: I wanted to make sure I got the password right - so I typed my password into TextEdit, copied it into the reset fields and reset the password. After reseting it, I immediately went to icloud.com and tried to log in using the copied password from TextEdit. The passwords are the same. iCloud won't let me in. I find it intuitive enough that the radical of $\mathfrak{gl}_n\mathbb F$ is the scalar matrices, but I have trouble finding an easy, but complete proof:  Proof. Let $\mathfrak s$ denote the scalar matrices. Clearly $\mathfrak s\subset\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$. Suppose that $\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$ is generated by more than one element, so that $X\in\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$, but $X\notin\mathfrak s$. We can change basis such that $\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$ is upper-triangular. (The change of basis leaves the scalar matrices invariant.) Then $X$ is upper-triangular.  I want to conclude that there exists a $Y\in\mathfrak{gl}_n\mathbb F$ s.t. $[X,Y]$ is not upper-triangular. How can I see that $Y$ always exists, except by waving hands? How can I model flips until N successes? You and I decide to play a game where we take turns flipping a coin. The first player to flip 10 heads in total wins the game. Naturally, there is an argument about who should go first.  Simulations of this game show that the player to flips first wins 6% more than the player who flips second (the first player wins approx 53% of the time).  I'm interested in modelling this analytically.  This isn't a binomial random variable, as there are no fixed number of trials (flip until someone gets 10 heads). How can I model this?  Is it the negative binomial distribution?    So as to be able to recreate my results, here is my python code:  import numpy as np from numba import jit   @jit def sim(N):      P1_wins = 0     P2_wins = 0      for i in range(N):          P1_heads = 0         P2_heads = 0         while True:              P1_heads += np.random.randint(0,2)              if P1_heads == 10:                 P1_wins+=1                 break              P2_heads+= np.random.randint(0,2)             if P2_heads==10:                 P2_wins+=1                 break     return P1_wins/N, P2_wins/N   a,b = sim(1000000)