Hi,  I got this code:    &lt;ul&gt;    &lt;li&gt;some list&lt;/li&gt;    &lt;li&gt;some list&lt;/li&gt;    &lt;li&gt;some list&lt;/li&gt;    &lt;li&gt;some list&lt;/li&gt;    &lt;li&gt;some list&lt;/li&gt;    &lt;li&gt;some list&lt;/li&gt;   &lt;/ul&gt;   and my css:  ul { background-color: #EDEADF; height: 30px; }  li {float: left;}   on a PC screen this looks fine. The problem comes when you see it on a mobile because the LI elements go vertical instead of horizontal. Im okay with that, but what I dont like is that the UL stays at the same height and since it has a background it looks weird. It should expand automatically and reach the bottom to cover until the very last LI. How can i achieve that effect?  Thank you.
Although elements like &lt;div&gt;s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example:   &lt;div&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    The parent div in this example will not expand to contain its floated children - it will appear to have height: 0. How do you solve this problem? I would like to create an exhaustive list of solutions here. If you're aware of cross-browser compatibility issues, please point them out. Solution 1 Float the parent.   &lt;div style="float: left;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Semantic code. Cons: You may not always want the parent floated. Even if you do, do you float the parents' parent, and so on? Must you float every ancestor element? Solution 2 Give the parent an explicit height.   &lt;div style="height: 300px;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Semantic code. Cons: Not flexible - if the content changes or the browser is resized, the layout will break. Solution 3 Append a &quot;spacer&quot; element inside the parent element, like this:   &lt;div&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt;   &lt;div class="spacer" style="clear: both;"&gt;&lt;/div&gt; &lt;/div&gt;    Pros: Straightforward to code. Cons: Not semantic; the spacer div exists only as a layout hack. Solution 4 Set parent to overflow: auto.   &lt;div style="overflow: auto;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Doesn't require extra div. Cons: Seems like a hack - that's not the overflow property's stated purpose. Comments? Other suggestions?
Hiding some slides in student handouts in Beamer I am preparing lecture slides for a class. I would like to hide some of the slides from the students. As an example, I would like to be able to compile students.pdf which has only student slides 1 and 2 (i.e., "teacher slide" is hidden); but teacher.pdf which has all three slides.  \documentclass{beamer}  \begin{document}  \begin{frame}{Student slide 1} blah blah blah \end{frame}  \begin{frame}{Teacher slide} secret stuff not to be shared with students \end{frame}  \begin{frame}{Student slide 2} blah blah blah \end{frame}  \end{document}   How would I do this in beamer? In a regular document, e.g., article, I would use the comment environment.  I feel that the approach in  is overkill for my needs. Editing old questions What are watched tags and ignored tags? How do they work? What are tag subscriptions? What are interesting tags? On Stack Overflow, the content of the main page question list appears to be influenced by watched and ignored tags. How does that work?   For more information, see &quot;&quot; in the . C non-blocking keyboard input Elementary proof for $\lim\limits_{n \to\infty}\frac{n!e^n}{n^n} = +\infty$ As seen in  question, the series $\sum\limits_{n=1}^{\infty} \dfrac{n!e^n}{n^n}$ diverges. (One way to see this is by noting that the terms of the sum are greater than $1$ and, therefore, don't converge to zero.)  However, more is true: not only are the terms greater than $1$, they blow up to $+\infty$! To see this, one can apply Stirling's approximation and get $\dfrac{n!e^n}{n^n} \sim \sqrt{2\pi n}$.  My question is: is there an elementary proof for $\lim_{n \to\infty}\dfrac{n!e^n}{n^n} = +\infty$?  The reason I'm asking this is that I'm taking a Calculus course and I was assigned the exercise of proving the divergence of the series above and I would feel more satisfied if I could prove that its terms go to $+\infty$ (as opposed to merely proving the terms are greater than $1$.) Obviously, things like Stirling's approximation are outside the scope of the course, so I can't really use them.  (To be clear, you can use anything one learns in $4$ semesters of standard Calculus courses. I hope this restriction is not too obscure.) Miktex Package Installation I recently installed MiKTeX with the texmaker editor and cannot figure out how to update the packages. When I attempt to use the subfigure package with the following preamble  \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{subfigure}   I then get a prompt to install a new package, which I then set to the online directory at ctan. I then get the following error:   ! LaTeX Error: File `subfig.sty' not found.Type X to quit or &lt;RETURN&gt; to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.&lt;read &gt;   How do I properly install packages to miktex? I'm absolutely confused. Thanks in advance for any help. Any subgroup of index $p$ in a $p$-group is normal. Missing font on some error and dupehammer info popups Some popups like the dupehammer explanation popup or the validation error ones on the  do not have the right fonts - the browser has to fall back to a default and quite ugly font instead.  Interestingly, this does not happen for validation popups on posting a question - those remain fine.  Tested with both Firefox and Microsoft Edge. Although the merits of stepwise model selection has been discussed previously, it is becoming unclear to me what exactly is "stepwise model selection" or "stepwise regression". I thought I understood it, but not so sure anymore.  My understanding is that these two terms are synonymous (at least in a regression context), and that they refer to the selection of the best set of predictor variables in an "optimal" or "best" model, given the data. (You can find the Wikipedia page , and another potentially useful overview .)    Based on several previous threads (for example here: ), it appears that stepwise model selection is considered a cardinal sin. And yet, it seems to be used all the time, including by what seem to be well respected statisticians. Or am I mixing up the terminology?  My main questions are:   By "stepwise model selection" or "stepwise regression", do we mean: A) doing sequential hypothesis testing such as likelihood ratio tests or looking at p-values? (There is a related post here: ) Is this what is meant by it and why it is bad? Or B) do we also consider selection based on AIC (or similar information criterion) to be equally bad? From the answer at , it appears that this too is criticized. On the other hand, Whittingham et al. (2006; )1 seems to suggest that variable selection based on information-theoretic (IT) approach is different from stepwise selection (and seems to be a valid approach)...?  And this is the source of all my confusion.  To follow up, if AIC based selection does fall under "stepwise" and is considered inappropriate, then here are additional questions: If this approach is wrong, why is it taught in textbooks, university courses, etc.? Is all that plain wrong? What are good alternatives for selecting which variables should remain in the model? I have come across recommendations to use cross-validation and training-test datasets, and LASSO.   I think everyone can agree that indiscriminately throwing all possible variables into a model and then doing stepwise selection is problematic. Of course, some sane judgement should guide what goes in initially. But what if we already start with a limited number of possible predictor variables based on some (say biological) knowledge, and all these predictors may well be explaining our response? Would this approach of model selection still be flawed? I also acknowledge that selection of the "best" model might not be appropriate if AIC values among different models are very similar (and multi-model inference may be applied in such cases). But is the underlying issue of using AIC-based stepwise selection still problematic?  If we are looking to see which variables seem to explain the response and in what way, why is  this approach wrong, since we know "all models are wrong, but some are useful"?   1. Whittingham, M.J., Stephens, P.A., Bradbury, R.B., &amp; Freckleton, R.P. (2006). Why do we still use stepwise modelling in ecology and behaviour? Journal of Animal Ecology, 75, pp. 1182–1189. Explain why $\mathbb{Z \times Z}$ and $\mathbb{R \times R}$ is not a field and that why any external direct sum of two fields cannot be a field. I believe it has much to do with the lack of every non-zero element having an inverse, however I am having difficulty seeing it. Can I have multiple background images using CSS? Is it possible to have two background images?  For instance, I'd like to have one image repeat across the top (repeat-x), and another repeat across the entire page (repeat), where the one across the entire page is behind the one which repeats across the top.  I've found that I can achieve the desired effect for two background images by setting the background of html and body:  html {     background: url(images/bg.png); }  body {     background: url(images/bgtop.png) repeat-x; }   Is this "good" CSS?  Is there a better method?  And what if I wanted three or more background images? Unique constraint that allows empty values in MySQL How to solve following equation: $x^x = C$ as $x, C \in \mathbb{R}_{&gt;0}$. I tried to use exponent and such that: $x\ln x = \ln C$. In chapter 2, the section on bitwise operators (section 2.9), I'm having trouble understanding how one of the sample methods works.  Here's the method provided:  unsigned int getbits(unsigned int x, int p, int n) {     return (x &gt;&gt; (p + 1 - n)) &amp; ~(~0 &lt;&lt; n); }   The idea is that, for the given number x, it will return the n bits starting at position p, counting from the right (with the farthest right bit being position 0). Given the following main() method:  int main(void) {     int x = 0xF994, p = 4, n = 3;     int z = getbits(x, p, n);     printf("getbits(%u (%x), %d, %d) = %u (%X)\n", x, x, p, n, z, z);      return 0; }   The output is:     getbits(63892 (f994), 4, 3) = 5 (5)   I get portions of this, but am having trouble with the "big picture," mostly because of the bits (no pun intended) that I don't understand.  The part I'm specifically having issues with is the complements piece: ~(~0 &lt;&lt; n). I think I get the first part, dealing with x; it's this part (and then the mask) that I'm struggling with -- and how it all comes together to actually retrieve those bits. (Which I've verified it is doing, both with code and checking my results using calc.exe -- thank God it has a binary view!)  Any help? 2 prong to 3 prong outlet help $a+1,a-1$ invertible for nilpotent element Given a ring $R$ (with unity), prove that if $a \in R$ is nilpotent, then $a+1,a-1$ are both invertible.   Suppose $a^n=0$. Then $1=1-a^n=(1-a)(1+a+\ldots+a^{n-1})$, so $1-a$ is invertible.  If $n$ is odd we can use $1+a^n=(1+a)(1-a+\ldots+a^{n-1})$.  But what if $n$ is even? Changing Unsubscribe reason through SSJS I noticed that you can unsubscribe a user , is it possible to use SSJS to change the unsubscribe reason?  I notice that doing it through ? why is that?  Thanks Entry to The US before 30-day grace period for student visa The F student visa allows me to enter the US up to 30 days before the program starts. For starting to set up things it is of my interest to arrive sooner than that. How hard is it to travel there beforehand with a tourist visa (waiver) and leave to, say Mexico, to then re enter on a proper date within the 30 days with the student visa? This seems easier than requesting for a status change inside the US from tourist to student.. How to use custom icons with mapKit framework? I understand that the eigenvectors of a linear transformation are the vectors that, when transformed, are simply scaled by a factor of the corresponding eigenvalue. Therefore $$ A\vec{x}=\lambda\vec{x}. $$ We can replace the scaling of the vector $\vec{x}$ by $\lambda$ with its equivalent linear transformation, $\lambda I$. Then we can rearrange this equation as follows: $$ A\vec{x}-(\lambda I)\vec{x}=\begin{bmatrix}0\\0\end{bmatrix}\\  (A-\lambda I)\vec{x}=\begin{bmatrix}0\\0\end{bmatrix}\\  $$ For this to be true either $\vec{x}$ must be a zero vector or the transformation $A-\lambda I$ must have $\vec{x}$ in its null-space. The course I'm following says that we can solve for $\lambda$ by finding when the determinant of $A-\lambda I$ is zero, but why does that guarantee that $\vec{x}$ will become the zero vector when transformed by $A-\lambda I$? I understand that for $\vec{x}$ to be an eigenvector this transformation must have a determinant of zero, but I don't see how the inverse can be true; having a determinant of zero doesn't gaurantee that $\vec{x}$ will be transformed into the zero vector. For example, let $$ (A-\lambda I) = \begin{bmatrix}1&amp;2\\0&amp;0\end{bmatrix}, \vec{x}=\begin{bmatrix}1\\1\end{bmatrix} $$ Then, although $\det\begin{bmatrix}1&amp;2\\0&amp;0\end{bmatrix} = 0$, it does not gaurantee $(A-\lambda I)\vec{x}$ to be the zero vector. $$ \begin{bmatrix}1&amp;2\\0&amp;0\end{bmatrix}\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}3\\0\end{bmatrix}  $$ We can see that the transformation gives us $\begin{bmatrix}3\\0\end{bmatrix}$ and not the zero vector. Why does finding when the determinant of this transformation is equal to zero help us find the eigenvectors? Am I missing something?