Find the sum $\sum _{n=1}^{\infty} {1\over n^2}$ elementary!
Different methods to compute $\sum\limits_{k=1}^\infty \frac{1}{k^2}$ (Basel problem)
multiple definition error including c++ header file with inline code from multiple sources I have a c++ header file containing a class. I want to use this class in several projects, bu I don't want to create a separate library for it, so I'm putting both methods declarations and definitions in the header file:     // example.h #ifndef EXAMPLE_H_ #define EXAMPLE_H_ namespace test_ns{  class TestClass{ public:     void testMethod(); };  void TestClass::testMethod(){     // some code here... }  } // end namespace test_ns #endif   If inside the same project I include this header from more than one cpp file, I get an error saying "multiple definition of test_ns::TestClass::testMethod()", while if I put the method definition inside the class body this does not happen:  // example.h #ifndef EXAMPLE_H_ #define EXAMPLE_H_ namespace test_ns{  class TestClass{ public:     void testMethod(){         // some code here...     } };  } // end namespace test_ns #endif   Since the class is defined inside a namespace, shouldn't the two forms be equivalent? Why is the method considered to be defined twice in the first case? Let $f$ be a measurable function on a measure space $X$ and suppose that $fg \in L^1$ for all $g\in L^q$. Must $f$ be in $L^p$, for $p$ the conjugate of $q$? If we assume that $\|fg\|_1 \leq C\|g\|_q$ for some constant $C$, this follows from the Riesz Representation theorem. But what if we aren't given that such a $C$ exists? I almost always want the profile correct applied, but it's an extra step. Any ideas on how to apply these automatically? How can I add vertices to intersection of two edges? I need to put a point at the intersection of two edges. Below is a picture with red circles around where I need points to be placed. Let $(a_n)$ be a strictly increasing sequence of positive integers such that: $a_2 = 2$, $a_{mn} = a_m a_n$ for $m, n$ relatively prime. Let $(a_n)$ be a strictly increasing sequence of positive integers such   that: $a_2 = 2$ and $a_{mn} = a_m a_n$ for $m, n$ relatively prime. Show that $a_n = n$, for every positive integer $n$.   This is a result apparently due to Paul Erdős, and  has a proof by induction.  I tried like this, $a_{10}=a_2a_5$. After this what we can do?    [Editor's comment] Possibly due to the apparent simplicity of the conditions it may be difficult to appreciate the subtleties of this question. If we try and construct a counterexample like $a_3=4$, $a_4=5$, $a_5=6$, then the requirements dictate $a_6=8$, $a_{10}=12$, $a_{15}=24$. At this point we realize that we have been speeding. For monotonicity forces $a_9\le 11$, and therefore $a_{18}\le22&lt;a_{15}$, violating the requirements. It is not obvious why something similar ruins all the modifications to the sequence $a_n=n$. [/comment, JL] Start + Gerund vs Start + Infinitive: is there a subtle tense difference? Is there a subtle difference between these fragments:  Jack walked over to the car, opened the door, and started to look for the aspirin vial in the glove compartment. Jill looked on skeptically. Jack walked over to the car, opened the door, and started looking for  the aspirin vial in the glove compartment. Jill looked on skeptically. Clip for each feature I want to clip a polyline feature class by a polygon feature class (buffers created from points). Several polygons overlap, so I want to get each polygon feature clipped with each polyline feature.  Using the Clip_analysis tool, I get the orange lines:   whereas I want the following red lines:    In a python script, I tried the following code to clip every polyline with each polygon:          temp = arcpy.ValidateTableName("clip_temp")     bufferCursor = arcpy.SearchCursor(buffer)     n = 0     for pRow in bufferCursor:         arcpy.AddMessage(n)         feat = pRow.Shape         arcpy.Clip_analysis(inputPolylineLayer, feat, temp, "#")         if n == 0:             arcpy.Copy_management(temp, clip)         else:             arcpy.Append_management(temp, clip)         n=n+1   But the execution is very very slow and it crashes before finishing.  I also tried the Intersect_analysis tool but I didn't get the right geometries:   Do you have any idea of a better methods to do it? Ok... so this is embarrassing.  I typed in "boobs" on EncyclopediaDramatica's search because, well, it's a really funny page.  But now I've got a problem... EVERY TIME I click a search field in Chrome now, it shows "boobs" as the first suggestion in the drop down!  This is not really socially acceptable as this laptop goes with me everywhere and Chrome is my primary browser.  Is there a way I can isolate and remove just that one entry? How do I trust a self signed certificate? As a result, I am able to be understanding and accommodating to the people that I work with, including clients, which I believe is an important asset for a professional to have.   I wanted to make sure it is absolutely known that I mean to acknowledge clients as a class of people I can work with. Is this the right way to include it with commas? Find the sum of finite series $S=\sum_{k=1}^{2015}{(-1)^{\frac{k(k+1)}{2}}}k$ I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end.  I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.  When it comes time to compare the actual output to the expected output I'm running into some problems.  My first thought was just to do string comparisons on the expected and actual messages.  This doens't work very well because the example data we have isn't always formatted consistently and there are often times different aliases used for the XML namespace (and sometimes namespaces aren't used at all.)  I know I can parse both strings and then walk through each element and compare them myself and this wouldn't be too difficult to do, but I get the feeling there's a better way or a library I could leverage.   So, boiled down, the question is:  Given two Java Strings which both contain valid XML how would you go about determining if they are semantically equivalent?  Bonus points if you have a way to determine what the differences are. Why Does Software Updater Say No updates Available, but apt-get upgrade Shows updates available? Most RPGs teach you that casual violence is the best solution to all your in-game problems. This is so well established a part of the vast majority of RPGs that there are entire satire RPGs like Greg Costikyan's  and John Tynes'  dedicated to showcasing the issue. Even now that the '80's anti-RPG hysteria is past, you see more sober critiques of endemic violence in RPGs in places like . In most RPGs, PCs become inured to murder and other antisocial activities very quickly, and enter the depths of depravity that wouldn't be appropriate in the worst parts of the world. Armed robbery, mass murder, and genocide become routine parts of an adventurer's day, something only stick-in-the-mud characters with the most extremely stated ethics object to. , even though it is not properly applied to just any conflict, is a PC's friend and they generally escalate any conflict in that direction. The sophistication of the gamer mindset towards introspection on this issue can be demonstrated in that the most meaningful question usually debated about in-game violence is some variant on &quot;but should we kill the noncombatant children&quot; or &quot;can we just murder people out of hand as long as they're from a typically evil race?&quot; In the real world, we generally a priori regard anyone having to have this discussion as a monster already. (P.S. The &quot;wipe out a given evil race&quot; thing isn't the point of this question; it is only mentioned to indicate that it's only &quot;that far&quot; that usually causes ethical handwringing from players, when that is a really quite extreme case and we should be uncomfortable with casual violence a lot sooner. ) What I'd like to have is a more realistic in-game treatment of conflict.  People getting wounded and giving up, taking and ransoming of prisoners, not always escalating a fistfight to weapons, not always escalating weapon combat to killing, etc.  Heck, as I write this, I'm watching an episode of Adventure Time with my daughter and the protagonists snuck in and rescued a princess kidnapped by the Ice King and then exit right next to his sleeping form. I thought, &quot;If this were D&amp;D they'd all be carefully coordinating a coup de grace to kill him in his sleep on the grounds that he inconvenienced them.&quot;  The problem isn't limited to D&amp;D of course, sci-fi PCs are happy to neutron bomb planets for convenience too, for example. I'm not part of the &quot;D&amp;D is Satanic&quot; crowd obviously, but I frankly do have compunctions about continually playing in games where the taught behavior is uncomfortably equivalent to the worst examples of human behavior we see on the nightly news. How can I give my PCs a newfound respect for human life? I am pretty sure that this is such a stupid, stupid question, but how do you prove that $d_2(x,y)={|x-y|\over {1+|x-y|}}$ satisfying the third condition to be a metric, which is the triangle inequality.   I know that I should really be able to do this, but I just can't, I keep seeing a contradiction. Please help me. Is Java "pass-by-reference" or "pass-by-value"? I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation? Make account merges propagate to chat When two accounts are merged, all the posts/votes are moved over to the "master" account, and the other account ("slave"?) is deleted. The merge is propagated network-wide, so a similar thing happens on each site.  But, this does not happen to the chat user. The "slave" chat user is kept, with a 404 parent profile link. I feel that the chat user should be merged as well, re attributing all the chat messages.  Thoughts? file /dev/* prints the description of a bunch of files as "block special (M/N)" and "character special (M/N)", where M and N are numbers. For example:  $ file /dev/null /dev/null: character special (1/3)   man file doesn't seem to document these, but refers vaguely to man stat, which seems to refer to these as major and minor device types. apropos 'device type' finds nothing. So what do these numbers mean? I have a finite field $\mathbb{F}_{27}$. I need to find an element of order 13. I know that multiplicative group of this field is cyclic with order 26. So I want to find a generator $g$ of this cyclic group, then $g^2$ will have order 13. Also I know that all elements of this field can be represented by polynomials from $\mathbb{F}_3[t]$, where t is root of irreducible polynom $x^3-x-1$.  Probably we can find generator of $\mathbb{Z}_{26}$ and than build an isomorphism to $\mathbb{F}_{27}\setminus 0$.  Anyway I don't know were to start.  Thanks! Changing the homepage