I have a RecyclerView that gets data from a Firebase database.  When the RecyclerView reaches the end of the data feed the app crashes with following:  Logcat file:   09-27 15:30:12.826 30184-30184/com.pctoolmanconsulting.trackmyweight E/AndroidRuntime: FATAL EXCEPTION: main                                                                                    Process: com.pctoolmanconsulting.trackmyweight, PID: 30184                                                                                    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference                                                                                        at com.pctoolmanconsulting.trackmyweight.ProgressViewHolder.bind(ProgressViewHolder.java:40)                                                                                        at com.pctoolmanconsulting.trackmyweight.ProgressAdapter.onBindViewHolder(ProgressAdapter.java:41)                                                                                        at com.pctoolmanconsulting.trackmyweight.ProgressAdapter.onBindViewHolder(ProgressAdapter.java:15)   I can not figure out where I am supposed to check for the null value.  In the bind method of my ViewHolder class or in the adapter class.   Can someone help point me in the right direction? Thanks.  My ViewHolder bind method:  public void bind (ImageProgress progress){   name.setText(progress.name);    if(progress.progressDetail.startsWith("https://firebasestorage.googleapis.com/") || progress.progressDetail.startsWith("content://")){     progressDetailMessage.setVisibility(View.INVISIBLE);     image.setVisibility(View.VISIBLE);     Glide.with(activity).load(progress.progressDetail).fitCenter().into(image);    } else {      progressDetailMessage.setVisibility(View.VISIBLE);      image.setVisibility(View.GONE);      progressDetailMessage.setText(progress.progressDetail);   } }   adapter class:  public class ProgressAdapter extends RecyclerView.Adapter&lt;ProgressViewHolder&gt; {    private static final String TAG ="ProgressAdapter";   private final Activity activity;   List&lt;ImageProgress&gt; progressDetails = new ArrayList&lt;&gt;();    public ProgressAdapter(Activity activity){     this.activity = activity;   }    public void addProgress(ImageProgress progress){     progressDetails.add(progress);     notifyItemInserted(progressDetails.size());   }    @Override   public ProgressViewHolder onCreateViewHolder(ViewGroup parent, int viewType){     return new ProgressViewHolder(activity, activity.getLayoutInflater().inflate(android.R.layout.two_line_list_item,             parent, false));   }    @Override   public void onBindViewHolder(ProgressViewHolder holder, int position){     holder.bind(progressDetails.get(position));   }    @Override   public int getItemCount() {     return progressDetails.size();   } }
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?
Using ExactTarget DEManager to update record? Is there a way to use ExactTarget DEManager to update a data extension record instead of only add? I have a data extension that adds subscribers to specified lists (each list is its own boolean column). If a user goes to my DEManager form and the subscriber already exists, the form will return the error url ("subscriber already exists" or something similar). Is there any way instead for the form to update the existing subscriber record instead of it returning an error? If so, is there a way to use DEManager to first check if a record exists, and if it doesn't then add, otherwise update?  Reference: the DEManager section at   &lt;form action="http://cl.exct.net/DEManager.aspx" name="subscribeForm" method="post"&gt;         &lt;input type="hidden" name="_clientID" value="12345" /&gt;         &lt;input type="hidden" name="_deExternalKey" value="WebCollectSubs" /&gt;         &lt;input type="hidden" name="_action" value="add" /&gt;         &lt;input type="hidden" name="_returnXML" value="0" /&gt;         &lt;input type="hidden" name="_successURL" value="http://example.com/Success" /&gt;         &lt;input type="hidden" name="_errorURL" value="http://example.com/Failed" /&gt;         Email: &lt;input type="text" name="Email"&gt;&lt;br /&gt;         First Name: &lt;input type="text" name="FirstName"&gt;&lt;br /&gt;         Last Name: &lt;input type="text" name="LastName"&gt;&lt;br /&gt;         &lt;input type="submit" value="Submit"&gt;     &lt;/form&gt; If every compact set is closed, then is the space Hausdorff? Book with a girl whose grandma is a phoenix, cover depicts the emerald/green-eyed blonde girl I read this book in 2016, but I remember the cover being torn up, so it couldn't have been a new book. There was a girl's face on the cover. She had lightly colored skin, and beautiful emerald green eyes. Her hair was a dirty blond. This book was first in a trilogy and the cover was illustrated.  The girl's grandmother in the story was actually a phoenix (I think this was revealed in a different book in the trilogy though). The book started out in a small village, and I can't remember exactly where in the village chapters (the chapters that took place in the village) but she sneaked her deceased mother's green dress out of a trunk she wasn't supposed to go in, and I think she wore it to some event. Can a countable set contain uncountably many infinite subsets such that the intersection of any two such distinct subsets is finite? Can a countable set contain uncountably many infinite subsets such that the intersection of any two such distinct subsets is finite? Can there be true conclusions without assumptions? I was thinking of the sentence  "I think therefore I am",  which I had for a long time considered indisputable because it's self-evident.   Then I considered the hypothetical situation where my thoughts are illogical – and of course I can't be aware that they are – and so to a logical outsider I am not saying something that is actually indisputable and self-evident, but in fact may be total nonsense. Perhaps there is a hypothetical evil demon altering my ability to reason. However convincing it seems to me that I MUST exist since, in whatever since "I" or "exist" is, there is the ability to question whether I do, the conclusion can't actually be trusted without doubt since I cannot know if I am in fact reasoning logically.  Even what I consider to be trivial tautologies require this assumption of sanity, and therefore there is no true conclusion without assumption – an assumption about the nature of my own reasoning. The only absolute truth I have is unspeakable subjective experience, and any articulation (and I realize the apparent circular reasoning I've cornered myself into here...) is necessarily uncertain.  I realize that perhaps this doesn't even make sense, but was just curious if anyone had entertained this line of thought and come to some satisfying resolution. How to dynamically change a web page's title? I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page? Decision Tree in LaTeX with TikZ Grid line doesn't have to be included     \documentclass[10pt]{beamer}  \usetheme{default}  \usepackage{graphicx}  \usepackage{amssymb,amsmath}  \usepackage{tikz}  \usetikzlibrary{matrix}  \usepackage{adjustbox}  \usepackage{caption} \ usepackage{subcaption}   \setbeamercolor{title}{fg=black}  \setbeamercolor{subtitle}{fg=gray}  \setbeamercolor{footlinecolor}{fg=white,bg=green}  \setbeamertemplate{footline}[text line]{% \parbox{\linewidth}{\vspace*{-10pt} \textit{Where Wall Street Goes to School} \hfill \insertpagenumber} } \setbeamertemplate{navigation symbols}{} –  \begin{tikzpicture}[&gt;=stealth,sloped][scale=0.8]  \matrix (tree) [matrix of nodes, minimum size=0.25cm, column sep=2cm, row sep=1cm, ]  { &amp; $C_{i+1,j+1}$ \\ $C_{i,j}$ &amp;$C_{i+1,j}$ \\  &amp; $C_{i+1,j-1}$ \\   };  \draw[-&gt;] (tree-3-1) -- (tree-1-3) node [midway,above] {};  \draw[-&gt;] (tree-3-1) -- (tree-3-3) node [midway,above] {};  \draw[-&gt;] (tree-3-1) -- (tree-5-3) node [midway,below] {};  \end{tikzpicture}  \end{adjustbox} – What is Ubuntu's status on the Meltdown and Spectre vulnerabilities? Why aren't my guide and other dead NPCs respawning in Terraria? I am currently in hard mode and during a blood moon, several of my NPCs including my guide and my healer died. it's been several in game "days" now and they have yet to respawn. Is there a way to check why they aren't respawning?   Is there a list of reasons for the NPCs to not respawn?   Edit in reponse to lunbok's answer:  1. They don't have appropriate housing - There is an in-game housing query function (changes your cursor into a ?) that lets you click on your house to see if it is still a suitable house and I clicked in every room in my house and they are all listed as "This housing is suitable" or "This housing is already occupied".  2. Their spawn conditions aren't met anymore. - This doesn't explain why my guide isn't respawning since they don't need a condition to respawn (other than having a suitable housing which the point above already prove isn't the problem).  3. There's a goblin invasion going on. - Do the invasions last that long? It has been about two reals days and a lot more in-game "days" now. As far as I can tell there shouldn't be an invasion going on.  4. It could be because you built your house in a part of the world that is now corrupted It would be nice to see what users have recently been active. This is somewhat standard with many forum-style websites, showing how active the site has been in the last n-minutes or so. As a functional advantage, this also serves to let you know when is a good time to get a question in. How do I delete/remove a shell function? I have done this:  $ z() { echo 'hello world'; }   How do I get rid of it? Does Windows still rely on MS-DOS? I am just about to start an OS course and as an Apple user I am not very familiar with the underlying details of Windows OS. I was wondering, is MS DOS still used with Windows running on top or is ONLY Windows used now as the OS? I was a little confused because I read somewhere that MS-DOS is used for booting but Windows has all other OS capabilities built into it and thus is used for all other OS operations... SQLException: Invalid Column Name...? variable-sized "such that" pipe How can I force a program to open in a specific desktop? I've created an environment where I use 3 different desktop configurations, but every time I reboot, I have to manually open each program in that target desktop to make it look like it did before.   So, I'd like to write a .bat file that can get all my programs running in their appropriate desktops. I'm wondering if something like this is possible:  "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -desktop:2 "C:\Program Files\My\Other\Software.exe" -desktop:3 ...etc.   Obviously, this example is not real, but I hope there's something similar. I don't care if it's hacky :) Help + Noun + Gerund or Infinitive I'm in 17.10. Whenever I touch the screen, whether to change windows/apps, scroll within a browser, or press a button, the stupid little keyboard pops up in the bottom left corner.  I have never left Screen Keyboard enabled in Universal Access, but if I toggle it on, that's the same keyboard popping up in the bottom left corner.    In this screenshot, I'm simply touching the screen in a full-screen youtube video. You can see the menu pop up on the right, under the point where I'm touching.  I don't have a before pic, but it was similar look/color keyboard, but it was smaller, maybe half as wide, and only in the bottom left section of the screen, as opposed to stretching across the entire width. This change from little left-hand keyboard to full-width keyboard happened after following @pomsky 's advice below.    This is a . You can mark yourself affected by it to hopefully increase its received attention. The following example works as expected:  \documentclass{article} \usepackage[table]{xcolor} \usepackage{makecell, multirow}     \renewcommand\theadfont{\normalsize\bfseries\color{white}}     \renewcommand{\theadgape}{} \usepackage{hhline}  \begin{document} \centering     \setlength\arrayrulewidth{2pt}     \arrayrulecolor{yellow}     \def\clinecolor{\hhline{&gt;{\arrayrulecolor{yellow}}--%                             &gt;{\arrayrulecolor{gray}}-}}     \setlength\extrarowheight{2pt} \begin{tabular}{ c | c | c }%     \rowcolor{gray} \multicolumn{2}{c|}{\thead{AAA -- BBBB}}    &amp;                                   \\     \clinecolor     \rowcolor{gray} \color{white} AAA   &amp;   \color{white} BBB   &amp;   \multirow{-2}{*}{\thead{CCC}}   \\     \hhline{&gt;{\arrayrulecolor{yellow}}-|-|-}     \rowcolor{gray!25} aaa                 &amp;   bbb                 &amp;   ccc                             \\     \hline     \rowcolor{gray!25} ddd             &amp;   eee                 &amp;   fff     \end{tabular} \end{document}     But the following not:  \documentclass[xcolor=table]{beamer} \usepackage{makecell, multirow}     \renewcommand\theadfont{\normalsize\bfseries\color{white}}     \renewcommand{\theadgape}{} \usepackage{hhline}  \begin{document} \begin{frame} \frametitle{test} \centering     \setlength\arrayrulewidth{2pt}     \arrayrulecolor{yellow}     \def\clinecolor{\hhline{&gt;{\arrayrulecolor{yellow}}--%                             &gt;{\arrayrulecolor{gray}}-}}     \setlength\extrarowheight{2pt} \begin{tabular}{ c | c | c }%     \rowcolor{gray} \multicolumn{2}{c|}{\thead{AAA -- BBBB}}    &amp;                                   \\     \clinecolor     \rowcolor{gray} \color{white} AAA   &amp;   \color{white} BBB   &amp;   \multirow{-2}{*}{\thead{CCC}}   \\     \hhline{&gt;{\arrayrulecolor{yellow}}-|-|-}     \rowcolor{gray!25} aaa                 &amp;   bbb                 &amp;   ccc                             \\     \hline     \rowcolor{gray!25} ddd             &amp;   eee                 &amp;   fff                             \\     \hhline{|-|-|-|}     \end{tabular} \end{frame} \end{document}     Why are the in beamer rules so strangely misplaced? Is there some workaround? What is sudo apt-get -f install? what is the usage of apt-get -f install . when I run sudo apt-get update I got some errors at the end It says try apt-get -f install. What is this command?  the last part of my error is :   . . .   going to be installed   E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). What is the correct way to punctuate the end of a sentence before a quote that directly supports the statement? I assume either a colon or a semicolon, but I have no idea which is correct.  For example:     Waldo is a better hide-and-seek player than Clem; "Waldo was   the winner of the past ten annual hiding awards" (Where's Waldo 13).      Waldo is a better hide-and-seek player than Clem:  "Waldo was   the winner of the past ten annual hiding awards" (Where's Waldo 13).   (Excuse the silly example, but I didn't have a better one.)