Android-Kotlin : BitmapFactory gives nullpointer exception this is my code    private fun initDesign(imageList: List&lt;ImageList&gt;) {         //Initialize with empty data          for (i in 0 until imageList.size) {              val imageDataBytes = imageList.get(i).image             val iD = Integer.parseInt(imageList.get(i).imageIndex)             val  imageAsBytes : ByteArray  = Base64.decode(imageDataBytes,0)             bitmaps !!.add(BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.size))             imageID!!.add(iD)         } }   what was the wrong with this code
What is a NullPointerException, and how do I fix it? 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?
Proof by induction on a rooted tree with even number of vertices Let $T = (V, E)$ be a rooted tree with an even number of vertices. Prove by induction that there exists a set of edges $S \subseteq E$ such that every $v \in V$ is incident with an odd number of edges in $S$.  I was wondering if my argument is sufficient to prove the statement above:  Base case: $|V|=2$, there is only 1 edge and both vertices are incident with 1 edge $-&gt;$ $S \subseteq E$.  Inductive step:  Let $|V|&gt;2$, implying that $T$ has at least 2 external vertices. Let us choose two arbitrary external vertices $w,u \in V$. Such vertices are only incident to 1 edge each, $e_w$ and $e_u$. We can say that $e_w,e_u \in S$.   By induction, there exists a set $S$ in $T'=T-\{w,u\}=(V',E')$ such that every $v \in V'$ is incident with an odd number of edges in $S$ because removing 2 vertices from a tree with an even number of vertices maintains the property $|V|=2n$. I have a script in file bla.sh and it is executable. When I click on it, the script is executed and the window is closed. I'd like the window to stay open.  Something like command cmd /k** command in Windows.  P.S. I don't want to use pause, but I want to able to write more commands after the script was executed. I have an uploaded video and I want to cut sections of audio (strong language) or add beeps on top without reuploading the video. Black artifacts when looking through many transparent objects? Why does Beamer's table of contents items link to the second slide in a section? When I include a table of contents in a Beamer slide show, each section entry in the TOC ends up linking to the second slide in that section. I would have expected it to link to the first slide. What am I doing wrong?:  \documentclass{beamer}  \begin{document} \begin{frame}{Test TOC}   \tableofcontents \end{frame}  \section{Section 1}  \begin{frame}   \frametitle{Test 1} \end{frame}  \begin{frame}   \frametitle{Test 2} \end{frame}  \end{document}   Just to clarify: when I click Section 1 in the TOC, it takes me to the slide Test 2.  UPDATE: I am actually not sure if it takes me to slide Test 2. When I click the link, the viewer (Evince and Okular) displays most of Test 2, but with a tiny strip of the slide Test 1 visible at the top of the window. I suspect that the viewer may treat the link as pointing to the very bottom of slide Test 1 and then aligns that with the top of the window. Could this be the explanation? every planar graph can be expressed as a union of five edge-disjoint forests How can I prove that every planar graph can be expressed as a union of (maximum) five edge-disjoint forests?  Only thing I can think about is going somehow like the $5$ color theorem but I get stuck in the middle. Or with induction, but still something doesn't fit. Can you help? Is speed of light and sound rational or irrational in nature? Just as circumference of circle will remain $\pi$ for unit diameter, no matter what standard unit we take, are the speeds of light and sound irrational or rational in nature ?   I'm talking about theoretical speeds and not empirical, which of course are rational numbers. What are the primary differences between the rules of D&D 3.5 and Pathfinder? What are some of the rule changes that Pathfinder brings in comparison to D&amp;D 3.5?  I am curious what changes were made so I can explain to my group what it has to offer. Landscape topography from grayscale image Any idea what kind of tool should I but to fix the loose left crank on my bike? I found this  but not sure if it's gonna suit. Or is it enough to buy only nut driver? Can independent variables with low correlation with dependent variable be significant predictors? I have eight independent variables and one dependent.  I have run a correlation matrix, and 5 of them have a low correlation with the DV.  I have then run a stepwise multiple regression to see whether any/all of the IVs can predict the DV.  The regression showed that only two IVs can predict the DV (can only account for about 20% of the variance though), and SPSS removed the rest from the model.  My supervisor reckons that I have not run the regression correctly, as due to the strength of the correlations, I should have found more predictors in the regression model. But the correlations were tiny, so my question is: if IVs and the DV hardly correlate, can IVs still be good predictors of the DV? A few years ago Umber Ferrule wrote that the toolbars in the taskbar are defined in   HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams.   This looks very plausible but cannot be the entire story.  Deleting this key will in no way affect the taskbar and on rebooting the system the key magically reappears.  Why do I want to know?  Simple.  I would like to export the key to a reg. file as a convenient backup. I'm looking for a story that was probably written somewhere from the 1940s to the 1960s. I think I read it in an anthology, possibly in the 1970s.  A group of human explorers landed on a planet with primitive aliens, living in hunter-gatherer villages. They hoped to make a profit from trading our goods for—well, I'm not clear on what they wanted from the aliens.  The native people learned the human language before the explorers could learn theirs. Then the natives suddenly started producing technological innovations far beyond what they originally used. I remember that wooden sailing ships suddenly replaced their canoes. All the natives had to do was hear a story once from the explorers before copying the technology in the story.  Finally, the explorers realized that the natives were much, much smarter than us and that Earth faced a serious problem.  I'm fairly certain that it wasn't a Heinlein story, but I remember that it had some qualities similar to his work. Proving a graph has no Hamiltonian cycle How to prove that a continuous function, homotopic to the constant map $f:S^1\to S^1$  (a) has a fixed point and that (b) has a point $x$, such that $f$ maps $x$ to its antipodal point $-x$? Fast(est) and intuitive ways to look at matrix multiplication? Opening files from version 2.8 in 2.79 I am doing some arcpy -functions and afterwards I'm trying to add the calculated results from one table to another table. I'm using the arcpy.AddJoin_management() function.   As input table I'm using a table which is stored in a personal geodatabase. The personal geodatabase is not the workspace environment! As "JoinTable" a Table of a file geodatabase is used. This file geodatabase is the workspace geodatabase environment.  The initialized function looks like this:  (%self.getWorkspaceEnvironment => "W:/a18fb/data/mypersonalgeodatabase.mdb" and tFactsheetHochwasser => table in the personal geodatabase)  arcpy.AddJoin_management("%s/tFactsheetHochwasser"%self.getWorkspaceEnvironment(),"KPG", "GebaeudeKtn_BWVred1Stat","KPG","KEEP_ALL")  If the code is executed the following error-message appears:  Failed to execute.Parameters are not valid. The value cannot be a table     ERROR 000840: The value is not a Raster Layer.      ERROR 000840: The value is not a Raster Catalog Layer.      ERROR 000840: The value is not a Mosaic Layer.      Failed to execute (AddJoin)`. How to find out if my system is i386 or x86_64 before installing Ubuntu? I am using Windows as of now and want to install Ubuntu. I want to find out if my system is i386 or x86_64? How do I do that? How to draw circle in html page?