Getting NullPointerException in a BankList Activity when sending data from MainActivity using intent in android
What is a NullPointerException, and how do I fix it?
Can i use the /testfor command to check for certain words in chat? What Wording Did Witches and Wizards in Other Cultures Use for Spells? The spells that we know about in the Harry Potter world all seem to be either in Latin, derived from Latin, or resembling Latin.  This makes sense for the European World, but there were likely witches and wizards in Africa, Asia, and the Americas.  These cultures would have developed independently, and the magical people in them would likely have still found ways to cast their spells.  Do cultures with languages that did not derive from Latin use the same words and phrases that are related to Latin for their spells?  Or did they have other phrases based on the languages in their cultures? Custom arrangement for fields with multiple values in Drupal 7 How can I execute `date` inside of a cron tab job? I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:  0 * * * * echo hello &gt;&gt; ~/cron-logs/hourly/test`date "+%d"`.log   Unfortunately I get this message when that runs:  /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file   I have tried escaping the date part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this? I have a 64-bit (amd64 a.k.a. x86_64) Debian or Ubuntu installation. I need to run 32-bit (i386/i686) programs occasionally, or to compile programs for a 32-bit system. How can I do this with a minimum of fuss?  Bonus: what if I want to run or test with an older or newer release of the distribution? My coach said that for all positive integers $n$, $n^4+4^n$ is never a prime number.  So we memorized this for future use in math competition.  But I don't understand why is it? How is pressure an intensive coordinate? Fast way of copying IMAP to IMAP on CentOS I'm trying to copy of IMAP emails from one server to my new server but after Googling for hours and trying several tools, nothing is working. Is there a tool that actually works?  I am copying hundreds of thousands of emails so using a email client is out of the question, I tried it, and at the rate of a email per 2 seconds, it would take a few weeks or months!  www.linux-france.org/prj/imapsync/ is commonly mentioned, however, the tool is no longer available.  I tried www.athensfbc.com/imap_tools/ which just hangs and does nothing.  Any migration tools that work? Is it possible to make a sequence of renders and give the user the option to cancel the process through the UI at any given time? I'm trying to make a script where I have to render several images of the same scene at the same frame, and write to disk with appropriate names. The problem is that although this works fine with a non-responsive UI, it doesn't work well when the render progress appears in the Blender UI.  I mean,  bpy.ops.render.render()   uses "EXEC_DEFAULT" when called from a script. This leaves a blocked User Interface until the render finishes, meaning that you can't cancel the process, except by killing Blender. The problem is that the render may be too big in resolution, and the user could want to stop the process when realizing that the render could take hours, so the idea is to cancel this process without losing the currently opened project.  If I call,  bpy.ops.render.render("INVOKE_DEFAULT")   I get a nice preview bar in the Info Window with a clickable "X" button. I want the user to be able to press that button to cancel the operation if needed, but for a series of renders (not animation).  The problem here seems to be when trying to loop this command with the INVOKE_DEFAULT context to write several renders. I made a lot of testing, and this way of calling the render operator seems to continue with whatever is next in the script, so it loops very fast and ends before the rendering actually finishes.  I think that I need some way to stop the script and make it wait until render finishes to continue looping with the next ones. I tried the "render_complete" and "render_cancel" handlers, but I can't use them to start a new render or even make the rest of the script wait until the loop of renders is complete. I tried threading and events without success either. Maybe I'm doing something wrong.  import bpy  render = bpy.context.scene.render path = render.filepath = "/tmp/" shots = ["one", "two", "three"]  for x in shots:     render.filepath = path + x     bpy.ops.render.render("INVOKE_DEFAULT", write_still=True) # this doesn't work      # but if I use:     # bpy.ops.render.render(write_still=True)     # without the INVOKE thing, images are written as expected,     # but losing the possibility to see the progress and cancel rendering Individual Phase shift provided by Op-Amp in Closed loop configuration After logging in on terminal with user name and password, how do I start the GUI? I am new to Ubuntu, and I am working on a Mac. The Ubuntu installation was done by someone else. I logged in with the user name and password, but I'm not sure what next to do in the terminal to get to the graphical interface. Could someone assist or point me in a direction where I can get useful guidelines? I have done research, but nothing I found helped me.   When I tried to start the lightdm greeter, I got the following message:  lightdm.service not found     Update: My understanding is that Ubuntu Server is installed. I am getting the error:   touch: cannot touch `/opt/tsrm/compliance/cme/log/20121207.log`: No such file or directory   on the touch command: touch $LOGFILE  I also checked the link: , But I didn't understand the answer.   Note: I was also getting mkdir: cannot create directory; I fixed this by adding the -p option.   Could this be something with the version of Linux I am working in? Quantum mechanics and everyday nature Is there a phenomenon visible to the naked eye that requires quantum mechanics to be satisfactorily explained? I am looking for a sort of quantic Newtonian apple. is it possible to redefine { and } in C? Should searching by default be AND or OR? On my website I have a search bar.  It's powered by Lucene.net.  I have a requirement to make search be a substring case insensitive search, with direct hits appearing before substrings.  What I don't know, however, is when a user searches for a multi-word item--say "Chocolate Milk"--should that be treated under the hood as an AND or OR search?  As an example:  *chocolate* AND *milk*   vs  *chocolate* OR *milk*   The requirement right now is to treat this as an AND, but I'm not sure if that's the right way to go about it.  What would be the best in terms of UX?  I would think the best thing to do would be an OR search, with items containing both keywords appearing before items containing only one of the keywords.  Thoughts?  EDIT: The types of items being searched are medical supplies, with very cryptic names. Why is the CDF of a sample uniformly distributed I read  that given a sample $ X_1,X_2,...,X_n $ from a continuous distribution with cdf $ F_X $, the sample corresponding to $ U_i = F_X(X_i) $ follows a standard uniform distribution.  I have verified this using qualitative simulations in Python, and I was easily able to verify the relationship.  import matplotlib.pyplot as plt import scipy.stats  xs = scipy.stats.norm.rvs(5, 2, 10000)  fig, axes = plt.subplots(1, 2, figsize=(9, 3)) axes[0].hist(xs, bins=50) axes[0].set_title("Samples") axes[1].hist(     scipy.stats.norm.cdf(xs, 5, 2),     bins=50 ) axes[1].set_title("CDF(samples)")   Resulting in the following plot:    I am unable to grasp why this happens. I assume it has to do with the definition of the CDF and it's relationship to the PDF, but I am missing something...  I would appreciate it if someone could point me to some reading on the subject or help me get some intuition on the subject.  EDIT: The CDF looks like this: Forgotten the pattern and phone not showing the "forgot pattern" button. I upgraded my Moto G2 to Android Lollipop using over-the-air upgrade. It was awesome but I set a pattern lock which I forgot. Usually after 5 wrong attempts it shows the "forgot password" button but it is not showing that button even after 100 wrong attempts. How to unlock the phone? How can I make an object follow a path exactly In Avengers: Endgame,       Thanos was able to stop and catch Mjolnir and Stormbreaker mid-air as both Captain America and Thor used/called them BEFORE he got the Infinity Stones.   Since this character is clearly not worthy and had no super powers at the time, how were they able to wield Thor's Mjolnir and Stormbreaker, when even the Hulk couldn't do it in The Avengers? Why is it possible to conclude everything from a false statement? Possible Duplicates:             I heard a professor of mathematics explaining that the following conslusions are true.   $\textrm{False}\Rightarrow \textrm{True}$ $\textrm{False}\Rightarrow \textrm{False}$   Could someone please explain to me why both conclusions are true? I am especially interested in the first case. I'd like to hear two explanations if possible: One for mathematicians and one for non-mathematicians. :-)