I have a div that has text that is right aligned.  I want to then center that div within its parent.  The code below only applies the right-alignment.  CSS  .outerDiv {     text-align: center;     width: 100%; }  .innerDiv {     text-align: right;     width: auto; }   HTML  &lt;div class="outerDiv"&gt;     &lt;div class="innerDiv"&gt;         10&lt;br/&gt;         &lt;span style="border-bottom: 1px solid black"&gt;             + 2         &lt;/span&gt;&lt;br /&gt;         12     &lt;/div&gt; &lt;/div&gt;   I know this can be done with using margin-left: auto; margin-right: auto in the outer div, but that requires that you set the inner div's width, which I don't know ahead of time.  Ideas?
How can I horizontally center a &lt;div&gt; within another &lt;div&gt; using CSS? &lt;div id=&quot;outer&quot;&gt;   &lt;div id=&quot;inner&quot;&gt;Foo foo&lt;/div&gt; &lt;/div&gt;
Canonical replacing Unity with gnome-shell in Ubuntu 18.04 what now? The default desktop environment in Ubuntu 18.04 is going to be gnome-shell instead of Unity 8.  Does this mean development of Unity is stopped? or just that we can expect it to be beta a bit longer?  source on  post by Mark Shuttleworth. phoronix also posted about it  and here about the How to fix 'android.os.NetworkOnMainThreadException'? How to prevent ENTER keypress to submit a web form? The  claims that likelihood and probability are distinct concepts.     In non-technical parlance, "likelihood" is usually a synonym for "probability," but in statistical usage there is a clear distinction in perspective: the number that is the probability of some observed outcomes given a set of parameter values is regarded as the likelihood of the set of parameter values given the observed outcomes.    Can someone give a more down-to-earth description of what this means?  In addition, some examples of how "probability" and "likelihood" disagree would be nice. Why would I vote for an increase in the number of authorized shares? For some reason, be it some bad habit or something else, I can not understand why the statement "p only if q" would translate into p implies q. For instance, I have the statement "Samir will attend the party only if Kanti will be there." The way I interpret this is, "It is true that Samir will attend the party only if it is true that Kanti will be at the party;" which, in my mind, becomes "If Kanti will be at the party, then Samir will be there."   Can someone convince me of the right way?  EDIT:  I have read them carefully, and probably have done so for over a year. I understand what sufficient conditions and necessary conditions are. I understand the conditional relationship in almost all of its forms, except the form "q only if p." What I do not understand is, why is p the necessary condition and q the sufficient condition. I am not asking, what are the sufficient and necessary conditions, rather, I am asking why. I can't figure out how to line up the symbols of an itemize environment in beamer with the left part of the main text. In other words, I would like to supress the left margin in beamer itemize lists.  It would be nice if the solution worked with any itemize label defined with  \setbeamertemplate{itemize item}[]   In order to make myself clearer, what beamer produces by default is something like:  Main text. Main text. Main text...    * Item 1    * Item 2    * Item 3    ....   and the desired result is   Main text. Main text. Main text... * Item 1 * Item 2 * Item 3 .... How do I replace the *first instance* of a string in .NET? Can I bring a pack of razor blades on a plane? I have to take a flight soon and I want to know if I can take a pack of razors with me. They are in a pack that is designed to not let any out unlesss a person really wants to open it. I'm going to the USA so, can I?  I mean plain old razor blades: Is it possible to get a list of most recently installed packages? Material setings in properties window is missing Balancing long table inside multicol in LaTeX I would like to put some longer tabular data inside the multicols environment while maintaining its balancing abilities. I have tried supertabular with the trick to redefine \newpage as columnbreak. This isn't good though, because the columns aren't properly balanced. Finally I ended up using \halign:  \documentclass[11pt, a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage{supertabular} \usepackage{multicol}  \def\shortlipsum{\par Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.\par}  \newcounter{entryno} \setcounter{entryno}{1} \def\tabline{Test &amp; \the\value{entryno} &amp; Description\addtocounter{entryno}{1}\\} \def\tablines{\tabline\tabline\tabline\tabline\tabline} \def\mybreak{\hrule width \columnwidth height 0pt \columnbreak}  \begin{document} \begin{multicols}{2} \shortlipsum \medskip  % % This doesn't balance the columns. Whole table ends up in the left column (it fits) % \begingroup\let\newpage\mybreak % \noindent\begin{supertabular*}{\columnwidth}{@{\indent}l l l} % \tablines\tablines\tablines\tablines\tablines\tablines % \end{supertabular*} % \endgroup  \begingroup\let\\\cr \noindent\halign{\indent#\quad&amp;#\quad&amp;#\hfil\cr \tablines\tablines\tablines\tablines\tablines\tablines} \endgroup  \medskip \shortlipsum \end{multicols} \shortlipsum \end{document}     I was wondering if I'm the only one using \halign to achieve this result. On the other hand supertabular leaves me with an undesired almost empty right column. How would you approach this problem? How is Leibniz's rule for the derivative of a product related to the binomial formula? Possible Duplicate:          The  describes the expansion of the $n$th power of the sum $(a+b)$:  $$(a+b)^n = \sum_{k = 0}^n {n\choose k}a^kb^{n-k}$$  In calculus, there is a generalization of the product rule called , which describes the expansion of the $n$th derivative of the product of two functions $f$ and $g$:  $$(fg)^{(n)} = \sum_{k = 0}^n {n\choose k}f^{(k)}g^{(n-k)}$$  It's not difficult to prove using the product rule and induction, what I'm really trying understand here is why the formula is true. Is there a way to prove it using the binomial formula? How are these two formulas related? Is there a combinatorial proof for Leibniz's rule like there is for the ?   I understand this question is a bit vague, but I hope you'll agree that these two formulas look so similar it just feels like there should be some relation between the two. Of course this is not necessarily true, but I'm hoping it's not just a crazy coincidence. Has a double slit experiment ever been done using a track chamber or even contemplated? I tried searches and the question has been posed in other fora, but no experiment came up.   Track chambers (cloud chambers, bubble chambers , time projection chambers, solid state detectors like the vertex detectors at LHC)  give the track of the particle as it ionizes the  medium, and could be carried out in geometry after the particle has passed the double slit. The straight track should be pointing back to the slit it came from and its record could be used as the points on the screen in the classical double slit experiment.  The set up as I see it would be the classical setup for single electron through the double slits but instead of a "screen" one has a detector and detects the track.  It should be a long enough detector to get an accuracy less than the slit difference so it could point back to the slit, as the interslit distance is of the order of 100 microns and detectors are giving order of microns accuracies.  This experiment, if possible,  would resolve the controversy whether the detection of the slit destroys the interference pattern or the  at the slits change the boundary conditions and destroy the interference pattern.  An expert's opinion is necessary whether the experiment is possible, whether the energies of the electrons to show interference with a specific d separation is enough to create an accurate track in a solid state detector. If not a cloud chamber would do , but again the energy of the electron would be important because it would have to pass the barrier air/chamber.  It could succeed if the double slits were within a cloud/ bubble chamber; the beam count was low  (10 to twelve per picture) but it was spread in the vertical direction. If the beam could be focused on the slits , it should be doable. How to get a DOM Element from a jQuery selector? Since Ubuntu 11.10 use a new kernel, it's very difficult to have a decent support for virtualization.   VirtualBox doesn't support guest additions for ubuntu 11.10, so I can't copy to and from my ubuntu desktop and windows, which I absolutely require, plus FreeBSD seems not to be able to use DHCP without guest additions.  Virt-manager instead gives an error on launch:  Unable to open a connection to the libvirt management daemon.  Libvirt URI is: qemu:///system  Verify that:  - The 'libvirt-bin' package is installed  - The 'libvirtd' daemon has been started  - You are member of the 'libvirtd' group   unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Permission denied  Traceback (most recent call last):   File "/usr/share/virt-manager/virtManager/connection.py", line 1146, in _open_thread     self.vmm = self._try_open()   File "/usr/share/virt-manager/virtManager/connection.py", line 1130, in _try_open     flags)   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth     if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Permission denied   The problem is solved by running virt-manager as root, but I don't like that. How do I change permissions to run Virt-Manager as user?  Is there a way to install guest additions on Ubuntu 11.10? If $\sum{a_n}$ converges does that imply that $\sum{\frac{a_n}{n}}$ converges? I know if $\sum{a_n}$ converges absolutely then $\sum{\frac{a_n}{n}}$ converges since $0\le \frac{|a_n|}{n} \le |a_n| $ for all $n$ so it converges absolutely by the basic comparison test and therefore converges. However, I cannot prove the convergence of $\sum \frac{a_n}{n}$ if $\sum{a_n}$ converges but not absolutely even though I suspect it to be true. Can you give me a proof or a counterexample for this? We know that continuous version of $\sum$ is $\int$, but, can there be a continuous version of $\Pi$? There are five boxes consisting of several identical coins. There are five boxes consisting of several identical coins. The first box contains 4 coins, the second box contains 9 coins, the third box contains 7 coins, the fourth box contains 10 coins, and the fifth box contains 3 coins. Some coins are taken from the boxes such that at least a coin taken from each box. In how many ways in taking the coins, such that the numbers of the coins taken are 12?  My attempt was solving it using repetition combination of which, there are only seven coins remaining considering that at least a coin taken from each box. By using the repetition combination, i.e. taking 7 from 9 (five boxes and four borders), resulting in 36 ways. However, there is no 36 ways in the choices. Why do people have darker skin in sunnier climates?