In Python, can someone explain the difference between the use of "s" and "s[:]"? Here, "s" is a sequence type?  Examples:  s = [1,2,3]   s[:] = [1,2,3]   for i in s:   print(i)   for i in s[:]:   print(i)   Are there any differences?  I was thinking maybe the last example means "copy of s" which would allow for modifying s inside loop? What else?  Update based on answers  Thanks everyone. This shows the difference in a very concise way.  &gt;&gt;&gt; s = [1,2,3]; t = s; s[:] = [2,3,4]; print(t) [2, 3, 4]  &gt;&gt;&gt; s = [1,2,3]; t = s; s = [2,3,4]; print(t) [1, 2, 3]
I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.
I was working on a worksheet for class and came across this problem:      Let $\varphi:R\to S$ be an onto ring homomorphism with the property that every ideal of $R$ is principal. Show that the same must be true for $S$.    I honestly do not know how to do this one! Cardinality of cartesian square Given an infinite set $A$ -  does the cardinality of $A$ equal to the cardinality of $A^2$? How to determine $\int x^2 e^{-x^2}\mathrm dx$? Firefox 33 doesn't see Java Plugin I am trying to enable Java (not JavaScript) in my Firefox v. 33 so that I can use applets within the browser.  Currently, I just get a dark gray box across the whole screen when I try to load an applet, without any error message or prompt to install plugin.  As per , I tried going into the Firefox plugin page to activate it, however, it wasn't there listed.  I do have Java 7 installed and it is in the path:  &gt;java -version java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)   What do I need to do to get Firefox to see my Java installation and recognize it as a plugin so that I can enable it and view applets inside the browser? How do you join on the same table, twice, in mysql? I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).  the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains table.  Simple.  Now I need to actually display both domain names on the webpage. I know how to display one or the other, via the LEFT JOIN domains ON reviews.rev_dom_for = domains.dom_url query, and then you echo out the dom_url, which would echo out the domain name in the rev_dom_for column.  But how would I make it echo out the 2nd domain name, in the dom_rev_from column? How is the recommended next badge determined exactly? According to , the     "Progress to next badge" bar automatically selects the badge you're closest to earning (or that's most logical to go for next)   While "the badge you're closest to earning" is pretty easy to determine: it's the bar with the most progress, I'm wondering what "most logical to go for next" means. Because right now on Meta Stack Exchange, I can track two badges: Illuminator and Legendary. My progress for Illuminator is 66.40% and for Legendary it's 66.67%, yet Illuminator is shown as the recommended next badge:    On some child metas where I barely have any activity, Student is shown as recommended next badge with a progress of 0/1, but I do have cast some votes so I have a small progress towards e.g. Civic Duty. So obviously there is some other logic at work, but what? Uniform convergence of $f_n(z)=nz^n$ in the set $|z|<\frac{1}{2}$ Why does C/C++ differentiates in case of array index out of bound #include &lt;stdio.h&gt; int main() {     int a[10];     a[3]=4;     a[11]=3;//does not give segmentation fault     a[25]=4;//does not give segmentation fault     a[20000]=3; //gives segmentation fault     return 0; }  I understand that it's trying to access memory allocated to process or thread in case of a[11] or a[25] and it's going out of stack bounds in case of a[20000]. Why doesn't compiler or linker give an error, aren't they aware of the array size? If not then how does sizeof(a) work correctly? I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks). If a charge travels in a circle it must accelerate, thereby producing EM.  However, a wire in a circular loop is analogous to many charges moving in a circle. So, why don't circular currents produce EM? (I have not found any evidence that circular currents can produce EM).  A similar question is: . However, my question asks about circular wires and direct current. Thanks. What do the plus and minus signs mean in Objective-C next to a method? Best books for mathematical background? What are the best textbooks to read for the mathematical background you need for modern physics, such as, string theory?  Some subjects off the top of my head that probably need covering:   Differential geometry, Manifolds, etc. Lie groups, Lie algebras and their representation theory. Algebraic topology. How to deal a specific amount of damage using commands? I want to make a datapack where if you touch lime glass, you get damaged 2.5 hearts. I don't want the commands to work for just this specific value. Instead, I want to be able to specify the amount of damage. I can't use the instant damage effect because it's not controllable. What is ground and what does it do? Illustrator: Is there an efficient and accurate way to join two circles by their tangents (and keep it editable)? It's easy to join two circles if they are the same size and horizontal/vertical, into a pill shape:    If the circles are at an add angle then it's still possible but you can no longer rely on smart guides.     You can add lines roughly where the tangents should be and then use the scissors tool on the circles, cut out the inner area and then join the two crescents into one shape.    Is there a better way to do this? Is there a way to do this that is still editable afterwards too?  There are some other questions that cover the same area as this but don't cover editability or joining circles that are not in line with each other (where smart guides can't help). I have this struct:  struct Map {     public int Size;      public Map ( int size )     {         this.Size = size;     }      public override string ToString ( )     {         return String.Format ( "Size: {0}", this.Size );     } }   When using array, it works:  Map [ ] arr = new Map [ 4 ] {     new Map(10),     new Map(20),     new Map(30),     new Map(40)};  arr [ 2 ].Size = 0;   But when using List, it doesn't compile:  List&lt;Map&gt; list = new List&lt;Map&gt; ( ) {     new Map(10),     new Map(20),     new Map(30),     new Map(40)};  list [ 2 ].Size = 0;   Why? I'm looking for a more politically correct substitute for the expression "poor man's", meaning an inferior improvised or makeshift substitute. Usage examples:   "Guncotton is the poor man's TNT" "Poor man's oyster" (mussels, or coughed up phlegm)    My hesitance is mainly because it is not as gender neutral as perhaps it once was. The closest I can think of is "pauper's", but I don't know many examples of usage. Fred and George Weasley are known for their trouble-making and general &quot;solemnly swearing they are up to no good&quot;. Their antics/adventures give something to smile about and show us not all wizards are as serious as Professor McGonagall and Hermione. This gives them a reputation of being less intelligent and indeed they only achieved three OWLs. However, we also see the twins have quite a brilliant side! Being able to open and successfully run a shop in Diagon Alley without having completed their Hogwarts education is no easy take (IMO, anyway). Their creations helped students get out of class, our heroes out of tight spot, and even stop our enemies execute an evil plot. Ginny may have said it best:  &quot;We’ve been hearing explosions out of their room for ages, but we never thought they were actually making things,&quot; said Ginny. &quot;We thought they just liked the noise.&quot; Harry Potter and the Goblet of Fire  Do we know how many things Fred and George invented? Why does connecting a high-current device to my digital circuit cause weird behavior? Moderator flag notifications should reach mobile I spend a great deal of time surfing SE sites from my phone during commutes and other down times. The global inbox is quite effective at reaching me even for chat pings. Quite frankly the mobile site is very well done!  However as a community moderator, there is a whole class of information not getting through. There are no notifications for moderator flags! I can switch to the full site and see these but that is inconvenient for browsing, so I only end up checking for flags periodically.  Ideally the moderator tools should all be available in mobile templates, but as a stand-by it's reasonable to switch to the full view to handle flags, but flags would get addressed in a much more timely manner if I knew about them. As it stands I often come and go from the site without even knowing there are outstanding flags.  A simple flag counter added to the header next to the notification counter and linked to the tools page (which automatically opens the full version anyway right now) would fix this.