I have made a script for adding VertexWeightMix modifers to a selected mesh. However, when I run the script, it adds tons of modifers, but only changes the first one it adds. How can I fix this? I don't want to apply them immediatly once a modifier is created.  for vertex_b in namelist:     vertex_a = "bone_01D2"     vertexA = bpy.context.object.vertex_groups.get(vertex_a)     vertexB = bpy.context.object.vertex_groups.get(vertex_b)     if vertexA is None:         print("Vertex " + vertex_a + " Does not Exist!")         continue     if vertexB is None:         print("Vertex " + vertex_b + " Does not Exist!")         continue     bpy.ops.object.modifier_add(type='VERTEX_WEIGHT_MIX')     bpy.context.object.modifiers["VertexWeightMix"].vertex_group_a = vertex_a     bpy.context.object.modifiers["VertexWeightMix"].vertex_group_b = vertex_b     bpy.context.object.modifiers["VertexWeightMix"].mix_mode = 'ADD'     bpy.context.object.modifiers["VertexWeightMix"].mix_set = 'B'   Edit: I figured out that if you declare a variable i = 0, then you can convert it to a string, append it to the name, then increase it. However, if I ran it again, it would not work.
I've found some code that could add a modifier but none can set parameters like Octree.
I have multiple polygons, all located offshore around the UK. I am trying to calculate the areas of these polygons in square kilometres, without splitting them by UTM zone.  Is it possible to do this accurately? I have been using World Mercator, but there are big distortions at this scale. If the polygons were limited to the east coast, say, I would use UTM31N. However, as they are all over the UK waters, I am unsure what to use.  Is there a coordinate system that covers this area? British National Grid does not extend far enough out to sea to be of use. What are the in universe telltale indicators of an away beam down or beam up? What do witnesses experience? As a long time fan, I'm familiar with the tell tale sound effects that indicate when the beaming process is taking place. What do residents of the Star Trek universe witness from the ground when people beam back to or down from the ship? How do I run two isolated instances of firefox? Do characters provoke opportunity attack when they leave another character's reach who is not facing them? "You can make an opportunity attack when a hostile creature that YOU CAN SEE moves out of your reach."   In 5E do you have to specify which way your character is facing at all times?  If an enemy who is behind him leaves melee range but his back is to him does that enemy provoke an opportunity attack?    Are enemies within five feet and 360 degrees of a character considered to be within reach?  For example... Kruska and Atone are attacking Dip.  Dip is facing or only attacking Kruska.    Then Atone moves out of Dip's reach (melee range 5 feet) to engage a silly looking wizard.    Does Atone's move provoke an opportunity attack from Dip even though he's not facing him?  Is he assumed to be able to see him? Its very easy to prove $p\mid n^p-n$ for p=3,5,7, it fails for p=9 because $$     (n+1)^9-(n+1)= n^9+9n^8+36n^7+84n^6+126n^5+126n^4+84      n^3+36n^2+8n $$ and $84= 2²\times 3\times7$. Is it true for any $p$ prime? I have checked many primes, but have no idea for the general case. I'm working in a C++ unmanaged project.  I need to know how can I take a string like this "some data to encrypt" and get a byte[] array which I'm gonna use as the source for Encrypt.  In C# I do    for (int i = 0; i &lt; text.Length; i++)     buffer[i] = (byte)text[i];   What I need to know is how to do the same but using unmanaged C++.  Thanks! There are n letters addressed to n eople at different addresses. The n addresses are typed on n envelopes.  A disgruntled secretary shuffles the letters and puts them in the envelopes in random order, one letter per envelope.  Find the probability that at least one letter is put in a correctly addressed envelope. [Hint: use the inclusion-exclusion formula.] What is the probability approximately, for large n ?    My attempt at a solution:  P(all correct) = $\frac{1}{n!}$  P(n-1 correct) = ${n \choose n-1} \frac{1}{n!} = \frac{1}{1!(n-1)!}$  ${n \choose n-1}$ ways of selecting n-1 correct letters.  P(n-2 correct) = ${n \choose n-2} \frac{1}{n!} = \frac{1}{2!(n-2)!}$  ...  P(n-n correct) = ${n \choose n-n} \frac{1}{n!} = \frac{1}{n!(n-n)!} = \frac{1}{n!}$  This all looks ok to me, but I tested this for a case of 4 people, (I think the theoretical value should be $\frac{9}{24}$ but obviously that is not what I got. Can someone correct my logic please? Also, with regards to the hint about inclusion/exclusion - where would that come in?  I read about derangements on Wikipedia but it did not make total sense to me (the derivation).  I would appreciate any advice whatsoever including references to other material. How much web can Spider-Man produce? Especially if he is not using his  but .   Also what happens to the web that he leaves behind? Does it decay after certain time or lose it stickiness and drops off? If $a_0\in R$ is a unit, then  $\sum_{k=0}^{\infty}a_k x^k$ is a unit in $R[[x]]$ Problems with \printbibliography I am writing my thesis and need to do this with apa citation style.  I used the following code in my main document:  \usepackage[backend=biber,style=apa,sorting=none,natbib=true]{biblatex} \addbibresource{library.bib}  \usepackage[autostyle=true]{csquotes}    and in the end of my main document..  \printbibliography[heading=bibintoc,[title={References}]   However I always get this error:     "Undefined control sequence.   \printbibliography[heading=bibintoc,[title={References}]"   Furthermore in my references table, I get (yearmonthday) instead of (2015)e.g. and the references are not alphabetically sorted. Help center still has the guidance about old Favorite tags Power set equivalency of Axiom of Choice Book about a boy who travels to a parallel universe to get a book I can't remember the gender of the main character.  I remember bits and pieces from different books, but I think they're all part of the same series. The pieces may not be in order or from multiple books.   Boy somehow ends up in a mirror universe that's darker and seems to have no people. He has to travel to a certain office(?) building and steal a book. I think this is towards the end of the book (I can't remember the events leading up to it). I think he finds the portal in a forest or something behind his school. He goes into the ocean with mermaids or something and has to save the ocean from pollution. Aliens exist and are observing Earth, because they think it's undeveloped and are waiting for them to be advanced enough. His mother ends up in hospital and he does something to save her. He goes to Ireland(?) and enters a mountain or something to find a race of people. I can't remember who showed him how, but I'm pretty sure she used magic. He goes to Mars and saves a race from war with themselves(?). This place was hidden inside an illusion. He's also grouped with a linguist that learned their language. He travels to another world where there's a prince. I can't remember, but I think it might've been part of a tournament. His sister goes to a robot planet through a portal. I think the actual planet was a robot/AI and had lots of little robots on it. Can't remember what happens here, but he goes there and saves her from something.   It was set a few years ago, when computers weren't common (his family got one early in the first book, I think).  Thanks in advance if someone finds it. How can I disable landscape mode in Android? How can I disable landscape mode for some of the views in my Android app? For the past couple of weeks, a process identified as usernoted appeared to "take over" my machine after a few hours of use, eating over 99% of available CPU.  Force quitting the process doesn't help; only a system restart puts usernoted to sleep for a while.  What is this process and how do I get it under control?  I am running OS X 10.10.5 (build 14F1021). Stopping Dwarf Fortress from auto-pausing Is it possible to prevent DF from pausing every time something comes up (liking hitting gold or whatever). The reason is that I am doing extensive mining and I want to leave the process unattended till it is over. Is there a Windows 10 Hotkey or Shortcut for switching to a specific display? I have my Windows 10 desktop computer connected to two displays through HDMI - one monitor and one TV, which I can toggle through with Windows Key+P as described in the accepted answer to .  However, I was wondering if there was some hotkey, shortcut, or button combination I could use sort of like a "Virtual KVM Switch" that lets me select one display or another specifically, without needing to cycle/toggle through other displays. Formula for expected value of continuous random variable without using density Find a real function $f:\mathbb{R}\to\mathbb{R}$ such that $f(f(x)) = -x$? I've been perusing the internet looking for interesting problems to solve. I found the following problem and have been going at it for the past 30 minutes with no success:     Find a function $f: \mathbb{R} \to \mathbb{R}$ satisfying $f(f(x)) = -x$ for all $x \in \mathbb{R}$.   I am also wondering, can we find $f$ so that is continuous?  I was thinking of letting $f$ be a periodic function, and adding half the period to x each time. I had no success with this, and am now thinking that such a function does not exist.  Source: How do I verify that a string only contains letters, numbers, underscores and dashes? I know how to do this if I iterate through all of the characters in the string but I am looking for a more elegant method.