Exception in strange class (generated code)
What is a NullPointerException, and how do I fix it?
I followed this  to install Ubuntu as dual-boot with Windows 8.1 pre-installed as(UEFI),but I am not able to dual-boot and tried    I first burned an Ubuntu ISO on a blank DVD-R to create the LiveCD. Even with secure boot disabled, when I tried restarting my computer, it never booted to the installation screen, and it just skipped to Windows.  After a lot of skimming, I thought I had to put my computer in Legacy Mode in order to get give my CD/ROM drive priority. I installed Ubuntu and used my existing EFI partition. Ubuntu works, but Windows doesn't, probably because my laptop is stuck in Legacy Mode. I tried switching back to UEFI using boot-repair on the Linux Terminal, and going into Advanced Properties -> Grub Location -> Ticking the checkbox for EFI, but it says I need to be in an EFI session, and now I'm just really lost and confused at what I've all done. I can see my Windows8.1 OS on a partition but I want to dual-boot Windows 8.1 along with Ubuntu?   Did I just brick my computer? I'm reading a proof about Lagrangian => Hamiltonian and one part of it just doesn't make sense to me.  The Lagrangian is written $L(q, \dot q, t)$, and is convex in $\dot q$, and then the Hamiltonian is defined via the Legendre transform  $$H(p,q,t) = \max_{\dot q} [p \cdot \dot q - L(q, \dot q, t)]$$  Under the right conditions there exists a function $\dot Q (p,q,t)$ such that  $$H(p,q,t) = p \cdot \dot Q(p,q,t) - L(q, \dot Q(p,q,t), t)$$  i.e. when some $\dot Q(p,q,t)$ satisfies $p = \frac{\partial L}{\partial \dot q}\rvert_{(q, \dot Q(p,q,t), t)} = \frac{\partial L}{\partial \dot q}(q, \dot Q(p,q,t), t)$  (Finding this function is usually called "inverting p")  By taking partials in the $p$ variable and using the relationship, we can obtain the relationship  $$\dot Q = \frac{\partial H}{\partial p}$$  Because of the notation I chose, I get the strong urge to say $\dot q = \frac{\partial H}{\partial p}$  , and in fact this is what the textbook does. But have we proved this?    In other words, how can we deduce that  $$q'(t) = \frac{\partial H}{\partial p}(p(t), q'(t), t)$$ for any differentiable vector valued function $q$? (or maybe there are more conditions we need on $q$? Here  $$p(t) = \frac{\partial L}{\partial \dot q}(q(t), q'(t), t)$$ according to Lagrange's equations. Name tikz pic as if it was a node I'm confused about tikz pics. I can freely define them without issue, and even add coordinates inside that will be available by name inheritance like (-A) as for example in \pic (S) at (0,0) {myPic}; \draw (S-A) -- ++(0,0);. This is all documented around p. 255 of the pgf manual.  However I don' understand why it is not possible to give a name to a pic like the one above if no coordinate is defined inside it. By default it would be great if it could behave like a normal node.  MWE:  \documentclass{minimal} \usepackage{tikz}  \tikzset{     myBlock/.pic = {         \node[draw,minimum width=1cm,minimum height=0.5cm] at (0,0) {};     },     myBlockNamed/.pic = {         \node[draw,minimum height=1cm,minimum width=0.5cm] (-m) at (0,0) {};     }, }  \begin{document} \begin{tikzpicture}     \pic () at (0,0) {myBock}; % can't give it a name     \pic (S) at (3,0) {myBlockNamed}; % can give it a name     \draw (S-A) -- ++(2,0); \end{tikzpicture} \end{document}   The underlying point is I'm working on a control blocs library (so that we can stop the chat below with @Alenanno). For example here is the definition of a math operator  \tikzset{     mySum background/.style = {         circle, minimum size=1.5em, fill=white,     },     mySum edge/.style = {         draw=black, circle, minimum size=1.5em, line width=.5pt,     },     pics/bOp/.style = {     code = {       \node [mySum background] {};       \foreach \t [count=\i] in {#1}{         \pgfmathsetmacro{\angle}{\i*90}         \node[anchor=center, font=\tiny] at (\angle:0.45em) {$\t$};       }       \node [mySum edge] {};     },   }, } I'm trying to run this command in the terminal:  sudo apt install software-properties-common   This is the error message I get:  E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)   E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),     is another process using it? What is this yellow and white mass inside my red cabbage? How do I remove a directory and all its contents? In bash all I know is that   rmdir directoryname   will remove the directory but only if it's empty. Is there a way to force remove subdirectories? Alternate Row Coloring in Django Template with More Than One Set of Rows Django templates offer the builtin tag cycle for alternating between several values at different points in a template (or for loop in a template) but this tag does not reset when it is accessed in a scope outside of the cycles definition.  I.e., if you have two or more lists in your template, the rows of all of which you'd like to use some css definitions odd and even, the first row of a list will pick up where the last left off, not with a fresh iteration from the choices (odd and even)  E.g., in the following code, if the first blog has an odd number of entries, then the first entry in a second blog will start as even, when I want it to start at odd.  {% for blog in blogs %}   {% for entry in blog.entries %}     &lt;div class="{% cycle 'odd' 'even' %}" id="{{entry.id}}"&gt;       {{entry.text}}     &lt;/div&gt;   {% endfor %} {% endfor %}   I've tried obviating this by patching with the resetcycle tag offered here:    to no avail.  (The code didn't work for me.)  I've also tried moving my inner loop into a custom tag, but this also did not work, perhaps because the compile/render cycle moves the loop back into the outer loop?  (Regardless of why, it didn't work for me.)  How can I accomplish this simple task!?  I'd prefer not to create a data structure in my view with this information pre-compiled; that seems unnecessary.  Thanks in advance. Are there any examples of Humans and Aliens producing offspring in Star Wars? The title is pretty self explanatory, although to expand on the question further I am looking for any examples of inter-species breeding in the Star Wars universe, not just inter-species (ahem) "relations". What is the difference between the memory usage report in System Monitor and the one by free? I am using System Monitor 2.28.0.  When I look in the Resources tab, I see a nice graph with for memory and swap.  Memory is about 60% 2.3 GiB of 3.8.  When I type the command free, I got :               total       used       free     shared    buffers     cached Mem:       3994908    3962396      32512          0     100852    1477032 -/+ buffers/cache:    2384512    1610396 Swap:      8000328      28468    7971860   cat /proc/meminfo | grep MemFree give  MemFree:           34536 kB   The situation has remained the save for several minute.  I started a lot of process with a script and the script is waiting for the free memory to get lower.  According to what I am seeing in the Process tab (or with top), the number in System Monitor seem a lot closed to the total of the memory of the process that the one reported by free.   Thanks was closed as "Not constructive" a little while ago by CasperOne. I'm not here to argue about the closure; in fact, I'm forced to agree that, as it stands, the question is explicitly a polling question and eligible to be closed for that reason.  I'd like to see it preserved, however; it's got a fair bit of useful in-depth information for ObjC/Cocoa developers on the "singleton" topic.* It's also (possibly more importantly) a great duplicate target -- have a look at the list of linked questions. I want to try to stave off deletion, and hopefully get it reopened.** (I did vote for reopening, but it expired.)  My thought is to edit the question itself into a "constructive" form, but after spending some time pondering how to do so, I'm not crazy about any of the ideas that I've come up with. Essentially they all involve reworking the question to fit the answers:   Rewrite the question so that the accepted answer fits exactly. "I've got this singleton implementation, but I really want the creation to happen earlier in my app's execution. How can I make that happen?" This is artificial and (in my opinion) doesn't make a particularly good question. Make the question still general, but more concrete and focused on the implementation give in the body. "What are the pitfalls associated with this singleton creation procedure? Are there other features that my singleton should have?" This is still skirting the border of discussion->NC, and none of the answers really respond to this exactly. Remove the implementation from the question and just ask for the "best" implementation. This obviously requires coming up with stringent criteria for "best", and, while it would preserve the relationship between the Q and A's best, might not even move it out of NC territory.   I'm looking for suggestions of ways to re-write this so that it can stick around. Alternatively, if you think I should just be advocating for a historical lock, say so.   If you think my basic premise is faulty and don't think the question should be preserved at all, I respectfully request that you just downvote me instead of answering -- I'd prefer not to turn this into an argument about the merits of the question, and I definitely don't want it to become a(nother) "deletionist"/"inclusionist" skirmish (and I am not infrequently ).    *Quite a bit of it unfortunately in comments.  **Historical locking would also be an acceptable solution to me, but it doesn't seem to fit the "controversial" criterion. consider positive numbers $a_1,a_2,a_3,\ldots,a_n$ and $b_1,b_2,\ldots,b_n$. does the following in-equality holds and if it does then how to prove it  $\left[(a_1+b_1)(a_2+b_2)\cdots(a_n+b_n)\right]^{1/n}\ge \left(a_1a_2\cdots a_n\right)^{1/n}+\left(b_1b_2\cdots b_n\right)^{1/n}$ jQuery - multiple $(document).ready ...? How can I rank observations in-group faster? Why can't root on one machine change nfs mounted content from another machine? On my NFS server, I have the following export defined:  #NFS exports Database /shared -alldirs -network=192.168.1 -mask=255.255.255.0   On my NFS client:  192.168.1.7:/shared /shared nfs rw 0 0   Obviously, as root on the server, I can do whatever I want.  On the client however, my regular user 'gabe' can make changes to the nfs mount (assuming I have permissions to), but root cannot.    As my regular user:   gabe@client$ cd /shared gabe@client$ ls -l total 8 drwxrwxrwx  4 gabe  wheel   512 Mar 20 19:20 tmp gabe@client$ cd tmp gabe@client$ touch test.txt gabe@client$ rm test.txt   As root:  # cd /shared/tmp # touch test.txt touch: test.txt: Permission denied   Again, this is all on the NFS client side of things, and I suspect perhaps it has something to do with the -maproot option.  This is the first time I'm setting up NFS and I just noticed this peculiarity.  I'm going to do some reading now, to see if I can figure this out, but if anyone has any insight, I would appreciate it. In  it says     To make gradient descent work correctly, we need to choose the learning rate η to be small enough that Equation (9) is a good approximation. If we don't, we might end up with $\Delta C&gt;0$, which obviously would not be good! At the same time, we don't want $\eta$ to be too small, since that will make the changes $\Delta v$ tiny, and thus the gradient descent algorithm will work very slowly. In practical implementations, $\eta$ is often varied so that Equation (9) remains a good approximation, but the algorithm isn't too slow. We'll see later how this works.   But just a few paragraphs before we established that $\Delta C\approx−\eta\nabla C⋅\nabla C=−\eta\|\nabla C\|^2$ is obviously always negative (for positive $\eta$). So how can $\Delta C$ be positive if we don't choose a small enough learning rate? What is meant there? What issues / pitfalls must be considered when overriding equals and hashCode? When is tension constant in a rope? Consider a massless rope with pulling forces applied at each end.  How do we decide if tension is constant or not in a rope? Consider a few example scenarios:  For example, if there is a knot in the rope the tension is not constant throughout (why?. Similarly, if the rope is hung over a cylindrical pulley of a non-negligible radius, the tension is not constant (why?). If there isn't anything touching the rope, for example, 2 people tugging on the rope at each end, the tension is constant (why?). Value of $x=\sum\limits_{n=1}^\infty {\frac{1}{10^n-1}} $ and location of second digit $1$ of $x$ What is the value of the series   $\sum\limits_{n=1}^\infty {\frac{1}{10^n-1}}$   and can one find closed forms for the sums   $\sum\limits_{n=1}^N {\frac{1}{10^n-1}}$?   I found that $\sum_{n=1}^N {\frac{1}{10^n-1}} $  =  $\sum_{n=1}^N (\lim_{m\to\infty  }{\frac{10^{-n}-10^{-nm}}{1-10^{-n}}})$  =  $0.111\ldots+0.0101\ldots+\ldots$ but I can't go farther.     The original question is: "Where does the second '1' appear?" What possessive forms are used for mutual 1st person ownership? I want to talk to someone about the house that my wife and I own.  Saying, for example, "My wife's and my house is awesome," sounds a bit funny to me.  What's the best way to express this?  Clarification  I'm asking specifically about the grammar of multiple nouns in possessive form.  I'm particularly curious if it's possible to do this with a first-person pronoun (me).  I am capable of rephrasing this in other ways - my question is not how to express the idea, but about this particular grammatical construction, if it is even legal. Laptop w/o battery US bound flight?