How can i check that string is null or not and while checking condition it throws a null pointer exception
What is a NullPointerException, and how do I fix it?
Rings' second isomorphism theorem I am thinking about the proof of the second isomorphism theorem, and something isn't very clear to me.   Let $R$ be a ring, $S\subset R$ a subring and $I\subset R$ an ideal. We have the natural homomorphism $f:R\rightarrow R/I$. The theorem states that $\mathrm{Im}(S)=(S+I)/I$. My question is why not simply $\mathrm{Im}(S)=S/I$?  I understand that it is not true (for starters, $S/I$ need not be a subring), but I cannot explain that to my self in a convincing way. Does the sign of scores or of loadings in PCA or FA have a meaning? May I reverse the sign? What is the relation between electromagnetic wave and photon? At the end of this nice video (), she says that  is a chain reaction of electric and magnetic fields creating each other so the chain of wave moves forward.  I wonder where the  is in this explanation. What is the relation between electromagnetic wave and photon? How much willpower do gravely wounded soldiers lose? The text says they suffer a permanent reduction? Could humans choose to establish fibre digesting colonies in our guts? Humans don't digest fibre, and nor do any animals, but some creatures have micro-organisms (bacteria, I'm guessing) in their gut which digest fibre for them.  My question is, could humans take some sort of pill and establish our own fibre-digesting colonies in our intestines?  Has this been tried?  Supposing it could be done, would you suppose it would have any negative effects on our health?  (i.e.. would those whose gut digested fibre for them be stuck on a low-fibre diet?).    Purpose of question: just wondering.  It would be cool to be able to eat bark. When should I use "when" and "while"? But you can't find anything while you're crying.   But you can't find anything when you're crying.   I'll tell you about it while Frank saddles the horse.   I'll tell you about it when Frank saddles the horse.     When should I use when, and when while? Are these sentences correct? We are Indian passport holders, with valid visas for Canada. Plan is to take the EgyptAir flight Mumbai to Toronto, via Cairo. Problem is Egypt embassy website says we don't need Transit Visa if transit is up to 12 hours but here transit is 14 hours.    Has anyone with a Indian passport traveled this route? What was your experience at Cairo? Did you need a transit visa? Syntax highlighting language hints Do you think it would be worthwhile to provide hints as to what language to use for the syntax highlighting?  Sometimes I find the highlighting on SQL or VB.NET answers is more distracting than helpful; for example:       to pick the two I've been looking at recently. What is this element on the far right of schematic described as "270 OHM"? Is this some kind of inductor? What is its purpose in this device (this is a reference design of dc-dc power supply of sim900 taken from its datasheet) and what would be an exemplary part number? Change \textwidth and \textheight in mid-document I set my \textwidth and \textheight in the preamble and would like to change both for some pages. How can this be done? E.g., the following example for \textwidth appears to work for the page number, but not for the text:  \documentclass{article}  \textwidth=5cm \textheight=5cm \begin{document} A \hfill B \eject \textwidth=10cm A \hfill B \end{document}   Output (true to scale): Including sections of source code as a listing, while being robust to source code edits "This is a favorite question" tooltip when not favorite I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that? To put it simple, there's a simple java swing app that consists of JFrame with some components in it. One of the components is a JPanel that is meant to be replaced by another JPanel on user action.  So, what's the correct way of doing such a thing? I've tried  panel = new CustomJPanelWithComponentsOnIt(); parentFrameJPanelBelongsTo.pack();   but this won't work. What would you suggest? Anyone know of a custom GPS ROM for Samsung Galaxy 5? Possible Duplicate:          I recently bought a Samsung Galaxy 5 (model number GT-I5500) and I'm new to the android world.   I'm not satisfied with the performance of the GPS on my cell phone so I thought it would be interesting to use a custom ROM to see if it improves a bit.   Anyone knows of a ROM that was tested in this model? Deciphering the RSA encrypted message from three different public keys I have three different 1024-bit public keys with common exponent $e$ but different moduli. A message $m$ is encrypted (without padding) using the three keys, which results in three different encrypted messages.  Given the three pairs of public keys $(N_i,e)$ and the encrypted messages $c_i=m^e\bmod N_i$ , how do I decipher the original message $m$ ? I'm having issues with my macbook pro OS X 10.7.5.  It used to connect to the wifi router (D-Link N300, DIR=615) no problems.  But for the past several weeks, I haven't been able to at all.  What pops up when I select my wifi network from the list:   "Failed to join "network" A connection timeout occured".   What happens when I try to enter my password manually:   "Connection timeout"   What I've tried to do as solutions:   Google Restart router by pressing reset &amp; refresh button Delete System &amp; User (Login) Keychain access Network > Gear symbol by the + and - bottom left of the screen > Set Service Order > Drag Wifi to the top I have heard a few times that one way of describing quantum computers is that they essentially use the computing power of their counterparts in alternate realities that they access through superposition. My first question is, of course,    is this actually an accurate description of how quantum computers work, or just a misrepresentation?   Also, if it were to be assumed true and taken literally, then presumably all the possible outcomes of any given computation done would be experienced by each of these alternate realities. I have a few questions regarding the implications of this:   Would it be correct to say that our universe essentially "spawns" these alternate realities to use for each computation, or that they all exist simultaneously in a higher dimension and only come into contact via the initiation of superposition by each computer at the same time? Would it be possible to create contact between universes via this connection? I'd expect that, if it was, it would be entirely random, and so not only would not cause any information transfer, it also would be completely undetectable, because the deviations would be within the expected probabilities of error rates - but is there any way to circumvent this? Root cause for "Entity is not org-accessible" for sharing object? How would one denote the set of all subsets of $A$ which have size $2$?  Would  $$\binom{A}{2}$$  be a good idea?