How to frame an environment like \minipage and others in a frame box.     Note: I tried \fbox and never worked, I always get errors   This is my code   \fbox{ \begin{minipage}{\linewidth} \small \begin{verbatim}  [2018-05-25 19:21:48 EDT] iverilog '-Wall' design.sv testbench.sv  &amp;&amp; unbuffer vvp a.out   a=  2, b=  5, outsum=  7, true_sum=  7, cout=0 a=  2, b= 34, outsum= 36, true_sum= 36, cout=0 a=  2, b= 63, outsum= 65, true_sum= 65, cout=0 a=  2, b= 92, outsum= 94, true_sum= 94, cout=0 a=  2, b=121, outsum=123, true_sum=123, cout=0 a=  2, b=150, outsum=152, true_sum=152, cout=0 a=  9, b=  5, outsum= 14, true_sum= 14, cout=0 a=  9, b= 34, outsum= 43, true_sum= 43, cout=0 a=  9, b= 63, outsum= 72, true_sum= 72, cout=0 a=  9, b= 92, outsum=101, true_sum=101, cout=0     a=  9, b=121, outsum=130, true_sum=130, cout=0 a=  9, b=150, outsum=159, true_sum=159, cout=0 a= 16, b=  5, outsum= 21, true_sum= 21, cout=0 a= 16, b= 34, outsum= 50, true_sum= 50, cout=0 a= 16, b= 63, outsum= 79, true_sum= 79, cout=0 a= 16, b= 92, outsum=108, true_sum=108, cout=0 a= 16, b=121, outsum=137, true_sum=137, cout=0 a= 16, b=150, outsum=166, true_sum=166, cout=0 Done \end{verbatim}  \end{minipage}}   and this the errors I got     Paragraph ended before \@xverbatim was complete. \end{minipage}}      Extra }, or forgotten \endgroup. \end{minipage}}      Improper \prevdepth. \chapter      Missing \endgroup inserted. \chapter      Missing } inserted. \chapter
Typically, to box in some text, I use the following:  \fbox {     \parbox{\linewidth}{     This is some text! Blah blah blah...     } }   However, say I have a verbatim block within that. It will never compile. Anyone know how I could draw a box around text which contains a verbatim block? I should note that I want to be able to draw a box around not just a verbatim block. For example, I would want to draw a box around something like:  This is text. \begin{verbatim} This is some more text. \end{verbatim} And this is even more text.
I upgraded my Mega Ring and have been looking for Mega Stones, and I found . However, the Mega Stone isn't in the place it's supposed to be, and I'm sure the location is right. Why isn't my Mega Stone here? Prove that $\sum\limits_{k=0}^m\binom{m}k\binom{n}{r+k}=\binom{m+n}{m+r}$ using combinatoric arguments. Prove that $$\sum\limits_{k=0}^m\binom{m}k\binom{n}{r+k}=\binom{m+n}{m+r}$$ using combinatoric arguments.   I prefer you to answer using an analogy to a combinatoric problem or else I'll have trouble understanding.  I tried:  Let $m$ represent a group of boys and $n$ represent a group of girls. We want to form a committee with the condition that there must be $r$ more girls than boys on the committee. There's two ways of doing this. (I'm having trouble with the right-hand side.)  The left-hand side is one way of doing this. So we split the problem to different cases. One such case is where there are no boys on the committee, and so, there's $\binom{m}0\binom{n}{r+0}$ ways of forming a committee. Next, we can have 1 boy on the committee. There's $\binom{m}1\binom{n}{r+1}$ ways to do this. We repeat this process until we have $\binom{m}k\binom{n}{r+k}$ ways of forming a committee. Summing up the cases will result in the right-hand side. However, as stated before, I don't really know how to explain the right-hand side. Maybe I used the wrong analogy? Question mark or bold citation key instead of citation number Square root of an inverse gamma distributed random variable I work on the grouped t copula and try to replicate part of the following paper: &quot;The t copula with Multiple Parameters of Degrees of Freedom: Bivariate Characteristics and Application to Risk Management&quot;, Luo &amp; Shevchenko (2010). My Question: I need the distribution of the following random variable: $$ Y = \sqrt{\frac\nu X} $$ where X is Chi square distributed with v degrees of freedom. I found out that the following random variabe Z is inverse gamma distributed with alpha = v/2 and beta = v/2, $$ Z = {\frac\nu X} $$ So, basically I am looking for the distribution of the square root of an inverse gamma distributed random variable. Do you have any ideas? How to show to the user a progression in a script? Show that the sequence $a_{n+1}=a_{n}+\dfrac{a^2_{n}}{n^2}$ is upper bounded Let $\{a_{n}\}$ be defined with $a_{1}\in(0,1)$, and  $$a_{n+1}=a_{n}+\dfrac{a^2_{n}}{n^2}$$ for all $n\gt 0$.  Show that the sequence is  upper bounded.  My idea: since  $$a_{n+1}=a_{n}\left(1+\dfrac{a_{n}}{n^2}\right)$$ then $$\dfrac{1}{a_{n+1}}=\dfrac{1}{a_{n}}-\dfrac{1}{a_{n}+n^2}$$ then $$\dfrac{1}{a_{n}}-\dfrac{1}{a_{n+1}}=\dfrac{1}{a_{n}+n^2}$$ so $$\dfrac{1}{a_{1}}-\dfrac{1}{a_{n+1}}=\sum_{i=1}^{n}\dfrac{1}{a_{i}+i^2}$$ since $$a_{n+1}&gt;a_{n}\Longrightarrow \dfrac{1}{a_{i}+i^2}&lt;\dfrac{1}{a_{1}+i^2}$$ so $$\dfrac{1}{a_{n+1}}&gt;\dfrac{1}{a_{1}}-\left(\dfrac{1}{1+a_{1}}+\dfrac{1}{2^2+a_{1}}+\cdots+\dfrac{1}{a_{1}+n^2}\right)$$ But the RHS might be $\lt0$ for a sufficiently large starting value; for instance, with $a_{1}=\dfrac{99}{100}$ then $$\dfrac{1}{a_{1}}-\left(\dfrac{1}{1+a_{1}}+\dfrac{1}{2^2+a_{1}}+\cdots+\dfrac{1}{a_{1}+n^2}\right)&lt;0,n\to\infty$$  see:   so this method won't let me bound the series and I don't know what else to do. How hard do early-career academics in the United States work, really? I'm finishing a PhD in Sweden this year and seeking a post-doc in the United States (atmospheric remote sensing).  It is clear that a job in academia is not a nine to five job; nor do I want it to be.  I often work late in the evening when I'm on a productive spur.  When an important dead-line is coming up, one needs to work harder, and there is no overtime paid.  I accept that.  However, no matter how much I'm interested in my research, I do enjoy and need a reasonable amount of spare time, too; relaxing on the weekends, occasionally a long weekend away, and sometimes a longer trip, such as three weeks in the wilderness.  Regarding the normal work ethos for early-career academics in the United States, I have a hard time judging what is normal and what is excessive.  Some examples:    warning post-docs that he expects all of the members of the group to work evenings and weekends. My apparent naïveté in believing that , despite Wikipedia  as a rest from work, or a hiatus, often lasting from two months to a year.  I was thinking of my friend, who spent a year between his PhD and his first post-doc travelling from France to Mongolia mostly on foot. Someone  I am not a good role model, but when I don't work on a Sunday, I count that as a vacation day.  having no employment-related benefits such as paid vacations, sick leave, or unemployment compensation. Question    We don't have such a work-ethos where I'm at.  I belief that working too hard risks stress and burn-out, and does not increase productivity in the long run, nor human well-being.  I want to do science.  Doing science makes me happy, but having time to relax while not doing science is important for me.  Does the selection of examples I gave above represent a normal situation in U.S. early-career academia?  Should I expect an attitude where asking for a 3-week holiday during the summer is considered as being not serious, or is the situation in practice usually not as bad as the examples above make it sound?  How hard to early-career academics in the United States work, really? I think we all understand the necessity of delete when reassigning a dynamically-allocated pointer in order to prevent memory leaks. However, I'm curious, to what extent does the C++ mandate the usage of delete? For example, take the following program  int main() {      int* arr = new int[5];      return 0; }   While for all intents and purposes no leak occurs here (since your program is ending and the OS will clean up all memory once it returns), but does the standard still require -- or recommend -- the usage of delete[] in this case? If not, would there be any other reason why you would delete[] here? Does removing an application from Software Center do a remove or a purge When I remove an application already installed through the Software Center. Does it remove the app the same way as doing a purge to it (aptitude purge) or does it remove it like a "remove" (aptitude remove). Copy/duplicate database without using mysqldump Continuing enumerate Counters in Beamer I'm trying to continue the numbering of examples in enumerate environments in beamer. For example, I'd like one slide to feature   Foo Bar   and the next slide   Zip Yadda   My strategy so far has been to define a counter that saves the enumerate counter at the end of the first environment and can then be queried to set the enumerate counter at the start of the second enumerate environment. (This is essentially the proposal also found at )  That works wonderfully so long as I don't try to uncover elements of the slide sequentially. The problem, of course, is that as each of the pdf-pages that make up the slide is created, the counter is advanced. Here's a MWE.  \documentclass{beamer}  \setbeamercovered{highly dynamic}  \newcounter{saveenumi} \newcommand{\seti}{\setcounter{saveenumi}{\value{enumi}}} \newcommand{\conti}{\setcounter{enumi}{\value{saveenumi}}}   \begin{document}  \begin{frame}[&lt;+-&gt;]   \begin{enumerate}   \item foo   \item bar%     \seti   \end{enumerate} \end{frame}  \begin{frame}[&lt;+-&gt;]   \begin{enumerate}     \conti   \item zip   \item yadda%     \seti   \end{enumerate} \end{frame}  \end{document}   As the second slide is progressively uncovered (pages 3 and 4 of the resulting PDF), the counter at the beginning of the enumerate environment is advanced each time. So page 3 of the PDF has the right numbering, (3) and (4) respectively, while the fully revealed page has the wrong numbering. Pictures follow:   on one of the slides    on the following one I read this story a long time ago and cannot remember either the title or the author. It was written in the 60s or 70s. The setting is sometime in the 21 century.  Here is a summary of the plot.  One of the great classical composers (maybe it was Schubert, I'm not sure) is revived with some future technology. All the guys in the lab are very happy about it, the world cheers the achievement. The composer is also quite excited to be alive. Naturally, he is asked to perform a concert. He asks for ink and music paper. Nobody knows what that is: in those days everybody writes music directly in "frequency spectrum" and similar stuff.  The composer, excited to create music again, tries to come up with something but he doesn't like anything he writes. The music is well written, but lacks something essential, it doesn't sound like his real music. Finally, the composer realizes that the lab guys recreated his mind from reviews by music critics, and his music just sounds like that. He performs the concert. The audience enjoys it, applauds and bravos. Not only to composer, but also to the lab guys.   At the end, if I remember it right, the composer gloats over the  primitive taste of the audience. The audience who writes music in frequency spectrum and applauds to lab guys at the music concert did not see the failure in the concert and ate it as it is.  Does someone recognize the story?  PS all the recent talk of advent of AI machines with Machine Learning algorithms reminded me of this story. Is it possible for an encryption method to exist which is impossible to crack, even using quantum computers? Quantum computers are known to be able to crack  a broad range of cryptographic algorithms which were previously thought to be solvable only by resources increasing exponentially with the bit size of the key. An example for that is .  But, as far I know, not all problems fall into this category. On , we can read     Researchers have developed a computer algorithm that doesn’t solve problems but instead creates them for the purpose of evaluating quantum computers.   Can we still expect a new cryptographic algorithm which will be hard to crack using even a quantum computer? For clarity: the question refers to specifically to the design of new algorithms. In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="&lt;funny characters here&gt;" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user. Can I store my pixels somewhere so I don't lose them when I die? I die all the time. My pixel balance hovers around zero as a result. I'm trying to save up for armor but my nonstop deaths are making that difficult.  Is there anywhere I can store my pixels so that when I die, I won't lose a bunch of them? Problem with "scopes" of variables in try catch blocks in Java Write access without read access Is it possible for a user to have a write access to a file and not be able to read it? How is it possible?   I tried the following commands:  debianbox@debian:~/posix/io$ touch filetest debianbox@debian:~/posix/io$ ls -l filetest -rw-r--r-- 1 debianbox debianbox 0 14 oct.  03:10 filetest  debianbox@debian:~/posix/io$ echo "Hello World" &gt; filetest debianbox@debian:~/posix/io$ cat filetest Hello World  debianbox@debian:~/posix/io$ chmod u-r filetest debianbox@debian:~/posix/io$ cat filetest cat: filetest: Permission forbidden  debianbox@debian:~/posix/io$   As you can see here, I have write but not read access on this file. How can this be possible? Is this considered as a bug? If not, in what situation would this be useful? Hide some fields in the NewForm.aspx for a custom list I have 5 columns in the custom list. Out of which only 3 have to displayed in the NewForm.aspx page.  All of the 5 columns have to be displayed on the EditForm.aspx page. While googling, I have come across the following  :  When I implemented the code that was given on this page, I get an error which says that parentNode is not found. Please guide me how can I implement this requirement.  Any other alternatives other than this are also appreciated. Lookup Tables Best Practices: DB Tables... or Enumerations If we have to store the available positions at a company (i.e. Manager, Team Lead, ... etc). What are the best practices for storing it? I have two opinions with comments... "sure, welcoming yours"        Storing it as DB table with columns ID and Name, and deal with it using queries and joins.     Storing it as Enum and forget about the DB table.    In my opinion, I will choose the first solution if I have changing items. So that I won't hard code these options as Enum. I may choose the Enum solution, if I have no doubt that data won't change (for example, Gender: Male, Female).  NOTE: I code in English, and the UI Culture may be Arabic. If I will work with the Enum Solution, I will hard code the culture-based strings in the presentation layer, is it okay from the best practices perspective!!!!  I would like to know your opinions and if my thoughts correspond to what is most recommended "Best Practices"?? How accurate is the location detection on the iPhone's Find My iPhone app