Android: I am having trouble opening the UI from MainActivity after creating intent
What is a NullPointerException, and how do I fix it?
How to create a soft or symbolic link? Person falls into radiotelescope and his mind gets transported to the far future Trying to show that $\ln(x) = \lim_{n\to\infty} n(x^{1/n} -1)$ How do I print my Java object without getting "SomeType@2f92e0f4"? Is it possible to have the dock in different positions in different desktop? Is it possible to have the dock in different positions in different desktops? In particular I'd like to change the settings between a normal desktop and a desktop where there's an app at full screen. In this way I'd keep the dock in lower side of the desktop when there's an app at full screen and vertically on the left side during normal use.  I have this problem that, sicne I usually have the dock vertically on the left, it pops out everytime i go to the far left in an app I'm using with full screen, and using this app I have to move the mouse to the left quite often. get list item by id using COM sharepoint 2013 I need to get item from list sharepoint by Id I use this code and it give me all the items of the list :  &lt;script&gt;  function parseURLParams(url) {         var queryStart = url.indexOf("?") + 1,             queryEnd = url.indexOf("#") + 1 || url.length + 1,             query = url.slice(queryStart, queryEnd - 1),             pairs = query.replace(/\+/g, " ").split("&amp;"),             parms = {}, i, n, v, nv;          if (query === url || query === "") {             return;         }          for (i = 0; i &lt; pairs.length; i++) {             nv = pairs[i].split("=");             n = decodeURIComponent(nv[0]);             v = decodeURIComponent(nv[1]);              if (!parms.hasOwnProperty(n)) {                 parms[n] = [];             }              parms[n].push(nv.length === 2 ? v : null);         }         return parms;     }  $( window ).load(function() {   var urlString = document.URL;  urlParams = parseURLParams(urlString);  ExecuteOrDelayUntilScriptLoaded(retrieveActualite, "sp.js");          var siteUrl = '/sites/securite';      function retrieveActualite() {              var clientContext = new SP.ClientContext(siteUrl);             var oList = clientContext.get_web().get_lists().getByTitle('Actualite');             var camlQuery = new SP.CamlQuery();              camlQuery.set_viewXml('&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=”ID” LookupId="TRUE"/&gt;&lt;Value Type="Text"&gt;' + urlParams.IdArt[0] + '&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;');             this.collListItem = oList.getItems(camlQuery);             clientContext.load(collListItem);             clientContext.executeQueryAsync(onQuerySucceededActualite, onQueryFailed);         }          function onQuerySucceededActualite(sender, args) {              var listItemInfo = '';              var listItemEnumerator = collListItem.getEnumerator();             while (listItemEnumerator.moveNext()) {                 var oListItem = listItemEnumerator.get_current();                   var desc=oListItem.get_item('Description');                 $('#idArticle').append('&lt;label class="titleArticle"&gt;'+oListItem.get_item('Title')+'&lt;/label&gt; &lt;br&gt;&lt;br&gt;&lt;p class="ContenuArticle" &gt;'+desc+'&lt;/p&gt;');                          }         }          function onQueryFailed(sender, args) {              alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());         }       });    &lt;/script&gt;   so how can I get only the considered item ? Getting text from the Resource file in asp.net 4 My singleton accessor method is usually some variant of:  static MyClass *gInstance = NULL;  + (MyClass *)instance {     @synchronized(self)     {         if (gInstance == NULL)             gInstance = [[self alloc] init];     }      return(gInstance); }   What could I be doing to improve this? Why does my apple not weigh 500 tons? Related to this question:   $E=mc^2$ - energy equals mass. So, if an object has gravitational potential energy relative to another object, it should have additional mass to represent that extra energy.  So, if I have an apple in my hand, it should have quite a large amount of gravitational potential energy relative to a black hole at the edge of the observable universe. I did a quick calculation of how much this gravitational potential energy would be (using Newton's Law of Gravitation) and it came out to be the equivalent of around 500 tons (and that's just for one black hole!).  So, why does my apple not weigh a lot more than it appears to?  EDIT: Here's my calculation of the GPE:  Assumptions:   The apple has mass $m_a=0.3 kg$ The black hole has a mass equal to 1000 solar masses, $m_b=2\times10^{33} kg$ Distance between the apple and black hole is 60 billion light years   Obviously $GPE=mgh$ can't be used, because the gravitational acceleration is not constant and varies with distance, so it has to be integrated.  I used Newton's Law of Gravitation to provide the acceleration:  $$ F=\frac{G{m_1}{m_2}}{h^2} $$  A small change in height produces a small change in energy, which can be used to integrate:  $$ \begin{eqnarray*} \delta E&amp;=&amp;F \delta h\\ \int_0^EdE&amp;=&amp;G{m_a}{m_b}\int_1^R\frac{1}{h^2}dh \end{eqnarray*} $$  I'm integrating the force starting at 1m from the center of the black hole, as the force goes to infinity at $h=0$. It's a little crude, but it should provide a conservative estimate.  $$ \begin{eqnarray*} E&amp;=&amp;G{m_a}{m_b}(1-\frac{1}{R})\\ E&amp;\approx&amp; G{m_a}{m_b}\;\;\;\;\;\;(R&gt;&gt;1)\\ G&amp;=&amp;6.673\times 10^{-11}\;\;N(\frac{m}{kg})^2\\ G{m_a}{m_b}&amp;=&amp;4\times 10^{22}\;\;Nm\\ E&amp;=&amp;mc^2\\ \Delta m&amp;=&amp;\frac{4\times 10^{22}}{(3\times 10^8)^2}\\ &amp;\approx&amp;444,000\;\;kg \end{eqnarray*} $$  So, a little short of 500 tons, but still pretty big! About an hour ago, from my account, an inappropriate message was posted as a reply to a Stack Overflow question.  I have noticed it, because I started getting downvotes. To my understanding my Gmail account wasn't compromised (I reviewed my account security settings and login history). I am from a secure WPA2 connection. I cannot find enough information on how to investigate this. Although I changed my passwords everywhere, I still seem confused and I would like to ask how to investigate this issue myself. How can I identify an anonymous inner class in a NotSerializableException Why didn't Dumbledore remove Quirrell from DADA teaching when he realized something was wrong with him? In "Harry Potter and the Deathly Hallows", from Snape's memory that Harry views, we learn that Dumbledore had misgivings about Quirrell, when he said to Snape:     Keep an eye on Quirrell, won't you?   If he knew something was off, why not remove him from a very sensitive position of teaching DADA to kids? Check if this proof about real numbers with an irrational product is correct. Can anyone confirm if my proof is correct, please?  Claim:- “If $x$ and $y$ are real numbers and their product is irrational, then either $x$ or $y$ must be irrational.”  Proof:-   Assume that both $x$ and $y$ are rational. Now, let $x = \dfrac pq$ and $y = \dfrac mn$ since both of them are rational. $xy =\dfrac pq * \dfrac mn = \dfrac{pm}{qn}$ Thus, if the product $xy$ can be written as a fraction, it's not a irrational number. Therefore if one of $x$ and $y$ is not irrational, then the product is not irrational.  By the principle of proof by contraposition, If $x$ and $y$ are real numbers and their product is irrational, then either $x$ or $y$ must be irrational. Is it possible to use multiple desktop environments on same system? I am using Ubuntu 12.04. I want to try out KDE and other desktop environments.   But I'm not sure if I'll like them enough to switch permanently. I want to be safe and make a transition in a piecemeal fashion.  Is it possible to install KDE on Ubuntu and yet not do away with the default Unity shell?  Could I install multiple desktop environments and switch between them by tweaking some startup configuration and then rebooting? How can I check if a program exists from a Bash script? How to show every field is a Euclidean Domain. I'm having trouble proving this. This is what I have so far:  Let $F$ be a field. Let $v(x) \rightarrow 1$ for all $x$ not equal to $0$.  So if we let $x$ be in $F$ where $x$ not zero then we can write $x$ as: $x=qy+r$ for some $y$ in $F$. If $r$ not zero then $V(r)=1$.  Not sure what to do from here. I know eventually I'm supposed to get no remainder $(r=0)$ but I'm stuck at applying the definition and valuation map. Does using an extender actually change the aperture of the lens? I just bought a Canon 2X extender and I always believed that it would only result in 2 stops' loss of light and not change the aperture.    However, when I tested this extender on a Canon 135mm f/2 lens, the maximum aperture I could set went down to F/4.  So it kind of confused me, because if I step down the aperture to f/5.6, is it actually setting the aperture to f/5.6 or f/2.8 (i.e., 1 stop below f/2)? How can I have an SPF record longer than 255 characters? I was just reviewing my "capitalization standards" for titles and such and was wondering if there's a macro to do the same thing I'm forced to do by hand nowadays. My personal rules (feel free to disagree/comment on them) are as follows:   the first letter (a number is a letter too for the sake of these rules) always gets capitalized, every word gets capitalized individually, the exception to the rule above (and just the rule above) are  such as prepositions and the like.   In other words: I'd like a capitalization command (like \MakeUppercase) that will capitalize every word not included in a list of words and that will always capitalize the first word of its argument.  Doable?  PS: one such "list" of closed class words (also known as "function words") can be found . How to convert a currency string to a double with jQuery or Javascript?