I have 2 recyclerview. I want to add different types of book images to different lines in the horizontal plane. But when I add a book, it is added to both of recyclerview. Where's my mistake?  for loop:  for (DataSnapshot ds : dataSnapshot.getChildren()) {                         HashMap&lt;String, String&gt; hashMap = (HashMap&lt;String, String&gt;) ds.getValue();                          mBaslik.add(hashMap.get("baslik"));                         mFotoUrl.add(hashMap.get("downloadurl"));                          if(hashMap.get("baslik").equals("Roman")){                             initRecyclerView();                         }                         else if(hashMap.get("baslik").equals("Hikaye")){                             initRecyclerView2();                          }                      }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
How to add \part only to TOC? Pagination returns 404 after page 20 Java: Detect duplicates in ArrayList? Inspired by  I was wondering why the Half Blood Prince left his book as a class copy. One would think that it was precious to him, since he invested so much in it. He made up potions and spells up by his own. I would expect him to keep it to himself. Both, because of the personal value of it, and to prevent others to (as happened at last) use his work (misguided and/or against him).  Is there any canon explanation why his book was left as class copy? What's up with Vic? In the TV series Glitch, we see several people returning from the dead.  We see Vic, a police officer,      getting in a car accident and seemingly .   Afterwards, he behaves very strange. He searches for the doctor and the risen, whom he seems to know a lot about, sometimes even more than they know themselves.      He rekills Maria by breaking her neck.   And he threatens the other risen.  Most of the risen, especially those that have been dead longer, have some difficulty remembering their past lives. Vic on the other hand, seems to remember fine but to have a complete change of character instead.   Why is he after the other risen? How does he know so much about them? Why did he have such a change of character?     Yes, these are several questions, but they are closely related, so I opted to ask them in one question. How can I change the registered name in Windows 7 to my own? how do I change the registered name in Windows 7 to my own name? Round double to 3 points decimal As part of the definition of a cone spell in the handbook:     A cone's point of origin is not included in the cone's area of effect, unless you decide otherwise.   As an example, what would either case be for a casting of Burning Hands?   Could the caster include themselves? or does this mean that they can exclude the first square of the cone? About the semantically related words Google's algorithm uses in mixed language websites Because I'm Latin, sometimes I use a word in English while talking in Spanish.   In a website, for example, I could be interested in ranking for a word as “promoter” inside a page in Spanish, because that is how my public understands that concept.  Does the latent semantic indexing (LSI) (or whatever Google uses for semantic relation) fail to relate “promoter” with the content (because there are not related words in English) and then could that prevent my site from ranking? "invalid use of incomplete type" error with partial template specialization What can I do about uncounterable spells? I cast , sacrificing my only creature to kill my opponent.  My opponent responds with , which will win the game the other way.  Last Word says "This spell can't be countered."  What else can I do about it besides countering it to prevent my plans from being foiled?  (I'd really like to have the last word here.)    Historic Note: before of the April 2018 rules change, uncounterable spells with targets used to actually have different wording (still visible on the printed cards) implying that they still could be countered.  For example, Last Word said:     Last Word can't be countered by spells or abilities.   Meanwhile Akroma, Angel of Fury said:     Akroma, Angel of Fury can't be countered. Does a man contain all the genes needed to make a woman? This question is brought on by a Sci Fi novel I am thinking about writing. The plot device involves a colonist in charge of building a population on a new planet who loses his supply of embryos and so forth in the landing. With the artificial "wombs" intact, he populates the planet with clones of himself.  If he wanted to introduce enough variation (without making up new genes, only rearranging) in the population to allow them to be able to reproduce naturally without inbreeding problems, would he be able to? In particular, could he make a woman?  Alternately, could a woman (without a Y chromosome) do the the inverse?  At the risk of introducing bias into the answers, the plot as it stands assumes he is a male and he CAN'T do any of the above and he is restricted to clones. There's someone much like Crazy Earl in Oasis behind a locked door. He tells me to leave until I've killed a seraph guardian or I get some sort of guardian crystal.  I just beat the DLC and did many of the sidequests and I'm still stumped as to how to get such a crystal. I assumed there would be Guardian foes just like in Borderlands 1, and they'd drop this item. After completing the story...there were no such enemies. So what do I do? Looking out into the universe means looking back in time - how does that work? This is a question that has been gnawing on me for many years now. Back a long time ago, as I recall in reference to a scene in a popular science show on TV, I was asked the following.  The claim is that when you look out into the universe, you see the universe as it appeared at some past time. (This follows from the speed of light being finite, and looking at objects by observing their emitted light or other EM radiation.) The amount of time that one looks backwards is equal to the distance to the observed object in light-distance (so looking at something ten lightyears away means you are observing it as it was ten years ago).  Matter moves at a rate of speed less than the speed of light (it has to, since matter has mass, even if miniscule at the atomic level). So $v_{mass} \lt v_{EM}$ (probably significantly less, since $v_{EM} = c$).  So let's say you're looking at an object $10^{10}$ lightyears away by observing something for which $v=c$. To the observer, that object appears as it was $10^{10}$ years ago. But the Earth is much younger than $10^{10}$ years and we established that matter moves at a slower speed than EM radiation, so wouldn't the radiation that was emitted $10^{10}$ years ago long since have passed Earth's current position?  If, say, $v_{mass} = 0.5 \times c$ (a big assumption, but bear with me for a second), it would seem that the radiation emitted $10^{10}$ years ago would have passed Earth's current position $10^{10} - (0.5 \times 10^{10}) = 5 \times 10^{9}$ years ago, around the time when the solar system was still forming. Setting $v_{mass} = 0.25 \times c$ (which seems more realistic) means the radiation would have passed "us" around $7.5 \times 10^{9}$ years ago. So how could we be observing it now?  I'm not sure I'm posing this question in the best possible way (I'll admit I do find the concept somewhat confusing), and I'm sure that there's a simple explanation for it all. Just what am I missing?  I did find  which seems peripherally related but not quite the same thing. Qmechanic brought up  but that question seems to be about whether it is so, not why it is so. grep a file, but show several surrounding lines? I would like to grep for a string, but also show the preceding five lines and the following five lines as well as the matched line. How would I be able to do this? Listing feature classes with active domains? I would like to prove the following equality: $$k^{\phi(l)} + l^{\phi(k)} \equiv1\pmod{lk}$$if $\gcd(l,k)=1$. What methods can I use? Thank you for your help. Splitting lines with points while maintaining other dissolved lines? I am on ArcGIS Desktop 10.2. I have a line feature class of a stream network. I also have a point feature class along the main stream (line) where a catchment enters that stream. I have dissolved my whole streams layer into one line feature and want to split this feature at the points.    However, when I use the  tool, the lines that don't have a point splitting them are still being split at the intersection of two streams.    Why did this line not stay as one feature with the other lines on that side of the splitting node and how can I prevent this from happening? I want to run a script to simply change the current working directory:  #!/bin/bash cd web/www/project   But, after I run it, the current pwd remains unchanged! How can I do that? How can one differentiate between "who" and "whom"? Many times, I've been asked the difference between "who" and "whom". I myself know the difference, but it is hard to explain to others. What is the easiest way to explain it to those with a basic understanding of English? A mnemonic (if possible) would help.