How to construct a homomorphism from an abelian group to $\mathbb{Q}$
Show $\text{Hom}_{Ab}(A,\mathbb{Q}) = \{0\}$ for finite $A$
Workaround for Android 4.4 not being able to write to SD cards? Yesterday I upgraded my Samsung Galaxy S4 to Android 4.4 KitKat and had the bad surprise that it cannot write to my SD card anymore... I know this problem is widely documented everywhere, but has any workaround been found for it yet? (Other than removing the card physically from the phone and opening it on my PC) Also, because of the KNOX flag I can't downgrade to 4.3...  (PS: Rooted or not, it makes no difference) Find $|(\mathbb{Z} \oplus \mathbb{Z}) / \langle(3,6)\rangle|$ and determine if its cyclic The Most Efficient Way To Find Top K Frequent Words In A Big Word Sequence Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence. Output: The most frequent K words in the text.  My thinking is like this.    use a Hash table to record all words' frequency while traverse the whole word sequence. In this phase, the key is "word" and the value is "word-frequency". This takes O(n) time.  sort the (word, word-frequency) pair; and the key is "word-frequency". This takes O(n*lg(n)) time with normal sorting algorithm.  After sorting, we just take the first K words. This takes O(K) time.    To summarize, the total time is O(n+nlg(n)+K)， Since K is surely smaller than N, so it is actually O(nlg(n)).  We can improve this. Actually, we just want top K words. Other words' frequency is not concern for us. So, we can use "partial Heap sorting". For step 2) and 3), we don't just do sorting. Instead, we change it to be  2') build a heap of (word, word-frequency) pair with "word-frequency" as key. It takes O(n) time to build a heap;  3') extract top K words from the heap. Each extraction is O(lg(n)). So, total time is O(k*lg(n)).  To summarize, this solution cost time O(n+k*lg(n)).  This is just my thought. I haven't find out way to improve step 1). I Hope some Information Retrieval experts can shed more light on this question. Corrupt MXD Causes? In  is a proof of Stirling's formula.  I really like most of it, but at a crucial step he uses the integral identity  $$n! = \int_{0}^{\infty} t^n e^{-t}  dt$$  , coming from the Gamma function.  I have a mathematical confession to make: I have never "grokked" this identity.  Why should I expect the integral on the right to give me the number of elements in the symmetric group on $n$ letters?    (It's not that I don't know how to prove it.  It's quite fun to prove; my favorite proof observes that it is equivalent to the integral identity $\int_{0}^{\infty} e^{(x-1)t}  dt = \frac{1}{1 - x}$.  But if someone were to ask me, "Yes, but why, really?" I would have no idea what to say.)  So what are more intuitive ways of thinking about this identity?  Is there a probabilistic interpretation?  What kind of random variable has probability density function $\frac{t^n}{n!} e^{-t}$?  (What does this all have to do with Tate's thesis?)  As a rough measure of what I'm looking for, your answer should make it obvious that $t^n e^{-t}$ attains its maximum at $t = n$.  Edit:  The kind of explanation I'm looking for, as I described in the comments, is similar to  of the beta integral. Acces VBA code combination not working, issue with exit sub? I'm very new at VBA and I can't seem to solve this problem. It seems like it should be an easy problem to fix, I just don't know how.   So what the code does: In the main form is a record. This record will be copied to another table bij pressing a button on the form. Before the copying begins, the code checks first if the 'OMnummer' has been filled in in the subform.  If not, a message box appears saying that the user should fill in the subform and the code stops running.   Secondly the code checks if the record is allready present in the other table. If so, a messagebox appears and the record will not be copied. If not, the record will be copied to the other table.   Both pieces of code work ok seperately. However, when I try to include both pieces in the same private sub, only the first one works. It may be something with the 'Exit Sub' code or I am not using the If - Then right.   Hope you can help me!  Monika   Private Sub KnopProjectVersturen_Click() On Error GoTo ErrProc  If IsNull(Me!Subform_OMnummers.Form!Omnr) Then  If MsgBox("Vul het OMnummer in. Je kan het project niet exporteren zonder OMnummer.")     Then       Exit Sub      DoCmd.OpenQuery "Qry_Depo_ControleAanwezig"  If DCount("Deponering.projectnummer", "Qry_Depo_ControleAanwezig") = 0 Then         DoCmd.SetWarnings False         DoCmd.OpenQuery "Qry_projectnaarDepot"          DoCmd.OpenQuery "Qry_ToevoegProjectDepot"         DoCmd.OpenForm "Depot_uitvoer", , , "[Projectnummer] = '" &amp; Me![Projectnummer] &amp; "' And [subID]=[subID]"     Me.Status = 8     DoCmd.Close acQuery, ("Qry_Depo_ControleAanwezig")     DoCmd.SetWarnings True  Else         MsgBox "Dit project bestaat al in de Depot_Uitvoer, verander de status in het projectformulier", vbInformation, "Example"         DoCmd.Close acQuery, ("Qry_Depo_ControleAanwezig")     End If  End If  End If    'Als er fouten zijn laat deze code een messagebox zien met het nummer en de melding.  ExitProc:  Exit Sub  ErrProc:     Select Case Err.Number     Case Else         MsgBox Err.Number &amp; "--" &amp; Err.Description         Resume ExitProc         End Select End Sub Is $\sqrt{64}$ considered $8$? or is it $8,-8$? Last year in Pre-Algebra we learned about square roots. I was taught then that $\sqrt{64}=8$ and $\sqrt{100}=10$, which I understood and accepted. I was also taught that $\pm\sqrt{64} = 8,-8$ because both of those numbers squared is 64, which I also get. But this year, with a new school and teacher in a different state, our teacher is telling us that: $\sqrt{64}=8,-8$ and $\pm\sqrt{64}$ also is $8,-8$. The way to get the positive root of something is: $+\sqrt{64}=8$ And these seem to contradict each other. I was always taught that a regular square root returned a positive number and only a positive number, but now my teacher is saying a regular square root gives two numbers, and considering the square root of a number $n$ is defined as $y^2=n$ I see where he is coming from. Upon researching this Wikipedia says:  For example, $4$ and $−4$ are square roots of $16$ because $4^{2} = (−4)^{2} = 16$  And Wolfram MathWorld says:  Note that any positive real number has two square roots, one positive and one negative. For example, the square roots of $9$ are $-3$ and $+3$  But on the other side, Wolfram Alpha, when given &quot;The square root of 9&quot; gives only 3.  So, which is right? Is $\sqrt{64}$ considered $8$? or is it $8,-8$? Evaluate $\lim_{n\to \infty} \sum_{r=1}^n \frac {1}{2^r}\tan \left(\frac {1}{2^r}\right)$ Evaluate $$\lim_{n\to \infty} \sum_{r=1}^n \frac {1}{2^r}\tan \left(\frac {1}{2^r}\right)$$   I tried to create a telescoping sum but I couldn't. The last step I could reach was turning the limit into $$\lim_{n\to \infty} \sum_{r=1}^n \left(\frac {1}{2^r(1-\tan (2^{-r+1})} -\frac {1}{2^r(1+\tan (2^{-r+1})}\right) $$  But couldn't proceed further. Also I thought about Riemann sums but it was a pure dead end.  Any help would be greatly appreciated Taking the second derivative of a parametric curve How to set JAVA_HOME to point to a JDK installation? I installed sun-java6-jdk.  I need to find its home directory. JAVA_HOME must point to a JDK installation, not JRE. Why does my front derailleur not work when it is cold? When it is warm outside my front derailleur works just fine. But when it gets colder (40F) the lever on the handle bar does not catch and I can move it without any resistance the whole way without the derailleur shifting.  Update: The wire is not moving and the shifter is a Shimano Deore.  Any idea what can cause that and how to fix it? Is Java's default value for Boolean 'true'? Equivalent of cURL for Ruby? What is going on with pgfpages and page labels? I’m using a feature of beamer that shows notes beside slides, but the page numbers that are coming out are crazy, making it impossible to extract specific slides into other documents with \includegraphics[page=n]{presentation.pdf}.  For example, in this MWE, there are two frames that are each 1 slide, and then one frame that is four slides. The PDF page labels that show up in Acrobat are, as indicated, 2, 3, 3, 3, 3, and 7. It starts at page 2 instead of 1, and then there are four page 3s, but they don’t even all belong to the same frame!  \documentclass{beamer} \usepackage{pgfpages}  \setbeameroption{show notes on second screen=left} \setbeamertemplate{note page}{frame \insertframenumber \\ \insertnote} \def\pg#1{pgfpages says this is page #1 but it is really page \arabic{page}}  \begin{document}  \setcounter{page}{0}  \frame{hi \note{\pg{2}}}  \frame{there \note{\pg{3}}}  \frame{how \pause are \pause you \pause today \note&lt;1-3&gt;{\pg{3}} \note&lt;4&gt;{\pg{7}}}  \end{document}   Here’s what the output looks like:    I know that the manual says, “pgfpages will produce wrong page numbers in the .aux file” and gives a manual workaround. But the page counter still works, so shouldn’t there be some way to pass that through to the PDF? I’d like to fix this, but don’t know where to start. Specifically, when the manual says that “TeX instantiates the page numbers when writing an .aux file only when the physical page is shipped out,” what exactly is it talking about? Where is the source code for that? Symmetric encryption construction (meet-in-the-middle attack) This is a question I had from an exercise session.  First we do DES in CBC encryption mode using a key $K_1$ and $IV_1 = O^n$. Then we do DES in ECB decryption mode using $K_1$. And then DES in CBC decryption mode with a secret $IV_2$ and key $K_2$.  Is this construction safe against meet-in-the-middle attack?  Wouldn't the first two operations negate themselves because $C_1$ would decrypt into $P_1$? When running 'screen ls' the screen stops with the text [screen is terminating]. I would like screen to keep the session alive and reattach to it to see the output of ls.  Of course the real thing is that I don't run screen ls, but rather a screen fsck ..., so I would like to ensure that the screen is not terminating when this command is finished.  I would love to have an answer that is useful for an already existing running screen session, so some interactive keys like C-a ... or C-a : (Enter command line mode) Virtual member call in a constructor Work done against gravity The work done against gravity is $mgh$, well at least that's what my textbook says. I have a question: I can apply a force say 50N, so total work done = $mgh + mah$. Where $ma$ = Force. But the truth is irrespective of the force applied, the work done against gravity is always $mgh$. Why?  For example, when I move an object with a force, the work done is more, so work depends on the Force. But in case of gravity it always depends upon the weight Avoiding "(Not Responding)" label in windows while processing lots of data in one lump I occasionally need to process a large amount of data from one package off the network, which takes sufficiently long that when the user tries to interact with the application windows adds the "(Not Responding)" string to the window title. I am aware this is because the processing is being done within a call to handle a message (some way up the stack) and therefore is blocking the message pump. I'm also aware the ideal way to deal with this is to process the data asynchronously in a separate thread so the pump can continue running, however this is a LARGE desktop application which is single threaded from top to toe and safely spinning this processing off is not feasible in our time frame.  So with that in mind, is there by any chance a way I can at least avoid the "not responding" moniker (which to most users reads as "has crashed") by telling windows my application is about to be busy before I begin the work? I believe there is something along these lines when responding to a request to close, one can keep asking windows for more time to avoid it proclaiming that your not "closing in a timely fashion"  I should add this is a C++ MFC application. There has been quite a few times that I wished I could send a message to another user on SO - not ask a question for everyone to see, but just a short message informing them of something or requesting them to do something.  Are there any plans to allow this to happen in the future?  Related: