I've got a QGIS processing script which displays progress in the message bar, using the code in the .   It displays properly at the beginning of processing, but my code calls some other processing algorithms from Grass, which also push messages to the message bar and override my progress bar. Is it possible to either set the default duration of these messages to something small like a second, or block the message entirely?   I tried an approach that connects the widgetAdded slot to a function to re-add the progress bar, but it's causing QGIS to crash. Here is the code:  def putBarBack():     iface.messageBar().widgetAdded.disconnect()     iface.messageBar().pushWidget(progressMessageBar, iface.messageBar().INFO)     iface.messageBar().widgetAdded.connect(putBarBack)  def run():        #set up progress bar     global progressMessageBar     progressMessageBar = iface.messageBar().createMessage("Processing...")     bar = QtGui.QProgressBar()     bar.setRange(0,100)     bar.setAlignment(Qt.AlignLeft|Qt.AlignVCenter)     progressMessageBar.layout().addWidget(bar)     iface.messageBar().pushWidget(progressMessageBar, iface.messageBar().INFO)      iface.messageBar().widgetAdded.connect(putBarBack)      # do some more processing here...      bar.setValue(25)      processing.runalg(grass7:r.watershed)      bar.setValue(75)      #do some more processing      bar.setValue(100)
When using processing tool in pyqgis and run, it always creates a progress bar. Is there a way to disable it?  processing.runalg('qgis:fixeddistancebuffer', _layer, distance_tolerance, 10, False, None)   I want to disable it because I get this error when I run my script in travis:     wrapped C/C++ object of type QProgressBar has been deleted See log for   more details       RuntimeError: wrapped C/C++ object of type QProgressBar has been   deleted
How do you beta test an iphone app? How can you beta test an iPhone app?  I can get it on my own device, and anyone that gives me a device, I can run it on theirs, but is there a way to do a limited release via the app store for beta testing?  Related: Also, see  on getting your app onto phones without using the App Store. I am moving from Malaysia to the US, and planning to bring my desktop computer with me. I plan to pack it in my checked-in luggage. Will the computer risk being damaged? Any precaution should I take to reduce this risk? Will there be any trouble with the airline or immigration about bringing computer? deleting windows system folder I am running Ubuntu 20.04 an  with an NVIDIA GeForce GTX 1660TI GPU. According to , the driver version for this GPU is 430. When I first installed Ubuntu, I installed 440. I'm now trying to correct that and install 430. I ran sudo apt-get install nvidia-driver-430, and then did a reboot. When I examined nvidia-smi, though, it still showed the 440: +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  GeForce GTX 166...  Off  | 00000000:01:00.0 Off |                  N/A | | N/A   55C    P0     9W /  N/A |      0MiB /  5944MiB |      0%      Default | +-------------------------------+----------------------+----------------------+  What is the appropriate way of updating this driver? What are reaching fouls in the NBA? When a player tries to steal the ball from a dribbling player, the referees sometimes award a "reaching foul". I just can't see any difference between a steal and a foul Let $f\in C^{\infty}(\mathbb{R},\mathbb{R})$ such that $f(x)=0$ on $\mathbb{R}$\ $(-1,1)$. Prove that there exists $n\in\mathbb{N}$ such that $f^{(n)}$ has at least n+1 zeros on $(-1,1)$  My attempt :   Assume $f$ is strictly positive  (if not n=0 works). Let $Z(f^{(n)})$ the number of zeros of $f^{(n)}$ on $(-1,1)$. Then we have: $$ \forall n\in\mathbb{N}:\;f^{(n)}(-1)=f^{(n)}(1)=0 $$ so that iterating the Rolle theorem to the successive derivatives of f we have  $$  \;Z(f^{(k+1)}) \geq Z(f^{(k)}) +1 $$ thus, by induction : $$ \forall n\in\mathbb{N}: \;Z(f^{(n+1)}) \geq Z(f^{(n)}) +1 $$ Therefore, $$ Z(f^{(n)}) \geq n $$ How can I find an another zero ?   I'm still looking for an another proof which does not use the lemma ..,  Thank you in advance. Karn, the Great Creator - what defines a 'card from outside the game' in sealed? In the upcoming set 'War of the Spark' there is the Planeswalker . His -2 ability reads as:      -2: You may choose an artifact card you own from outside the game or in exile, reveal that card and add it to your hand    Now my question is, in a sealed tournament, like the Prerelease, is a player allowed to also choose cards from outside his sealed cardpool, or only out of the cards therein. Does anyone know any rulings on stuff like that? If I want to find the continued fraction of $\sqrt{n}$ how do I know which number to use for $a_0$? Is there a way to do it without using a calculator or anything like that? What's the general algorithm for computing it? I tried to read the wiki article but was overwhelmed and lost. I tried Googling but couldn't find a website that actually explained this question.  If anyone has a good site that answers these questions either, please let me know. Thanks! Question  I calculated the classical heat capacity of a diatomic gas as $C_V = (9/2)Nk_B$, however the accepted value is $C_V = (7/2)Nk_B$.  I assumed the classical Hamiltonian of two identical atoms bound together as $$ H = \dfrac{1}{2m}( |\bar{p}_2|^2 + |\bar{p}_2|^2)+ \dfrac{\alpha}{2} |\bar{q}_1-\bar{q}_2|^2. $$ I calculated the partition function of $N$ particles as $$ Z = \left( \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} e^{-\beta H} ~d^3q_1~d^3p_1~d^3q_2~d^3p_2 \right)^N \propto V^N T^{(9/2)N}. $$ I calcuated the heat capacity as $$ C_V = \dfrac{\partial }{\partial T} \left( k_B T^2 \dfrac{\partial \ln(Z)}{\partial T} \right) = \dfrac{9}{2}k_BN. $$  Why does the classical argument fail?  Classical Derivation  The partition function is \begin{align} Z &amp;=&amp; \left( \frac{1}{h^6} \int \mathrm{e}^{- \beta H(\bar{q}_1,\bar{q}_2,\bar{p}_1,\bar{p}_2)} ~d^{3}q_1 ~d^{3}q_2 ~d^{3}p_1   ~d^{3}p_2 \right)^N \\&amp;=&amp; \left( \frac{1}{h^6} \int \mathrm{e}^{- \beta ((|\bar{p}_1|^2+|\bar{p}_2|^2)/(2m)+\alpha |\bar{q}_1-\bar{q}_2|^2/2)} ~d^{3}q_1 ~d^{3}q_2 ~d^{3}p_1   ~d^{3}p_2 \right)^N \end{align} A useful gaussian integral \begin{align} \int_{-\infty}^{\infty} e^{-\gamma (x-x_0)^2}dx = \sqrt{\dfrac{\pi}{\gamma}} \end{align} The partition function can be evaluated using separated integrals \begin{align} \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta |\bar{p}_1|^2} ~d^{3}p_1 = \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta |\bar{p}_2|^2} ~d^{3}p_2 = \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \end{align} and \begin{align} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta \alpha |\bar{q}_1-\bar{q}_2|^2/2 } ~d^{3}q_1 ~d^{3}q_2 = \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 \iiint_{-\infty}^{\infty}  ~d^{3}q_1 = \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 V \end{align} The last set of integrals are improper integrals. One has to take the limit as the space approaches infinite containment. In that limit, integrating one set of variables $d^3q_2$ approaches the limit of a finite Gaussian term, while the other $d^3q_1$ approaches the diverging value of the total volume of the gas.  The partition function is \begin{align} Z &amp;=&amp; \left( h^{-6} \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 V \right)^N \\&amp;=&amp; \left( h^{-6} \left(k_B T \pi\right)^{9/2} \left( \dfrac{2}{\alpha} \right)^{3/2} V \right)^N \\&amp;=&amp; \left( h^{-6} \left(k_B \pi\right)^{9/2} \left( \dfrac{2}{\alpha} \right)^{3/2} \right)^N V^N T^{9N/2} \end{align} As a mod when should I vote to close content that is not flagged? I know mods are supposed to step in to quickly close seriously problematic posts and otherwise allow the community to vote to close a post.  But what about when there are four close votes on a question, and I personally feel the question should be closed but isn't worthy of mod super-mega closing? Should I cast the final vote like a normal user (even though it's technically binding) or should I sit back and wait  for the community?  For me the problem is complicated because on UX.SE we hover close to the point where there's not enough high-rep activity to quickly close posts and I was one of those high rep users that used to VtC.  Should I always treat my mod close vote as binding and reserve it for extreme situations, or should I treat my close vote as "normal" when it's the fifth and final vote anyway? Fastest way to convert string to integer in PHP What's better here - a single column or multicolumn primary key? Let's assume you have a table groups and a table item. Each item belongs to exactly one group. It is an inherent part of that group. An item cannot exist outside of a group and it cannot be moved to another group.  When trying to decide on a primary key for the item table, what should I use?  Should I make up an artificial global serial key like this:  CREATE TABLE items (     item serial PRIMARY KEY,     group integer NOT NULL REFERENCES groups(group), );   ... or should I rather use a composite key and per-group item serial like this:  CREATE TABLE items (     group integer NOT NULL REFERENCES groups(group),     item integer NOT NULL,      PRIMARY KEY(group, item) );   The reason why I'm leaning more towards the second solution is that the post URL will always show the group and item, so it makes sense to have both of them as the composite primary key. In case of the first solution, the URL contains superfluous information because the group ID can already be deduced from the item ID alone. The URL structure is given, however, and cannot be changed.  The disadvantage of the second solution is that you have to manage a per-group serial (i.e. each item integer should start from 0 for each group).  What's better in terms of best practices, normalization and performance? Or is it simply a matter of taste? How to convert mediawiki syntax to latex? When training a neural network using the back-propagation algorithm, the gradient descent method is used to determine the weight updates. My question is: Rather than using gradient descent method to slowly locate the minimum point with respect to a certain weight, why don't we just set the derivative $\frac{d(\text{Error})}{dw}=0$, and find the value of weight $w$ which minimizes the error? Also, why are we sure that the error function in back-propagation will be a minimum? Can't it turn out the error function is a maximum instead? Is there a specific property of the squashing functions that guarantees that a network with any number of hidden nodes with arbitrary weights and input vectors will always give an error function that has some minima? I've seen videos of some folks having several armor sets (4 is the most I've seen so far) standing about on their settlement. I'm wondering if having too many would cause some sets to disappear. They're not like guns/items that you can safely store in settlement crates, the suits kind of just... stand around. (I know there's the extra step of taking out the fusion cores, so that NPC's don't use them.)  Is there a limit to the number of Power Armor sets you can keep? Prove $\binom{n}{a}\binom{n-a}{b-a} = \binom{n}{b}\binom{b}{a}$ I want to prove this equation, $$ \binom{n}{a}\binom{n-a}{b-a} = \binom{n}{b}\binom{b}{a} $$ I thought of proving this equation by prove that you are using different ways to count the same set of balls and get the same result. But I'm stuck. Help me please.   (Presumptive) Source: Theoretical Exercise 1.14(a), P19, A First Course in Pr, 8th Ed, by S Ross. What are the various physical mechanisms for energy transfer to the photon during blackbody emission? By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant? Is "life" a countable noun in English? I am a learner of English. Sometimes I see an article (a and the) before the noun (life) but sometimes I also see the noun without any article. So I am confused when should I use an article before the noun and when I should not. Please check the examples and let me know are they correct?     Examples:      His life is an awesome life.      I want to get a beautiful life.      I like the life he lived. How to randomize (shuffle) a JavaScript array? How do I sort a vector of pairs based on the second element of the pair? If I have a vector of pairs: std::vector&lt;std::pair&lt;int, int&gt; &gt; vec;  Is there and easy way to sort the list in increasing order based on the second element of the pair? I know I can write a little function object that will do the work, but is there a way to use existing parts of the STL and std::less to do the work directly? EDIT:  I understand that I can write a separate function or class to pass to the third argument to sort.  The question is whether or not I can build it out of standard stuff.  I'd really something that looks like: std::sort(vec.begin(), vec.end(), std::something_magic&lt;int, int, std::less&gt;());