I have an older hp pavilion all in one pc and after upgrading to 15.04 whenever I tell the computer to shutdown while in unity (haven't tried other DEs) it goes to the login screen as if I'd only pressed logout. It will then shutdown if I select shutdown from the menu in lightdm. But why is it doing this?
Since i upgraded to Ubuntu 15.04, if i click on the shutdown button it only logs out and i have to click again on the shutdown button (from the ubuntu login screen) to power off the pc. How can i fix this?
Is there a standard function in C that would return the length of an array? Convergence of an alternating series : $ \sum_{n\geq 1} \frac{(-1)^n|\sin n|}{n}$ Study the convergence of $$\displaystyle \sum_{n\geq 1} \frac{(-1)^n|\sin n|}{n}.$$   I am stuck with this series, we need probably some measure of irrationally of $\pi$, unfortunately I am unfamiliar with this. So here is my attempt :  Let $f(x) = \sum \frac{|\sin{n}|}{n} x^n, |x| &lt; 1$  It's not difficult to compute the Fourier series of $|\sin(x)|$ :  $$ \displaystyle|\sin(x)|=\frac{2}{\pi}-\frac{4}{\pi}\sum_{n=1}^{+\infty}\frac{\cos(2nx)}{4n^2-1} $$  Then Fubini's theorem () works very well (because the previous series converges absolutely at $x$ fixed ) and all calculations made, we find that for all $x\in( -1,1)$:  $$ \displaystyle f(x)=\frac{2}{\pi}\sum_{n=1}^{+\infty}\frac{x^n}{n}-\frac{4}{\pi}\sum_{p=1}^{+\infty}\frac{x^2-2x\cos(p)}{(4p^2-1)(x^2-2x\cos(p)+1)} $$  However, the second sum I have not been able to show the convergence. I feel the series diverge because the following series $$ \displaystyle\sum\frac{1}{p^2\sin^2\left(\frac{p}{2}\right)} $$  diverge because  $0$ is an accumulation point of $\displaystyle (n\sin(n))$ sequence.  Any ideas (for the original series) ? Imaginary line on the Earth is straight or not? I was watching Google map. Saw a line which is joinging north to south pole. It is going between middle of China and Mexico. But, the line is not straight. Tried to search in net but not able to get anything. Can anyone check and let me know  or Minecraft Test If A Chest Contains An Item I've seen a lot of questions for finding specific items in chests using commands using testforblock but how would you test if any block/item has been placed in a chest?  Thanks Why are there no animals in "The Matrix"? Aside from the repetitive appearance of the black cat, I can't remember seeing any living animals, either inside the Matrix simulation or in Zion.  How come? Is there an in-universe explanation? How would you make a comma-separated string from a list of strings? What would be your preferred way to concatenate strings from a sequence such that between every two consecutive pairs a comma is added. That is, how do you map, for instance, ['a', 'b', 'c'] to 'a,b,c'? (The cases ['s'] and [] should be mapped to 's' and '', respectively.)  I usually end up using something like ''.join(map(lambda x: x+',',l))[:-1], but also feeling somewhat unsatisfied. We've just been learning about complex numbers in class, and I don't really see why they're called numbers.  Originally, a number used to be a means of counting (natural numbers).  Then we extend these numbers to instances of owing other people money for instance (integers).  After that, we consider fractions when we need to split things like 2 pizzas between three people.  We then (skipping the algebraic numbers for the purposes of practicality), we use the real numbers to describe any length; e.g. the length of a diagonal of a unit square.  But this is when our original definition of a number fails to make sense- when we consider complex numbers, which brings me to my main question: what is a rigorous definition of 'number'?  Wikipedia claims that "A number is a mathematical object used to count, label, and measure", but this definition fails to make sense after we extend $\mathbb{R}$.     Does anyone know of any definition of number that can be generalised to complex numbers as well (and even higher order number systems like the quaternions)? Split List into Sublists with LINQ Is there any way I can separate a List&lt;SomeObject&gt; into several separate lists of SomeObject, using the item index as the delimiter of each split?  Let me exemplify:  I have a List&lt;SomeObject&gt; and I need a List&lt;List&lt;SomeObject&gt;&gt; or List&lt;SomeObject&gt;[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially).  eg.:   Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c]   I'd also need the resulting lists size to be a parameter of this function. The MathJax code in Mathematics Stack Exchange doesn't render after I updated to the new version (It used to):     App Version: 1.6.2.5 Device: iPhone 6s OS Version: Version 9.0 (Build 13A342) POSIX compliant way to redirect stdout and stderr to a file I am trying to write a script which is POSIX compliant, so it can run on any *nix system (Debian, Fedora, CentOS, AIX, Arch... ALL of them). When it comes to redirection, I am rather confused on what is supported by POSIX and what is not.  If I redirect ls -l file missingfile &amp;&gt; out.txt this works perfectly in bash. The line from stderr complaining that missingfile doesn't exist, and the permissions output from file, are both in out.txt. However, I believe this is only working because these shells support more than just POSIX standard operators. Upon researching this question I've come across conflicting answers.  , for example, seems to imply that &amp;&gt;, &gt;&amp;, &gt;&gt;&amp; and &amp;&gt;&gt; are non-standard operations. However,  explicitly states that some-program &gt; some_file 2&gt;&amp;1 is POSIX compliant. Does this mean that the &gt;&amp; operator (using digits for stderr &amp; stdout) is POSIX compliant whereas using &amp;&gt; to auto redirect both stderr and stdout to a file is not POSIX compliant? Or are both &amp;&gt; and &gt;&amp; not POSIX compliant / POSIX compliant (one of these two people are wrong)?  I considered just avoiding the &amp; sign completely and using ls -l file missingfile &gt;out.txt 2&gt;out.txt however this comes with its own issue. Running the ls command this way causes the shell to open two file handles for out.txt, both pointing to offset 0 in the file. So when ls looks for these two files, one of the messages gets clobbered.  What one would expect ls -l file missingfile &gt;out.txt 2&gt;out.txt to output:  -rw-r--r-- 1 blah blah 0 Jun  3 13:18 file ls: cannot access 'missingfile': No such file or directory   What is actually output:  -rw-r--r-- 1 blah blah 0 Jun  3 13:18 file le or directory   What is the best way to redirect both stdout and stderr to a file in a POSIX compliant fashion? What's the bad magic number error? Deciphering the RSA encrypted message from three different public keys I have three different 1024-bit public keys with common exponent $e$ but different moduli. A message $m$ is encrypted (without padding) using the three keys, which results in three different encrypted messages.  Given the three pairs of public keys $(N_i,e)$ and the encrypted messages $c_i=m^e\bmod N_i$ , how do I decipher the original message $m$ ? As every American teenager "knows" there is no speed limit on the Autobahn. My understanding, however, is that there is still such a thing as excessive speed even on this free-for-all.   So, ignoring the practical "don't be an idiot" and "don't drive faster than you can handle," at what speeds would die Polizei be pulling you over?  Bonus points for translating km/hr into miles/hr. integral roots for $f(x) = 41$ if $f(x) = 37$ has 5 distinct integral roots. I can open Thunderbird but as soon as I click on any file thunderbird freezes. Went to tools can see first page of settings but thunderbird freezes.  Ran norton 360 &amp; rebooted too   Went to firefox website to download thunderbird Version 3.1.9 (3) program downloads and then freezes while norton checks for viruses....  Any suggestions? Why was mixing declarations and code forbidden up until C99? How to animate A curve segment? I want to make an animation in time to a song so when I hit play on the timeline I need to be able to hear the song so I can finely tune the animations to start and end at the right time.  Is it possible to have sound play on an animation while it is playing in the 3d viewport before it has been rendered. Possible Duplicate:           What book would you recommend for an undergraduate wanting to learn the basics of topology? I've come across several books that claim to give an introduction to the subject, but I wasn't sure which one(s) to pick.  Here are some of the books I came across:   Introduction to Topology - Bert Mendelson Basic Topology - M.A. Armstrong First Concepts of Topology - William G. Chinn Topology Without Tears - Sidney A. Morris Topology - James Munkres   They don't go over the exact same topics, some are more in-depth than others, some seem to target slightly different audiences etc. What would be right for me (not necessarily from that list)? To give some more background, I want to learn topology because I feel it will be somewhat helpful in the field of Computer Vision. How to set custom keyboard shortcuts from terminal?