@Override     protected void onStart() {         super.onStart();          databaseVaccine.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                 String k;                   vaccineList.clear();                  for(                         DataSnapshot vaccineSnapshot :dataSnapshot.getChildren())                  {                     //getting farm                     Vaccine vaccine = vaccineSnapshot.getValue(Vaccine.class);                     k= getSfuff();                     if (vaccine.CattleVaccineID.equals(k)) {                          vaccineList.add(vaccine);                      }                     //adding farm to the list                  }                  VaccineList adapters = new VaccineList(ViewVaccination.this, vaccineList);                 ListViewVaccine.setAdapter(adapters);             }              @Override             public void onCancelled(@NonNull DatabaseError databaseError) {              }         });     }     public  String getSfuff() {         Bundle bundle = getIntent().getExtras();           String stuff = bundle.getString("cattleID");         return stuff;       }   It's showing following error on the line   "if (vaccine.CattleVaccineID.equals(k)) "  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference  Can someone find a solution to solve this error? I have tried many options and those didn't work properly.
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 create a grain / noise effect in Adobe Illustrator I want to create a noise effect using Adobe Illustrator.  Inside the hexagonal shape there is some kind of texture effect, I don't know what the name of this effect is:    How can I create such an effect in Adobe Illustrator? or is it created using Photoshop? Blank image when I render I have found an error in a textbook. What can I do about it? In the book Electronic Devices and Circuit Theory (10th edition) by Boylestad and Louis Nashelsky, I have found a .     What can I do about this? To whom should I send an email, the authors or the publisher? (Also, there is no email address mentioned in the book or on the Internet to which I can send my suggestions.) I have never written an official email of this kind. If I should send an email, how should I write it? "BookList" or "booksList?" Possible Duplicates:             I'm wondering whether or not I should use a plural form noun with a collection name. For example, which one is correct, bookList or booksList (obviously they are variables in a programming language)? How are answers with the same vote score sorted? When a new question is asked how are the answers sorted?  I just answered a question and there were two other answers.  All three answers have 0 votes and no edits.  Immediately after I answered my answer appeared first.  Now the order refreshed,  it appears they are sorted by reputation. I resized the root partition with GParted, from 20 GB to 40 GB, but the filesystem still reports a size of 20 GB.  How can I use all 40 GB?    Update  The resized partition was an LVM Physical Volume (/dev/sda2), and the boot partition is ext4 (/dev/sda1). Should I use the first or last bits from a SHA-256 hash? I have the need for a hexadecimal token that is smaller than the normal length of the hexadecimal representation of a  hash.  Should I take the first bits or the last bits? Which of them contain the most entropy? Irfanview nearest equivalent for linux Expressions - is there an easy and "visual" way to combine them into another expression? Can we have a black hole without a singularity? Assuming we have a sufficiently small and massive object such that it's escape velocity is greater than the speed of light, isn't this a black hole? It has an event horizon that light cannot escape, time freezes at this event horizon, etc. However this object is not a singularity.  If a large star's mass were compressed to the size of, say, a proton, it would certainly have these properties but it would still not be a singularity as a proton does have volume.  The reason "physics breaks down" at singularities is because we cannot divide by zero, but as long as the proton-sized object has volume, physics won't "break down", yet we still have an event horizon and an object that is invisible (but not undetectable) from the outside.  I have read the answers to  related question. I'm not sure if they don't address my specific question or if I don't understand the answers. Update: Universal login is in place and considered &quot;done&quot;. If you see anything weird, please submit new bug reports.   As y'all know, our current flavor of &quot;global authentication&quot; leaves a few things to be desired. It's flaky, requires a page refresh, etc. etc. Wouldn't it be nice if you could just sign in once and be automatically logged in across the network?  We are ready to roll out Stage 1 of Project &quot;Make Authentication Suck Less&quot;. It is live as of a few minutes ago. What this means right now:  When you log into any Q&amp;A site on the stackexchange.com domain, you will be automatically logged into all other Q&amp;A sites on the stackexchange.com domain + stackexchange.com itself.   is excluded from this.   , , and other Q&amp;A sites with their own domains will still use the old flow.  We are going to recognize you in some ways on sites where you don't have a profile. This is still a work in progress, but most notably you will see &quot;join this community&quot; in the top bar instead of &quot;sign up&quot; and &quot;log in&quot;.   But I use multiple accounts! What do? We aren't intending to break the ability to run multiple accounts. The same guidelines as before still apply — we don't officially support that, you might end up with an accidental automatic merge if you're not careful with your credentials, any interaction between the accounts is right out, and so on. If you're already using different browsers or different browser profiles for your accounts, nothing will change for you. If you are somehow logged into multiple accounts in the same browser... I'm sorry to say, but that's a bug even for our current global auth setup. You will now only be able to log into one at a time, and you'll need to log out when you want to switch. (Or start using different browsers.) What's next:  Remember  we tested a few months ago? It's coming back. Stage 2: bring other domains into the fold (this is also live now) Stage 3: make cross-domain experience smoother and support browsers that reject third-party cookies in all conditions (looking at you, Safari) - this is not currently feasible. Safari users and users who reject third-party cookies will need to sign in separately to every second-level domain (e.g. stackexchange.com, stackoverflow.com, etc).  If you see any issues… Good luck, because you probably can't log in to report them here. =) But seriously, let us know via the contact form linked at the bottom of any page. If you are able to log in, report issues here on meta as normal. So, in conclusion… Contour method to show that $\int_0^\infty\frac{x-\sin x}{x^3} \, dx=\frac\pi4$ Show that $$\int_{0}^{\infty} \frac{x - \sin(x)}{x^3} \, dx = \frac{\pi}{4}$$   My attempt is as follows: Let $$f(z) = \frac{z - i e^{iz}}{z^3}$$ and consider the contour on $[\epsilon, R]$ followed by a semicircular arc in the counter clockwise direction, then on $[-R, -\epsilon]$, then the semicircular clockwise contour avoiding the origin. We have, then, that  $$0 = \int_{\Gamma} f(z) dz = \int_{[\epsilon, R]} f(t) dt + \int_{C_R}f(Re^{it})Rie^{it}dt + \int_{[-R, -\epsilon]}f(t)dt + \int_{C_{\epsilon}}f(\epsilon e^{-it})\epsilon i e^{-it} dt$$  Then the first and third integrals ( $I_1$ and $I_3$) combine so that  $$I_1 + I_3 = 2\int_{\epsilon}^R \frac{t - \sin{t}}{t^3}\,dt$$  Further,   $$|I_{C_R}| \leq \int_0^\pi \left|\frac{Re^{it} - ie^{-R\sin{t}}e^{iRcos{t}}}{R^2 e^{2it}} \right|dt \rightarrow 0 \text{ as } R\rightarrow \infty$$  (I've omitted the details, it isn't too bad to bound)  However, I'm having trouble computing the limit  $$\lim_{\epsilon \rightarrow 0}\int_{C_{\epsilon}} f(\epsilon e^{-it})\epsilon i e^{-it} dt$$  No matter which way I look at it, it seems like this limit does not exist. Perhaps I'm seeing something wrong or have I chosen a bad $f(z)$? What do ref, val and out mean on method parameters? I'm looking for a clear, concise and accurate answer.    Ideally as the actual answer, although links to good explanations welcome.  This also applies to VB.Net, but the keywords are different - ByRef and ByVal. I encountered such a formula for pooled variance:  $$\frac{(n-1)s_x^2+(m-1)s_y^2}{n+m-2}\left(\frac{1}{n} + \frac{1}{m}\right)$$  Here we have two samples of the following sizes $n$ and $m$. $s_x, s_y$ are the sample variances.  I understand that the first term is a weighted average, but from the second term comes? How to download Bootcamp drivers without Bootcamp assistant? I'm setting up my MacBook Air for a Windows-only boot setup. This was easy enough. It already had rEFIt on it, I just connected a Windows 7 boot thumb drive, and away I went.  However, it seems Apple does not let you download Bootcamp drivers outside of their assistant tool. Reinstalling OS X just for the drivers is ridiculous.  This laptop no longer has OS X on it at all. How do I get the required drivers? I cannot find them anywhere on Apple's support pages.  Every other manufacturer has their drivers available for download.   How do I download the Windows drivers for my 2010 MacBook Air without the BootCamp Assistant? Find the all possible real solutions of $x^y=y^x$ Find the all possible real solutions of $$x^y=y^x$$ $x,y$ both are real numbers.  My attempt:I observed the following solutions  $x=2,y=4$  $x=4,y=2$  $y=x$  Is there any other possible solutions? Since the new top bar has been rolled out - a number of different people, established and new users alike, have asked questions on where a specific link has disappeared to with the new top bar design. Where has the link to &lt;X&gt; gone? Modifying agsm.bst package bibliography output I would like to change the URL output from:  URL: the html link  into:  [Online]URL: [Accessed on]  I am using:  \usepackage[comma]{natbib} \bibliographystyle{agsm} The error I am having when trying to update my package list.  W: GPG error: http://download.opensuse.org ./ Release: The following signatures were invalid: KEYEXPIRED 1436387333  W: Failed to fetch http://ppa.launchpad.net/samrog131/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead. Are there any organised resources available from where I can begin my quantum computing studies?