Why does Python recognize certain variables which are outside of the body function (example with a list) but not others?
UnboundLocalError on local variable when reassigned after first use
This may be a stupid or trivial question, but I am new to Ubuntu, and have two unsolved problems (flashplayer doesn't play, and scanner doesn't work - in virgin install 13.04), so I started to search in documentation. In the 13.04 specific web site I was browsing the hardware section, and came across something like this: "Open Dash, and select Disk Utilities".  So what is Dash, and where is Disk Utilities?  The application finder could not find any of those. In terminal the "dash" command seems to invoke some sort of a shell. Adding a citation after paper is accepted I am a junior researcher in mathematics. I worked simultaneously on proving Theorem A and Theorem B. They both generalize Theorem X in two different directions. Theorem X was proved several years ago (not by me). The proofs of Theorem A and Theorem B use very different techniques, and so I decided ahead of time to write one paper for each.  I finished proving Theorem A before I finished proving Theorem B. Then, I submitted Paper A to a journal (and the arXiv) proving Theorem A. Paper A includes a survey of related problems in the introduction. After a short while, I managed to prove Theorem B, and two months after the submission of Paper A, I submitted Paper B (to a different journal, and also to the arXiv). Now, six months after the submission of Paper A, it is accepted with requests for minor corrections. There is no response yet regarding Paper B.     In this situation, is it a reasonable/common to add one/two sentences to the survey in introduction of Paper A, explaining and citing the arXiv prepreint of Paper B, in addition to the minor corrections the referees asked for? (and letting the editor and referees know that I did that in my answer to their reports which comes along with the corrected manuscript).   Note that I am not asking if it is ok to cite a preprint. This is something I do, and so do other people, at least in math. My question is about making a change, after acceptance, which was not asked by the referees and the editor. How to add custom C++ keywords to be recognized by Minted? Why do some Unicode text messages crash the iPhone OS? Hitting arrow keys adds characters in vi editor When I tried to use arrow keys in insert mode in vi editor the following characters are being inserted in the editor:   for ↓ I get B, for ↑ I get A, for ← I get D, for → I get C.   Please help me in resolve this problem. Let $V,W$ be nonzero normed spaces over $\mathbb{K}$ such that $V$ is finite-dimensional.  Let $E$ open in $\mathbb{K}$ and $p\in E$.  Let $f:E\rightarrow W$ be Gâteaux-differentiable at $p$.  Is $f$ necessarily Fréchet-differentiable at $p$ in this case?  I think this is not true in general, but cannot find a counterexample. What would be a counterexample? Image uploader shouldn't remove unused link references How can I get merit points? I want to advance in the ranks of Senator Lavigny-Duval. How can I get merit points? I know I can participate in expansion goals, but is there a better way than that? Is there any way to hide your Steam status from others? Is there any way to prevent others from seeing your Steam status without removing them as a friend?   Let's say I want to play Borderlands 2 without letting some friends know. Is there any way to hide my status to prevent them from knowing I'm playing it?  Basically, what I'm asking if Steam has an "Appear Offline" option. HDD SMART interpretation - Possible impending drive failure I've just had an issue pop up related to my drives.  First things first, I was working in my case when I clumsily shifted the foot of the case off of my desk. Case shifted and hit the desk somewhat hard, but only fell an inch or two. It had been properly shut down so this may not have anything to do with the issue.  After booting up, I noticed that when playing a video from my F: Drive (Seagate), it produced a whine, almost a chirping sound coming from the hard drive bay. I think I may have heard this before the drop, but quieter.  Fearing impending failure I downloaded GSmartControl and inspected the drive information. The Seagate drive displayed a high Raw Read Error Rate, as well as a high Seek Error Rate.  I've read some of these values can be high on Seagate drives from the start. This drive is about 6 months old and the producer of the noise.  I also checked my Toshiba drive, which came with a refurbished prebuilt I bought about a year ago. It showed more normal SMART data, but displayed some concerning statistics (2 "Mechanical Start Failures" and 2 "Reported Uncorrectable Errors").  Both of the drives passed the basic SMART test, but the noise was quite alarming. It would stop as soon as a paused the video and start right up again as soon as I resumed playing.  Here is an album with 3 photos of the SMART data, the Seagate did not display statistics.  Could I please have help interpreting the SMART data, and whether this may indicate an impending failure?   Thank you for your time.   Here are images of the SMART data. Install ffmpeg in Ubuntu 12.04 LTS Background :  I used ffmpeg to merge two videos side by side. First I install ffmpeg by following command as it suggest by Ubuntu itself.  sudo apt-get install libav-tools   or   sudo apt-get install ffmpeg   But then I realize it is not the correct version since it doesn't support for -filter_complex and few other functions.   After a few hours researcher I found  and I succeed with video conversion as well. As per that article, it is suggesting we need to build it our own.        Question :  What is easiest way to install that ffmpeg version (which is support for -filter_complex ) without following all those steps ? Is there always an equilibrium point in space for gravity? For instance, for a two-body system, there will always be a point in-between the two in which the forces of gravity completely cancel, and if I were there then I would experience no net force. I believe there is also a point, or a region, for three body systems as well. Assuming we treat the stars or planets as simply point-masses, will there always be, for any number of objects, a point, or a region, of equilibrium? Or no? Citation: refer to author or paper? What is the British English way of referring to a source in-text.  Is it plural because there are two authors, like this:         X and Y (2011) describe ...   Or is it singular because you are referring to a singular source, like this:     X and Y (2011) describes...   So what I am asking is whether you refer to the source or to the authors? I try to prove the following formula:  $$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$  I noticed that  $\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor &lt; k \leq \lfloor n/(p^{s}) \rfloor $ Create element in pdf that doesn't print to paper About the complex nature of the wave function? 1.  Why is the wave function complex? I've collected some layman explanations but they are incomplete and unsatisfactory. However in the book by Merzbacher in the initial few pages he provides an explanation that I need some help with: that the de Broglie wavelength and the wavelength of an elastic wave do not show similar properties under a Galilean transformation. He basically says that both are equivalent under a gauge transform and also, separately by Lorentz transforms. This, accompanied with the observation that $\psi$ is not observable, so there is no "reason for it being real". Can someone give me an intuitive prelude by what is a gauge transform and why does it give the same result as a Lorentz tranformation in a non-relativistic setting? And eventually how in this "grand scheme" the complex nature of the wave function becomes evident.. in a way that a dummy like me can understand.  2.   A wavefunction can be thought of as a scalar field (has a scalar value in every point ($r,t$) given by $\psi:\mathbb{R^3}\times \mathbb{R}\rightarrow \mathbb{C}$ and also as a ray in Hilbert space (a vector). How are these two perspectives the same (this is possibly something elementary that I am missing out, or getting confused by definitions and terminology, if that is the case I am desperate for help ;)   3.   One way I have thought about the above question is that the wave function can be equivalently written in $\psi:\mathbb{R^3}\times \mathbb{R}\rightarrow \mathbb{R}^2 $ i.e, Since a wave function is complex, the Schroedinger equation could in principle be written equivalently as coupled differential equations in two real functions which staisfy the Cauchy-Riemann conditions. ie, if $$\psi(x,t) = u(x,t) + i v(x,t)$$ and $u_x=v_t$ ; $u_t = -v_x$ and we get $$\hbar \partial_t u  = -\frac{\hbar^2}{2m} \partial_x^2v + V v$$ $$\hbar \partial_t v  = \frac{\hbar^2}{2m} \partial_x^2u - V u$$ (..in 1-D) If this is correct what are the interpretations of the $u,v$.. and why isn't it useful. (I am assuming that physical problems always have an analytic $\psi(r,t)$). Suppose a vibrating fork exerts force to the air particles to compress which leads to the increase of internal energy (heat).This heat or energy given by the fork is given to the next layer of air and in this way, this energy makes sound. But if it was so, it will be isothermal. And Laplace told it was adiabatic. How can it be? I am confused. The heat energy infact is the energy given by the fork. If it is adiabatic, how can the air pass this energy ? How do you perform a left outer join using linq extension methods Assuming I have a left outer join as such:  from f in Foo join b in Bar on f.Foo_Id equals b.Foo_Id into g from result in g.DefaultIfEmpty() select new { Foo = f, Bar = result }   How would I express the same task using extension methods? E.g.  Foo.GroupJoin(Bar, f =&gt; f.Foo_Id, b =&gt; b.Foo_Id, (f,b) =&gt; ???)     .Select(???) I saw a video where the person copied a material from one object to another (Cycles).  How can I accomplish this? In course of evolution (possibly), mammary glands became vestigial in male mammals, but became fully developed in females. Is there any plausible explanation for this characteristic?