I have a list like this: [&quot;*****&quot;, &quot;*****&quot;]  I want to insert the elements of another list to the middle of this list like this: [&quot;*****&quot;, &quot;abc&quot;, &quot;ded&quot;, &quot;*****&quot;]  However, my attempt produces a list nested inside another list: [&quot;*****&quot;, [&quot;abc&quot;, &quot;ded&quot;], &quot;*****&quot;]  This is my code: def addBorder(picture):      length_of_element = len(picture[0])     number_of_asterisks = length_of_element + 2     new_list = ['*' * number_of_asterisks for i in range(0, 2)]     new_list.insert(len(new_list)//2, [value for value in picture])          return new_list  I know that my code is good. I just want to know what tweaks I need to make.
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.
Evaluating $\prod_{n=1}^{\infty}\left(1+\frac{1}{2^n}\right)$ What does the second column in the output of 'ls -n' mean? I am trying to find the correct opposite of a delegate in the context of a person being a representative of someone else that have allowed or chosen them to be their delegate. What would you call that "someone else?" The only word I could find is a delegator (which isn't a real word in English) or assigner, but they are technical words rather than descriptive.    Any other word I could use?    Think of it in a sentence like this:       Here is a list of all the delegates in the company.   But that is the list of their _ _ _ _ _ (what can go here?).   I am trying to avoid fillers such as:  bosses, agents, managers, etc. Following are other questions which I think I need to know:   From a non X Session? (meaning root isn't logged into X) If multiple people were logged in on X, could I auto-detect who was on which screen, and thus programmatically detect which screen I need to launch the app on? Can I launch the app as the user? ( ok I'm 99.999% sure this is a yes ) Can I detect if users of group X are logged in to X? Is this WUBI? What is "Installation size" setting for? I'm new to Ubuntu... I went to the downloads page and downloaded the Windows Installer as I am hoping initially to have a dual boot on my currently Win 7 PC (I would consider preserving my Win7 install as a VM under Ubuntu instead - advice?)  It's asking me to choose an "Installation size" but there's no explanation as to what the significance of this is. Is this a disc partition?  Can I increase it easily later if it's too small?  I came here to ask these questions and now I see a bunch of threads about 'WUBI' and possible downsides of installing Ubuntu this way. Is the Windows Installer I just downloaded going to give me WUBI? OS X: Blurry Beamer presentations on Sierra / High Sierra Since OS X 10.12 (Sierra), the built-in Preview, but also many other PDF Viewers on OS X (such as Skim) show a number of problems, among them the following rendering issue:   The page is first rendered in low-res  with blurry text and graphics. About one second (!) later, the page is rendered in high fidelity. The display "wobbles", as text and graphics on the high-fidelity page is about one or two pixels up.   Example code:  \documentclass{beamer} \begin{document} \begin{frame}{Duke says}   \begin{itemize}   \item&lt;+-&gt; It don't mean a thing, if it ain't got that swing         \item&lt;+-&gt; (doo-ah, doo-ah, doo-ah, doo-ah, doo-ah, doo-ah, doo-ah, doo-ah)         \item&lt;+-&gt; It don't mean a thing all you got to do is sing         \item&lt;+-&gt; (doo-ah, doo-ah, doo-ah, doo-ah, doo-ah, doo-ah, doo-ah, doo-ah)  \end{itemize}  \end{frame}  \end{document}   While one may consider this acceptable when reading documents on screen, this is a show stopper for presenting beamer presentations with animations. The low-res display and wobbling makes the audience sick, while the 1 second rendering time makes PDF-based animations impossible.  So I am looking for a PDF Viewer for OS X that does not suffer this problems, but that a suitable for presenting beamer-based slide shows. Requirements:   page-wise full-screen/presenting mode with just the page and nothing else on the screen crisp and high-fidelity display quick rendering time   Unfortunately, the root of the problem is in Apple's own PDFKit library that is the base for most PDF viewers on OS X. So I am looking for PDF viewers that are not based on PDFKit, but fulfil the requirements above.  I am aware, of course, of Acrobat Reader DC. However, I do not particularly like its font rendering (Req 2) and I would also prefer something more light weight. I also have PDFExpert, which also is not PDFKit-based, however, does not support a presenting mode (Req 1). Setting the editing style on a UITableViewCell What is the probability that the selected function maps prime numbers to prime numbers? Let $X = \{1, 2, 3, . . . , 25\}$. If a student selects a function randomly from the set of all functions from $X$ onto $X$, then what is the probability that the selected function maps prime numbers to prime numbers ? No idea how to proceed, please guide. Determinant of a block lower triangular matrix Did I correctly derive this recurrence equation formula SQL to find the number of distinct values in a column I can select all the distinct values in a column in the following ways:   SELECT DISTINCT column_name FROM table_name; SELECT column_name FROM table_name GROUP BY column_name;   But how do I get the row count from that query? Is a subquery required? Manga where the protagonist need to solve girl's quests Can someone tell me the manga in which the protagonist is teleported to an alternative world where he needs to make the girls fall in love with him, then he gains some skills like an invisible sword. Then, when he finishes these &quot;quests&quot;, he will be able to bring one of them to the real world. He has the ability to save and load like checkpoints of games. I installed nginx a while ago using the ubuntu PPA repository.  Now I want to compile nginx from source so I can compile in and use the geo-ip module.  I know how to compile the new nginx from source.  How can I remove the nginx binary which was installed by the package?  I want to leave all the configs and logs and upstart stuff etc untouched.  I really just want to remove the old binary.  How can I do this? Disk brakes severely reduced in power after replacing bearings Removing OS from Dual Boot computer, and recovering HD space. I have a computer that dual boots Linux Mint, and Ubuntu, I am wondering what the best way would be to remove Linux Mint, then recovering the hard drive space that is resides in so that Ubuntu will be able to access it. How do I remotely wake my Mac over Wi-Fi? Can I use set instead of List to resolve the duplicate id issue If you take a look into this issue     I have provide an answer of using set&lt;Sobject&gt; instead using list&lt;Sobject&gt;  i.e.  if( !contacts.values().isEmpty() ){   set&lt;Contact&gt; setContacts = new set&lt;Contact&gt;();   for( Contact objCon : contacts.values() ){     if(!setContacts.contains(objCon)){         setContacts.add( objCon );     }   }  update new list&lt;Contact&gt;(setContacts); }   even if(!setContacts.contains(objCon)) is not needed  if( !contacts.values().isEmpty() ){   set&lt;Contact&gt; setContacts = new set&lt;Contact&gt;();   for( Contact objCon : contacts.values() ){         setContacts.add( objCon );   }  update new list&lt;Contact&gt;(setContacts); }   So is there any condition/use case where this answer might fail? Convert UTC date time to local date time My son is going on 5 and starting to learn a lot about how we're created. I've been with my husband for 10 years, but nearly 6 years ago I had no other choice but to move 1000 miles away and after trying the long distance thing it didn't work so we split up.   I ended up going through a rough patch and started dating an abusive jerk. After a year I was pregnant. He threatened me trying to force me to have an abortion and I refused. His grandmother was chief of police and he scared me into moving back to Florida.  Eventually, when I was 4 months along in my pregnancy my husband and I picked up right where we left off. He loved me so much and accepted our son as if he was his own and has done an amazing job at raising him.   He enrolled in college while I was pregnant, got us a house and went above and beyond to care for us both (as after giving birth I became very ill due to rare brain and spine conditions). I've always tried to do right by my son. Since day one, even while with my husband, I tried to keep the sperm donor involved. But he wanted no part of his son.  My husband stepped up when the biological father refused. The biological father would pretend that he cared, only to tell me he never cared about him anyway and was just trying to manipulate me into stopping child support (which I did anyway after the first year: I felt it wasn't right to take his money when my son had a dad who loved, supported and wanted him from the beginning).  This is a very long story so I'll try and make it not so much of a novel. The sperm donor has made it very clear he wants nothing ever to do with my son. My husband has been Dad since the moment my son entered this world. I've always planned to tell my son as early as possible. I think now, or in a few years, it won't be as hard on him compared to us telling him when he's a teen and who knows how he'd handle it.   I just don't know what to do. We have an extremely happy loving family. My son adores his dad. We never argue, we have a very happy non-dysfunctional marriage. I just feel we have a very special family. But I refuse to lie to my son. What if we wait and someone else maliciously tells him? Or if, when he's older and finds out, he spirals out of control?  I'm so confused, I just want to do the right thing and desperately need advice. Especially from others who have been through similar circumstances. We're planning on meeting with therapists and I guess child development specialists, if someone could also point me in the right direction for what type of doctor is best suited in this situation.   Also my son is very happy. He has a wonderful life and I feel as if he would do fine, knowing how much he loves his dad and just beginning to really grasp the concept of life. I don't think it would change anything for him, if that makes sense. I've been worrying over this for 5 years and really need some answers! MAC addresses in JavaScript I know that we can get the MAC address of a user via IE (ActiveX objects).  Is there a way to obtain a user's MAC address using JavaScript?