How to give information between an activity to a fragment in android?
What is a NullPointerException, and how do I fix it?
I am making a test where I am asked to add the missing words.     [...] chair is [...] useful piece of furniture.    I would have said that a is the missing word in both the cases, but the test says the words I should have added are the and a respectively.     [...] last time I saw [...] bear, I was travelling in [...] Europe.   I would have added: nothing, a, nothing. The correct answer is: the, a, nothing.  Why is the the correct article to use in both the sentences? Let's disallow moderator nominations from people who've been suspended in the past year can I use same functions with the different type of argument inputs How to make files protected? I just installed Ubuntu 16.10 on my desktop and have a USB deathadder. The problem is I can't see where the cursor actually is because it appears only in the top left of my screen. The mouse still moves but the cursor graphic doesn't follow Transpose of inverse vs inverse of transpose A cannonball is launched from a point 100 m above ground, at a speed of 20 m/s. This is modelled by the equation $h(t)=-4.9t^2 +20t +100$ The speed of sound (of the cannonball is) 380m/s If a person sitting directly underneath the cannonball runs as soon as they hear the sound do they escape the cannon? My main question is &quot;$y=-380x+100$&quot; the correct equation to model the cannon's sound? In a script I'm trying to find the Terminal.app window containing a specific tty device and raise that window to the top. Here's what I have in Applescript so far:  tell application "System Events"   set foundWin to false   if (name of processes) contains "Terminal" then     tell application "Terminal"       set theTabs to first tab of every window where tty is "$(tty)"       repeat with theTab in theTabs         if class of theTab is tab then           set theWin to (first window whose tabs contains theTab)           set selected tab of theWin to theTab           set foundWin to true         end if       end repeat     end tell   end if   if foundWin then     --RAISE THE WINDOW?!   end if end tell   Where I'm getting stuck is the "raising the window" part.  Here are some things that are not quite what I want:  set frontmost of theWin to true -- this brings the window to the front of the group of Terminal.app windows but doesn't raise it above any other windows.  tell application "Terminal" to activate -- this brings every Terminal window to the front in a big stack. I just want the one window.  tell application "System Events"     set theSysWin to first window of process "Terminal" whose name is (name of theWin)     perform action "AXRaise" of theSysWin end tell   This almost does it, but what it does is to raise the terminal window to the #2 position, still underneath the active window (if the active app is something other than Terminal.app.)  click theSysWin at {10,50} -- doesn't seem to do anything.  click first static text of theSysWin -- doesn't seem to do anything.  Is there a way to do this? It doesn't have to be in Applescript.  EDIT I did find this web page (  ) quoting an Obj-C/Cocoa call:  SetFrontProcessWithOptions(&amp;psn, kSetFrontProcessFrontWindowOnly);  I'm not familiar with either ObjC or Cocoa, and this is (ultimately) getting invoked from a shell script, so not sure where to go from there. Compiling the following code and got the error of type illegal.  int main() {     // Compilation error - switch expression of type illegal     switch(std::string("raj"))     {     case"sda":     } }   You cannot use string in either switch or case. Why? Is there any solution that works nicely to support logic similar to switch on strings? Recurrence relation for number of ternary strings that contain two consecutive zeros The question is: Find a recurrence relation for number of ternary strings of length n that contain two consecutive zeros.    I know for ternary strings with length one, there are 0. For a length of 2, there is just 1 (00), and for a length of 3, there are 5 (000,001,002,100,200).    I did a similar problem, finding a relation for the number of bit strings of length n with two consecutive zeros: $$a_n = a_{n-1} + a_{n-2} + 2^{n-2}$$    Since you can add "1" to the end of all the $a_{n-1}$ strings, "10" to all the $a_{n-2}$ strings, and "00" any string of size $n-2$.    For the ternary string problem, I'm pretty sure you would replace the $2^{n-2}$ with $3^{n-2}$, but confused about the other terms of the relation. My guess is that it would have the coefficient $2$ in front of the other terms, since you can add either $1$ or $2$ to the end of $a_{n-1}$ and either $01$ or $02$ at the end of $a_{n-1}$.    So I believe the answer for the relation is: $$a_n = 2a_{n-1} + 2a_{n-2} + 3^{n-2}$$    How does that look? Should "each" be followed by a singular or plural possessive? If a possessive noun, which is plural, is preceded by "each", then should it use the singular or plural possessive form?  For example, which of the following is correct?    spend time in each other's presence spend time in each others' presence How to hook into the CPT's title placeholder? I want to change the default placeholder text in my Custom Post Type title field. This isn't possible while registering a new post type.  The following screenshot describes it. What's the name for the property of a function $f$ that means $f(f(x))=x$? I can think of several examples of functions such that twice application of the function is equivalent to no application of it.   Additive inverse Multiplicative inverse Fourier transform Complex conjugation Any group built up from $\mathbb{Z}_2$, applying (one of) the $\mathbb{Z}_2$ parts' operation.   "Idempotent" came to mind, but that's wrong. It means $f(f(x)) = f(x)$, not $f(f(x))=x$.  What is the word for this "flip-flop" property? What I want to show is the following statement.  For every prime of the form $2^{4n}+1$, 7 is a primitive root.  What I get is that  $$7^{2^{k}}\equiv1\pmod{p}$$ $$7^{2^{k-1}}\equiv-1\equiv2^{4n}\pmod{p}$$ $$7^{2^{k-2}}\equiv(2^{n})^2\pmod{p}$$ Thus $(\frac{2^n}{p})=(\frac{7^{2^{k-2}}}{p})=1$.  I think that $7$ is important because $7$ is a primitive root but I don't know how to use $7$. Microphone volume at maximum yet too quiet I have got a reasonbly basic desktop microphone, however for reasons that I don't understand it is extremley quiet. I dual boot, both systems run Windows 7, one system is working just fine although the other system, after I restarted the computer a couple of weeks ago, the microphone is now far too quiet.  I've been through the Sound control panel. The correct microphone is selected as the default communication device. The microphone level is set to 100. The microphone is plugged into a sound card, so I uninstalled the audio card (an Asus D1) driver and reinstalled it which made no difference. If I tap the microphone, it does register 5 or 6 green bars in the recording volume monitor. So, does anybody have any suggestions on where to look next? What is the simplest way to prove the Earth is round? Assume you've come in contact with a tribe of people cut off from the rest of the world, or you've gone back in time several thousand years, or (more likely) you've got a numbskull cousin.  How would you prove that the Earth is, in fact, round? How to create a new partition from the existing partition? I wanna create a new partition from the existing root partition.My root partition is about 250GB.I wanna create a new partition say 150 GB taking space from this root partition.Can anyone help me with the procedure on doing this?  output: fdisk -l  karthick@karthick:~$ sudo fdisk -l [sudo] password for karthick:   Disk /dev/sda: 250.0 GB, 250000000000 bytes 255 heads, 63 sectors/track, 30394 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x28219744  Device Boot      Start         End      Blocks   Id  System /dev/sda1   *           1          61      487424   83  Linux Partition 1 does not end on cylinder boundary. /dev/sda2              61       30395   243650561    5  Extended /dev/sda5              61         124      498688   82  Linux swap / Solaris /dev/sda6             124         186      498688   82  Linux swap / Solaris /dev/sda7             186       30395   242651136   83  Linux I want to add CaseComment and CaseHistory related list to my visualforce page.   &lt;apex:relatedList list=" " /&gt;  What should be the value for List attribute in the code defined above. When I added   &lt;apex:relatedList list="CaseHistory" /&gt; 'Histories' is also not working   &lt;apex:relatedList list="CaseComment" /&gt; 'CaseComments' is also not working  I get errors saying they are not valid child relationship name for entity Case.  Please help me out on this issue. Why are there so many close votes to review and so few of the others? If $A$ and $B$ are positive definite, then is $B^{-1} - A^{-1}$ positive semidefinite?