I am trying to evaluate the following integral using the residue theorem:  $$\int_0^{2\pi} e^{ \cos(\theta)} \cos(n\theta) d\theta$$  I have already evaluated $\int_0^{2\pi} e^{e^{-i\theta}} e^{i n\theta} d\theta$ using the residue theorem by making the substitution $z = e^{i\theta}$ and then finding the coefficient of the $z^{-1}$ term in the Laurent series expansion. Now, however, this no longer works, so any help would be appreciated.  Thank you.
The following integral should be doable using the residue theorum:     $$\frac1{2\pi}\int_{0}^{2\pi}e^{\cos\theta}\cos(n\theta) \,d\theta$$
Now that I know , I was wondering how I can restart the phone or turn it off.  The lock button is completely unresponsive and holding it down does nothing. Are there any workarounds besides replacing the button? How to decide whether to replace or repair? Overdispersion and Underdispersion in Negative Binomial/Poisson Regression I was performing a Poisson regression in SAS and found that the Pearson chi-squared value divided by the degrees of freedom was around 5, indicating significant overdispersion. So, I fit a negative binomial model with proc genmod and found the Pearson chi-squared value divided by the degrees of freedom is 0.80. Is this now considered to be underdispersed? If so, how does one go about handling this? I have read a lot about overdispersion and believe I know how to handle this but information on how to handle or determine if there is underdispersion is scant. Can anyone assist?  Thanks. Change location of macOS Notification Center alerts? Is it possible to change where macOS Notification Center alerts appear on the screen?  They currently appear at the top right of the screen with the menu bar:    Alerts appearing in the top right tend to cover up work I'm doing more often than not. They cover up browser tabs, toolbar icons, and window titles.  I would prefer, say, the bottom right corner of the screen.  If moving the alerts is not possible, is it possible to change the screen on which they appear? Objects not rotating or scaling in viewport Automatically detect edit abuse and exclude from badges/flag for mod review has 5 pages of 1 character edits (including an edit to one of my posts), apparently in a massive attempt to earn the Copy Editor badge.  Should Copy Editor, etc., ignore 1 character whitespace-only edits?    If we still want to count minor edits (which may be useful), could we at least detect edit abuse via some secret algorithm? ~20+ one character whitespace-only edits in the course of an hour should at least raise a flag of some sort.    If whitespace character are too hard to count, can we at least assume that 20 non-tag edits in 20 minutes (less than a minute per edit) is a good signal of abuse? The specific algorithm should be secret, obviously, but I think these sorts of edit abuses shouldn't be too difficult to detect. Could there be an eighth Horcrux? Positive euphemism for "harped on" How can I replace harped on with a more positive expression?  The production manager harped on the new quality assurance regulations for nearly an hour. SD card partitioning? why? how? Ordeal of Heliod and changing creature control Here is the situation that came up:  Player 1 controls a creature enchanted with  and two +1/+1 counters. On Player 2's turn, they cast  to take control of the creature, and then attack with it. The attack triggers the Ordeal, putting another +1/+1 counter on it. Now that it has three counters, it is sacrificed and a player gains 10 life.  Which player sacrifices the enchantment and gains 10 life? The controller of the creature (Player 2) or the player who cast the enchantment (Player 1)? Recommended way to save uploaded files in a servlet application I have to submit a manuscript to a journal, and I just realized that they want every single part of the paper to be in 12 pt font. This includes tables text, footnotes, acknowledgements etc. Is there a way to force all text to be the same size? Is a 1st-level spell cast using a 4th-level slot a 1st-level spell, or a 4th-level spell? How is Bohr's model related to electron cloud models via the correspondence principle? So, I'm working with OpenGL (I'm not exactly sure of the version), and I want to do an old-style lighting setup by essentially drawing a black rectangle over the screen, and drawing white circles over the areas that should be lit. I already have the rectangle and the circles, but I can't figure out how to make it so that the white circles are transparent when applied to the black areas. Any ideas? I tried to use blending modes, but it still evades me...  EDIT: Here's the code that I'm using (Python).  view_buf = Buffer(GL_INT, 4) glGetIntegerv(GL_VIEWPORT, view_buf) view = view_buf.to_list() if hasattr(view_buf, "to_list") else view_buf.list  glDisable(GL_DEPTH_TEST)  glDisable(GL_LIGHTING)  glEnable(GL_BLEND)  if logic.lights['smooth']:     glEnable(GL_LINE_SMOOTH)  # # Make sure we're using smooth shading instead of flat # glShadeModel(GL_SMOOTH)  # Setup the matrices  glMatrixMode(GL_PROJECTION) glPushMatrix() glLoadIdentity() gluOrtho2D(0, view[2], 0, view[3]) glMatrixMode(GL_MODELVIEW) glPushMatrix() glLoadIdentity()  #glAlphaFunc(GL_GREATER, 0.5)  glColor4f(0.0, 0, 0, 0.75)  glBegin(GL_QUADS);                              # Draw Black screen glVertex2d(0.0, 0.0); glVertex2d(view[2], 0.0); glVertex2d(view[2], view[3]); glVertex2d(0.0, view[3]); glEnd()  glColor4f(1, 1, 1, 1)  degtorad = 3.14159/180.0   glBlendFunc(GL_ZERO, GL_SRC_ALPHA)  def DrawCircle(x, y, radius, fill = 1, step = 11):      glVertex2f(x, y)      if fill:         glBegin(GL_TRIANGLE_FAN)     else:         glBegin(GL_LINE_LOOP)      for a in range(0, 360, step):         angle = degtorad * a         glVertex2f(x + (sin(angle) * radius), y + (cos(angle) * radius))      glEnd()   #for layer in range(len(logic.lights['layers'])): #   size =  for light in logic.lights['points']:     DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], step = light[2])     if logic.lights['smooth']:         DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], 0, light[2])  # Reset the state glPopMatrix() glMatrixMode(GL_PROJECTION) glPopMatrix() How do I read a resource file from a Java jar file? What do the words 'RELATED' and 'ESTABLISHED' individually signify in RELATED,ESTABLISHED state in iptables? Angle notation for complex numbers in polar form I am looking for suggestions on how to typeset complex numbers in the modulo-argument form, sometimes called phasor notation. Have already checked  but nobody mentions this in particular. I am explicitly excluding exponential and sine-cosine notations. My MWE is as follows  \documentclass{article} \begin{document}     $z = r \angle \phi$ \end{document}   I think it looks ugly, specially if the angle has many digits, ie  $z = 1.19 \angle -78.2039^{\circ}$   I was thinking of an \angle replacement which maybe would extend the lower segment up to the last digit. What do you think?  EDIT: It looks like the steinmetz package doesn't do a good job with the vertical space if the \phasor{} argument has a \fraction{}{} with parenthesis, see:  \documentclass{article} \usepackage{steinmetz}  \begin{document}     Something.     \[I = I \phase{\left(\frac{A_0}{B_0}\right)}\]     This line is too close to the upper equation, don't you think?      \[I = I \phase{\left(\frac{A_0}{B_0}\right)}\]     Whereas this line is NOT so close to the upper equation. \end{document}   Strangely, commenting the first line (% Something.) fixes the problem. Is there any way to fix this? How to resize array in C++? I recently installed Ubuntu 18.04 and I'm not keen on the desktop environment. I want the desktop env. I used to have in Ubuntu 14.04. How can I get it?  I've attempted to use , but when I try to install the Unity's 7.2.5 version using the command:  apt install unity=7.2.5   it gives me   E: Version '7.2.5' for 'unity' was not found   For sure I need to add a PPA for this, but which one!?