Reference:   We tried various different trigonometric identities. Still no luck.   Geometric interpretation would be also welcome.  EDIT: Very good answers, I'm clearly impressed. I followed all the answers and they work! I can only accept one answer, the others got my upvote.
Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$
A common scenario we run into on Stack Overflow is that we have a troll, spammer, or obvious sock puppet of another user and moderators decide to delete this user. We go on about our business only to find out an hour or two later that the account we just deleted has been recreated, using the same credentials, and is now back to trolling, spamming, or committing voting fraud once again.  I've seen some people recreate an account like this using the same credentials four or five times (multiple times in the last week, in fact). The only thing that stops them is if we remember to suspend the account for right before we destroy it. Accounts recreated using the same credentials as an account that was suspended will be locked into the same suspension the old account was serving.  In particular, this becomes a real problem with sock puppet accounts that have a network association reputation bonus attached to them, because the recreated accounts keep getting that 100 point bonus and can immediately be used for voting fraud, to troll chat, or to spam comments. I've had to deal with quite a few puppet accounts like this by suspending them for a year before deletion.  I propose that all moderator-deleted accounts behave as if they were suspended for a year upon deletion, so that recreating these accounts using the same credentials will cause the new account to be locked in a one-year suspension. This would prevent the new accounts from being used to abuse the site in the same manner as their old account did.  This won't put an end to people creating new spam, troll, or puppet accounts after we delete them, but it will at least slow them down by forcing them to create new login credentials each time. It also would curb abuse of account association bonuses by puppets. Calling a parent window function from an iframe Mysql Pivot rows into dynamic columns with unknown number of columns I have an output of a query as follows:  bid  | code | amount        | ----------------------------- 2915 | BF   |   -10700.00   | 2915 | YQ   |   -300.00     | 2915 | YR   |   0.00        | 2915 | YM   |   0.00        | 2915 | WO   |   -153.00     | 2915 | IN   |   -329.00     | 2915 | K3   |   0.00        | 2915 | CUTE |   -50.00      | -----------------------------   I need to convert the values in code column to individual columns with column name as corresponding code and amount shall be the value.  bid  | BF       | YQ     | ... | CUTE  | ---------------------------------------- 2915 | -10700.00| -300.00| ... | -50.00|   The issue is that the result of my initial query has dynamic codes and hence need to generate columns accordingly.  Already tried the following logic but couldn't achieve the goal:   , ,   All the above links use some expression or the other to generate the columns.   My original resulting rows are result of simple select on multiple joined tables, and has no calculation or expression scope.  Kindly suggest some pointer or hint on how to achieve this.  Many thanks in advance. I'm using uninstall.php for my plugin to delete all the traces my plugin did to a site on uninstall (delete). I did it in a good way, but even after the deletion there are some fields in the options table:   uninstall_plugins recently_activated _site_transient_update_plugins   in these options there are multiple values from other plugins too.  How can I take care of such traces, how can I remove all those traces too?  I checked WooCommerce and found they leave no traces after there deletion, if the "delete data" checkbox is checked.  How can I do so? Classification of automorphisms of projective space Let $k$ be a field, n a positive integer.  Vakil's notes, 17.4.B: Show that all the automorphisms of the projective scheme $P_k^n$ correspond to $(n+1)\times(n+1)$ invertible matrices over k, modulo scalars.   His hint is to show that $f^\star \mathcal{O}(1) \cong \mathcal{O}(1).$ (f is the automorphism. I don't if $\mathcal{O}(1)$ is the conventional notation; if it's unclear, it's an invertible sheaf over $P_k^n$) I can show what he wants assuming this, but can someone help me find a clean way to show this? Replace Builtin commands with Custom Commands for CMD.exe Plotting solutions to NDSolve What are valid values for "data defined" labeling settings? I'm using QGIS 1.8. I'd like to customize label features on an existing shapefile using the new label engine and it's "data defined settings" option. I'd like to know what the attribute table field types should be for each of the settings: All 7 font options, all 2 buffer options, and all 6 position options. Should they all be numeric fields, or some text, or both? I want to create these fields in the attribute table correctly so that I can map them to the label field settings. I can't find information on the proper field types anywhere. Thanks for your thoughts. What does ':' (colon) do in JavaScript? Let $ G $ be an abelian group of order 6.  Then $ G $ has one element of order 6.  And so, $ G $ is cyclic and isomorphic to $ \mathbb Z _6 $.  In general, It is not true that an abelian group of order $n$ has an element of order $n$.  However in the case of $n=6$, it is true. I'm wondering there is any rule of the case (for example, a rule of $n$ that makes an abelian group cyclic). For instance if me and my friend had a Pidgeot and we powered them all the way up. Could mine end up with like 525 and his at like 500? What determines whether colors you can't see are visible or not? So, when someone is red-green colorblind, the colors appear the same to them, like this:   And if you're totally colorblind, then things presumably just appear like they would in a black-and-white movie.  However, this isn't how ultraviolet patterns seem to work. Compare how we see this flower to the version where ultraviolet is visible:   The UV pattern is completely invisible here. However, unlike with the red and green, this isn't because yellow and UV are colors that appear identical when you can't see UV. Look at these flowers:     This time the flowers are purple, but the UV pattern is still invisible. Why is that? Shouldn't the UV pattern still be apparent on at least one of the flowers, just in a different color? And on some other flowers, the UV does appear as a different color. So:    Why is the UV invisible only sometimes?  Does it have to do with the flower using iridescent structures to produce color, instead of a pigment? Can this happen with red and green, as well? So, let's take Skeptics.SE for an example. You can become a trusted user when you acquire 4000 rep., not 20000  I was like, wow, so is it like this because of the lack of users on Skeptics.Se, as in, not so much as Stack Overflow or something?  Why do some sites need less reputation to be a trusted user? How can I change pdf page size? I would like to split pages in pdf so that each page would be divided into 2 pages ( e.g. form 100 pages I would go into 200 but smaller - exactly half size).  I need this to read pdfs on my ebook reader.  Anybody knows how can this be done ? Remove rogue app from menu bar BitLocker issue. Recovery Key is required on each startup after installing secondary OS I'm using a laptop with TPM module with BitLocker-encrypted internal HDD, running Windows 7. Recently I've installed a Windows 8 on the external, eSATA drive. Windows 8 detected the Windows 7 and correctly replaced the bootloader with dual-boot option.  Unfortunately, I'm now forced to enter BitLocker Recovery Key each time I start the computer. The only workaround I've found was to disable TPM module in BIOS, and suspend BitLocker on the Windows 7 drive.  How to accomplish the following configuration:   Keep the BitLocker running on Windows 7 (internal drive)  Leave the Windows 8 (external, eSATA drive) completely unencrypted  Don't be bugged to enter Recovery Key each time during startup  No matter if the eSATA drive is plugged in, or not   Is it possible? I don't care if TPM is enabled and I just want the Windows 7 drive to be BitLocker-encrypted. How to apply for a Schengen visa when the travel dates are uncertain My husband has a Chinese passport and I am a U.S. citizen; I don't need a visa to travel to Schengen countries. I am helping him to apply for a visa.  Our plans are to go to Paris, Italy and Spain, but we haven't nailed down definite dates; the approximate dates are August 18 to September 11. We made an appointment with Spain consulate to apply for the visa. We need to show air flight reservations, I could book it online without any problems.    Since we don't have definite dates, what dates should he put down on the application?  I know that, once they approve you, they give you 90 days, so does it matter what dates I put down on the visa application?   Our appointment at the Spanish Consulate is in a few days. How to use C++ 11 features in the latest version of g++ Newbie here. I just got an error running from the terminal a C++ program I wrote: error: ‘stoi’ is not a member of ‘std’. They told me the compiler is too old.  I'm using Ubuntu 14.04.  My g++ version is 4.8.4.  How do I upgrade? I understand that information cannot be transmitted at a velocity greater than speed of light. I think of this in terms of the radio broadcast: the station sends out carrier frequencies $\omega_c$ but the actual content is carried in the modulated wave, the sidebands $\omega_c\pm\omega_m$. The modulation envelop has its group velocity and this is the speed at which information is being transmitted. We also know, for example, that x-rays in glass have a phase velocity which is greater than the speed of light in vacuum.   My question is, what exactly is it that is travelling faster than the speed of light?    EDIT: I know it couldn't be anything physical as its superluminal. My problem is, what is it that has absolutely no information content yet we associate a velocity with it. In Java, how do I convert a byte array to a string of hex digits while keeping leading zeros?