App crashing when trying to open gallery Android pie I am trying to select image from gallery and code is working well on devices upto andorid nogut(7). I have added provider.xml also. This is my code     public void processSelectionOfImage(int code) {     Intent intent = new Intent();     intent.setType("image/*");     intent.setAction(Intent.ACTION_PICK);      Uri fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);     intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);      try {         intent.putExtra("return-data", true);         startActivityForResult(                 Intent.createChooser(intent, "Select Picture"), code);     } catch (Exception e) {         e.printStackTrace();     }  }   I am getting NullPointerException    java.lang.NullPointerException: file     at android.net.Uri.fromFile(Uri.java:453)
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?
Any suggestions for a good undergraduate introductory textbook to statistics? I am hoping you can give me some suggestions. I am teaching in a very diverse (made of minority groups) college and the students are mostly Psychology majors. Most students are fresh from high school but some of them are older returning students above 40. Most of the students have motivational problems and aversion to math. But I am still looking for a book that covers the basic curriculum: from descriptive to sampling and testing all the way to ANOVA, and all in the context of experimental methods. The department requires me to use SPSS in class, but I like the idea of building the analysis in a spreadsheet such as excel.  p.s. the other teachers use a book that I don't like because of the extensive reliance on computational formulae. I find using these computational formulas - rather than the more intuitive and computationally intensive formula that is consistent with the rational and basic algorithm- unintuitive, unnecessary and confusing. This is the book I refer to Essentials of Statistics for the Behavioral Sciences, 7th Edition Frederick J Gravetter State University of New York, Brockport Larry B. Wallnau State University of New York, Brockport ISBN-10: 049581220X Thank you for reading! says:     A humanoid killed by this spell rises at the start of your next turn as a zombie that is permanently under your command   If a player is hit by finger of death and dropped to 0hp, do they turn into a zombie immediately? If they subsequently fail death saves and die, do they then turn into a zombie? Given complex $|z_{1}| = 2\;\;,|z_{2}| = 3\;\;, |z_{3}| = 4\;\;$ : when and what is $\max$ of $|z_{1}-z_{2}|^2+|z_{2}-z_{3}|^2+|z_{3}-z_{1}|^2$ Why is the "Arnold Schwarzenegger" terminator referred to by two different product numbers (T-101, T-800)? Please don't refer to 2019 as 'a great year' Can I exclude spam domains from my search results? Sometimes when I search for something, there are plenty of links to sites with no content (those who only have the premade templates which the search terms), spammers, and leechers (as in copying content from other sites, like B r o t h e r s o f t who leeches on SoftPedia.com).  How come they have such a high ranking without any original content (furthermore, why are they not simply banned from the results)?  And also, is there some way of filtering them out? Like for example completely exclude a domain from search results? A word for someone who you share a half-sibling with This is probably best explained with an example.  Alice and Bob have a child, Erin. Bob and Carol have a child, Frank. Carol and Dan have a child, Grace. Clearly, Erin and Frank are half-siblings, because of their father, Bob. Similarly, Grace and Frank share their mother, Carol.  Erin and Grace have no parents in common, and are thus not half-siblings. However, is there a term for their relation? For equal cost, why would you select the MacBook Air over the MacBook Pro? I can see that the 13" version of MacBook Pro and MacBook Air is same $1199, but the Pro is more feature-loaded than Macbook Air. Why would anyone buy MacBook Air? What's the catch in this?    I was thinking of buying a MacBook for development purposes, and worried if there's any problem in the Pro version, because it comes with more features (like more storage).  Edit:    Thanks for the answer guys, I bought a MacBook Pro a week ago and already loving it. How can gravity affect light? Is it safe to have laptop turned on 24/7? Why does an environment's label have to appear after the caption? \documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used. Is there any intuition or meaning regarding Cauchy-Riemann equations? Short story about a crew finding an ancient alien ship filled with tons of artifacts from their society is there a way to get the option "Organize Desktop by Name" in Ubuntu 19.10 same as in 18.04? the option in Ubuntu 18.04 is "Organize Desktop by name"    But there is no option available in Ubuntu 19.10 I'm a European citizen living in the US on a work visa. Due to some unfortunate circumstances, I need to urgently visit my home country. However I would like to get back to the US after my visit is complete. Flying from the US to Europe is not a problem as there are still daily flights between some city pairs. However going back could be tricky, as  anyone who has been in the Schengen area in the past 14 days from re-entering the country.   Is there a flight route that would let me from Europe to some country, stay there for 14 days and then fly to the US? Canada is out, as they've banned international visitors. Mexico seems to keep their border open, but I  any direct European flights from their airports. Almost every other country either suspended flights or doesn't allow foreign nationals to enter. Including Bitmap (.bmp) I can't include bitmaps with pdflatex. Here is my mwe:  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[turkish]{babel} \addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 } \addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }   \usepackage{graphicx}  \begin{document}  \shorthandoff{=}  \includegraphics[width=5cm,height=5cm]{000.bmp} \end{document}   Gives the error Unknown graphics extension: .bmp. In Java, what is the best way to determine the size of an object? I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know. Few days ago I got sample of toroidal core from my friend. I don't know any technical details of core just know OD-10cm, ID-6cm, height- 5cm and wet about 1.845 kg(M4 grade CRGO). I want to make toroidal transformer using this core but how to calculate core area and maximum VA capacity of core.I take some photos and attach. I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/speed problems.  So, sometime in the very far past I went to try and find if there existed any "pattern" or text-book way of transforming a common recursion approach to iteration and found nothing. Or at least nothing that I can remember it would help.   Are there general rules? Is there a "pattern"? Unable to make recursive call in Javascript