NullPointerException triggering while creating custom Adapter
What is a NullPointerException, and how do I fix it?
How do I exclude plugins from getting automatically updated? There is an opt-in filter that allows all plugins on my site to receive automatic updates:  add_filter( 'auto_update_plugin', '__return_true' );  I like this feature, but I don't want all my plugins to be updated automatically. How can I allow some plugins to be updated automatically, while excluding those I want to do manually? How do I restore the default repositories? There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States. How to get layer extent in OpenLayers or zoom to WMS layer extent? I have added WMS layers using follow:  basemap = new OpenLayers.Layer.WMS( "Layer Name1", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername'} );   utility = new OpenLayers.Layer.WMS( "Layer Name2", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername', transparent:"true"}, {isBaseLayer:false} );   Now I want to get zoom to my utility layer, How can I?  I have tried as following:  map.zoomToExtent(utility.getDataExtent()); I use a Asus laptop with dual-boot Ubuntu and Windows 8.1  Wifi is on but I am not able to detect Wifi networks.  When I run :  lspci -knn | grep Net -A3; rfkill list   This is what happens:    I get  acer-wireless: Wireless LAN     Soft blocked: yes Field level permissions in Drupal 7 What is the best way to create a piece of content with multiple fields... allowing users to edit the content as a whole yet blocking the ability to edit.  The setup I have is a piece of content that has 3 fields: Body, PDF, SWF... and a "Selector" (List Text) that's tied via dependancy. So the user chooses BODY, PDF or SWF and that's what available to edit and shown on the page when live.  What I want to do is add a PHP field... that's either:     greyed out (unable to edit) if your not admin...   doesn't show up in the Drop Down list... Can't select it if you can't see it Shows up on the drop down, but the field doesn't show up in the editor without permissions.   I hope I'm making sense... I can provide an example if needed. Should I use the singular or plural verb in mathematical formulae ("Two and two make/makes four")? Inequality $\frac{1}{n+1}+\frac{1}{n+2}+...+\frac{1}{3n+1} \ge 1$ Asymptote: when white isn't white I'm trying to display a white 3D ball with Asymptote (3D PDF), but it always turns up gray:    import graph3; import solids;  defaultrender.merge=true; size(10cm,0);  currentprojection=orthographic(-Z);  //currentlight=Headlamp; //currentlight=light(-10,1,1); //currentlight=White; currentlight=Viewport;  draw(unitsphere,rgb(1,1,1));   I understand it's a lighting issue, and I've tried playing with its settings (the lines commented out in my source are some of my attempts), but I never manage to have white be white. If I understand correctly, I need a whiter diffuse component in my light, but I cannot see how to achieve that. And the documentation is not very clear…    This will be part of a molecular model, and the rendering I'm going for it something like this: Prove that: $(f(x))^{2} + (f'(x))^{2} \leqslant \max(a,b)$ where $(a,b) \in \mathbb{R}^2$ Let $f\in C^2(\mathbb{R},\mathbb{R})$.   Assume there exist  $(a,b) \in \mathbb{R}^2$ such that  $\forall x \in \mathbb{R}, (f(x))^{2} \leqslant a$ and $(f'(x))^{2} + (f''(x))^{2} \leqslant b$.   Prove that: $$(f(x))^{2} + (f'(x))^{2} \leqslant \max(a,b)$$ for all $x \in \mathbb{R}$.   I tried to use taylor lagrange with the integral form of the remainder but I did not succeed.  Ì really don't know how to tackle  the problem.   Any suggestion, Hint (or Answer) will be very helpful,  Thank you in advance, Dominoes and induction, or how does induction work? I've never really understood why math induction is supposed to work.  You have these 3 steps:   Prove true for base case (n=0 or 1 or whatever) Assume true for n=k.  Call this the induction hypothesis. Prove true for n=k+1, somewhere using the induction hypothesis in your proof.   In my experience the proof is usually algebraic, and you just manipulate the problem until you get the induction hypothesis to appear.  If you can do that and it works out, then you say the proof holds.  Here's one I just worked out,  Show $\displaystyle\lim_{x\to\infty} \frac{(\ln x)^n}{x} = 0$  So you go:   Use L'Hospital's rule. $\displaystyle\lim_{x\to\infty} \frac{\ln x}{x} = 0$. Since that's $\displaystyle\lim_{x\to\infty} \frac{1}{x} = 0$. Assume true for $n=k$. $\displaystyle\lim_{x\to\infty} \frac{(\ln x)^k}{x} = 0$. Prove true for $n=k+1$.  You get $\displaystyle\lim_{x\to\infty} \frac{(\ln x)^{k+1}}{x} = 0.$   Use L'Hospital again: $\displaystyle\lim_{x\to\infty} \frac{(k+1)(\ln x)^{k}}{x} = 0$.  Then you see the induction hypothesis appear, and you can say this is equal to $0$.  What I'm not comfortable with is this idea that you can just assume something to be true ($n=k$), then based on that assumption, form a proof for $n=k+1$ case.  I don't see how you can use something you've assumed to be true to prove something else to be true. Booting Ubuntu Failure : error: attempt to read or write outside of disk 'hd0' I have installed Ubuntu 12.10 in a Western Digital external hard drive (320GB). This is a complete installation, not a live USB.  When I plug it in my HP desktop I go to the BIOS settings and boot off the hard drive, everything work perfectly as it should. Now this works on every single computer and laptop in my house (all HP), except for ONE. My HP ProBook 4530s.  When I select to boot of the USB I get the message:  error: attempt to read or write outside of disk 'hd0'   Now, I have removed the hard drive from my laptop and the external drive is the ONLY drive plugged in. Below is a screenshot of the message on the screen. After the message I navigate to ls / (as shown below):    After here I try to acces other folders under ls /, for example, I try to go to ls /boot to get to the grub folder. Then I get the same message as before: as shown below:    grub rescue&gt; ls /boot  error: attempt to read or write outside of disk 'hd0' grub rescue&gt; _   The only folders I can access without getting the message again are /home, /run and /usr.   So how do I:   Boot Ubuntu from GRUB2 (this screen) manually Set to automatically boot Ubuntu If possible an explanation for this problem   Thanks! It was nice to discover the option for a room owner to add any user to a room, even if their rep is too low.     ...so I notified the user in question, and as instructed on the next screen, I had them got to chat.stackoverflow.com so that I'd be able to add them.    ...but when they did their part, and I did my part, I got the message:    Obviously both frustrated, the user's next logical question was:  "So I just have ask a couple questions and get someone to upvote them, right?"    Needless to say, we don't want to encourage new users to post questions for the sole purpose of bypassing a frustrating, misdocumented rule.  I realize this will likely quickly get closed since it has at least one  - which hasn't been touched in 5½ years.  However it would be nice if the issue was revisited:  Ideally, it would be cool if RO's did have the option of deciding who had access to the room they "own", but short of that, is it possible to remove the 6 "misleading" words from that page? I read this recently on the web and can't manage to understand it. Not homework -- I haven't done math homework for years.  If $d\mid ab$ then $d=d_1 d_2$, that $d_1|a$, that $d_2|b$ and, further, if $(a,b)=1$ then $(d_1,d_2)=1$.  I know it's the same question... if $a = a_1 a_2 ... a_n$, why can't $d$ divide some $a_i$ and only $a_i$? I have updated my kubuntu 14.10 to kubuntu 15.04. And now after boot, when I enter my password on welcome screen, I will get black screen. It's looks like screen powered off. No cursor, no change brightness. Nothing. And when I try switch to text consoles (Ctrl+Alt+F1) nothing happening. If I doesn't login in welcome screen I can switch to text console. Review filter appears to be broken When browsing questions for a given tag, a review indicator has recently started showing up that links to the open review tasks for that tag.  For example, this is what I see when viewing :    The number 187 in the screenshot above would link to    However, clicking on that often opens review tasks that do not have the tag in question.  For example, it opened the following on successive attempts:   (c)   (java)  It seems that the filters are broken.  A sample screenshot (note the mention of the filter on the review page): What is the difference between shell, console, and terminal? Getting ssh to execute a command in the background on target machine This is a follow-on question to the  question.  If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return?  When I try to just include the ampersand (&amp;) at the end of the command it just hangs.  The exact form of the command looks like this: ssh user@target &quot;cd /some/directory; program-to-execute &amp;&quot;  Any ideas?  One thing to note is that logins to the target machine always produce a text banner and I have SSH keys set up so no password is required. I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also.  reinterpret_casts are applicable in two scenarios:   convert integer types to pointer types and vice versa  convert one pointer type to another. The general idea I get is this is unportable and should be avoided.     Where I am a little confused is one usage which I need, I am calling C++ from C and the C code needs to hold on to the C++ object so basically it holds a void*. What cast should be used to convert between the void * and the Class type?  I have seen usage of both static_cast and reinterpret_cast? Though from what I have been reading it appears static is better as the cast can happen at compile time? Though it says to use reinterpret_cast to convert from one pointer type to another? If $S$ is a finitely generated graded algebra over $S_0$, $S_{(f)}$ is finitely generated algebra over $S_0$? Let $S = \bigoplus_{n\ge 0} S_n$ be a graded commutative ring. Let $f$ be a homogeneous element of $S$ of degree $&gt; 0$. Let $S_{(f)}$ be the degree $0$ part of the graded ring $S_f$, where $S_f$ is the localization with respect to the multiplicative set $\{1, f, f^2,\dots\}$. Suppose $S$ is finitely generated algebra over $S_0$. Then $S_{(f)}$ is a finitely generated algebra over $S_0$. There are $2n+1$ people. For each $n$ people there is somebody who is friend with each of them. Prove there is a "know-them-all" person. I have a following problem.     There are $2n+1$ people in the room. For any group of $n$ people there is a person (different from them) who is friends with each person in this group. Prove that there is a person, who knows all $2n$ other people.   One can easily see, that $\min_v \deg v = n$. From this we can get a lower bound for number of edges $N_e$: $$ N_e = \frac{1}{2}\sum_v \deg v \geq \frac{(2n+1) \cdot n}{2} $$ I do not know where to move from this point (and do not think, that this is the right direction) and pretty stuck right now. Can you give a hint?