I have a group which contains x number of layers. I can connect the group's node  signal to a simple print function so that when the group is toggled, a message is printed to the console.  The issue is that the message is printed x times (the number of layers in the group) + 1 (the group node itself).   Is there a signal which is only emitted once when the group node is toggled?   I tried searching in the  and  classes but I seemed to have missed it.    A simple example:  def print_me():     print 'something'  group = QgsProject.instance().layerTreeRoot().findGroup('myGroup') group.visibilityChanged.connect(print_me)
I need to update a vector layer's data when the visibility is turned back on.  My update does not occur when the visibility is off.  To what signal do I need to connect to catch the visibility change?
So I get a square matrix $A$ is idempotent when $A^2 = A$.  How can you prove that if $A$ is an $n \times n$ matrix that is idempotent and invertible, then  $A = I$??  I'm quite confused on this.  Any help much appreciated, Thanks. Are there any guarantees in JLS about order of execution static initialization blocks? My employer didn't send me W-2 for December 2015. In fact, he told me that I wasn't on payroll for the two months(Dec/Jan) I worked for them so I am not sure whether he will be able to generate W-2 for me or not. I am wondering should I call IRS and inform them about the same, and probably they will call the employer? Or should I report my December 2015 earnings as Miscellaneous and report to IRS while filing taxes? Or what other options do I have? I am a non resident alien on F-1 Visa. My employer also has not paid me full salary as promised, which I am discussing with him.  Also, I got paid by check in January month for my December payment, so I am wondering does this apply for 2015 tax filing as I got paid in January 2016? Double-clicking a window’s title bar to minimize it in Mavericks After upgrading to Mavericks I’m no longer able to minimize a window to the Dock by double-clicking on its title bar. How do I get this functionality back? How to shrink Windows 7 boot partition with unmovable files I have just bought an HP laptop with Windows&nbsp;7 (64 bit). It has a 500&nbsp;GB HDD with three partitions: a small hidden system partition, a 12&nbsp;GiB HP recovery partition, and a 450&nbsp;GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100&nbsp;GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20&nbsp;GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows&nbsp;7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows&nbsp;7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions. "did shoot" vs "shot" This morning I read this sentence (see ):     On July 24th and again on July 29th,   Egyptian police did shoot dead unarmed   African migrants attempting to cross   that border.   Why "did shoot" and not "shot"? The cow in the field problem (intersecting circular areas) What length of rope should be used to tie a cow to an exterior fence post of a circular field so that the cow can only graze half of the grass within that field?  updated: To be clear: the cow should be tied to a post on the exterior of the field, not a post at the center of the field. java.lang.IllegalArgumentException: The servlets named [X] and [Y] are both mapped to the url-pattern [/url] which is not permitted How to add item to right-click menu when NOT selecting a folder or file? How do I add a menu item to my context menu to open up powershell (or any other arbitary application) when I right-click inside Windows Explorer?  I found tons of links on how to add menu items when doing this: (selecting a folder; )    ...but couldn't find any instructions on how to add menu items when doing this: (not selecting a folder or file)    I did find  and tried adding powershell to HKEY_CLASSES_ROOT\Directory\Background\shell\, (loosely based on the  and linked above) but it didn't work for me.  I'm running Windows 7, by the way.  Also, I'm currently interested in adding only PowerShell, but I'd prefer a general solution I can apply to add any program to the context menu. What are the most appropriate datum and projection I could use for the Gulf coast region - spanning  Louisiana, Mississippi, Alabama, and Florida? I have to analyze block group data along the coast. In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop? When can an autonomous system be written using a Hamiltonian? What are alternatives to ExtJS? So what I'm looking for is a javascript framework I can use that has several UI controls. I have taken a look at  but those controls are very basic compared to ExtJS. Are there any other competitive alternatives?     This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. More info: . Why won't this command work? /summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}   I'm using this as a recycler villager, and I can't get the first trade to work. What's going on? When do we use "at" and "in" with "arrive" talking about place, not time? I notice that the space between each column of a table in LaTeX is not quite wide (at least for me). Is there any way to set this? I found the \hspace, but I don't get how to use this in the table. 750Gig Hard Drive shows full with only 315Gigs used This works as expected:  $ echo a b c | xargs --replace="{}" echo x "{}" y x a b c y   This does too:  $ echo a b c | xargs --max-args=1 echo x x a x b x c   But this doesn't work as expected:  $ echo a b c | xargs --max-args=1 --replace="{}" echo x "{}" y x a b c y   And neither does this:  $ echo a b c | xargs --delimiter=' ' --max-args=1 --replace="{}" echo x "{}" y x a y x b y x c  y   I expected this output:  x a y x b y x c y   As a workaround, I am using printf and two xargs, but that is ugly:  $ echo a b c | xargs printf '%s\0' | \ &gt; xargs --null --max-args=1 --replace="{}" echo x "{}" y x a y x b y x c y   Any idea why this is happening? Suppose $G$ has odd order, show the function $f:G\rightarrow G$ defined by $f(x)=x^2$ is injective. This proposition is easily provable if we assume $G$ is Abelian, but I don't know how to start this without the assumption of being Abelian. How to `bundle install` when your Gemfile requires an older version of bundler?