Closed form of $\sum_{k=1}^{2015}(-1)^{k(k+1)/2}k$
Find the sum of finite series $S=\sum_{k=1}^{2015}{(-1)^{\frac{k(k+1)}{2}}}k$
How do I get my Mac to boot from an Ubuntu USB key? Adobe Illustrator: Lines with stroke < 2.0pt doesn't change color I created lines using the line segment tool in Adobe Illustrator (latest Adobe Cloud version) and I can't change the color of the stroke (through the Appearance panel) if the stroke weight is less than 2.0pt.   If the stroke is 2pt or more, then the color around the line changes but not the line itself.    The whole behavior is odd for me as I've never faced in Illustrator before.  Edit: added screen below with the line selected. I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script. Difference between $(this) and event.target? If $(\log_4 x)^2= (\log_2 x)(\log_a x)$ (the $4$ is the little number next to log by the way) , find the value of $a$. Selenium Webdriver: No such element exception even though element gets available after waiting for some time How to use "fit" to frame the nodes and labels By default after a new user signs up, a redirect to the home page happens.  But in such case I want to redirect such user to another page like node/35.  In this node/35 I then want to display some content. When should unions be used? Why do we need them? Collapsing a stream of multiple lines into one line I have a file containing a a large number of lines, each of which contains a bunch of numbers which are separated by spaces. I process this data in a pipe in some way, and then I want to collapse the multiple lines into a single line of all the numbers separated by spaces.  Is there a standard command-line utility I can use to do this? It seems like most line-by-line utilities won't mess with the newlines... Does shoving a creature break its grapple on another? A situation came up in my session where a fighter used his Shield Master Shove feature to shove a Giant Crocodile that was currently restraining another PC using it's bite+grapple ability.  I did a quick check at the time and did not find anything related to shove, although in the  condition description it states:     The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell.   I ruled at the time that a shove would count in a similar way to being "hurled away" however I wasn't sure and said I would find more concrete information for the future.  I have searched high and low for somebody else asking this specific question but have yet to find it. I saw some reference to a Jeremy Crawford tweet about involuntary movement and grappling however I am unable to find it.  If a third party "shoves" a creature that is grappling another, does it only shove the grappler away, or does it move both the grappler and grappled?  I drew a diagram:   (; this question relates to if a third party shoves the grappler instead, so it's not a duplicate.) Radius of circumscribed circle of triangle as function of the sides Given the length ot the sides $a , b$ and $c$  of $ \triangle ABC$.  What is the length of the radius of the circumcribed circle?  After some formula substitution I came to the monster formula:  $$ \frac {a b c}{\sqrt{2a^2b^2+2a^2c^2+2b^2c^2-a^4-b^4-c^4}} $$  Can this formula be simplified? What are the summary rules for when to use image stabilization and when not to? When I got my DSLR, I took a lot of pics and all of them came excellent, even though I had VR at the "Off" position.   Since those came out so well, I wonder when should I turn VR on, and when I should just leave it off.   I found  which answer this question in detail, but that's too much for me to understand easily. Can someone explain the strict rules in short?  Should I use VR with tripod? When should I use it when I'm not using a tripod, and when should I leave it off? Is there an easy way to tell if a graph can be embedded on a Möbius strip (with no edges crossing)?  A specific version of this: if a simple graph with an odd number of vertices has all vertices of degree 4, can it be embedded on a Möbius strip?    Answer summary:   There are  for the Möbius strip that are   and drawn on . There are  for the Möbius strip, they are , and even better there are only .   I have not yet answered the second question, but Jim Belk's excellent explanation has given me good ideas. What happens if I buy a game I already own through Steam a second time? I am debating whether or not to get the Potato Sack (yes, I realize I've been debating for several weeks now) bundle through steam.  I already own: Defense Grid: The Awakening, Super Meat Boy, and Audiosurf, all of which are part of the sack pack. What happens if I buy the Potato Sack?  Do I get 2nd copies of the three above mentioned games to gift elsewhere?  Is the price of the bundle reduced by the games I already have?  Do I get nothing special for already owning those 3 games? ffmpeg working from command line in Terminal but not in an Automator shell script! Prove that   $\dfrac {\left( 5^{125}-1\right)}{\left( 5^{25}-1\right)}$ is composite number using number theory. Do not use calculator or Wolfram alpha or anything like that. Implement MicroController Power Switch and re-use the button for other features This is similar to other questions, but I feel it is different because of the reuse of the "power" button.   I want a "latching" Momentary Power button.  Behavior:   User Pushes momentary button, holds down as long as necessary and the device powers up. Between Power On and Off the same button will be re-used for other functions  When it is held down for 5 +/- seconds the MicroController will turn itself off.    Design Constraints:   Battery provides between 3.7V to 2.9V during it's usable life The Voltage regulator requires Vin +/- 0.3V on the Enable Pin, 3.1V output. MicroController operates at 3.1V MicroController Output Pin High state is 2.7V Max   Debouncing: In this case I'm not concerned about debouncing the switch, if the user doesn't hold it down long enough for the MicroController to set it's Digital Output pin  High the device doesn't power on.  I've worked up the following schematic, which kind of works.    It assumes 3.7V from the battery. Uses an Analog Input for the Power button, which then uses the variation in voltage to determine if the button has been pressed. In the current design the difference is 0.12 V (from 3.4 to 3.52), but the MicroController has a 12 bit ADC so that shouldn't be a problem, in addition I can adjust the sensitivity range of the ADC.   Questions:  What is the difference between reality and the simulator?  Is there a better way?  How can I get a greater voltage difference on the button input? I've tried many different combinations but they increase the voltage range above the 3.6V Input High Maximum specified in the datasheet.  I'm not excited about the "Leakage current" when the uC Controlled Power Pin is Low, any suggestions?   Thank you for any ideas/suggestions/answers. Proving a combinatorial identity without double counting Consider the following problem:  We have a collection of m white and n black balls. We pick k balls (k ≤ m+n) without replacement. What is the expected number of white balls in the sample?  Counting method 1: The ratio of white balls in the collection is m/(m+n). If we repeatedly sample the collection, we expect that on average, our sample has the same ratio. Therefore, the expected number of white balls in a sample of size k is km/(m+n). As a side note, I think the above argument somehow depends on the unbiasedness of  the mean estimator. Am I right?  Counting method 2: We directly compute the expected number of white balls in the sample: $$ \frac{\sum_{i=0}^{k} i\binom{m}{i}\binom{n}{k-i}}{\binom{m+n}{k}} \enspace.$$  So, we reach at the identity: $$ \sum_{i=0}^{k} i\binom{m}{i}\binom{n}{k-i} = \frac{km}{m+n}\binom{m+n}{k} \enspace.$$  How to prove the above result without double counting? It seems to be provable using  as well as $i\binom{m}{i} = m\binom{m-1}{i-1}$. But is there a simpler approach (which does not depend on extra identities such as Vandermonde's)? Summarizing flatness of county with statistic Elevation variance per square mile I need to classify every county in the US as either hilly, moderately hilly, or flat. Accuracy is not critical, just a rough classification. I used R and followed the advice in  answer to import elevation and counties and calculated the zonal variance. This was inherently biased towards larger counties since they have more surface for hills, so I need to divide by area. If I divide variance by square miles does that reasonably represent hilliness? The preliminary results seem decent, with the highest values being places like Colorado, Hawaii, Montana, etc.