New Programmer: For Loops and While Loops(python)
Understanding slice notation
How do I install the Tor Browser Bundle in Ubuntu? In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu? Should I be able to 'manually' rotate the headset? How can I add the session name to my screen status display? This is my current .screenrc files which is mostly copied from the link in the code  #First iteration 2014-09-06, not quite sure of stuff to add # got a fancy hardstatus line noted below hardstatus on hardstatus alwayslastline # hardstatus string "%w"  # blagged this hardstatus like from https://bbs.archlinux.org/viewtopic.php?id=55618, not quite sure what it does hardstatus string '%{= kG}%{C}Screen: %{c}%{= kG}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %d-%m %{W}%c %{g}]'   I now want the session name to appear in it as well, and the one I have settled on is from this answer -   The solution runs along these line:  hardstatus string '%H:%`' backtick 0 30 30 sh -c 'screen -ls | grep --color=no -o "$PPID[^[:space:]]*"'   It is an area I am not familiar with and I wonder how the backtick command fits in it, ie whether it is a screen command at all. Generate three correlated uniformly-distributed random variables Lagrangian of Schrodinger field The usual Schrodinger Lagrangian is $$ \tag 1 i(\psi^{*}\partial_{t}\psi ) + \frac{1}{2m} \psi^{*}(\nabla^2)\psi, $$ which gives the correct equations of motion, with conjugate momentum for $\psi^{*}$ vanishing. This Lagrangian density is not real but differs from a real Lagrangian density  $$ \tag 2 \frac{i}{2}(\psi^{*}\partial_{t}\psi -\psi \partial_{t}\psi^{*} ) + \frac{1}{2m} \psi^{*}(\nabla^2)\psi $$ by a total derivative.  My trouble is that these two lagrangian densities lead to different conjugate momenta and hence when setting equal time commutation relations, I am getting different results (a factor of 2 is causing the problem). I can rescale the fields but then my Hamiltonian also changes. Then applying Heisenberg equation of motion, I don't get the operator Schrodinger equation.   Is it possible to work with the real Lagrangian density and somehow get the correct commutation relations? I would have expected two Lagrangians differing by total derivative terms to give identical commutation relations (since canonical transformations preserve them). But perhaps I am making some very simple error. Unless all conjugate momenta are equivalent for two Lagrangians differing by total derivatives, how does one choose the correct one?   I guess the same thing happens for other first order systems like Dirac Lagrangian also. STM32 & ST-LINK - Cannot connect to MCU after successful programming I have built my own board with STM32F7-45VGT6. I have successfully programmed it with ST-LINK v2 (not the original one though) and now I cannot even connect with MCU.  I use ST-Link Utility from ST and SWD interface. It can be the case that I use SWD pins as output and in my code I set them as GPIO output. Can it be the case?  Nevertheless, I connect my reset pin to GND and set "Connect under reset" option in ST-Link Utility but it doesn't work... What can I do?  On the Internet, I have found something about using BOOT0 Pin, but I don't know exactly... Let $\Omega$ be a region in the complex plane and let $f_1$ and $f_2$ be holomorphic functions on $\Omega$ having no common zero. Show that there exist holomorphic functions $g_1$ and $g_2$ on $\Omega$ such that, $f_1g_1+f_2g_2$ is identically equal to one on $\Omega$. How can I copy from Tmux terminal and paste it other application in my OS? I am using tmux on ubuntu. I read this  for copy and paste inside tmux. But I would like to know how can I copy from TMUX terminal and paste it to other application e.g browser in my OS? It's been sometime and Google has yet to index my site. How can I get Google to index my website? Are there naturally occurring lasers? Are there perfect elastic collisions in Nature? I have a quick question about buttons that toggle between two states. (Think Play/Pause, or Shuffle/Regular Play.) As the title says, should the toggle show it's current state or the state to which it will transition?  I think people are used to the Play/Pause convention. But the Shuffle/Regular play might be more confusing if you show the transition state instead of current. For example, the built-in music player on the Xbox 360 does it this way: when it's in shuffle mode, it shows the icon for direct play and vice versa and it always confuses me (am I in shuffle mode or straight play).  I see it this way: Play/Pause is more like action as in begin playing or pause playing. Yes behind the scenes it is a state transition but to the user, there is an action. Whereas Shuffle/Straight Play is an option and it's best to show the current state (and possibly have only one icon and change button to show that the option is enabled/disabled). Thoughts? I am trying to write an if statement to test whether there are any files matching a certain pattern. If there is a text file in a directory it should run a given script.  My code currently:  if [ -f /*.txt ]; then ./script fi   Please give some ideas; I only want to run the script if there is a .txt in the directory. Deriving curvature formula How do you derive the formula for unsigned curvature of a curve $\gamma (t) = (x(t), y(t)$ which is not necessarily parameterised by arc-length.   The formula given is $$|\kappa (t)| = \left|\frac{x'' y' - y'' x'}{((x')^2 + (y')^2)^{3/2}}\right|$$  All the definitions of curvature in my notes give it in terms for an arc-length parameterisation $T'(s) = \kappa(s) N(s)$. This is apparently meant to be 'easily derivable', am I missing something? Cardinality of a totally ordered union While I can post external texts into question and answer bodies, it preserves the old font style, spacing and size (although the markdown display won’t be affected by that.)   App Version: 1.6.6.2 Device: iPhone 6 OS Version: Version 11.0.3 (Build 15A432) Assuming I have an ArrayList  ArrayList&lt;MyClass&gt; myList;   And I want to call toArray, is there a performance reason to use  MyClass[] arr = myList.toArray(new MyClass[myList.size()]);   over  MyClass[] arr = myList.toArray(new MyClass[0]);   ?  I prefer the second style, since it's less verbose, and I assumed that the compiler will make sure the empty array doesn't really get created, but I've been wondering if that's true.  Of course, in 99% of the cases it doesn't make a difference one way or the other, but I'd like to keep a consistent style between my normal code and my optimized inner loops... Can I complete the Pokedex with only 6th Generation games? Given $\int_0^{\infty}e^{-x^2}dx = \frac{\sqrt{\pi}}{2}$, evaluate $\int_0^{\infty}e^{-a^2x^2-\frac{b^2}{x^2}}dx $ Given $$\int_0^{\infty}e^{-x^2}dx = \frac{\sqrt{\pi}}{2}$$ evaluate:   $$\int_0^{\infty}e^{-a^2x^2-\frac{b^2}{x^2}}dx. $$   I can find that  $$\left(ax+\frac{b}{x}\right)^2 = a^2x^2+2ab+\frac{b^2}{x^2}$$  therefore: $$\int_0^{\infty}e^{-a^2x^2-\frac{b^2}{x^2}}dx = e^{2ab}\int_0^{\infty}e^{-\left(ax+\frac{b}{x}\right)^2}dx$$  but I can't find any clue then. How to rename file as below  AS1100801000002.RAW7AGS  AS1100801001008.RAW7AH4 AS1100801002001.RAW7AH9 AS1100801003002.RAW7AHE AS1100801004009.RAW7AHT AS1100801005002.RAW7AHY AS1100801010002.RAW7AJ3   to new name  AS1.txt AS2.txt AS3.txt AS4.txt AS5.txt AS6.txt AS7.txt