When click pic directly from app it's crash from this lines. this problem is getting only on Android 11, working fine on other devices Errors: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isMutable()' on a null object reference at com.my.collegemaker.collagelib.Utility.decodeFile(Utility.java:115) at com.my.collegemaker.collagelib.CollageActivity$BitmapWorkerTask.doInBackground(CollageActivity.java:262) at com.my.collegemaker.collagelib.CollageActivity$BitmapWorkerTask.doInBackground(CollageActivity.java:227) @SuppressLint({&quot;NewApi&quot;}) public static Bitmap decodeFile(String path, int requiredSize, boolean isScrapBook) {     try {         File f = new File(path);         Options boundsOption = new Options();         boundsOption.inJustDecodeBounds = true;         BitmapFactory.decodeStream(new FileInputStream(f), null, boundsOption);         Options o2 = new Options();         if (isScrapBook) {             o2.inMutable = true;         }         o2.inSampleSize = calculateInSampleSize(boundsOption, requiredSize, requiredSize);         Bitmap bitmap = BitmapFactory.decodeStream(new FileInputStream(f), null, o2);         ExifInterface exif = null;         try {             exif = new ExifInterface(path);         } catch (IOException e) {             e.printStackTrace();         }         bitmap = rotateImage(bitmap, exif.getAttributeInt(&quot;Orientation&quot;, 0));         if (bitmap.isMutable()) {             return bitmap;         }         Bitmap mutableBitmap = bitmap.copy(Config.ARGB_8888, true);         if (mutableBitmap != bitmap) {             bitmap.recycle();         }         return mutableBitmap;     } catch (FileNotFoundException e2) {         return null;     } }  App Crash On This Line bitmap = rotateImage(bitmap, exif.getAttributeInt(&quot;Orientation&quot;, 0));         if (bitmap.isMutable()) {             return bitmap;
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?
Several responses to a question  suggested I try Opera kiosk mode, so I decided to download it and give it a try. Once the download had completed and the disk image was being verified, Safari hung for over a minute and there were periods where Safari used a very high %CPU:    In Mac OS X 10.5, I was accustomed to seeing Safari freeze, but it never used up more than 200% CPU (2 cores x 100%). Is this a bug in Activity Monitor? Or does this mean that %CPU is now more akin to ? If $A$ and $B$ are positive definite, then is $B^{-1} - A^{-1}$ positive semidefinite? Primary Decomposition of $\mathbb{R^n}$ under T I have a question related to the Primary Decomposition Theorem for a vector space under a linear transformation.  The following question is a direct corollary of this theorem.  However, I wish to prove it without calling upon theorem.  I am currently studying for a comprehensive exam and ran across this question.  I never really felt comfortable with the proof I saw of the Primary Decomposition Theorem so I hoping with your help with this problem I will understand this particular problem and better understand that proof as I believe their proofs will be essentially the same techniques.   Question:  Suppose we have a linear transformation $T: \mathbb{R^n}\to \mathbb{R^n}$ with minimal polynomial $m(x)=f(x)g(x)$ and $f(x),g(x)$ are relatively prime.  Show that we can write $\mathbb{R^n}=M\oplus N$ where $M$ and $N$ are $T$-invariant subspaces s.t $f(x)$ is the minimal polynomial for $T|_M$ and $g(x)$ is the minimal polynomial for $T|_N$.   So I know that I want to use $M=ker(f(T))$ and $N=ker(g(T))$ but after that I really don't have much.  Since this isn't a homework problem for a class I am essentially looking for someone to present me a proof of this simpler question and walk me through their logic so that I can hopefully understand the general theorem and its proof.  Thanks in advance for the help! Generalized Second Borel-Cantelli lemma I am looking at some code and it has this statement:    ~ConnectionManager() {     Dispose(false); }   The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for. Somewhere in the provided answer:   $$\int \frac{1}{\sqrt{2-x^2}} dx = \sin^{-1}{\frac{x}{\sqrt{2}}}$$  How did they get that? What I have:   $$\frac{1}{\sqrt{2-x^2}} = \frac{1}{\sqrt{2(1-\frac{x^2}{2})}} = \frac{1}{\sqrt{2} \sqrt{1-\frac{x^2}{2}}}$$  $$\frac{1}{\sqrt{2}} \int \frac{1}{\sqrt{1-(\frac{x}{\sqrt{2}})^2}} = \frac{1}{\sqrt{2}} \sin^{-1}{\frac{x}{\sqrt{2}}}$$  So I have an extra $\frac{1}{\sqrt{2}}$ ... I probably had some stupid mistakes? Is it possible for a system to have negative potential energy? What is the difference between “Size” and “Size on disk?” Looking at the properties for a Windows file I get two attributes, “Size” and “Size on disk,”  and "Size on disk" is always larger.  What do these two metrics mean? Why does default auto.arima stop at (5,2,5)? The function auto.arima in the forecast package of R is a powerful tool to identify the best ARIMA(p,d,q) model for a given data series. In the   of the function, they report the following:  auto.arima(y, d=NA, max.p=5, max.q=5, max.order=5, max.d=2, start.p=2, start.q=2, ...)   According to the above function it seems that, by default, auto.arima tries to find the best model among all the combination having:   p equal or lower than 5 q equal or lower than 5 d equal or lower than 2 order equal or lower to 5, i.e. p + q + d  ≤ 5.   However, why does the default code stops at these conditions? Is there any particular reason why p, q and d should be equal or lower than 5, 5 and 2 and their sum lower than 5? For privacy and performance reasons, I'd like to prevent my computer from ever communicating with certain Internet hosts. I'd like to do this at the OS level, not through web browser plug-ins (not broad enough), or even through my home router (my laptop travels). I'd prefer to use built-in tools.  I'm running Windows 7 Professional 64-bit. I'm all too familiar with the Windows hosts file - and its limitations. There seems to be some confusion over whether hosts supports wildcards, but my own tests confirm that it does not.  I have experimented with Windows Firewall and the IP Security Policy MMC snap-in. So far as I can tell, both require numeric addresses. I don't want to block specific IP addresses, or ranges of addresses, in part because IP-address-to-hostname mappings can and do change.  Is there any tool in Windows 7 Professional with which I can block (or route to 0.0.0.0) communication with Internet hosts by hostname mask? If not, are there any good, free, third-party tools? I noticed that if I transfer a few large files between two hard drives, it's pretty speedy, at around at least 30&nbsp;MB per second, but if I transfer thousands of files less than 5&nbsp;KB, it is pretty damn too slow.. around 1 to 2&nbsp;MB per second.   Is there a way to speed up the copy/paste process with thousands of small files on Windows 7? Is a particular sequence required for detailed replicator requests?    To elaborate, is there a reason Captain Picard orders his tea, "Tea. Earl Grey. Hot." aka "Noun. Descriptor. Descriptor." and not "Descriptor. Descriptor. Noun." or "Descriptor. Noun. Descriptor." (in the event he forgot a descriptor)?  Would ordering it as "Hot. Earl Grey. Tea." or even the non-statement "Hot Earl Grey tea." produce a warm (hot), smoky (gray-ish) gas with the odor of tea?  I assume his ordering sequence is an acquired background affectation, but I'd like confirmation.  Note: I'm using "descriptor" instead of "adjective" to avoid minutia/debate about classification. I am using MikTex 2.9 and TeXstudio for my TeX preparation. I would like to set the path to my figures folder, which contains all the figures, plots etc. required for my work.   I used \graphicspath to set the directory, but it gives me an error message:  \documentclass[12pt]{article}  \usepackage{graphicx}  \graphicspath{D:/LATEX/Reports@IIT/figures}  \begin{document} \includegraphics[width=4.5cm,height=4cm,angle=0]{logo.jpg}  \end{document}      Error: Package pdftex.def Error: File `logo.jpg' not found   However, when I prepend the filenames of the images with the same path in the \includegraphics command, it works just fine:  \documentclass[12pt]{article}  \usepackage{graphicx}  \begin{document}  \includegraphics[width=4.5cm,height=4cm,angle=0]{D:/LATEX/Reports@IIT/figures/logo.jpg}  \end{document}   Why is \graphicspath not setting the path? In biblatex, treat periods in journal as abbreviation dots I would like to consistently have a comma between the journal and volume number for article references using biblatex with biber as the backend. Unfortunately, the punctuation between the journal and volume is not consistent. Journals whose last word is abbreviated have no comma between the journal and the volume, and the word "Vol." is capitalized. Journals whose last word is not abbreviated have a comma and the word "vol." is not capitalized. I can fix the capitalization by un-commenting the commented lines in the below MWE, but the comma problem is quite perplexing. Apologies if this fix is in an answer somewhere, but I cannot find it (or at least, I don't know what to search for!).  Current output: [1] First Author. “Blah Blah 2”. In: Am. J. Phys. Vol. 72, no. 3 (Mar. 2004), pp. 367–375. [2] Second Author. “Blah blah”. In: Energy Fuel, vol. 27, no. 12 (Dec. 2013), pp. 7778–7789.  Expected output: [1] First Author. “Blah Blah 2”. In: Am. J. Phys., vol. 72, no. 3 (Mar. 2004), pp. 367–375. [2] Second Author. “Blah blah”. In: Energy Fuel, vol. 27, no. 12 (Dec. 2013), pp. 7778–7789.  MWE:  \documentclass{article} \usepackage{filecontents} \usepackage[     backend=biber,     citestyle=numeric-comp, ]{biblatex} \addbibresource{\jobname} % \DefineBibliographyStrings{english}{%     % volume = {\lowercase{v}ol\adddot}, % avoid capitalization after dots. % } \DeclareFieldFormat[article]{volume}{\bibstring{volume}\addspace #1} \DeclareFieldFormat[article]{number}{\bibstring{number}\addspace #1} \renewbibmacro*{volume+number+eid}{%   \printfield{volume}%   \setunit{\addcomma\space}%&lt;---- was \setunit*{\adddot}%   \printfield{number}%   \setunit{\addcomma\space}%   \printfield{eid}} \renewbibmacro*{journal+issuetitle}{%   \usebibmacro{journal}%   \setunit*{\addcomma\addspace}%&lt;---- was \setunit*{\addspace}%   \iffieldundef{series}     {}     {\newunit      \printfield{series}%      \setunit{\addspace}}%   \usebibmacro{volume+number+eid}%   \setunit{\addspace}%   \usebibmacro{issue+date}%   \setunit{\addcolon\space}%   \usebibmacro{issue}%   \newunit}  \begin{filecontents*}{\jobname.bib} @article{York2004, author = {Author, First}, journal = {Am. J. Phys.}, month = mar, number = {3}, pages = {367--375}, title = {{Blah Blah 2}}, volume = {72}, year = {2004} } @article{Baumgardner2013a, author = {Author, Second}, journal = {Energy Fuel}, month = dec, number = {12}, pages = {7778--7789}, title = {{Blah blah}}, volume = {27}, year = {2013} } \end{filecontents*}  \begin{document} \nocite{*} \printbibliography \end{document} Can a werewolf turn a muggle into another werewolf? I took this code straight out of 'Java all in one for Dummies' ....why doesn't it work? Google Chrome automatically adding websites to my list of search engines? I have noticed that certain websites (e.g. Stack Exchange sites, Dell, etc.) are automatically added to my list of search engines in Google Chrome.   They even add a keyboard shortcut to their entry. Here are some examples:   Dell: Keyboard -> Dell.com Stack Exchange Web masters: Keyboard -> webmasters.stackexchange.com Reuters: Keyboard -> reuters.com   Q1: Is this the default behavior in Chrome? (to let websites add themselves to the list of search engines?)  Q2: Is it possible to disable this behavior in Chrome?   Note: I'm running the latest version of Chrome: 11.0.696.57 on Windows 7 64, and I only have one extension installed: Google URL shortener. Proving that $AB-BA=cI$ for nontrivial $c \in \mathbb{C}$ I have a homework question I can`t solve:  Let $X$ be a normed linear space, $A,B \in B(X)$. Show that there exists no nontrivial $c \in \mathbb{C} $ such that $AB-BA=cI$.  Thanks alot already guys! I seem to have a professor who gives impossible homework problems.  The hint he gave: $A^{n}B-BA^{n}=ncA^{n-1}$, $n \in \mathbb{N}$ Today I gave a .  This results of course in a negative score for today.   Since then I don't get any more notifications for new rep in the new top-bar on meta.    Only after resetting the rep indicator by clicking on it I get new notifications. Why was Severus Snape placed in Slytherin?