I'm trying to get all the previous elements of the element I clicked, just like .prevAll() does in jQuery. I've read in  but I can't get it to work, I've just achieved that the prev one of what I clicked works. Only the previous elements of divs inside .container-wrap   const mejoras = document.querySelectorAll('.history:not(.first)');  mejoras.forEach(function(item){       prev = item.previousElementSibling;        function detach(node) {         return node.parentElement.removeChild(node);       }       function insertAfter(newNode, existingNode) {         existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling);       }             item.addEventListener('click', function(e){        //Remove prev element       detach(prev);       //Put removed element after the one's clicked       insertAfter(prev, item);        item.classList.add('opened');       item.style.width = '100%';      })   }) &lt;div class="container-wrap"&gt;   &lt;div class="history"&gt;1&lt;/div&gt;   &lt;div class="history"&gt;2&lt;/div&gt;   &lt;div class="history"&gt;3&lt;/div&gt;   &lt;div class="history"&gt;4&lt;/div&gt;   &lt;div class="history"&gt;5&lt;/div&gt;  &lt;/div&gt;
How do I get the next element in HTML using JavaScript?  Suppose I have three &lt;div&gt;s and I get a reference to one in JavaScript code, I want to get which is the next &lt;div&gt; and which is the previous.
Convergence of the series $ \sum_{n=1}^{+ \infty } \frac{1}{n \cdot \ln(n) \cdot (\ln(\ln(n)))^{a}} $ I have a problem with a convergence of the series $ \sum_{n=1}^{+ \infty } \frac{1}{n \cdot \ln(n) \cdot (\ln(\ln(n)))^{a}}$ depending on the parameter $a$. I know that  $\frac{1}{n} \rightarrow 0$, $\frac{1}{\ln(n)} \rightarrow 0$, but I don't know how to deal with $\frac{1}{\ln(\ln(n)))^{a}}$ and how to get to the final answer. So far I solved tasks with  $\frac{1}{n ^{a}}$ and I know that $a&gt;1  \Leftrightarrow \sum_{n=1}^{+ \infty }\frac{1}{n ^{a}}$ is convergent, but in this task I cannot use it. Can you help me? ‘So the boy ... the boy must die?’ asked Snape, quite calmly.   ‘And Voldemort himself must do it, Severus. That is essential.’   Deathly Hallows - page 551 - UK Hardcover - chapter 33, The Prince's Tale   Dumbledore tells Snape it is 'essential' that Voldemort be the one to kill Harry, I'm assuming in order for the piece of Voldemort's soul in Harry to be properly killed as well.  But why?   Hermione destroyed the Hufflepuff cup; Ron destroyed the Slytherin locket; Neville killed Nagini; Harry destroyed the diadem and Tom Riddle's diary. So the Horcruxes were not immune to destruction at the hand of someone other than Voldemort. And as it ended up, Harry himself wasn't even a Horcrux, but rather just an unknowing host to a parasitic bit of Voldemort's soul.   Why was it 'essential' that Voldemort be the one to kill Harry in order for the piece of Voldemort's soul to die? Filter to change the content of 404 page I have created custom rewrite rules. These rules now go to 404 page as expected. I can use action hook template_redirect to change the template matching query_var.  But I don't want to create separate template files as the page structure depend on the current theme in use. Rather I just want to change the content and title. I have tried change the content using the_content filter, but it seems the filter doesn't even get called for 404 page.  I also tried loading index.php template and then using the_content filter, but it also doesn't work.  Is there any way to achieve this? Recommended shutter speed for action sports? What shutter speed do professional sports photographers typically use for action sports like football and basketball? Tasks in custom Environment I need to wrap a tasks environment inside a custom \NewEnviron. Apparently, tasks chokes on code besides its \task or \item due to the , presumably causing it to do so on \BODY. Any way to get around this? Exact error given is "Something's wrong--perhaps a missing \item", as per:  \documentclass[a4paper]{book} \usepackage{environ} \usepackage[more]{tasks}  \NewTasks[style=enumerate,counter-format=tsk[1]),label-width=2ex]{mytaskenum}[\item](3) \NewEnviron{mytaskenv}[1][Exercises]{   % Misc. stuff to precede the tasks env here   \begin{mytaskenum}   \BODY   \end{mytaskenum}   % Misc. stuff to follow }{}  \begin{document}  \begin{mytaskenv}   \item item 1   \item item 2   \item item 3 \end{mytaskenv}  \end{document} Spotlight with Halo applied is creating rings around light Here's a portion of a render I'm working on, which is backlit from behind by a spotlight with a "Halo" effect applied:    If you look carefully in the background, you'll notice the halo effect is creating "rings" of shadow as it fades.  How can I remove these rings and make the halo effect fade out smoothly?  I've played around with all the settings I can find without any success.  Here's my current settings for the spotlight: First, a word about the format - I don't know whether this was a movie or a TV series, b/c I saw it aired in pieces on PBS back in the 1980s. I don't even recall if it was originally voiced in english, dubbed over, or subtitled. I'll just call it a movie for now.  The movie seemed to be set in Europe in what looked like the 1960's or 70's, where almost all the people were gone. The protagonist was probably a 20-something man, who routinely visited a psychiatrist. I think the protagonist also had a girlfriend, but most of the dialogs seemed to be between the man and the doctor.   It was kind of a mystery where all the people had gone, and I think the man was nominally seeing the doctor to cope with the stress of it all, or had amnesia and suspected he knew The Truth. However, it turns out that the doctor discovers that the man is somehow the key to the reality that the characters share, and during hypnosis sessions, discovers he can manipulate the man and thereby reality. To make it easier for himself, the doctor gives the man a code word to return the man to a hypnotic trance on command. The code word, I am positive, was 'Antwerp'.  I don't think I ever saw the end of this, but the 'truth' might have been that World War III was fought with neutron bombs, and that the man was actually just dreaming everything as he wandered around the city, dying. Or not. It would be nice to know how it turned out, but I don't even have the name of the show. Can you travel to the US prior 1 months of tourist visa expiry? I've heard that i can travel to the US any time before my tourist visa expiry.  Is that true?  (please advise) Meaning of telegraph code in the song "Planetes" The song Planetes in Guilty Crown begins with some telegraph encoding, which I think is . Here is the . My transcription is: -•-• -••-- •-- --•-- •- --•-• •-•-- -•--•  which decodes to this:  ni-yu-ya a-i-shi-te-ru  Niyuya didn't make sense. Did I get something wrong? For some or other reason, typing @ᔕᖺᘎᕊ in a chat room pings everyone who's been in that chat room for the last 7 days...    Seems to work in all chat rooms (I only tested 2 as I don't want to upset too many people...)  How should we proceed? Can we have a system to submit potential robo-reviewers for moderators attention? Am I Running as a Service When is $2^n \pm 1$ a perfect power Is there an easy way of showing that $2^n \pm 1$ is never a perfect power, except for $2^3 + 1 = 3^2 $?  I know that   gives the result directly, but I'm hopefully for a more elementary method.    I can show that it is never a square, except for $2^3 + 1$.  Proof: Cases $n=1, 2, 3$ are easily dealt with. Henceforth, let $n\geq4$.  $2^n -1 \equiv 3 \pmod{4}$ hence is never a square.     If $2^n +1 =x^2$, then $2^n = (x-1)(x+1)$ and both of these are powers of 2. Thus we must have $(x-1) = 2, (x+1) = 4$. This gives the solution of $2^3 + 1 = 3^2$.    Let's now do an odd prime.  Say $2^n +1 = x^p$. Then $2^n = x^p - 1 = (x-1)(x^{p-1}+x^{p-2} + \ldots +1)$, so both terms are powers of 2. We have $ x = 2^m+1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since this is clearly greater than 1, we get a contradiction.  Say $2^n -1 = x^p$. Then $2^n = x^p + 1 = (x+1)(x^{p-1} - x^{p-2} + \ldots -x +1 )$, so both terms are powers of 2. We have $x = 2^m -1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since $x^p + 1 \neq x+1$ except for $p=1$, this means that the term is greater than 1. Hence we get a contradiction. Why are effect size estimates (such as $R^2$) difficult in mixed-effects models? So when we view reputation, there is graph view. However, it seems to be off by a day. Here's what I mean:   I'm sure 70 + 20 + 15 is not 15. Its 105, which is what we see below:   And 40 + 10 is NOT 105, unless you did  :)     Anyways 40 + 10 is 50:   So yeah. Did you do what that post on codegolf says? Devs better fix that :) Assume you have some objects which have several fields they can be compared by:  public class Person {      private String firstName;     private String lastName;     private String age;      /* Constructors */      /* Methods */  }   So in this example, when you ask if:  a.compareTo(b) &gt; 0   you might be asking if a's last name comes before b's, or if a is older than b, etc...  What is the cleanest way to enable multiple comparison between these kinds of objects without adding unnecessary clutter or overhead?   java.lang.Comparable interface allows comparison by one field only Adding numerous compare methods (i.e. compareByFirstName(), compareByAge(), etc...) is cluttered in my opinion.   So what is the best way to go about this? Can I ignore coefficients for non-significant levels of factors in a linear model? The following is a well-known result in functional analysis:     If the vector space $X$ is finite dimensional, all norms are equivalent.     Here is the standard proof in one textbook. First, pick a norm for $X$, say  $$\|x\|_1=\sum_{i=1}^n|\alpha_i|$$ where $x=\sum_{i=1}^n\alpha_ix_i$, and $(x_i)_{i=1}^n$ is a basis for $X$. Then show that every norm for $X$ is equivalent to $\|\cdot\|_1$, i.e.,  $$c\|x\|\leq\|x\|_1\leq C\|x\|.$$ For the first inequality, one can easily get $c$ by triangle inequality for the norm. For the second inequality, instead of constructing $C$, the  is applied to construct a contradiction.   The strategies for proving these two inequalities are so different. Here is my question,      Can one prove this theorem without Bolzano-Weierstrass theorem?   UPDATE:     Is the converse of the theorem true? In other words, if all norms for a vector space $X$ are equivalent, then can one conclude that $X$ is of finite dimension? I am working on refactoring some old code and have found few structs containing zero length arrays (below). Warnings depressed by pragma, of course, but I've failed to create by "new" structures containing such structures (error 2233). Array 'byData' used as pointer, but why not to use pointer instead? or array of length 1? And of course, no comments were added to make me enjoy the process...  Any causes to use such thing? Any advice in refactoring those?  struct someData {    int nData;    BYTE byData[0]; }   NB It's C++, Windows XP, VS 2003 Whether and how to thank a girlfriend or boyfriend in the acknowledgements of thesis?