NullPointerException open method
What is a NullPointerException, and how do I fix it?
How to read a csv file and use the values as x and y points in blender? How can i use the value in column 'lon' and 'lat' as the position of my uv_sphere? For example,read the values from line 4, (116.4559081, 39.9139083), and make these 2 numbers as my uv_sphere x and y position in blender? and gives different colors for different mode, for example i have 4 modes in the csv , i want to make the uv sphere that represents the bus mode to be red, and subway to be green , rail to be blue and tram to be yellow., and use the row ['from'] and ['to'] to connect the nodes with a cylinder with x scale 0.5 , y scale 0.5 and the z scale with the value in ['length'] value. Does the alarm work when my phone is turned off? Will the alarm still go off if I turn off the phone before?  Example: when I have low battery, I have to go to sleep and wake up at X o'clock, and there is no charger around. Should I turn off the phone?   Note: If it makes any difference my phone is Galaxy S running froyo Why does a Tesla car use an AC motor instead of a DC one? I was just watching a mega factory video and wondered why they use an AC motor which requires a power inverter instead of DC which may be powered directly from their DC battery? Introducing an inverter means more cost (weight, controller, etc).  Are there any reasons for that? What are the differences between an AC and DC motor that may have lead to this decision? Also does anyone know what kind of motor is used in other electric cars? Is it possible to mark or modify a player with a specific item in their inventory I'm building a CTF map of sorts, using command blocks in vanilla 1.8. I've discovered two commands for detecting if an item is in a players inventory:  /clear @a[team=Red] banner 4 0  /testfor @a[team=Red] {Inventory:[{id:"minecraft:banner"}]}  Those work fine, unless you want to perform a command ON the player carrying that item. For example: I want to cause the player who picks up a banner of the opposite team, to automatically equip that banner in their head slot with a command similar to this:  /replaceitem entity @a[???????] slot.armor.head banner 1 4  Can this be done? If not, is there a way to mark a specific player carrying an item using scoreboards? I'm curious to know how important the bias node is for the effectiveness of modern neural networks. I can easily understand that it can be important in a shallow network with only a few input variables. However, modern neural nets such as in deep learning often have a large number of input variables to decide whether a certain neuron is triggered. Would simply removing them from, e.g., LeNet5 or ImageNet have any real impact at all? Codomain of function complete implies function space complete Let $(X,d_X)$ and $(Y,d_Y)$ be two metric spaces.   Let $(C_b(X,Y), d_C)$ be a function space with the metric $$d_C(f,g):=\sup\limits_{x\in X} d_Y(f(x), g(x)).$$  Prove that if $(Y,d_Y)$ is complete then $(C_b(X,Y), d_C)$ is complete.  Unfortunately, I have no idea how to approach this problem. I can think of something like this:  Let $(y_k)_k\subset Y$ be a Cauchy sequence converging to $y\in Y$. Then there exists some $f\in C_b(X,Y)$ such that $f(x_k)=y_k$ for all $k\in \mathbb N$. Since $f$ is continuous, $\lim\limits_{k\to\infty} d_Y(f(x_k), y)=0$.  But how do I go from here? As far as I understand, what needs to be proved is that any Cauchy sequence of functions in $C_b(X,Y)$ converges in $C_b(X,Y)$, that is, that the limit is bounded and continuous. But how do we devise such a sequence of functions? Co-Buyer Automobile As a co-buyer on an automobile, can the other party take full possession? Both parties names are listed as the Purchaser's. Only one purchaser signed the retail order for the motor vehicle, and if so, how can one become a no co-buyer? I've just installed a new SSD replacing an HDD in my old (late 2008) iMac. When I switched it on all I got on screen was a question mark.   On the advice of my son I tried cmdR during switch on with no result.   I then tried alt which at least got me a cursor on the screen, but nothing else. Any suggestions? I've got everything backed up on an external Hard Drive, by the way. Convert line voltage heating system to use low voltage thermostats I currently have two line voltage ceiling radiant heating systems in my condo each with their own DPST thermostat. I'd like to use low voltage thermostats such as the nest. I found , but it only has 3 wires. Will this work with a system designed to use DPST thermostats? If not, is there something else out there that will allow me to use low voltage thermostats with line voltage heaters? What is an example of pairwise independent random variables which are not independent? Delete all but the most recent X files in bash Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory?  To give a bit more of a concrete example, imagine some cron job writing out a file (say, a log file or a tar-ed up backup) to a directory every hour. I'd like a way to have another cron job running which would remove the oldest files in that directory until there are less than, say, 5.  And just to be clear, there's only one file present, it should never be deleted. Create backup iPhone with forgotten encryption password I'm trying to make a backup from my iPhone, however it's set to be password protected. I do not know the password, as I've never set one. I've tried all the passwords I know, which I've ever used to make sure I didn't set it.  I've also tried the default 0000 and 1234 codes.   I want to uncheck the encryption checkbox in iTunes, but it requires me to type a password. What else can I try?  I have no problems in removing all backups and start from the scratch somehow, however - I do not want to restore my phone as new and remove all those settings. So a buddy and I were playing a game of Magic that turned out to be a really quick game because he got  out on the battlefield early. He was tapping it without attacking because of its obviously awesome ability but I don't know if you can tap a creature for its Inspired (untap-triggered) ability without attacking for it to then be tapped. Are you allowed to tap a creature whenever you want? Find all $n\in\mathbb N^+$ such that the sum of the digits of $5^n$ is equal to $2^n$.   I've solved this, but I think the proof is a bit weird and I wonder if there's a better one.    My proof:  We can see that $n\neq 1$, $n\neq 2$, $n=3$, $n\neq 4$ and $n\neq 5$.  Let $n&gt;5$. Notice that $5^6$ has $5$ digits, while $\frac{2^6}{9}=7\frac{1}{9}$, so $5^6$ has to have at least $8$ digits in order for the sum of the digits to be able to at least reach $2^6$.  Everytime $1$ is added to the exponent of $5$, the amount of digits $5^n$ gets is at most $1$, while $\frac{2^{n+1}}{9}-\frac{2^n}{9}=\frac{2^n}{9}&gt;3$, so the lowest amount of digits it has to have to reach $2^n$ becomes higher by at least $4$.  When $n=6$, the amount of digits $5^n$ has is already lower than the amount it has to have in order to reach $2^n$, and I've just proved that the amount it has to have in order to reach $2^n$ grows faster than the amount of digits $5^n$ has, therefore $5^n$ will never be able to reach $2^n$ when $n&gt;5$.  Hence the only solution is $n=3$. Understanding minipages - aligning at top I would like to be able to align two minipage at the top, without worrying about what is in the minipage.  I am aware of the optional [t] parameter, but still have some confusion as to how this all works.  I tend to think of a minipage as a regular page in that whatever is placed on it starts at the top and fills the page going across and then down the page, but this does not appear to be the case.  In the MWE example below, I have color coded the sections for reference purposes.   The first case (black) works just as I would expect. The two minipages are aligned exactly as I want with the [t] specifier.  No question here.  The next case (red) only works if the inner minipage also has the [t] specifier. Why is that necessary?  I would have thought that any content would be placed at the top of this page, and since both the outer minipage had a [t] things should have aligned at the top. I would like to place a graphic in the second mini page, and still have the two aligned at the top.   The simple case (blue) of using \includegraphics directly does not result in the content being aligned at the top.  So, then I attempt to put this in a \parbox (green) and this too does not yield the desired results.  I also try to place the graphic inside an inner minipage (brown) and specify the [t] alignment, and even though this worked in the red section, it does not here.  The only difference between the red and brown being that the red section had text, whereas the brown section has a graphic.  I am aware of question regarding  which suggests to place \vspace{0pt} at the top of the minipage, and that does provide the desired alignment (cyan), but adds vertical space at the top.  So, my second question is why is the \vspace{0pt} necessary when a graphic is included, but not when it is text.  This appears to be a hack and wondering if there is a replacement for minipage that works better without having to worry about exactly what is in the minipage?  Also, why did wrapping the figure in a parbox (green) or another minipage (brown) not solve this problem?   Here is the MWE:  \documentclass{article} \usepackage[demo]{graphicx} \usepackage{lipsum} \usepackage{xcolor}  \begin{document} \section{This Works - Aligned at top as desired} \begin{minipage}[t]{0.6\linewidth}     \lipsum[1] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \lipsum[2] \end{minipage}  \color{red} \section{Why does inner mini page required the [t]?} \label{Minipage-in-minipage} \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \begin{minipage}[t]{\linewidth}% Why is [t] required here         \lipsum[4]     \end{minipage} \end{minipage}  \color{blue} \section{Why are These not aligned at top?} \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \includegraphics[width=\linewidth]{foo} \end{minipage}  \color{green} \section{Why are These not aligned at top?} \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \parbox{\linewidth}{\includegraphics[width=\linewidth]{foo}} \end{minipage}  \newpage \color{brown} \section{Why does this not work with the [t] as it did in red section?} This worked fine in Section \ref{Minipage-in-minipage}  \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \begin{minipage}[t]{\linewidth}% Even with [t] here, this does not work         \parbox{\linewidth}{\includegraphics[width=\linewidth]{foo}}     \end{minipage} \end{minipage}   \color{cyan} \section{Adding a \textbackslash{}vspace\{0pt\} works} \begin{minipage}[t]{0.6\linewidth}     \vspace{0pt}% Hack!! But does do the job     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \vspace{0pt}% Hack!! But does do the job     \begin{minipage}[t]{\linewidth}% Why is [t] required here         \parbox{\linewidth}{\includegraphics[width=\linewidth]{foo}}     \end{minipage} \end{minipage} \end{document} I have an unused copy of Mass Effect 2 Collector's Edition bought via Amazon.com in the US, including a special code for Inferno Armour (also unused).  Will it work fine if I install and start playing the game in the UK? Does geographical location matter?  Thanks! Is there a package that automatically inserts the ToC level of the reference I inserted?  Section 1.1 \label{a} Subsection 1.1.1 \label{b} Subsection 1.1.2  \label{c}   So that the text:  Blah \superref{a} and \superref{b} and \superref{c}   becomes:  Blah Section 1.1 and Subsection 1.1.1 and Subsection 1.1.2   So that it automatically adapts if I change the level of a label? I am trying to use the MailManager class in Drupal 8 to send HTML mail. I got it working, but it isn't parsing the HTML markup. I think something is wrong with the headers of the email.  What I have is a custom module (Custom_forward) that contains a form and that calls Mailmanager::mail() in its submitForm() method, which contains the following code.          // Email body         $header = $sender . ' thought you would like to see this page from the website.';         $personal_message = $form_state-&gt;getValues()['message_body'];         $entity_url_value = '&lt;a href="' . $entity_url-&gt;toString() . '"&gt;Go to article&lt;/a&gt;';         $message = $header . '&lt;br&gt;' . $personal_message . '&lt;br&gt;' . $entity_url_value;          // Email         $langcode = 'en';         $mailManager = \Drupal::service('plugin.manager.mail');         $to = $form_state-&gt;getValues()['recipient'];          $params['title'] = 'Forward';         $params['message'] = $message;         $result = $mailManager-&gt;mail('custom_forward', 'forward', $to, $langcode, $params, NULL, true);          if ($result['result'] !== true) {             drupal_set_message(t('There was a problem sending your message and it was not sent.'), 'error');             \Drupal::logger('mail-log')-&gt;error($message);         }         else {             drupal_set_message(t('Your message has been sent.'));         }   According to Drupal you also need the hook_mail method in mytheme.theme to be able to send message, you can see this method here:  function custom_forward_mail($key, &amp;$message, $params) {   $message['body'] = [];   $message['subject'] = [];   $message['headers'] = array(     'content-type' =&gt; 'text/html',     'charset' =&gt; 'UTF-8',     'format' =&gt; 'flowed',     'delsp' =&gt; 'yes',     'from' =&gt; \Drupal::config('system.site')-&gt;get('mail')   );    switch ($key) {     case 'forward':       $message['subject'] = $params['title'];       $message['body'][] = '&lt;html&gt;&lt;body&gt;' . $params['message'] . '&lt;/body&gt;&lt;/html&gt;';       break;   } }   As you can see, I am setting the content type to text/html and that should tell the mail system to parse the content as an HTML, but this is not working for some reasons.  This is a testing email. All the HTML markup is not shown, but also not working.  Bassem thought you would like to see this page from the website. personal message Go to article [1] [1] http://myhost/node/81 "Heard me [infinitive]" vs. "heard me [present participle]" Consequences of not showing up for one leg of journey