I have found some answers for this, but they were all outdated and didn't work. So I'm making a kind of battle royale type minigame in vanilla minecraft, and all I have left is seeing how many players are left. So I need to emit a redstone signal once only 1 player is in adventure mode. Currently, I am putting dead players in spectator mode.
I want to run a command when there are only 10 entities left. I know you can use /execute unless entity to detect when all matching mobs have died, but it doesn't work if you want to run a command when there are for example 10 entities left.  A command like /execute if entity @e[limit=10] does not work, it also triggers if there is only one entity.  Such a counting system could also be used to determine once there is only one player left in an arena, meaning they have won a battle or similar.
How many distinct ways to climb stairs in 1 or 2 steps at a time? (Fibonacci puzzle) There is a very interesting puzzle for Fibonacci sequence:     You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb $1$ or $2$ steps. In how many distinct ways can you climb to the top?   The answer is Fibonacci sequence: $F(n) = F(n - 1) + F(n - 2)$. The explanation is that you could reach the $n$th step either from the $(n - 1)$th step or $(n - 2)$th step.  What I fail to understand is why isn't the answer $F(n) = (F(n - 1) + 1) + (F(n - 2) + 2)$. Since, after reaching $(n - 1)$th step I have to take $1$ step to reach the $n$th step and after reaching $(n - 2)$th step I have to take another $2$ steps to reach the $n$th step.  I know I might be ignoring some very stupid detail but it's better to ask and be called a fool once than to remain a fool forever. When I use the MouseUp event, I can get it to fire with a mouse right-click. But MouseLeftButtonUp won't fire with either click!  &lt;Button MouseLeftButtonUp="btnNewConfig_MouseUp"  Name="btnNewConfig"&gt;     &lt;StackPanel Orientation="Horizontal"&gt;         &lt;Image Source="Icons\new.ico" Height="24" Width="24" Margin="5"/&gt;         &lt;TextBlock VerticalAlignment="Center"&gt;New&lt;/TextBlock&gt;     &lt;/StackPanel&gt; &lt;/Button&gt;   I know this is most likely something simple. Thanks for the help! Can you be tripped by an AoO while standing up? Does every Abelian group admit a ring structure? Diffeomorphism & Weyl transformations in the 2D worldsheet of string theory and the existence of conformal gauge D. Tong's , chapter 5 (), feature the following in introducing the symmetries used in the Faddeev-Popov method:     We have two gauge symmetries: diffeomorphisms and Weyl transformations. We will schematically denote both of these by $\zeta$. The change of the metric under a general gauge transformation is $g \rightarrow g^{\zeta}$. This is shorthand for,   \begin{equation} g_{\alpha \beta} (\sigma) \rightarrow g_{\alpha \beta}^{\zeta} (\sigma)= e^{2\omega (\sigma)} \frac{\partial \sigma^{\gamma}}{\partial \sigma'^{\alpha}} \frac{\partial \sigma^{\delta}}{\partial \sigma'^{\beta}} g_{\gamma \delta} (\sigma) \end{equation}   In two dimensions these gauge symmetries allow us to put the metric into any form that we like — say, $\hat{g}$. This is called the fiducial metric and will represent our choice of gauge fixing.   Is there a proof available that shows that the combined symmetry allows us to "put the metric in any form (locally, of course)?" Is this property restricted to two dimensions? Mongoose Sub Document Woes How to extract the n-th elements from a list of tuples? How to show that $\log (\frac{2a}{1-a^2}+\frac{2b}{1-b^2}+\frac{2c}{1-c^2})= \log\frac{2a}{1-a^2}+ \log \frac{2b}{1-b^2}+ \log \frac{2c}{1-c^2}$ If $\log (a +b +c) =\log a+\log b+\log c$ then show that $$\log \left(\frac{2a}{1-a^2}+\frac{2b}{1-b^2}+\frac{2c}{1-c^2}\right)= \log\frac{2a}{1-a^2}+ \log \frac{2b}{1-b^2}+ \log \frac{2c}{1-c^2}$$  Trial: If put $a=\frac{2a}{1-a^2}$ and the similar we are done. Can we do this in this way? Otherwise how to do. Please help. No internet after 16.04 LTS 18.04.01 upgrade This may seem like a duplicate, but many solutions have been unsuccessfully tried. Currently I have no internet, WIFI or Ethernet. Sometimes: "no wifi adapter found".  The device is HP dm4, dual boot with Windows 7.    Here is the  The issue started 3 weeks ago as no GUI after 16.04 LTS to 18.04.01 upgrade.  At that time, I was able to use the terminal to connect to the Internet and run "fixes" in   Then mysteriously, the GUI ran after restarting several times.  But since then, I am unable to connect to the Internet in the terminal or GUI.    There is a chatroom  about my issues.  sudo nmcli c up &lt;saved WIFI connection&gt;   only appears to connect.   sudo nmcli d wifi list   shows strong signal strength, but ping to google and nyt fails.   The phone I use as a hotspot shows a successful connection.    In the GUI Network Tools show the phone/hotspot recently used minutes ago, the Available Networks list shows the phone/hotspot as available with a check mark, but the "connect" button is grayed out and unfunctional.    REGDOMAIN=00 and attempts to change this has failed as others describe. I have a similar set up to the one described by cipricus in  and the situation described in How can I check if the editor that is currently being used is Gutenberg in a WordPress plugin?  I need this because Gutenberg lacks post_submitbox_misc_actions, so I need a fallback which will only be used if the current editor is Gutenberg. Maintaining Units of measure across type converstions In HLW8012 where should I connect the reference voltage (GND) In the , the both 33nF capacitors , 1K resistor and 0.1uF capacitor are connected to GND. I'm not sure where should I connect those ends of components marked with GND symbol, (To Live, To Natural or the DC GND). I can't read Chinese, I don't really know what everything mean there.  Live directly connects to the shunt resistor and this means that live is also GND (0 volt reference) for the chip? Should I connect those end of components marked as GND symbol to Live wire? My windows directory is huge I have always had problems with my windows directory's growing to a huge size.  It started with windows 95 then 98 then 2000 and xp.  Windows 7 however is absolutely huge.  The windows folder itself with out program files is 21.4 gigs...add the program files and other windows files and it is a whopping 32 gigs.  My question is why is it so large and what can I do about it.  At the rate this is going I will be out of space in now time. How to add a progress bar to a shell script? When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a progress bar is needed.  For example, copying a big file, opening a big tar file.  What ways do you recommend to add progress bars to shell scripts? Here is my script:  #!/bin/bash  echo "Digite o local em que deseja instalar o IGRAFU(pressione enter para  instalar em  ${HOME}/IGRAFO):" read caminho if test -z $caminho then caminho="${HOME}/IGRAFO" fi echo "O IGRAFU será instalado no diretório: $caminho" mkdir -pv $caminho  mv -v ./* $caminho echo "Pronto!"   At 'read caminho' I may receive from the user a path like ~/somefolder. When the script receives that kind of path both mv and mkdir won't make tilde expansion, so it will try to create a ~/somefolder and not /home/username/somefolder and therefore fail.  How do I ensure that the tilde will be converted into the HOME variable? If $\gcd(a,b)=1$, $\gcd(a,y)=1$ and $\gcd(b,x)=1$ then prove that $ax+by$ is prime to $ab$ If $\gcd(a,b)=1$, $\gcd(a,y)=1$ and $\gcd(b,x)=1$ then prove that $ax+by$ is prime to $ab$.  I tried assuming Diophantine Equations for all the relations and representing everything in terms of $a$, but that didn't lead me anywhere. There must be an intuitive and elegant approach right? Please see the following image, where you can find the inconsistency of SO reputation score among different flair themes (one with 7165, while all other three 7265).   I always thought that these four themes are based on the same data until now. Is this a bug? Are different flair themes really updated individually?    P.S.: The inconsistency only shows on my mobile, no problem from my desktop. Does IBIS reduce image resolution? How does it compare to lens based IS? How do I make Ubuntu not require a password to supend? Start codon AUG also codes for methionine and without start codon translation does not happen. And even the ambiguous codon GUG codes for methionine when it is first. So does this mean that all proteins start with methionine as the first amino acid.