What is the difference between range and xrange in python?
What is the difference between range and xrange functions in Python 2.X?
Why taking components of a component of a vector is invalid? Displacement currents, aren't really currents? Using Apex Managed Sharing to share an opportunity Here's the use case. When a lead is converted to an Opportunity, I want to automatically share the opportunity with the previous owner of the lead. This is needed because upon conversion, the opportunity ownership is granted to someone else but the original lead owner needs ongoing access to the opportunity.  So:   A partner submits/creates a lead and is the lead owner Lead is converted to opportunity and internal sales person gains ownership Original partner needs to have view/edit access on this opportunity   I know you can use Apex Managed Sharing to share a custom object, but I'm hitting a wall trying to do this with an opportunity since the fields in OpportunityShare are not writable. The following won't even compile as a result:  List&lt;OpportunityShare&gt; oppShares = new List&lt;OpportunityShare&gt;(); for(Id i : oppIds) {    OpportunityShare os = new OpportunityShare(OpportunityId = i);    os.OpportunityId = i; // *** ERROR - not writable ***    os.OpportunityAccessLevel = 'Read/Write';    os.UserOrGroupId = oppIdToLead.get(i).OwnerId;    os.RowCause = 'Manual Sharing';    oppShares.add(os); }  Database.SaveResult[] result = Database.insert(oppShares, false); What is Stack Overflow's deployment process? I'm looking for some insight into how Stack Overflow releases are deployed and managed.   What software/tooling is used? What time are releases generally performed? How many and what steps are involved?   I'm assuming it's not too stringent given the light team working on the codebase. But considering the high rate of change, I could see some kind of tooling and automation becoming increasingly relevant, so I'm curious to learn what kind of decisions are being made to deal with the changes in scale and feature set over time.  Is this information available somewhere? Geometry with Trigonometry From the given figure, prove that      $$\cot\ \theta=\cot\ A+\cot\ B+\cot\ C$$     I could not even start to the first point. Please help me to solve this.  Thanks in advance How can I remove the white pixels around the edges when exporting a transparent GIF? How to Split Features in QGIS? Getting a stack overflow exception when declaring a large array How are the Tenchi timelines related? Between Muyo, Universe, GXP, and Ryo-ohki, I'm thoroughly confused. Sometimes Tenchi series seem to be related (Ryo-ohki and Universe) and sometimes not (GXP). What are all the Tenchi series, are they related, and if they are, how? Why is looping over find's output bad practice? This question is inspired by    I see these constructs  for file in `find . -type f -name ...`; do smth with ${file}; done   and  for dir in $(find . -type d -name ...); do smth with ${dir}; done   being used here almost on a daily basis even if some people take the time to comment on those posts explaining why this kind of stuff should be avoided... Seeing the number of such posts (and the fact that sometimes those comments are simply ignored) I thought I might as well ask a question:  Why is looping over find's output bad practice and what's the proper way to run one or more commands for each file name/path returned by find ? Can you filter out certain SE sites from the hot questions list? Is it possible to filter out Stack Exchange sites from the hot questions list? You'd think that as soon as Harry met someone who was friends with his dad, he'd have asked about his family.  Certainly Lupin or Sirius could have told him something of his family, given that they were James' closest friends, and Sirius was "always welcome at the Potters".  Obviously there's nothing in the books, but did J.K. Rowling ever explain why there was no mention of any living relative other than Aunt Petunia, or even what happened to Harry's grandparents? Is there a standard pronunciation for gender-neutral -@ or -x More and more I see, especially in activist communities, Spanish-derived words ending in x or @ in order to neuter the gendering inherent in the original language. For example: latinx (or latin@) as opposed to latina and latino. How, though, are these endings pronounced? Please provide evidence of how this orthography is most commonly pronounced. Note 1: I recognize this is in an English Language site, rather than a Spanish language site, but this phenomenon is very much happening in English, albeit with Spanish loan words. Therefore the question is relevant to non-Spanish-speaking English speakers. Note 2: A question like this can lead to politically charged or, at least, sarcastic comments. Please refrain from bringing in your biases for or against. Note 3: This question is not seeking opinions as to how some people pronounce the suffixes. Answers should address evidence of a developing orthodoxy in pronunciation. Is it possible to duplicate eyes? This question contains spoilers for anime viewers and early manga viewers.      When Nagato was revived with Edo Tensei, he had Madara's eyes. When Madara was revived, he had his original eyes too (Rinnegan, much like Nagato).   Is this exploitable? Can I repeat this cycle of transplant and revive to duplicate strong eyes? How does that work really? Does Qt have a C interface? Add CSS or JavaScript files to layout head from views or partial views A white number inside a black circle. How to make a white number inside a black circle (the picture below)? I want to change numbers inside the black circle, of course.  I use Share LaTeX. I have read some articles here but anyone are not what I would like to get. I would like to get this  (the picture below) - the sixth answer.   Thanks for help. If you create a scene for the Video Sequence Editor and start working on a project Blender will render the output from the VSE. But if you want to later switch it to render your 3D scene again (the camera output) where is the setting to select the source?  Usually I keep a separate .blend for VSE edits so I don't need to switch, but I feel like I ought to learn how to do this as it's pretty basic. I would expect to find this in the Render context but I see no place to specify the source.  Thanks. Adverb position in "Listen carefully to what I say" SimpleXML: Selecting Elements Which Have A Certain Attribute Value