python 2 vs python 3 class with __iter__
Build a basic Python iterator
How to insert text before the first line of a file? How can I make a part of a texture glow? With powershell get exactly the same application list as in Add/Remove programms There are various methods to find installed applications on the system but to my knowledge none returns exactly the same list as control panel item Add Remove Programs. Some of the ways I tried are:   WMI via Win32_Product and Win32Reg_AddRemovePrograms Registry, both x32 and x64 branches   For instance, I have 217 entries in AR and   gwmi  Win32_Product   returns 261 items.  gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | ? {![string]::IsNullOrWhiteSpace($_.DisplayName) } | select DisplayName   returns 119 items.   (gwmi Win32Reg_AddRemovePrograms) + (gwmi Win32Reg_AddRemovePrograms64) | sort DisplayName -Unique    returns 107 items.  I tried to nail it down with more complex filter that included InstallLocation, InstallSource, InstallDate etc without success. Player A taps  targeting Player B; its "deals 1 damage to target player" ability is placed on the stack.  Player B gets priority and responds with , targeting Goblin Fireslinger.  Both players pass priority. Snap resolves, and Goblin Fireslinger is returned to its owner's hand.  Does Player B still take 1 damage from Goblin Fireslinger's activated ability?  I know that if the creature had been killed/sent to the graveyard, the ability would still resolve, but I was told recently that because a player's hand is a private zone it couldn't. If anyone could confirm or deny this for me, it would be most appreciated. Rsync filter: copying one pattern only I am trying to create a directory that will house all and only my PDFs compiled from LaTeX. I like keeping each project in a separate folder, all housed in a big folder called LaTeX. So I tried running:  rsync -avn *.pdf ~/LaTeX/ ~/Output/   which should find all the pdfs in ~/LaTeX/ and transfer them to the output folder. This doesn't work. It tells me it's found no matches for "*.pdf". If I leave out this filter, the command lists all the files in all the project folders under LaTeX. So it's a problem with the *.pdf filter. I tried replacing ~/ with the full path to my home directory, but that didn't have an effect.  I'm, using zsh. I tried doing the same thing in bash and even with the filter that listed every single file in every subdirectory... What's going on here?  Why isn't rsync understanding my pdf only filter?    OK. So update: No I'm trying  rsync -avn --include="*/" --include="*.pdf" LaTeX/ Output/   And this gives me the whole file list. I guess because everything matches the first pattern... What causes the permittivity and permeability of vacuum? When light travels through a material, it gets "slowed down" (at least its net speed decreases).  The atoms in the material "disturb" the light in some way which causes it to make stops on its path.  This is expressed in the material's permittivity and permeability:  Its ability to transmit electromagnetic waves.  But then what causes the limited permittivity and permeability of vacuum?  There are no atoms there to disturb the light, so what is keeping it from travelling at infinite speed?  Is there a special property of space itself which determines the speed of light?  Or is it the virtual particles in vacuum which interact with the light? What is the benefit of launching a satellite "a few days before the monthly report" I've seen this hint in the game as well as on this site and I've been wondering if there is any specific advantage to launching satellites closer to the monthly report rather than any time during that month.  The way I see it, monthly maintenance costs are taken out during the reports (correct me if i'm wrong), so regardless of when you launch it during the month it would cost the same.   Is the benefit of holding on to them longer simply a safety net in case some countries go into the red during that time? Let $a, b$ be elements of a group $G$. Suppose that a has order $5$ and that $a^3b = ba^3$. I want to show that that $ab = ba$.  Here is what I think:   We know that we have $a^1, a^2, a^3, a^4, a^5 = 1$. So, $a^4 = a^{-1}$ and $a^3 = a^{-2}$ and $a^{2} = a^{-4}$. Now,   $a^3b = ba^3$ then $a^{-2}b = ba^{-2}$ then $ba^2 = a^2b$ then $ba^{-4} = a^{-4}b$ then $a^{-1}b = ba^{-1}$ then multiply on the left and right by $a$ to get $ba=ab$. Is this correct or is there a simpler approach? Name for the center amplitude of a sine wave I am trying to find the name for the value at the center of a sine wave $$ y(t) = A\sin (kx \pm \omega t+\varphi) + D $$ i.e. the offset $D$ of the wave in the $y$-direction.  calls it Center Amplitude, but further googling this name is difficult and does not provide any further sources. I also found the expression , but I'm not sure that it refers to the same thing. Is there a commonly used name for the $y$-direction-offset of a sine wave? Vertical uniform circular motion.. can it really be uniform? This is the picture in my mind:    For centripetal force, I learned that: $T-mg\cos\theta= \frac{mv^2}{r}$  In vertical circular motion, the velocity is naturally going to decrease as kinetic energy is converted to potential energy as the particle moves up the circle- and thus resulting into a non-uniform circular motion.  However, I was told that if tension changes accordingly, the velocity will remain constant(as from the equation). What I do not get about this part of the explanation is that which force will balance mgsinθ (tangential force in the diagram  )? Java and manually executing finalize Can I submit an edit for approval after earning 2k reputation? I have now enough reputation points on Stack Overflow to edit every post directly. But sometimes (especially if this is about a field where I'm not savvy, or when I try to edit a question title without having understood the question itself) I might be not totally sure about whether my edit really is an improvement.  For now, I have these options:   Do the edit anyway, hope that someone else will catch it if it is wrong Don't do the edit, and hope that someone else will see this post and edit it in the right way Let a comment and hope that someone will see it (either after editing or instead of it). Flag the post for moderator attention (but will the moderators know it better?) Search the right chat room to find someone who knows more about the topic.   All these are not really optimal, I think.  I would like to have a check box     [_] Submit this edit for approval   which, when checked, would submit the edit into the usual edit approval queue. Then I would get at least one or two other pairs of eyes looking over my edit, and maybe even improving it.  (I don't really care about the +2 reputation for the edit - I think it should be without any reputation difference here.)  There's an  for nearly giving everyone the ability to suggest edits that the post owner can approve, but I'm simply interested in being able to insert them into the general edit queue where anyone can approve them.  Actually, I could do this right now by having a low-reputation sock puppet (or a totally anonymous edit), but I think this is not the intended use for sock puppets, is it? Also, I would like to be able to get feedback for my edit. I'm a bit confused in describing 1.5hrs in words.   Is writing one and a half an hour correct or should it be one and half hour?  E.g:     I'll see you there in one and a half an hour.     OR       I'll see you there in one and half hour.   Or is there any other correct way of writing this? Transfer game license So the problem is that account 1 and account 2 bought a game together, but account 1 isn't used anymore. Can we transfer the game license from account 1 to account 3?   The game was bought on account 1 and account 2 activated account 1 as primary. The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by $\sum_{k=1}^{n-1} {n-1 \choose k-1} k^{k-2} (n-k)^{n-k-2}$.  I am unsure how to approach this question. Could someone guide me through the proof? If G is a spanning tree and it is disconnected then I know it is a spanning forest. Also, I know by Cayley's thm that there are $n^{n-2}$ nonequal tree on a vertex set V = {1, 2, ...,n} which is where i'm assuming the $k^{k-2}$ comes from but I do not understand where the rest of it is coming from. This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked.  How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"? Does app review rejection list all issues? Our app was rejected recently with reason Google+ signin, which we understood is not according to Apple policy and need to fix.  While discussing about this issue we came across an interesting question with Apple review process, does Apple review team list all issues (if more than one exists) while rejecting app (or) would they stop reviewing other areas as soon as they found an issue (in our case Google+ signin)? What is covariance in plain language and how is it linked to the terms dependence, correlation and variance-covariance structure with respect to repeated-measures designs? DNS, multiple nameservers and geolocation? Currently, when a DNS client makes a request for a DNS record (say, www.example.com., it needs to traverse the DNS tree. It asks the root servers for the location of com., which it then asks for the location of example.com., which it then asks for the location of www.example.com.. Thankfully, much of this is cached.  If example.com. has multiple, geographically diverse NS records listed, my understanding is that these are listed in random order to avoid all queries going to the first (or last) NS record listed.  This would appear to imply that a DNS resolver in Australia could choose a NS record for a nameserver that's located far away, perhaps in Europe, when there may be another authoritative nameserver that is much closer.  So, my question is: Is there any provision within the DNS spec to allow DNS resolvers to select an authoritative nameserver that's local to them? The only way I can see to achieve this is to have the NS records behind an anycast address and do local resolution that way. Would this work? Is there any other option? How to show the inequality for $\int_{0}^{\pi/4}\tan^n(x) dx$ I can't seem to figure out the inequality option, I substituted n=2 for the answer bit is there any elegant way of getting it?