LateX code for 1+2+3+4+5 = 15
Sum of (example: 0+1+2+3 = 6 , 0+1+2+3+4+5+6+7 = 28 and so on)
There are several questions here about , about , and about . And of course there's the basic . And plenty of  questions. There's related questions like . But there's no be-all-end-all question asking:  What exactly determines depth of field in a photograph?   Is it just a property of the lens? Can lenses be designed to give more depth of field for the same aperture and focal length? Does it change with camera sensor size? Does it change with print size? How do those last two relate? Why no ooVoo on ubuntu? Do you have recommendations for books to self-teach Applied Statistics at the graduate level? I took several statistics courses in college but I found that my education was very theory driven.  I was wondering if any of you had a text in Applied Statistics (at the graduate level) that you recommend or have had good experience with. Java: Sorting user-input array upon return According to my text book:  The Lorentz Force F on a charged particle moving in an electromagnetic field is given by:  $$F= qE + q(v\times B)$$  then it states that "it is to be pointed out that only the electric force does work, while the no work is done by the magnetic force which is simply a deflecting force."  How can this by true won't the the magnetic force have a considerable magnitude, will it now impart kinetic energy to the charge? Any explanations will help a lot. Please keep the terminology simple, thanks. Should we use wheatstone bridges nowadays? For measuring strain gauges, the Wheatstone bridge is the historical choice.  In a quarter Wheatstone brigde (\$350 \Omega \$ typically (?)), with a high input impedance amplifier, and some bridge power voltage \$V\$, the ratio between the bridge output voltage w.r.t. any resistor is 1/4, which is the same ratio in a voltage divider between the output voltage w.r.t. any resistor, compared with a stable voltage reference of \$V/2\$.    A voltage divider with a voltage reference would have a voltage noise of about 35.16 nV/rtHz (from a voltage reference of 35 nV/rtHz plus two resistors), and the Wheatstone bridge a voltage noise of 4.86 nV/rtHz (from four resistors), which should be enough (?) for most ADC systems (i.e. for 24 bit, 0-5V range: 300nV resolution).  And a voltage reference (\$0.02\%\$ initial error, \$2 \ ppm/C^\circ\$, ), would be more stable and precise (?) about \$4\ ppm/C^\circ\$, than a precision resistor (\$0.005\%\$ error, \$2 \ ppm/C^\circ \$, ), about \$8 \ ppm/C^\circ\$.  Hence, why bother using Wheatstone bridges? \section*[toc]{normal section title} not working for me for my thesis I want to have a section appear differently in the ToC than in the text.  After googling a bit, I found \section[short]{long} as a proposed answer, but this does not seem to work for me.  Here is a MnotWE:  \documentclass[12pt,a4paper,reqno]{amsbook} \usepackage{fontspec} \setmainfont[SlantedFont={Latin Modern Roman Slanted},          SmallCapsFont = {Latin Modern Roman Caps},          ]{Latin Modern Roman}    \usepackage[activate=true,nocompatibility},final,tracking=true,factor=1100,stretch=10,shrink=10]{microtype}  \usepackage[bindingoffset=1cm]{geometry} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage{csquotes}  \title{\textsc{Some Title}} \author{me}  \begin{document} \maketitle \frontmatter \tableofcontents \mainmatter  \part[toc part]{normal part} \section*[toc section]{normal section} some text  \end{document}   It just takes "toc part" as normal and as ToC heading for the \part command.  For the section I am interested in the starred version. Here the [toc section] part of the command seems to be completely ignored.  I use LuaLaTeX to build my document. Does anyone have a suggestion how to get a \section* appear with a different title in the ToC? Mean absolute error OR root mean squared error? Why use Root Mean Squared Error (RMSE) instead of Mean Absolute Error (MAE)??    Hi  I've been investigating the error generated in a calculation - I initially calculated the error as a Root Mean Normalised Squared Error.  Looking a little closer, I see the effects of squaring the error gives more weight to larger errors than smaller ones, skewing the error estimate towards the odd outlier. This is quite obvious in retrospect.   So my question - in what instance would the Root Mean Squared Error be a more appropriate measure of error than the Mean Absolute Error? The latter seems more appropriate to me or am I missing something?  To illustrate this I have attached an example below:                    The scatter plot shows two variables with a good correlation,  the two histograms to the right chart the error between Y(observed ) and Y(predicted) using normalised RMSE (top) and MAE (bottom).     There are no significant outliers in this data and MAE gives a lower error than RMSE. Is there any rational, other than MAE being preferable, for using one measure of error over the other? I was trying to suggest a retag of  on Seasoned Advice, but the system won't let me; I get the familiar message     Edits must be at least 6 characters; is there something else to improve in this post?   In general, that's not true for retagging; if you don't change the question body at all, it should work. I suspect the logic checking the edit is thrown off guard because of the title warning:     The question you're asking appears subjective and is likely to be closed       I found , but I cannot find any evidence (in SEDE) for invisible characters being present in the question's source. Also, that's supposed to be . Php string not working in Wordpress Functions.php (trying to fetch 1st category for each blog that post appears in the sidebar) I am trying to fetch 1st category for each blog post that appears in the sidebar of any blogpost landing page. I tried multiple options to add the 2nd block code to the 1st block at the line &quot;.wp_get_post_categories ($post_id).&quot; but I could not find any solution. Please help me with that and if you need closer to the code just let me know. 1st Block $related_blog .=&quot;&lt;div class='related-blog'&gt;                             &lt;div class='row'&gt;                                 &lt;a href=&quot;.get_the_permalink().&quot;&gt;                                                                  &lt;div class='col-lg-4 col-md-4 col-xs-4 blog-image'&gt;                                         &lt;img src=&quot;.$image_related[0].&quot;&gt;                                     &lt;/div&gt;                                      &lt;div class='col-lg-8 col-md-8 col-xs-8 blog-text'&gt;                                         &lt;strong&gt;&lt;p class='related-blog-title'&gt;&quot;.get_the_title().&quot;&lt;/p&gt;&lt;/strong&gt;                                 &lt;/a&gt;                                 &lt;span class='related-blog-sidebar-content '&gt;&quot;.substr(get_the_content(),0,250).&quot;...&lt;/span&gt;                                                                  &lt;p class='related-blog-sidebar-category'&gt;                                 &quot;.wp_get_post_categories ($post_id).&quot;                                                                &lt;/p&gt;                                                                  &lt;a class='related-blog-sidebar-link' href=&quot;.get_the_permalink().&quot;&gt;Read More                                 &lt;/a&gt;                                      &lt;/div&gt;                             &lt;/div&gt;                         &lt;/div&gt;&quot;;  2nd Block &lt;?php $category = get_the_category(); ?&gt; &lt;a  href=&quot;&lt;?php echo get_category_link($category[0]-&gt;cat_ID); ?&gt; &quot;&gt; &lt;?php echo $category[0]-&gt;cat_name; ?&gt; &lt;/a&gt; How do I print a #defined constant in GDB? How do you find out which program is using too much memory? Ubuntu has been crashing on me recently. I think its because it runs out of memory so I ran the free -m command and found that my memory usage was really high. So then, i ran top to find the culprit, but the displayed processes were using less than 1.5% of memory. How do I know which program is making ubuntu crash/run out of memory? Below is the output:  shafee@shafee-pc:~$ free -m              total       used       free     shared    buffers     cached Mem:          3824       3714        110          0        978       1954 -/+ buffers/cache:        780       3044 Swap:           99          0         99  shafee@shafee-pc:~$ top top - 02:12:14 up  1:24,  2 users,  load average: 0.16, 0.42, 1.49 Tasks: 182 total,   1 running, 181 sleeping,   0 stopped,   0 zombie Cpu(s):  2.9%us,  1.9%sy,  0.3%ni, 79.3%id, 15.5%wa,  0.0%hi,  0.2%si,  0.0%st Mem:   3916708k total,  3803848k used,   112860k free,  1002308k buffers Swap:   102396k total,        0k used,   102396k free,  2001852k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND              4200 root      20   0  289m  53m  38m S    2  1.4   1:06.45 Xorg                 5590 shafee    20   0 19348 1368  956 R    2  0.0   0:00.01 top                     1 root      20   0 24124 2136 1264 S    0  0.1   0:02.05 init                    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                3 root      20   0     0    0    0 S    0  0.0   0:24.23 ksoftirqd/0             6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0             7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1             9 root      20   0     0    0    0 S    0  0.0   0:00.11 ksoftirqd/1            11 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/2            13 root      20   0     0    0    0 S    0  0.0   0:03.89 ksoftirqd/2            14 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/3            16 root      20   0     0    0    0 S    0  0.0   0:00.16 ksoftirqd/3            17 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset                 18 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper                19 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns                  21 root      20   0     0    0    0 S    0  0.0   0:00.01 sync_supers         shafee@shafee-pc:~$   Or is it normal to have 110mb of free memory and is my issue related to something else? How does the US federal income tax system work? General question here about US personal income federal tax rates.  Is it a cumulative effect where your income is first taxed at the lower tranches and move up, or is it one specific percent for your entire taxable income? Elements order in a "for (… in …)" loop Why was Padmé made to clean an astromech? Reading  (the Amidala stand-in) I remembered that I always wondered why she ordered the actual queen to scrub R2-D2. There were enough actual servants who could have done it, so why Padmé? If that wasn't enough, after giving the actual queen (Padmé) the order to go away, she tells Panaka to continue with the discussion. How does that make sense?  The significant piece of dialogue:     AMIDALA : Thank you, Artoo Detoo. You have proven to be very loyal...Padme!    ...    AMIDALA : (Cont'd) Clean this droid up the best you can. It deserves our gratitude...(to Panaka) Continue, Captain.   Note that this question is two-fold:   Why was Padmé chosen in the first place? Why would an important meeting with the ship's captain be continued without her? Can a finite group act freely (as homeomorphisms) on $\mathbb R^n$ I am asking if whether or not a finite group acts freely (as homeomorphisms) on $\mathbb R^n$.  To answer in the negative, it suffices to show: for any homeomorphism $f$ such that $f^d=\text{id}_{\mathbb R^n}$, then $f$ has a fixed point.  I am looking for a complete self-contained answer. Show an exponential function has a valid density. Given:  Let $X$ be exponential with parameter $\lambda$, that is   $$ f_X(x) = \begin{cases} \lambda e^{-\lambda x} &amp; \text{if }x&gt; 0, \\ 0 &amp;\text{for }x\leq 0. \end{cases} $$  where $\lambda&gt;0$ is called the rate of the distribution.  Question:  Show that this is a valid probability density function (pdf).  Attempt:  Need to show that  $$ f(x) = \int^{\infty}_{-\infty} \lambda e^{-\lambda x}\,  dx=1\\\\ $$ Thus, \begin{eqnarray*} f(x)&amp;=&amp;\int^0_{-\infty} \lambda e^{-\lambda x} \, dx+\int^\infty_0 \lambda e^{-\lambda x} \,  dx\\[8pt] &amp;=&amp;0+\int^\infty_0 \lambda e^{-\lambda x} \, dx \\[8pt] &amp;=&amp;\lambda\int^\infty_0 e^{-\lambda x} \, dx \\[8pt] &amp;=&amp;1 \end{eqnarray*}  The problem is that my professor just told me that I skip a step right before I derive $1$. Any insight?  EDIT:  Given the great feedback, here is the answer:  \begin{eqnarray*} f(x)&amp;=&amp;\int^{\infty}_{-\infty} \lambda e^{-\lambda x} dx=1\\\\ f(x)&amp;=&amp;\int^{\infty}_{-\infty} f_X(x)dx\\ &amp;=&amp;\int^{0}_{-\infty} 0\,\,\, dx+\int^{\infty}_{0} \lambda e^{-\lambda x} dx\\ &amp;=&amp;0+\int^{\infty}_{0} \lambda e^{-\lambda x} dx\\ &amp;=&amp;\int^{\infty}_{0} \lambda e^{-\lambda x} dx\\ &amp;=&amp;\int^{\infty}_{0} e^{-\lambda x} \Big(\lambda \,\,\,dx\Big)\\ &amp;=&amp;\int^\infty_0e^{-u} du\\ &amp;=&amp;-e^{-u}\Big|^{\infty}_0\\ &amp;=&amp;1-\lim _{x \to \infty} e^{-u}\\ &amp;=&amp;1\\ \end{eqnarray*} VirtualBox not starting after kernel upgrade Yesterday I received a kernel upgrade and after reboot, VirtualBox stopped working.  Here is my system info (after kernel upgrade):  matteo@workstation:~$ cat /etc/lsb-release  DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS" matteo@workstation:~$ uname -a Linux workstation 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux   I installed VirtualBox long ago with  sudo apt install linux-headers-$(uname -r) sudo apt install virtualbox-dkms virtualbox virtualbox-qt   used on daily basis and never had problems with kernel updates. The error I receive now is   matteo@workstation:~$ sudo modprobe vboxdrv modprobe: ERROR: could not insert 'vboxdrv': Exec format error matteo@workstation:~$ dmesg | tail -n 1 [ 1413.167311] vboxdrv: version magic '4.4.0-116-generic SMP mod_unload modversions ' should be '4.4.0-116-generic SMP mod_unload modversions retpoline '   I found a forum post with this error message  from three days ago, unfortunately without resolution. Therfore I tried to remove the VirtualBox packeges from the Ubuntu repo, and install the latest 5.2 using . However, even after rebooting the machine, the error remains.  What can I do in this case? Had it not been vs If it were not for How to create & execute a script file