How to use a definite integral to find the following limit: $\lim\limits_{n\to\infty}\left(\frac{1}{n+1}+\frac{1}{n+2}+...+\frac{1}{n+n}\right)$  Which is equal to $\ln(2)$. I know that there are a lot of series which converge with radius of convergence 1, so I'm assuming i'd have to use this fact in order to integrate the series, but I have no idea what to do here. If someone could drop a hint that would be great
Prove that : $\displaystyle \lim_{n\to \infty} \frac{1}{n+1}+\frac{1}{n+2}+\frac{1}{n+3}+\cdots+\frac{1}{2n}=\ln 2$    the only thing I could think of is that it can be written like this :  $$ \lim_{n\to \infty} \sum_{k=1}^n \frac{1}{k+n} =\lim_{n\to \infty} \frac{1}{n} \sum_{k=1}^n \frac{1}{\frac{k}{n}+1}=\int_0^1 \frac{1}{x+1} \ \mathrm{d}x=\ln 2$$  is my answer right ? and are there any other method ?(I'm sure there are)
How to get the file name from a full path using JavaScript? Enabling Nvidia driver messes up splash screen When you boot from live CD, or doing the first boot after installing Ubuntu, splash screen looks awesome. But as soon as you enable nvidia-current driver, installed with apt-get, splash screen goes all crazy.  With crazy I mean that resolution is very low, font(I assume) is very weird and it all looks like it's been broken.  This happened with 10.04 and now again with 10.10.  How do I fix splash screen after enabling nvidia drivers? How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release? Number of vertices present in all maximum matchings Given a graph $G$, we need to find the cardinality of the largest set of vertices so that each of them are present in every maximum matching possible.   Is there a solution beside the obvious remove each vertex and find the maximum matching to see it reduces? Using a diode to ensure current flows in only one direction, without causing a voltage drop To power my microcontroller (ATmega8), I am using a ~5.4V voltage source. I want to ensure that I don't accidentally connect the voltage source in reverse, and figured a diode would be a nice way to accomplish this as from what I have learned so far, a diode allows current to flow in one direction, and blocks it in the other.  But what I also learned is that diodes create drops in voltage. I have a few of the typical diodes (1N4001, 1N4148, etc.), and would like to use them to achieve the aforementioned result without dropping the voltage as it would be too low to power the IC.  My question is, is there any way to do this with a diode? Or do I need some other component (if so, what would you recommend)? Does $\sum_{n=1}^\infty \frac{\cos{(\sqrt{n})}}{n}$ converge? Pass Variable to Custom Block template file I want to create my custom block with custom content in Drupal 8,in start I create  Block with just simple text on it, and work correctly, my Problem is how can I pass my custom variable to it? I saw some tutorial about it , my Module name is tcdev and this is content of .module file.  function tcdev_theme($existing, $type, $theme, $path) {     return array('tcdev' =&gt;         array(             'variables' =&gt; array(                 'title' =&gt; 'Default title',                 'description' =&gt; null             ),             'template' =&gt; 'block--sliderblock'         )     ); }   and my SliderBlock.php       namespace  Drupal\tcdev\Plugin\Block; use Drupal\Core\block\BlockBase;   /**  * Provides a 'SliderBlock' block.  *  * @Block(  * id = "slider_block",  * admin_label = @Translation("Slider Block"),  * )  */  class SliderBlock extends BlockBase{     /**      * {@inheritdoc}      */     public function build(){         return array(             '#title' =&gt; 'my title ',             '#description' =&gt; 'my custom desc'         ); } }   and finally my template file block--sliderblock.html.twig    &lt;h2&gt;My Custom Block{{ title }}-{{ description }}&lt;/h2&gt;   But Result is only "My Custom Block-" . The problem is variables not getting passed to template file,where is my fault?  appreciate any help I've already done a lot of searching (in particular: ) to try to prove this statement:      $f: A \to B$ is injective if and only if it has a left inverse. [I'm going to also assume $A$ and $B$ are nonempty.]   My attempt so far:     $\Leftarrow$ Suppose $f$ has a left inverse and $f(a_1) = f(a_2)$ for    $a_1, a_2 \in A$. Then there is a function $g: B \to A$ such that   $g\left(f(a_1)\right) = a_1$ and $g\left(f(a_2)\right) = a_2$. Since   $g$ is well-defined, it follows that $g\left(f(a_1)\right) =  g\left(f(a_2)\right)$, and hence $a_1 = a_2$.         $\Rightarrow$Now   suppose $f$ is injective. Then $f(a_1) = f(a_2) \implies a_1 = a_2$.   Furthermore, since $A$ is nonempty, there is an element $x \in A$.   Define $g: B \to A$ by  \begin{equation*} g(b) = \begin{cases}  f^{-1}(b), &amp; b \in \text{Im}(f) \\ x, &amp; b \in A \setminus  \text{Im}(f)\text{.} \end{cases} \end{equation*} This mapping is   well-defined, since if $f$ is injective, $f^{-1}(b)$ is unique.   My main question: does this imply that if $f: A \to B$ is injective that any mapping $g: \text{Im}(f) \to A$ is bijective? Otherwise, I don't understand why we can even use $f^{-1}$ on an element. [Please read the link above for more details - in proof 1.] What is the origin of "man on the spot"? What is the origin of "man on the spot" ?   defines on the spot and uses as an example man on the spot.     on the spot -  at the place in question; there; "they were on the spot when it happened"; "it had to be decided by the man on the   spot" (Emphasis added)   Some evidence suggests that the origin of the phrase refers to decisions made by officials of the past British empire and actions taken by them. Can I access private members from outside the class without using friends? Disclaimer Yes, I am fully aware that what I am asking about is totally stupid and that anyone who would wish to try such a thing in production code should be fired and/or shot.  I'm mainly looking to see if can be done. Now that that's out of the way, is there any way to access private class members in C++ from outside the class?  For example, is there any way to do this with pointer offsets? (Naive and otherwise non-production-ready techniques welcome) Update As noted in the comments, I asked this question because I wanted to write a blog post on over-encapsulation (and how it affects TDD).  I wanted to see if there was a way to say &quot;using private variables isn't a 100% reliable way to enforce encapsulation, even in C++.&quot;  At the end, I decided to focus more on how to solve the problem rather than why it's a problem, so I didn't feature some of the stuff brought up here as prominently as I had planned, but I still left a link. At any rate, if anyone's interested in how it came out, here it is:   (I suggest reading it before you decide that I'm crazy). Redefine default color of todonotes What is the difference between topological and metric spaces? What is the difference between a topological and a metric space? Why have header files and .cpp files? Why does C++ have header files and .cpp files? In Knuth's book "The Art Of Computer Programming Vol.1" there is a description about Euclid's algorithm to find the greatest common divisor of m and n.   And there is a phrase.     $m = qn+r$.  If $r = 0$, then $m$ is a multiple of $n$, and clearly in such a case $n$ is the greatest common divisor of $m$ and $n$. If $r \neq 0$, note that any number which divides both $m$ and $n$ must divide $m -qn =r$ , and any number which divides both $n$ and $r$ must divide $qn+r =m$.   I don't understand why any divisor of $m$ and $n$ must divide $m-qn =r$. Where Android apps store data? Why avoid increment ("++") and decrement ("--") operators in JavaScript? How can I successfully finish a hobby game project in my free time?  How do I motivate myself to keep it up and drive right through to the finish without losing interest or motivation along the way? Why do I keep getting told I posted less than 15 characters when I posted more than 15? I tried to post the following comment and it claims it was less than 15 when it was more.  Based on Tim's comment and testing I believe it would not let me post because with @Shadow removed it is less than 15. However, the characters left message indicates I have passed the 15 character minimum thus it is wrong.  This is the bug I'm reporting:  The characters remaining message and the characters left message do not take into account striping out @name prefixes. Why is Outlook 2010 Changing my Embedded Spreadsheet to a GIF? Years ago I figured out how to embed a spreadsheet in an Outlook email to automate a task I do regularly.  Whenever I want to send a new quote request I open an old email, tell Outlook I want to resend it, fill in the new values in my embedded spreadsheet and then send it off.  This method worked well for years.  After switching to a new computer however, I have found that when I open the latest emails I have sent, I cannot edit the embedded spreadsheet because Outlook interprets it now as a GIF.  Saved emails that I sent with the old computer however, still work fine - I can still open, edit and resend and Outlook interprets the embedded spreadsheet correctly.  I would like to figure out how to setup Outlook in the new PC correctly so that the embedded spreadsheet is interpreted correctly when the email is reopened. Some sort of security setting, maybe?  Any help anyone could provide would be appreciated.  Edit: I developed the spreadsheet originally in Excel. Then I went into Outlook, created a new email, did Insert->Object->Excel Spreadsheet. At that point I had a blank spreadsheet in my email. Then I copied and pasted the spreadsheet from Excel into the blank spreadsheet in Outlook and it worked perfectly (until this recent problem) divisibility of binomial coefficients by primes If $p$ is a prime number and $r = 1,2,3 \dots ,p -1$, how can I prove that the binomial coefficients $_nC_r(p,r)$ are divisible by $p$? By divisible I mean $_nC_r(p,r)/p$ leaves remainder $0$.  oivind