I have a div tag with width set to 800 pixels. When the browser width is greater than 800 pixels, it shouldn't stretch the div, but it should bring it to the middle of the page.
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;
Directory index forbidden by Options directive How to obtain and use the .bbl file in my tex document for ArXiv submission? I am submitting my first article to ArXiv and in the instructions they specify I have to include the .bbl file. Their instructions are:  "We do not run BibTeX in the auto-TeXing procedure. If you use it, include in your submission the .bbl file that BibTeX produces on your own machine; otherwise your references will not come out correctly. We do not run BibTeX because the .bib database files can be quite large, and the only thing necessary to resolve the references for a given paper is the .bbl file. The name of the .bbl file must match the name of the main .tex file for the system to process the references correctly."  My knowledge of LaTeX is basic, and I have not heard of .bbl file before. I am using TeXmaker. I have my tex file and my bib file. So what do I exactly do to obtain the .bbf file correctly and submit the article?  Thanks a lot! hotel occupancy counting problem The multiple-choice question:  A hotel has four vacant rooms. Each room can accommodate a maximum of four people. In how many different ways can six people be accommodated in the four rooms? (A) 4020 (B) 4068 (C) 4080 (D) 4096.  My attempt:  If there were no 'four person' constraint, the six people could be accommodated in $4^6=4096$ ways. however, this number includes combinations with 5 or 6 people in one room, which should be excluded.  If one room has 5 occupants, one other room has 1 occupant. The number of '1,5' combinations is ${{4} \choose {2}}$=12. If one room has 6 occupants, the other three rooms have no occupants, and there are four such combinations.  I believe the answer should be $4096-12-4=4080$, but am not confident. I'd be grateful for any comments on my attempt. How to prove the function is a constant Let $f\in C[0,1]$ be such  that $\forall \phi\in C[0,1]$ with $\int_0^1\phi \, dx=0$,we have $\int_0^1f\phi \, dx=0$.  Then $f$ is constant.  May be someone can help me proof this problem. Thanks! In a bash script sometimes you need the user to wait some seconds for a background process to finish.  I usually use for example:  sleep 10   How can I add a kind of progressbar to the script, so the user knows how long to wait?  I installed the command bar but I don't understand the manual. Difference in System. exit(0) , System.exit(-1), System.exit(1 ) in Java According to , the SE chat sites may have individual Easter eggs, depending on the site. If you find them, please post. Because it's so easy to make this stuff up, a screenshot as proof would be nice. (Although Photoshop isn't that hard either...) I have a datetime column in MySQL.   How can I convert it to the display as mm/dd/yy H:M (AM/PM) using PHP? Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2} \right |\leq \left |b-c \right |$. Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2}  \right |\leq \left |b-c  \right |$. Give me a clue, I don't have any idea to work with that inequality. Counting binary operations on a set with $n$ elements I am trying to solve following problem but not able to find any way to proceed.  Let $S$ be a set having $n$ elements. Can we count about number of binary operations that can be defined on a set? Can we also count number of commutative binary operations defined on  $S$?  Thanks for the help and suggestions How to find the last field using 'cut' I have a question that says "Show that there is a bounded sequence $x_n$ which is not convergent but has the property that $x_n - x_{n+1} \to 0$ as $n \to 0$.  What does this mean? Do I need to come up with an example or does the problem actually want me to prove such proposition?  By the way, I see that this sequence looks like Cauchy because of $x_n - x_{n+1} \to 0$ as $n \to 0$, but it is obviously not. Is there a bulletproof way to know a file has been successfully decrypted? I am wondering whether there is a bulletproof way to know if one is successful in decrypting a file.   As an example, say I encrypt a text file and protect it with a 3 letter password. I use brute force to decrypt it, but two different passwords lead to a file that contains English intelligible text. Is there a way for me to know which one is the original one? In other words, is there an infallible way to know I've entered the password correctly? How to disable requiretty for a single command in sudoers? I want to disable requiretty so that I can sudo within scripts, but I'd rather only disable it for a single command rather than everything. Is that possible within the sudoers config? Definite article, repetition in lists Which would be correct?        The fridge, the shelves, the walls, the floor, and John himself, were all covered in foam.   The fridge, shelves, walls, floor, and John himself, were all covered in foam.      The the can be applied to all the nouns, so is there a need to repeat it? How can I override the OnBeforeUnload dialog and replace it with my own? List has no row exception: Queryerror I have below line placed in controller that fires list has no row exception. I just need to show a custom message instead when the query returns no value.   Apex code:  Id CI=[select Compliance_Incident_abv__c from Compliance_Incident_Transaction_abv__c where Name=:selectedCIT].Compliance_Incident_abv__c ;  //**This line throws error**     system.debug('CI@@'+CI);         if(cond != '')             cond += ' and';           else             cond += ' where ';                                        if(CI!=null)          cond += ' Id = \'' + CI+ '\''; Sobolev inequality If $f\in H^2(\mathbb R^2)$, I want to show that    $||f||_{L^\infty}\le c||f||_{H^2}$ $||f||_{L^\infty}\le c||f||_{H^1} [1+\ln(1+||f||_{H^2})]$   For 1, I use $||f||_{L^\infty}\le \sup_{x\in \mathbb R^2} |f|\le\int_{\mathbb R^2} |\hat f(\xi)|d\xi = \int(1+|\xi|^2)^{-1}(1+|\xi|^2)|\hat f(\xi)|d\xi \le (\int (1+|\xi|^2)^{-2}d\xi)^2(\text {which is integrable in this case})||f||_{H^2}\to \text{is this correct?}$   But for 2, I am stucked. How can I get the "ln"? and how can I make it into a product of $H^1$ and $H^2$ norm? I am currently running a Dungeons and Dragons 4 campaign for a group of 9 players.  Whittling the group down to a more manageable size is not really an option since they are all family.  When we do combat it takes forever even if I have one player help me and allow them to go 2 at a time.  When we do story based adventure there are 2-3 players that do most of the talking and the others twiddle their thumbs.  I've tried encounters with many foes, encounters with only a few tough foes, dialog only encounters, social puzzle encounters, everything I can think of.  What else can I try to get this group more engaged? Compute $E(X\mid X+Y)$ for independent random variables $X$ and $Y$ with standard exponential distributions Being $X$ and $Y$ independent random variables distributed as $\mathrm{Exponential}(1)$ and let $T=X+Y$ Calculate $E(X|T)$.  This is my attempt at solving this:  Being $Z=\sum_{i=1}^{n}P_{i}$ where $P_{i}$~$\mathrm{Exp}(\lambda)$ then using it's MFG you have that $$M_{P_i}(t)=\frac{\lambda}{\lambda-t}$$ then $$M_{Z}(t)=M_{\sum{P_{i}}}(t)=(M_{P_{1}})...(M_{P_{n}})=(\frac{\lambda}{\lambda-t})^n$$ with this being the MFG of a $\mathrm{Gamma}$ distribution with parameters $(n,\lambda)$  With this result is easy to see that $T$~$\mathrm{Gamma}(2,1)$  Now $E[X|T]=\int xf_{X|T}(x|t)dx$  Then using Bayes' theorem we can make $$f_{X|T}(x|t)=\frac{f_{T|X}(t|x)f_{X}(x)}{f_{T}(t)}$$ then $$f_{T|X}(t|x)=Pr(T=t|X=x)$$ $$=Pr(X+Y=t|X=x)$$ $$=Pr(x+Y=t|X=x)$$ $$=Pr(Y=t-x)=f_{Y}(t-x)$$  Using this result we can now rearrenge $$f_{X|T}(x|t)=\frac{f_{Y}(t-x)f_{X}(x)}{f_{T}(t)}$$ $$=\frac{e^{-(t-x)}.e^{-x}}{\frac{te^{-t}}{\Gamma(2)}}$$ $$=\frac{1}{t}$$ then $$E[X|T]=\int (x)(\frac{1}{t})dx$$  And this where I got stuck because $1_{x\epsilon(0,\infty})$, I made this explanation step-by-step hoping that someone can se easily check where I went wrong. I would aprecciate a step-by-step answer, thanks.