Find max sum of elements in array
Maximum sum sublist?
Do spice containers need to be hermetic? Spice containers purchase  I'm planning on upgrading my spice storage. Reading some advice online (e.g. , and ) I came to the conclusion that spice containers should:   Not be exposed to direct sunlight and high temperatures Be airtight   Which means that either you store it inside of some closed cupboard/wardrobe/room or you have containers which do block light and are in a relatively shady place. And the containers need to be airtight.  Available solutions  I've been browsing for some containers available online in my country and the 2 most sensible options I've seen are these:       The problem  The first one is hermetic (it has some rubber around the lid) but it's clear glass. The other one does not have the rubber, just a regular twist-off lid, but it's amber glass.  It'll be hard for me to find any space inside of cupboards to store all of my spices (I need at least 30), so I'd rather buy amber glass container, which I believe will effectively block the sunlight, even when kept on the counter. But I can't find any hermetic amber-glass containers, only ones with regular lid.  The question  Is that regular twist-off lid enough to keep spices airtight and fresh? Or should I focus on buying a hermetic container (like the one in clear glass). I could then for example paint them black to block the sunlight. In cricket, in UDRS screen, if the ball hits the wicket, then why is not out still given? In cricket, in UDRS screen, if the ball hits the wicket, then why is not out still given?  I saw this situation so many times happened; bowler appealed for UDRS for LBW, in UDRS it shows ball hits the wicket, but still not out is given sometimes. What is the problem with nested environments using \BODY (environ package)? This question led to a new package:      I want to define some environments, which place their content into multiple different other environments. To access the contents I used the environ package, which introduces the \BODY command. However at some point pdflatex seemed to be stuck in an infinite loop.  I reduced it to a minimal example:  \documentclass{article} \usepackage{environ}  \NewEnviron{assertion}{Assertion: \BODY} \NewEnviron{outerassertion}{\begin{assertion}\BODY\end{assertion}}  \begin{document}  \begin{assertion} test \end{assertion}  \begin{outerassertion} test2 \end{outerassertion} \end{document}   Any ideas how to work around this problem? I guess, the problem is with the \BODY command since everything works fine as long as I use it in only one of the new environments. What are irreducibles in the ring $R$ of entire functions? Here's how far I have gone:  I first find the units in $R$. Let $f$ $ \in $ $R$ be a unit. Then $\exists$ $g$ $\in$ $R$ such that $fg=1$, i.e $f(z)g(z)=1$ $\forall$ $z$ $\in$ $\Bbb C$.  Then, $f(z)$ $=$ $\frac 1{g(z)}$ $\forall$ $z \in \Bbb C$. Hence $f(z),g(z) \neq 0$ $\forall$  $z \in \Bbb C$.  Now to find the irreducibles, let $f \in R$ be an irreducible. Hence whenever  $f(z)=g(z)h(z)$ for $g,h \in R$, then $g$ or $h$ is a unit.  Let $h$ be the unit and $\alpha$ be a zero of $f$. Then $f(\alpha)=g(\alpha)h(\alpha)=0$ $\Rightarrow$ $g(\alpha)=0$. Hence $z-\alpha$ is a factor of $g$. So $g(z)=(z-\alpha)^ng_1(z)$ for some $n \in \Bbb N$, where $g_1$ is unit. Since $f$ is irreducible, hence $n=1$.  I'm stuck here. What can be my next step? How can I merge properties of two JavaScript objects dynamically? I am trying to think/know about something, but I don't know if my base premise is plausible. Here we go.  Sometimes when I'm talking with people about pure mathematics, they usually dismiss it because it has no practical utility, but I guess that according to the history of mathematics, the math that is useful today was once pure mathematics (I'm not so sure but I guess that when the calculus was invented, it hadn't a practical application).  Also, I guess that the development of pure mathematics is important because it allows us to think about non-intuitive objects before encountering some phenomena that is similar to these mathematical non-intuitive objects, with this in mind can you provide me historical examples of pure mathematics becoming "useful"? As a new user without much rep, what should I do if someone else has already asked a question I have, but it has no answers? Suppose you had a question, and you really want a good answer that would solve your problem, but noticed it was already asked by someone else. However, no one has posted any answers. The question is technically considered "unanswered", but a lot of users who would otherwise bother to give a correct answer probably skip the question completely for some reason.  What should I do in this case?  One idea is to ask a new, completely identical question, in the hope users will notice the new question and post an answer there. But would that go against SE policy?     Note: This is adapted from , but that doesn't cover the case where the original question is unanswered. Also, it is not a duplicate of , as that question asks about getting attention for one's own questions, while this one and the one linked above ask about getting an answer if someone else has already posted the same thing. Trace of a commutator is zero - but what about the commutator of $x$ and $p$? Operators can be cyclically interchanged inside a trace: $${\rm Tr} (AB)~=~{\rm Tr} (BA).$$ This means the trace of a commutator of any two operators is zero: $${\rm Tr} ([A,B])~=~0.$$ But what about the commutator of the position and momentum operators for a quantum particle? On the one hand: $${\rm Tr}([x,p])~=~0,$$ while on the other hand: $$[x,p]~=~i\hbar.$$ How does this work out? Can we define tension in a string as the reactive force produced in a string being pulled at both ends? In my textbook, the definition of tension was given that  is the reactive force which exists when string is being stretched at its both end. After it there was a case given that to calculate acceleration and tension produced in string while it's attached with different masses at both its ends and passed over a frictionless pulley. First body is being hung and second is placed over horizontal frictionless surface with relatively smaller mass. It is given in my book that there are three forces acting on the body placed on horizontal smooth surface viz., Weight of body, the reaction force to weight and tension in string pulling body towards pulley's wheel. How can there be tension in string according to the definition given my book however there is no acting force (pulling force) on the body that pulls it away from wheel.  There are different definitions for tension. The one in our book is creating problem however second one, that is, " tension describes the pulling force exerted by each end of a string, cable, chain, or similar one-dimensional continuous object " is al right.  Since acceleration is lowered due to Tension then acceleration produced in the body must be given by, $a=\frac{Net-Force}{m}$ $=&gt;$ $a=\frac{m_1g-T}{m_1}$ since $W_1$ $&gt;$ $T$.  If tension in string is the reactive force to the weights pulling the string apart then according to Sir Isaac Newton, $W_1=W_2=T$. How was this answer posted after this question was closed? Let $a_n$ be a sequence of positive reals, such that the partial sums $S_n = \sum_{i = 1} ^ n a_i$ diverge to $\infty$. For given $\epsilon &gt; 0$ do we have $$\sum_{n = 1} ^ \infty \frac{a_n}{S_n^{1 + \epsilon}} &lt; \infty?$$  For $\epsilon \ge 1$ we can resolve this quickly by noting $$\frac{a_n}{S_n ^ 2} \le \frac 1 {S_{n - 1}} - \frac 1 {S_n}$$ so for sufficiently large $n$ we can bound $\frac{a_n}{S_n^{1 + \epsilon}}$ by $\frac 1 {S_{n - 1}} - \frac 1 {S_n}$ as well. I'm wondering if this is true for arbitrary $\epsilon &gt; 0$. I know that the series in question diverges for $ \epsilon = 0$, so all that is missing is what happens in $(0, 1)$. What are the entire functions $f$ such that $|f'(z)| \leq |f(z)| \ ? $ Could someone advise me on how to determine all entire functions $f$ such that $|f'(z)| \leq |f(z)|, \forall z\ ?$  Hints will suffice, thank you. Show that $\lim_{n\to\infty}b_n=\frac{\sqrt{b^2-a^2}}{\arccos\frac{a}{b}}$ If $a$ and $b$ are positive real numbers such that $a&lt;b$ and if $$a_1=\frac{a+b}{2}, b_1=\sqrt{(a_1b)},..., a_n=\frac{a_{n-1}+b_{n-1}}{2},b_n=\sqrt{a_nb_{n-1}},$$ then show that   $$\lim_{n\to\infty}b_n=\frac{\sqrt{b^2-a^2}}{\arccos\frac{a}{b}}.$$ I tried to calculate explicitly the first few terms $a_2,b_2$ etc but the terms got too complicated really quickly and I couldn't spot any pattern. Etymology of "history" and why the "hi-" prefix? According to , history comes from the same root as story. If they are from the same word, where does hi- come from? Is it just because of the English habit of taking names from other languages verbatim or is there something more to it? How should one maintain and update a MiKTeX installation? Every once in a while after updating MiKTeX, the installation gets into an inconsistent state. This might be a problem with the packages (an example is described in ), but sometimes packages are split or renamed. The cases I remember are when  and when miktex-etex-base-2,9 was renamed to miktex-etex-base-2.9 (if I recall correctly; I am sure it was either that or something very similar). In each case the MiKTeX Update process suggested to remove the "old" packages but it didn't give the user any hints about him having to manually add the respective replacement packages back in the package manager to get one's MiKTeX installation back into a usable state.  What are best practices for keeping MiKTeX up to date? Note that I'm not asking about installing new packages or fonts in general; there are other questions covering this area.   In which order should one execute the Update process and the Synchronization of the repository? , it is recommended to check the MiKTeX homepage before updating. What else should one do? When and in which order (and why) should one execute the "Refresh FNDB" and "Update Formats" processes within the MiKTeX Options menu? What else can happen? Other advice? BBWC: in theory a good idea but has one ever saved your data? I'm familiar with what a BBWC (Battery-backed write cache) is intended to do - and previously used them in my servers even with good UPS. There are obvously failures it does not provide protection for. I'm curious to understand whether it actually offers any real benefit in practice.  (NB I'm specifically looking for responses from people who have BBWC and had crashes/failures and whether the BBWC helped recovery or not)  Update  After the feedback here, I'm increasingly skeptical as whether a BBWC adds any value.  To have any confidence about data integrity, the filesystem MUST know when data has been committed to non-volatile storage (not necessarily the disk - a point I'll come back to). It's worth noting that a lot of disks lie about when data has been committed to the disk (). While it seems reasonable to assume that disabling the on-disk cache might make the disks more honest, there's still no guarantee that this is the case either.  Due to the typcally large buffers in a BBWC, a barrier can require significantly more data to be commited to disk therefore causing delays on writes: the general advice is to disable barriers when using a non-volatile write back cache (and to disable on-disk caching). However this would appear to undermine the integrity of the write operation - just because more data is maintained in non-volatile storage does not mean that it will be more consistent. Indeed, arguably without demarcation between logical transactions there seems to be less opportunity to ensure consistency than otherwise.   If the BBWC were to acknowledge barriers at the point the data enters it's non-volatile storage (rather than being committed to disk) then it would appear to satisfy the data integrity requirement without a performance penalty - implying that barriers should still be enabled. However since these devices generally exhibit behaviour consistent with flushing the data to the physical device (significantly slower with barriers) and the widespread advice to disable barriers, they cannot therefore be behaving in this way. WHY NOT?  If the I/O in the OS is modelled as a series of streams then there is some scope to minimise the blocking effect of a write barrier when write caching is managed by the OS - since at this level only the logical transaction (a single stream) needs to be committed. On the other hand, a BBWC with no knowledge of which bits of data make up the transaction would have to commit its entire cache to disk. Whether the kernel/filesystems actually implement this in practice would require a lot more effort than I'm wiling to invest at the moment.  A combination of disks telling fibs about what has been committed and sudden loss of power undoubtedly leads to corruption - and with a Journalling or log structured filesystem which don't do a full fsck after an outage its unlikely that the corruption will be detected let alone an attempt made to repair it.   In terms of the modes of failure, in my experience most sudden power outages occur because of loss of mains power (easily mitigated with a UPS and managed shutdown). People pulling the wrong cable out of rack implies poor datacentre hygene (labelling and cable management). There are some types of sudden power loss event which are not prevented by a UPS - failure in the PSU or VRM a BBWC with barriers would provide data integrity in the event of a failure here, however how common are such events? Very rare judging by the lack of responses here.   Certainly moving the fault tolerance higher in the stack is significantly more expensive the a BBWC - however implementing a server as a cluster has lots of other benefits for performance and availability.  An alternative way to mitigate the impact of sudden power loss would be to implement a SAN - AoE makes this a practical proposition (I don't really see the point in iSCSI) but again there's a higher cost. Is $2^{|\mathbb{N}|} = |\mathbb{R}|$? What should be done with questions that have been resolved as a comment instead of an answer? I'm trying to go through and provide answers to every unanswered question (search &quot;closed:0 answers:0&quot;), somewhat following the spirit that was blogged about at  .  However, I'm finding this much more difficult than it needs to be, as many of the questions have already been answered without the use of an &quot;answer&quot; - but instead, in the form of a comment by either the OP or another poster. I wouldn't mind reading through and skipping these, as long as there was some appropriate action I could take to at least assist with preventing these questions from being seen again from the same query - either by myself or another SO member.  Is there such an appropriate action?  Should we vote to close?  If so, using what reason? Even if I vote to close, what are the chances that 4 other users will also view the question and also vote to close?  (i.e., will my individual vote even do any good?  Is there any report to show recent close votes, so that others may also review and contribute supporting close votes?) Should we post some sort of an answer - even just something to the effect of &quot;this was already answered by the OP's own comment to his answer (above)&quot;? Would something like this be appropriate to flag for moderator attention, and let the moderators deal with it?  (Or would this be considered too trivial?) Should we rename the question title to something standard that can be used in a search exclusion?  (Maybe &quot;SOLVED:&quot;?)  Basically, how can I help to denote questions as &quot;This question is no longer in active search of an answer - though better answers may still be appreciated.&quot;? I've already reviewed , which was closed as a duplicate of  - but this requires effort on part of a user who may very likely no longer be active. Otherwise, is there something I should be doing to improve my search to filter out these types of questions? I've run across this many times, so I don't consider it to be a rare issue.  However, the last question like this I just ran across, prompting this question, was .  In this case, the question was self-answered by the OP in the form of a comment, this question is the OP's only question, the OP has no other visible activity on SO, and the OP hasn't been seen on SO since he registered and posted the question 5 months ago. Another one I just ran across is .  However, here the &quot;answer&quot; comment was posted by a reputable and recently active SO member.  Should I leave a comment directed at him, asking him to re-post his comment as an answer, or should I post my own answer echoing his comment?  (Or something else?) Yet another is .  Interestingly, the OP actually self-edited the question to include the &quot;SOLVED:&quot; prefix on to the question, instead of posting his resolving comment as an answer (and ideally accepting it) as he was asked to do by another comment.  This brings up another good idea - is there a &quot;standard&quot; we should use to rename the titles on these &quot;resolved but unanswered&quot; posts that could be used as a search exclusion?  (Also added to the above list.) I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible? Is division of matrices possible? Is it possible to divide a matrix by another? If yes, What will be the result of $\dfrac AB$ if $$         A = \begin{pmatrix}         a &amp; b \\         c &amp; d \\         \end{pmatrix},         B = \begin{pmatrix}         w &amp; x \\         y &amp; z \\         \end{pmatrix}? $$