My code seems to be throwing a null pointer exception when attempting to copy an existing file to a new location; the new file will also be named based on the current date of execution.   Any ideas?  public static String returnScreenshotName() {     return (System.getProperty("user.dir") + "\\target\\output\\imgs\\" + screenshotName); }  private static void copyFileUsingStream(File source, File dest) throws IOException {     InputStream is = null;     OutputStream os = null;     try {         is = new FileInputStream(source);         os = new FileOutputStream(dest);         byte[] buffer = new byte[1024];         int length;         while ((length = is.read(buffer)) &gt; 0) {             os.write(buffer, 0, length);         }     } catch (IOException ignored) {     }     finally {         is.close();         os.close();     } }  public static void copyLatestExtentReport() throws IOException {     try {         Date d = new Date();         String date = d.toString().replace(":", "_").replace(" ", "_");         File source = new File (System.getProperty("user.dir") + "\\output\\report1.html");         File dest = new File (System.getProperty("user.dir") + "\\output\\" + date + ".html");         copyFileUsingStream(source, dest);     }catch (IOException ignored) {     }
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 redirect users to custom lostpassword page? Is it possible to animate the speed of a strip? I want to accelerate the speed of a video and decelerate some seconds before it ends. I wonder if it's possible to do it into the video editing. I know how to increase the speed of a strip but, what I need is a trasition between normal speed and fast speed. How to tell what length of chain to get? Eigenvalues of symmetric matrices are real without (!) complex numbers Is there any proof of the fact that the eigenvalues of symmetric matrices (i.e. $A\in\mathbb{R}^{n\times n}$ with $A^t=A$) are real without the use of the concept of complex numbers? How do you deserialize json properties that are reserved words in apex? What is the difference between update-grub and update-grub2? I'm making some changes on my grub file under /etc/default/grub. In some tutorials I have seen sudo update-grub and others sudo update-grub2. What is the difference? Prove every element of $G$ has finite order. Ramsey Number Inequality: $R(\underbrace{3,3,...,3,3}_{k+1}) \le (k+1)(R(\underbrace{3,3,...3}_k)-1)+2$ I want to prove that:  $$R(\underbrace{3,3,...,3,3}_{k+1}) \le (k+1)(R(\underbrace{3,3,...3}_k)-1)+2$$  where R is a Ramsey number. In the LHS, there are $k+1$ $3$'s, and in the RHS, there are $k$ $3's$. I really have no clue how to start this proof. Any help is appreciated! Perturbation property of Orthonormal basis for Hilbert space Showing that $|N \cap Z(G)| > 1$ for normal subgroups of p-groups I have a finite $p$-group $G$ and a normal subgroup $N$ which is not the trivial subgroup. I am asked to show that $|N \cap Z(G)| &gt; 1$.  There has been a similar question on MSE here:  Unfortunately, I cannot comment on other user's questions yet, so I made my own question.  I know that the trick is to use conjugation but I can't follow the logic. Can someone elaborate? Especially on the last part of the top answer. Looking for a powershell script that can pull a file from a set of PC's and FTP I'm looking to write a script (preferably powershell) that will essentially copy a file from a bunch of PC's and FTP it to a server.   So the structure of the environment is that we have a file on multiple PC's (around 50 or so) that need to placed on a server. Sometimes one of the PC's may be turned off so the script would first need to ensure the PC is up and running (maybe a ping result), then it would need to go into a directory on that PC, pull a file off of it, rename the file, place into a source directory, then remove the file. Naming convention doesn't matter, but date/time stamp would be easiest. Ideally, it would be best to first move all the files to a source directory to save on FTP bandwidth, but since the files will be named the same, the files must be renamed during the move process. Move not copy because the directory needs to be empty so the file can be re-created the next day. So once moved to the source directory, now all the files need to be FTP'd to a server for processing.   After all of this, we need to know which PC's on the list did not respond so we can manually retrieve the file so the script should output a file (txt is fine) that will show which PC's were offline.   Everything is one domain and script will be run from an server with admin creds.   Thank you! Q&A blank in Stack Exchange Android app v1.0.95 - S10e/Android 10 Recently upgraded to a Samsung S10e and Android 10, but all Q&amp;A in the Stack Exchange app v1.0.95 are blank.  The title and comments are visible, but question/answer posts are just white space. Accessing the About page in the app is also blank.  I tried clearing data, cache and re-installing the app, but I still get the same behaviour. Word for "blissfully oblivious"? How to change account profile picture? I can't believe I have to ask this...but, how do I change my account profile picture in Ubuntu 12.04 Desktop? One would think it would be under the "User Accounts" section. $\varepsilon$-number countability without choice Let $\alpha\mapsto\varepsilon_\alpha$ be the enumeration of the $\varepsilon$-numbers--that is, those $\alpha$ such that $\omega^\alpha=\alpha$--by the ordinals.  If we know that countable unions of countable sets are countable, (slightly weaker than countable choice), then we can show fairly easily that $\varepsilon_\alpha$ is countable iff $\alpha$ is countable.  I think I saw a result at some point that $\varepsilon_0$ is countable without relying on any choice principle (though I can't recall where I saw that). Is this true? More generally, for which $\alpha$ can we conclude that $\varepsilon_\alpha$ is countable in ZF?  Update: I have been able to prove (in ZF) that if $\varepsilon_\alpha$ is countable, then $|\alpha|&lt;\aleph_1$, so that's one direction. I'm still a bit uncertain about the answers I've got so far. How to differentiate a given inner product (CSIR DEC(2018) Let $A$ be a $n \times n$  invertible  matrix.Define a function $F:\mathbb{R}^{n} \times \mathbb{R}^{n} \rightarrow \mathbb{R}$ by $F(x,y)=\langle Ax,y\rangle$. Let $DF(x,y)$ denotes the derivative of $F$ at $(x,y)$ which is a linear transformation from $\mathbb{R}^{n} \times \mathbb{R}^{n} \rightarrow \mathbb{R} $. Then      1) if $x\neq 0$,then  $DF(x,0)\neq 0$      2) if $y\neq 0$,then  $DF(0,y)\neq 0$      3)  if $(x,y)\neq (0,0)$,then $DF(x,y)\neq 0$      4) if $x=0 \; or \;y=0$,then $DF(x,y)= 0$   I don't even know how to start the solution and also how to take derivative in higher dimensions.  Please help!  Thank you. What happens when one is affected by something such as energy drain, and permanently loses levels when one only has racial HD? Does the victim of the spell die? Or do they permanently lose racial HD? How to parse hundred html source code files in shell? Why is a normal subgroup of $G_1\times G_2$ with trivial intersections with $G_1$ and $G_2$ is abelian? Let $G=G_1\times G_2$ be a direct product, and let $H\triangleleft G$ be a normal subgroup such that $H\cap G_1=H\cap G_2=\{1\}.$ Then $H$ is abelian.     I considered the commutators of two elements in $H$, trying to show that it must be $1,$ but I don't see how this works. Any hint is very welcomed and appreciated. Thanks in advance. Cardinality of cartesian square Given an infinite set $A$ -  does the cardinality of $A$ equal to the cardinality of $A^2$?