I want to find the highest number not in the list. The break should end the last for loop and leave me with Ans = highest number not in list. Why doesn't it work  A = [1,3,5,9,11]  u = A[0] for i in range(1, len(A)):     if A[i] &gt; u:             u = A[i]     if u &lt;= 0:         Ans = 1      else:         for j in range(u ,0, -1):             if j not in A:                 Ans = j                 print(Ans)                 break
Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied?
Can I use an Android phone as webcam for an Ubuntu device? Do the Manuals and Tomes allow you to exceed 20 in an ability score? And can they be stacked? I am looking at items like Manual of Bodily Health, Tome of Clear Thought, etc.  Quoting from Manual of Bodily Health     If you spend 48 hours ... your Constitution score increases by 2, as   does your maximum for that score.   This sounds to me like when you read the tome according to the instructions, you are then allowed to increase your CON up to a maximum of 22.     Is that a correct reading -- that these magic items allow a player to override the usual ability score maximum of 20? Probably, you were already at 20 when you read it, but if, say, you were at 18 and read it to bring your CON up to 20, could you then later increase your CON further via feats or ability score increases gained at certain levels? Can you read more than one book of the same type, to increase your maximum by an additional 2 points? Prove every element of $G$ has finite order. Let $G$ be a group such that the intersection of all its subgroups which are different from $\{e\}$, is a subgroup different from $\{e\}$. Prove that every element of  $G$  has finite order.  Assume that $a$ has infinite order in $G$. Then let $y\neq e$ belong to the intersection of all subgroups of $G$ different from $\{e\}$. Then $y=a^n$ and $y$ will also belong to subgroup generted by $a^2$ hence  $y=a^{2m}$ for some integers $m$. This contradicts that $a$ has infinte order.  Is this correct? I need to know the ip address of another machine in a lan network.  What is the Windows command for getting ip address from machine name and vice versa? What is inertia of a body? The definition of  is  "Inertia is the resistance offered by the body whenever its state of motion is changed."   What is inertia of a body? Is inertia actually a force exerted by the body?  If so, then why is there no application of inertia in numerical problems involving application of force on a body? What is the actual application of inertia in theory? is there a way to request a new tag be created? Possible Duplicate:          I do not have sufficient reputation on any site to create new tags, but I do on occasion find myself in need of a tag that does not exists.  Is there a feature that allows for a person with sub-1500 reputation to request a new tag? The script works fine if I run it with sh filename, but it ignores all the --exclude parameters if its run by cron:  #!/bin/sh TIMESTAMP=$(date +%u)  WEEK=`date +"%V"` if [ $(($WEEK%2)) -eq 0 ]; then     echo "even";     BACKUP_DIR="/mnt/backup/2_$TIMESTAMP"     mkdir -p "$BACKUP_DIR/www"  else     echo "odd";     BACKUP_DIR="/mnt/backup/1_$TIMESTAMP"     mkdir -p "$BACKUP_DIR/www"   fi  if [ $(date +%u) -gt 6 ]; then     zip -r -y $BACKUP_DIR/www/web.zip /var/www/ --exclude='var/www/\.opcache/*' --exclude='var/www/utils/phpThumb/cache/*' else     zip -r -y $BACKUP_DIR/www/web.zip /var/www/ --exclude='var/www/mycompany/files/*' --exclude='var/www/\.opcache/*' --exclude='var/www/mycompany/szamlazz/xml_szamlak/*' --exclude='var/www/mycompany/files_admin/szamlazz/*' --exclude='var/www/mycompany/files_admin/chatFiles/*' --exclude='var/www/mycompany/utils/phpThumb/cache/*' --exclude='*/backup-guard/*' --exclude='var/www/mycompany/mailer/*' --exclude='var/www/mycompany/attachments/*' fi  exit 0   The above script should create a larger backup on sunday, and a partial on weekdays, but it just zips everything. We are all told at school water vapour and carbon dioxide are the top two greenhouse gases, and that they absorb thermal infra red radiation, trap heat and warm up the Earth. My question is how do they do that? Why can't Oxygen or Nitrogen or any other gas not absorb infra red radiation as well as water vapour or CO2? Show that an operation being commutative is a structural property What is the most popular open source password manager which I can use on a Ubuntu machine or preferably across Ubuntu/Windows machines with some form of data compatibility. If there is a free web based version, that would be even more preferable. How to add Excel sheet to console application Does Earth's Rotation Affect Its Shape? The question I am working on is, &quot;Consider the following. (a) Find the angular speed of Earth's rotation about its axis. rad/s (b) How does this rotation affect the shape of Earth?&quot;  I am fully capable of solving part (a); however, I am not sure how to describe the effect earth's rotation on its shape. I tried to search my textbook for the answer, but could not find anything. Is there an actual effect on the shape? This came to my mind after I learned the following from :  where T : struct   We, C# developers, all know the basics of C#. I mean declarations, conditionals, loops, operators, etc.  Some of us even mastered the stuff like , , , , ...  But what are the most hidden features or tricks of C# that even C# fans, addicts, experts barely know?  Here are the revealed features so far:    Keywords    by  var by  using() statement by  readonly by  as by  as / is by  as / is (improved) by  default by  global:: by  using() blocks by  volatile by  extern alias by    Attributes    by   by   by   and  by   by   by   by    Syntax    (coalesce nulls) operator by  Number flaggings by  where T:new by  Implicit generics by  One-parameter lambdas by  Auto properties by  Namespace aliases by  Verbatim string literals with @ by  enum values by  @variablenames by  event operators by  Format string brackets by  Property accessor accessibility modifiers by  Conditional (ternary) operator (?:) by  checked and unchecked operators by  implicit and explicit operators by    Language Features   Nullable types by  Anonymous types by  __makeref __reftype __refvalue by  Object initializers by  Format strings by  Extension Methods by  partial methods by  Preprocessor directives by  DEBUG pre-processor directive by  Operator overloading by  Type inferrence by  Boolean operators  by  Pass value-type variable as interface without boxing by  Programmatically determine declared variable type by  Static Constructors by  Easier-on-the-eyes / condensed ORM-mapping using LINQ by  __arglist by    Visual Studio Features   Select block of text in editor by  Snippets by      Framework   TransactionScope by  DependantTransaction by  Nullable&lt;T&gt; by  Mutex by  System.IO.Path by  WeakReference by    Methods and Properties   String.IsNullOrEmpty() method by  List.ForEach() method by  BeginInvoke(), EndInvoke() methods by  Nullable&lt;T&gt;.HasValue and Nullable&lt;T&gt;.Value properties by  GetValueOrDefault method by    Tips &amp; Tricks   Nice method for event handlers by  Uppercase comparisons by  Access anonymous types without reflection by  A quick way to lazily instantiate collection properties by  JavaScript-like anonymous inline-functions by    Other   netmodules by     by     by Is there a better name for this than "emphatic and"? In semi-poetic writing, I have had occasion to deviate from the standard prose list practice (interpose commas or semicolons between items, with an "and" preceding the final item), by utilizing a second or third and to separate three or four items.  That is,       Bob likes beer, wine and liquor.   The variant would be:     Bob likes beer and wine and liquor.   Now, the usage is obviously nonstandard and should be avoided in formal writing, but for those instances where poetic variation may be justified.    What is it called?  "Emphatic And" is the best I can coin on my own, but I wonder if there is a more established name for this variation. The first homology group $ H_1(E(K); Z) $ of a knot exterior is an infinite cyclic group which is generated by the class of the meridian. With the following AppleScript code within a "Run AppleScript" action in a Service:  tell application "System Events"     set theSBounds to {{572, 64}, {332, 515}}     set position of window "Google Hangouts - myemailaddress@gmail.com" of application process "Google Chrome" to item 1 of theSBounds     set size of window "Google Hangouts - myemailaddress@gmail.com" of application process "Google Chrome" to item 2 of theSBounds end tell   the Service will only work if the application from which that Service has been called has been added to the list of applications under "Allow the apps below to control your computer." This list is found at System Preferences → Security &amp; Privacy → Accessibility.  Is it possible to modify the AppleScript code somehow so that adding every application on one's computer to the list is not necessary? Or, so that, one only needs to add one item to the list, as opposed to every application on one's computer?  I thought that something like this might work:  do shell script "osascript -e 'tell application \"System Events\"' -e 'set theSBounds to {{572, 64}, {332, 515}}' -e 'set position of window \"Google Hangouts - myemailaddress@gmail.com\" of application process \"Google Chrome\" to item 1 of theSBounds' -e 'set size of window \"Google Hangouts - myemailaddress@gmail.com\" of application process \"Google Chrome\" to item 2 of theSBounds' -e 'end tell'" with administrator privileges   but this code also requires that the application from which the Service is run is added to the Accessibility list.  Note: I only want to run this AppleScript as a Service, and not in an Automator-created Application, because the code receives selected text as its input (system-wide). Why are text format commands used inside braces? Most commands in Latex are written with the arguments inside braces following the command: \command{arguments}. But text formatting options, like \em, or \scriptsize are usually written inside the braces, like {\em some italicised text}. Why is this? What makes these commands different? I'm particularly asking because it seems to make standardisation - of which LaTeX really appears badly in need - more difficult. We know that the "Harmonic Series" $$ \sum \frac{1}{n}$$ diverges. And for $p >1$ we have the result that the series converges $$\sum \frac{1}{n^{p}}$$ converges.   One can then ask the question of testing the convergence the following 2 Series:  $$\sum\limits_{n=1}^{\infty} \frac{1}{n^{k + \cos{n}}}, \quad \sum\limits_{n=1}^{\infty} \frac{1}{n^{k + \sin{n}}}$$ where $ k \in (0,2)$.  Only thing which i have as tool for this problem is the inequality $| \sin{n} | \leq 1$, which i am not sure whether would applicable or not. Cycles : shadows on smooth shaded mesh, strange behavior I wonder if this is a bug, or if I missed something... When a light hits tangentially convex surfaces with "smooth shading", the shadow on this surface seems to "partially ignore" the smoothness of the surface. Here is an example with a simple cylinder :    On the left, a cylinder with "flat shading". Everything's ok. On the right, the same with "smooth". We can see an edge, bad shadowed.  With or without the "Edge split" modifier, no matters, the edge is still there. The shader is a simple white diffuse shader with no texture nor displace.  I have to add a subsurf modifier with at least 2 levels, which will insanely increase the vertex count... And I can't do that for my project.  I hope someone already saw it, and have a little tip to share. Or if someone already know it's a bug, or a limit of the current Cycles renderer ? I wanted to send a single email to different users. I save an email to drafts and send the email to a user and it goes to the sent box instead of staying in the drafts box. Is there a way I can send an email repeatedly from the drafts box?