Append an element to particular list within a list - Python
List of lists changes reflected across sublists unexpectedly
Can negative levels get rid of racial HD? What happens when one is affected by something such as energy drain, and permanently loses levels when one only has racial HD? Does the victim of the spell die? Or do they permanently lose racial HD? Equation for a smooth staircase function I am looking for a smooth staircase equation $f(h,w,x)$ that is a function of the step height $h$, step width $w$ in the range $x$.   I cannot use the unit step or other similar functions since they are just one step. I have been experimenting with various sigmoid curves and while I can get a single smooth step I cannot get to realize the staircase shape. The closest staircase function I have found is given in  in equation (18) and depicted in Fig. 4 and it is a close example of what I want (i.e generate a staircase in the range $x$ for arbitrary step heights and widths) but it is not smooth at all.  Regarding smooth steps, a likely starting point I found is  but it gives a smooth function of just a single step. I have been unable to modify the equation to make it into a staircase. I would like to specify arbitrary step heights and widths and generate a smooth staircase in the range $x$ specified.    Edit (Extra info): The smooth function I mention above has the problem that the upper, horizontal line is not equal in length to the lower, horizontal line which is why I have been unable to adapt it into a staircase function   Edit 2 Including some pictures     Edit 2 Plot of $s$ with a steep slope showing a different width on the first horizontal line I've asked this question towards a developer for Minecraft and I thought I'd ask here too since they might not see the question.  How do I select all but two types of entities in Minecraft?  For example, something like: /say @e[type=![Player,Item],r=50] (to clarify I also tried type=Item,Player, type=Item,type=Player etc)  Should select any entity that does not match players or items, so things like Creepers, Ghasts, XPOrbs, PrimedTNT and so on within a radius of 50 blocks and print them to the chat.  Instead it ignores one of the flags, and works with the other instead. What does “times” mean in the newspaper “Washington Times”?  I have always wanted to ask about this, but feared it might be so obvious that I would look like a fool. For that many times, I haven't before experienced that level of hesitation with any other question, but I think now is the right time to ask, anyway. Error message on Terminal launch Every real number in $[0,1]$ has a decimal expansion $0.d_1d_2d_3...$, so construct an infinite tree rooted at 0 where each node has branches leading to $\{0,1,2,3,4,5,6,7,8,9\} $, and let each path through the tree represent the successive decimal digits of a real number. To enumerate them, go through the tree breadth-first i.e. layer-by-layer. Let's say I have  on the board. He is a 2/2 that says:  Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.  I play a . It says:  Put three 1/1 red Human creature tokens with haste onto the battlefield. Sacrifice those tokens at the beginning of the next end step.  The sacrifice portion is not important to this question. What is important is how these two cards interact with each other. Playing this card in my first main phase, assuming no counters or other shenanigans by my opponent, I will have my Commander and 3 tokens on the battlefield. What will happen in terms of the power/toughness of my tokens and Commander? Option A The tokens will be 1/1 each. They don't see each other come in at all. The Commander is 3/3, as one &quot;enter the battlefield&quot; trigger happens. Option B The tokens will be 1/1. They don't see each other come in at all, because they weren't on the battlefield to see any of the triggers. The Commander is 5/5, as he saw three &quot;enter the battlefield&quot; triggers occur. Option C The tokens will all be different, with one being 3/3 as he saw the other two come in, one being 2/2 as he saw only the last one come in, and 1/1 as the last one saw none come in. Option D The tokens will all be 4/4, as three creatures entered the battlefield this turn. I am obviously hoping for this option. It may be supported by a ruling on Goldnight Commander that says, emphasis mine:  The creature that entered the battlefield will also get +1/+1 until end of turn if it's still on the battlefield when the ability resolves.  The key being the ability resolving. So my thought is thus:  Thatcher Revolt goes on the stack. Thatcher Revolt resolves, and three separate &quot;enter the battlefield&quot; triggers go on the stack as the three humans enter the battlefield as 1/1. The last (it is a stack) &quot;etb&quot; trigger resolves. This puts an ability from Goldnight Commander on the stack. This resolves and the humans are now all 2/2. The next &quot;etb&quot; trigger resolves. This puts a new ability from Commander on the stack, and resolves with the humans being 3/3. The first &quot;etb&quot; trigger finally resolves, puts a Command ability on the stack, which resolves putting the humans at their final state of 4/4.  Option E The tokens will all be 2/2.  Thatcher Revolt goes on the stack. Thatcher Revolt resolves, and one single &quot;enter the battlefield&quot; trigger goes on the stack. The &quot;etb&quot; trigger resolves. This puts an ability from Goldnight Commander on the stack. This resolves and the humans are now all 2/2.  I would really like to have a complete understanding both of the result and how this result is calculated by the game engine. Brute-force attacking One Time Pads feasible? I have a ciphertext encoded with One Time Pad. I do not know the key. How can I find the possible keys which when decoded, will result in a meaningful plain text? dpkg: error processing package mysql-server (--configure) Why won't my computer go to sleep automatically? Windows 8 is set to sleep after 30 mins, and it used to work, but recently it's started refusing to sleep. (I can still manually ask it to go to sleep without any issue.)    I was having issues a while ago, but it was with my network adapter. That's since been disabled, so it's definitely not that:    I've checked to see what devices are able to wake up my machine, but it only appears to be my mouse:    Which is odd, because I haven't recently changed my mouse, and more confusing still: The monitor does go to sleep just fine. If it was actually the mouse keeping my system awake, I'm pretty sure the monitor wouldn't go to sleep.  I've checked my Wake Timers, and nothing:    I've also checked my existing requests...  UPDATE: I found something. What to do with it, I don't know...    Note: Even when /requests says that there's "NONE" under every category, my machine still won't sleep(!).    In short: How can I tell what's preventing my computer from Sleeping?    UPDATE: Ok, so I now have a few more pieces of the puzzle. I came back to my computer and it was ASLEEP! Lawks! It seems that the only times it doesn't sleep is if VLC Player is open, even if a video isn't actually playing.  UPDATE UPDATE: Ok, so it won't sleep sometimes when VLC Player ISN'T running, either. Bah! Removing duplicate strings from an array? I read an essay about prime numbers. In it the author suggests that a natural first question to ask is,      What is the probability of a random natural number being prime?   but proceeds to dismiss it as "not making sense". I wonder what's wrong with the question. Is its meaninglessness related to the fact that there is an infinite number of naturals? I know that the movies were written to be a stand alone universe on their own, but what key elements were missing in the movies that were vital in the books that viewers are missing out on? How to make existing public files private? Referencing to "above" or "below"? If $a$, $b$, $c$ are the roots of $x^3-6x^2+3x+1=0$, find all possible values of $a^2b+b^2c+c^2a$ Let $a$, $b$, $c$ be the roots of $$x^3 - 6x^2 + 3x + 1 = 0$$ Find all possible values of $a^2 b + b^2 c + c^2 a$. Express all the possible values, in commas.  I've already tried to bash out all the roots, Vieta's Formula, and try to manipulate the equation to become easier to work with. However, Vieta's didn't get me anywhere, and I couldn't find a way to make the equation simpler or anything. Any hints to start this problem? Database does not update automatically with MySQL and Python I'm having some trouble updating a row in a MySQL database. Here is the code I'm trying to run:  import MySQLdb  conn=MySQLdb.connect(host="localhost", user="root", passwd="pass", db="dbname") cursor=conn.cursor()  cursor.execute("UPDATE compinfo SET Co_num=4 WHERE ID=100") cursor.execute("SELECT Co_num FROM compinfo WHERE ID=100") results = cursor.fetchall()  for row in results:     print row[0]  print "Number of rows updated: %d" % cursor.rowcount  cursor.close() conn.close()   The output I get when I run this program is:     4Number of rows updated: 1   It seems like it's working but if I query the database from the MySQL command line interface (CLI) I find that it was not updated at all. However, if from the CLI I enter UPDATE compinfo SET Co_num=4 WHERE ID=100; the database is updated as expected.  What is my problem? I'm running Python 2.5.2 with MySQL 5.1.30 on a Windows box. Eclemma not offering report exportation option Images as Planes in Eevee having weird transparency Summing up the area on a polygon by a certain attribute result I wish to know if there's a tool on QGIS equivalent to the Excel's "SUMIF".    I have a shapefile of a land use and cover that's classified by the attribute with the name of the classes, for example: "vegetation", "urban centers" and "pastures". My goal is to calculate the area of each class, but since it's composed by various polygons, I need to add up all the areas from all polygons that were put in the same class.  Like I mentioned in the beginning of the question, I know that Excel has a function that can do such thing for me, but it turns out that the sum made by excel doesn't match the area's total given by QGIS.  English is not my first language, so if the explanation isn't clear enough, I'll be glad to rephrase it.