Beginner at Python : Exiting inner for loop soon as completing the job
How to break out of multiple loops?
Why is the observable universe so big? I have a question pertaining to the concept of acceleration and it's formula - Both seem to give me different answers.  I was asked:     A train is moving at a velocity of $20\ \mathrm{m/s}$. It hits the breaks and starts slowing down at the rate of $8\ \mathrm{m/s^2}$. How long does it travel before coming to a stop?    $a=-8\ \mathrm{m/s^2}$ $u=20\ \mathrm{m/s}$ $v=0$ $s=?$ (Displacement is asked)   According to the formula of $s= \frac{(v^2-u^2)} {2a}$, answer I got was 25 meters.  BUT!  My concept of acceleration explains me this :    According to my intuition of acceleration and velocity, when  an object is said to be accelerating at $-8\ \mathrm{m/s^2}$, it means that with every passing second, it's velocity will reduce $8\ \mathrm{m/s}$. So,   At 1st second - Velocity = $20\ \mathrm{m/s}$ - It'll travel 20 meters. At 2nd second - $v = 20\ \mathrm{m/s}-8\ \mathrm{m/s}=12\ \mathrm{m/s}$ -  Train travels 12 meters At 3rd, it travels 4 meters. At 4th, it halts.   So total is 20+12+4 = 36 meters. It travels 36 meters before halt.  Where am I going wrong in my conceptual understanding, I really don't understand! I have a set of aerial images which I am trying to clip by their overlapping areas, for use in a more involved program I am writing.  Is there a command line based tool out there with an easy method for extracting the overlapping areas from a pair of images?  The images themselves do not have georeferencing, but they DO come with a shapefile containing bounding boxes of the image collects, as well as IMU data from image collection.  I know this may be difficult since the images will have slight perspective differences, but I was hoping it would still be possible--especially since I am trying to maintain and utilize these perspective differences for something else. How to combine two QUERY results into one column I have the following QUERY  =query(XX!A2:A;" select A where A&gt;'50' ")   and  =query(YY!A2:A;" select A where A&gt;'50' ")   how do I combine these two data sources so I don't have to have two separate columns they process data to?   best would be if the 1st row from XX is followed by the 1st row of YY, 2nd row followed by 2nd row... and so on If the above option is not easily possible, it is OK for one query to be followed by the second one (if I expect correctly that the start of the second will be moved with newly added data into the first one) How to align right within equation array Is the Stack Exchange engine that powers Stack Overflow available to download or install internally for an enterprise or company?  I think Stack Exchange's engine is very great and could be very cool to use for internal enterprise patterns and practices, like the engine of Wikipedia. How do you unlock the Dream Suite? What's the difference between terms 'link function' and 'canonical link function'? Also, are there any (theoretical) advantages of using one over the other?  For example, a binary response variable can be modeled using many link functions such as logit, probit, etc. But, logit here is considered the "canonical" link function. User is able to edit a file using vim I have a file named file.txt with some contents located in /home/myuser directory and I change the permissions of that file to root.root and 644.   -rw-r--r-- 1 root root 1.4K Jan 15 07:09 file.txt   Then I switched to myuser and opened it with vim(without sudo) and tried to edit and save it :wq! and I got output like:  "file.txt" E949: File changed while writing Press ENTER or type command to continue   Then I hit enter and then again :wq! and the output was :  WARNING: The file has been changed since reading it!!! Do you really want to write to it (y/n)?   I hit y, the file got saved and exit from vim.  The question is why a file with ROOT privileges and read-only access for a user changed by the way?  PS: 1. myuser is a sudo user.   The user permissions after saving the file changed to myuser.myuser as well.  -rw-r--r-- 1 myuser myuser 1.4K Jun 27 18:57 file.txt Does being granted a Schengen visa and not going have any consequences? I'm granted a one-entry Schengen visa and now I can't go. Will having an unused visa in my travel passport have any consequences like future visas refusal? Do I need to do anything special? What is the origin of "a cut above/below the rest"? $\|h(x)-h(y)\|\geq 3\|x-y\|$ prove that image of open is open What does the "private" modifier do? Considering "private" is the default access modifier for class Members, why is the keyword even needed? Why is $\mathbb{Z}[\sqrt{-n}], n\ge 3$ not a UFD? In what order should you do linear regression diagnostics? In linear regression analysis, we analyze outliers, investigate multicollinearity, test heteroscedasticty.   The question is:  Is there any order to apply these? I mean, do we have to analyze outliers very firstly, and then examine multicollinearity? Or reverse?    Is there any rule of thumb about this? I try to unzip a zip file, but got an error:  $ unzip COCR2_100.zip  Archive:  COCR2_100.zip   End-of-central-directory signature not found.  Either this file is not   a zipfile, or it constitutes one disk of a multi-part archive.  In the   latter case the central directory and zipfile comment will be found on   the last disk(s) of this archive. note:  COCR2_100.zip may be a plain executable, not an archive unzip:  cannot find zipfile directory in one of COCR2_100.zip or         COCR2_100.zip.zip, and cannot find COCR2_100.zip.ZIP, period.   I googled but didn't find a solution. I was wondering why it is and how I should fix it? Thanks!  The zip file can be downloaded from . It is an application, and here is its website .  My OS is 10.10. I believe it's a common practice in some communities to name children after their grandparents or parents or relatives and sometimes even friends and popular people. Places, roads, streets etc., get named after famous people, too. Many inventions and discoveries have been named after people who invented or discovered them.  But I am not yet aware of a term that refers to the person whose name is given to people, places or objects this way. Is there a suitable word to fill in the blank below?     They named their son after the famous football player, David Beckham.      David Beckham is .......... of their son. Are there any rules for adjudicating a ranged attack fired at a target engaged in melee combat with an ally? While running a session recently, one of the players chose to "assist" his companion who was in melee with a goblin, by firing an arrow at the pair of them. I couldn't find any particular rules for this scenario so just had him roll at a disadvantage, counting a miss as a hit on his companion (damage to be ascertained by a second roll).   This seemed to work okay, and became a running joke for the night as the arrow bounced off the companions back, but are there specific rules for this scenario? QGIS update from 2.14 to 2.16 failed on Ubuntu 14.04 Until yesterday my whole qgis and python-qgis worked fine with version 2.14 under Ubuntu 14.04. After a simple sudo apt-get update and sudo apt-get upgrade qgis failed to update... Several attempts to reinstall it with different versions failed.  Current error message (for version 2.14.3) goes like this:  qgis-providers (2.14.3+dfsg-2~trusty1) is configured ... /usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: GEOSDelaunayTriangulation_r   I also tried to reinstall all gdal libraries - not sure if I got all?!  Maybe it is somehow related to this one:  ?  UPDATE:  Trying to install version 2.16.0 it gives different but similar error:  /usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libqgis_core.so.2.16.0: undefined symbol: GEOSNearestPoints_r   UPDATE Sources:  For version 2.16.0 there are these sources in /etc/apt/sources.list:  deb http://qgis.org/debian trusty main deb-src http://qgis.org/debian trusty main deb http://qgis.org/debian trusty main deb-src http://qgis.org/debian trusty main   which are all the same, right?   When I do apt-cache policy qgis it gives me:  qgis:   Installiert:           1:2.16.0+20trusty   Installationskandidat: 1:2.16.0+20trusty   Versionstabelle:  *** 1:2.16.0+20trusty 0         500 http://qgis.org/debian/ trusty/main amd64 Packages         100 /var/lib/dpkg/status      2.0.1-2build2 0         500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages fastest way to detect if a value is in a group of values in Javascript I have a group of strings in Javascript and I need to write a function that detects if another specific string belongs to this group or not.  What is the fastest way to achieve this? Is it alright to put the group of values into an array, and then write a function that searches through the array?  I think if I keep the values sorted and do a binary search, it should work fast enough. Or is there some other smart way of doing this, which can work faster?