Flattening a list of tuples
Flattening a shallow list in Python
If $G$ has no proper subgroup, prove that $G$ is cyclic of order $p$, where $p$ is a prime number.     I know that since $G $is a group with no proper subgroups, $g \in G$ is not just the identity. I don't know where to go from there. Probability distribution in the coupon collector's problem I'm trying to solve the well known Coupon Collector's Problem by explicitly finding the probability distribution (so far all the methods I read involve using some sort of trick). However, I'm not having much luck getting anywhere as combinatorics is not something I'm particularly good at.   The Coupon Collector's Problem is stated as:  There are $m$ different kinds of coupons to be collected from boxes. Assuming each type of coupon is equally likely to be found per box, what's the expected amount of boxes one has to buy to collect all types of coupons?  What I'm attempting:  Let $N$ be the random variable associated with the number of boxes one has to buy to find all coupons. Then $P(N=n)=\frac{|A_n|}{|\Omega _n|}$, where $A_n$ is the set of all outcomes such that all types of coupons are observed in $n$ buys, and $\Omega _n$ is the set of all the possible outcomes in $n$ buys. I think $|\Omega _n| = m^n$, but I'm not even sure about that anymore, as all my attempts so far led to garbage probabilities that either diverged or didn't sum up to 1. Fourier transform of $\exp(-t^2)$ using contour integration. Disable COPY drag and drop in Windows Explorer in Windows 7 I have the following problem:  Let $a, b \in\mathbb{Z}$. Show that $\,\{ ax + by\ :\ x, y \in \mathbb{Z}\} = \{ n \gcd(a,b)\ :\ n\in \mathbb{Z} \}$   I understand that the Bezout's lemma says that $gcd(a,b) = ax +by$, so Im not really how you would go about proving the above, it doesn't really make sense to me. Any help is appreciated1 Does personified Death really exist in Harry Potter? I went through the last book, Harry Potter and the Deathly Hallows, yesterday and a question popped in my mind: Does Death, the supposed creator of the Deathly Hallows, really exist in the Harry Potter universe? Dumbledore thought otherwise and I am with the same school of thought.  By the way who created the deathly Hallows actually?  Update:  1) Why were the brothers so sure that the hooded figure was death(couldn't it be a more powerful wizard playing with them)  2) Couldn't, Beedle and the brothers create this story? Generate multiple PDFs for different document versions in a single build How do I quickly rename a MySQL database (change schema name)? The MySQL manual at  covers this.  Usually I just dump the database and reimport it with a new name. This is not an option for very big databases. Apparently RENAME {DATABASE | SCHEMA} db_name TO new_db_name; .  This needs to work with , which stores things very differently than . Define a linear operator $T:C[0,1] \to C[0,1]$ as follows: $$Tf(x) = f(x) + \int_0^x f(u)du$$ It is easy to show that $T$ is a bounded linear operator. The statement also (1) claims that $T$ is one-to-one and onto, and (2) asks to compute $T^{-1}$. (Hence $T$ is an isomorphism due to a corollary of Open Mapping Theorem)  I need help to prove $T$ is onto: given any $g \in C[0,1]$, how to decompose it into a sum between a continuous $f$ and its antiderivative. I have trouble decomposing $g(x)=|x|$, not to mention bizarre functions like Weierstrass function. It seems impossible.  Thanks in advance for help! Let $f:[0;1]\to\mathbb R$ be continiously differentiable Multiplexing UART I'd like to interface my main microcontroller's hardware serial port to more than one device at the same time. My understanding is that UART on my microcontrollers is based on an active-low 5V TTL.  (I know what I'm explaining here can be technically achieved by using more suited protocols, such as SPI and I2C, but my project requires to be only implemented using UART.)  Here's a pseudo-schematics chart of what I'm trying to achieve:         &ndash; Schematic created using   Please note that:   I don't want to use a second UART interface on the master, or any of the slaves. Only one slave at a time is going to transmit or send data on the line to the master. (e.g. If the slave 1 is transmitting data, slave 2 and 3 should remain idle.) Whatever the master is transmitting can, and should be received by all of the slaves. All of the slaves should be hot-pluggable, meaning they could be removed or inserted at any time. The RX and TX wires to the master are parallel between each slave, so no daisy chaining.   So, my questions are as follows:   Assuming the correct impedance is considered, I shouldn't need an additional circuit to transmit data from the master's TX line to any of the slave's RX line simultaneously. Is this correct? I understand that without current limiting resistors between slaves' TX line and the master's RX line, if any of the devices begin to broadcast data, the line between the devices will short circuit and I risk damaging them. Is this correct? Assuming the items 1 and 2 are correct:  a) Would just some current limiting resistors be enough to use?  b) Can I use 74-series logic gates instead of resistors? Between options a and b above, what route should I choose? For a reliable 115200 baud rate connection, will the switching frequency of a 74HC08 AND gate suffice to be incorporated?   EDIT: I'm well aware of other well-suited protocols such as SPI and I2C. There's a reason I'm using UART, and that's because the optiboot bootloader that is used on the master's mcu communicates over UART, albeit UART's obvious limitations.  Also, while daisy-chaining is definitely a clever approach, due to breaking the 4th requirement, it also breaks bootloader functionality.  The devices could also be USB-to-Serial chips, and using SPI-to-USB or I2C-to-USB would not be feasible in this project.  So, I'd appreciate if you could focus on the 6 questions listed here instead, and share your UART knowledge. On approving an edit, I just get this pop up since morning. At first I thought there might be some internet connection issue, but this is now the 3rd to 4th time I got the same error; also, the review is accepted because on refresh I can see my name with approved text beside, but it still throws this error.    I am on a Windows 7 machine, running Firefox 24 (Icognito/Private Mode)    Also, this happens only when edit(1) is written on an question/answer, I don't go to review queue and approve, these reviews were directly loaded from the notification beneath the question/answer.  Martijn Pieters reproduced the problem from the review queue three times; each time the improve option was picked, accepting the suggested edit but editing the post some more. The network console shows that posting to https://stackoverflow.com/review/task-reviewed fails, the server responds with a 404 error:  Request headers: POST /review/task-reviewed HTTP/1.1 Host: stackoverflow.com Connection: keep-alive Content-Length: 137 Accept: application/json, text/javascript, */*; q=0.01 Origin: http://stackoverflow.com X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 Content-Type: application/x-www-form-urlencoded DNT: 1 Referer: https://stackoverflow.com/review/suggested-edits/3575396 Accept-Encoding: gzip,deflate,sdch Accept-Language: en,en-US;q=0.8,nl;q=0.6,nb;q=0.4,no;q=0.2,de;q=0.2,fr;q=0.2 Cookie: &lt;redacted&gt;  POST data: taskTypeId=1&amp;reviewTaskId=3575396&amp;taskResultTypeId=5&amp;fkey=f8791a329b445b658876f4d3afe7961e&amp;postCommentId=null&amp;taskResultSubtypeFlags=null  Response headers: HTTP/1.1 404 Not Found Cache-Control: private Pragma: no-cache Content-Type: application/json X-Frame-Options: SAMEORIGIN Date: Fri, 13 Dec 2013 12:04:53 GMT Content-Length: 0   On the  itself, no record is made of the accept; instead the suggested edit is recorded as approved by 3 people not including Martijn Pieters. In this case the improve review arrived too late.  In , improve again resulted in the error, but the Community account is shown rejecting the edit. Can someone use DC generator along with electric motor to make electricity along with mechanical energy? I know this might sound stupid and maybe stupid totally, but I need some clarification....  I came through electric motor principle.  and then I came across the following link on DC generators    Now my question is, can't we combine them both to provide DC current with little DC used in motor side? By "combine," I mean using a DC generator coil only at the other side of the coil of the motor in the motor itself. The condition is that the 2 coils are connected via some apparatus that causes the 2nd coil to move along with the 1st coil.   In this way we can use both the mechanical energy produced by the 1st coil and the electrical energy produced by the 2nd coil, right?   This is a great concept if it works, right? Please throw some light on this. I always used to open a new VLC window; go to "open file"...etcetera when I wanted to watch something because when I click on a file in Windows Explorer and chose "open with" or just clicked on the file or right-clicked to choose "play with VLC" it always opened in an old already used VLC window.  Is there any way to get VLC to use a new one without always resorting to: Open VLC, "open file", find file etcetera? How can I use a command to delete all files in Downloads whose dates added are greater than 1 year? I am using a Mac. How can I use a command to delete all files in ~/Downloads whose dates added are greater than 1 year? Seemingly random reputation gain of 1 Double decimal formatting in Java Home folders accessible to other users and should not be, how to fix? Why are my home folders accessible by other users on the same system by default?  I understand that I can change the permission of the home folders but want to know why this happened?  I have done nothing to make the folders "shareable" and yet I can easily navigate to any users home folder using Nemo 2.4.5 and see all their contents.  This is quite a privacy and security flaw and I'm not sure why it has defaulted this way on my system.  Under Users and Groups (items checked =) (both are administrator accounts)  User 1 = adm, cdrom, dip, lpadmin, plugdev, sudo  User 2 = User 2, sudo  Also of note is why User 2 has User 2 clicked but User 1 does not have User 1 clicked.  Both accounts appear to behave exactly the same.  Thank you for any tips in this matter. Fade in each element - one after another I am trying to find a way to load a JSON page to display my content, which I currently have. But I am trying to fade in each element one after another? Is anyone familiar with a way to do that?  Fade in each element with a slight delay?  Here is an example of my code, I am using the jquery framework.  CODE: Miktex Package Installation I recently installed MiKTeX with the texmaker editor and cannot figure out how to update the packages. When I attempt to use the subfigure package with the following preamble  \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{subfigure}   I then get a prompt to install a new package, which I then set to the online directory at ctan. I then get the following error:   ! LaTeX Error: File `subfig.sty' not found.Type X to quit or &lt;RETURN&gt; to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.&lt;read &gt;   How do I properly install packages to miktex? I'm absolutely confused. Thanks in advance for any help.