If I am in the middle of using the terminal, say to apt-get something;   If I click the x / close button, does the Terminal continue to run in the background?    To afraid to try it, cause I don't want to have to start the process all over again...  Has anyone accidentally done it?
How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&amp;) to the command as such:  nm-applet &amp;   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.
Okay setting the scene. I have three tables, (Table1, Table2 and DataTable) and I want to insert into Table1 and Table2 using DataTable as source. So for every row in DataTable I want a row in Table1 and Table2, and Table2 needs to have the inserted id (PK) from Table1...  If I were to do this...  INSERT INTO Table1 SELECT A, B, C FROM MyTable INSERT INTO Table2 SELECT IDENTITY_INSERT(), D, E, F FROM MyTable   I'd get the ID of the last inserted record into Table1.  Is a CURSOR or WHILE loop the only ways to do this? Passing a formatted NSDate Proving replacement theorem? I want to see if I am understanding the proof of the replacement theorem correctly.   Let $V$ be a vector space that is spanned by a set $G$ containing $n$ vectors.  Let $L \subseteq V$ be a linearly independent subset containing $m$ vectors.  Then $m\leq n$ and there exists a subset H of G containing exactly $n-m$ vectors s.t. $L \cup H$ generates $V$.   The proof in the book says to start with $m=0$. In that case $L=\varnothing$, the empty set.        Let's assume this theorem is true for some integer $m \geq 0$.   Let $L = \{v_j\}_{j=1}^{m+1}$ and define it as a linearly independent subset of $V$ consisting of $m+1$ vectors.  Since any subset of a linearly independent set is linearly independent as well ($S_1 \subseteq S_2 \subseteq V$), then $\{v_j\}_{j=1}^m$ is linearly independent also.   It then says to use the induction hypothesis to say that $m \geq n$. Well, ok, but that seems sort of pulled out of nowhere to me. The next step is to say that there is therefore another subset, $\{u_k\}_{k=1}^{n-m}$ of G such that $\{v_j\}_{j=1}^m \cup \{u_k\}_{k=1}^{n-m}$ spans $V$.   That being the case there are scalars $(a_j)_{j=1}^m$ and $(b_k)_{k=1}^{n-m}$ which you can multiply by the vectors $v_j$ and $u_k$. You can then add the two sets of vectors, yielding $$\sum_{j=1}^m a_j v_j + \sum_{k=1}^{n-m} b_k u_k = v_{m+1}$$  At this point I am not sure I understand things. Because we are assuming $n-m&gt;0$ -- otherwise $v_{m+1}$ is linearly dependent. But then it says not only is $n&gt;m $ but $n&gt;m+1$, and that is where I am losing the plot to get to the next step. Prevent Adobe Reader from switching to "Fit Page" zoom when bookmark is clicked Failed to resolve version for org.apache.maven.archetypes How to delete a file with a path too long to be deleted Error handling in C code What do you consider "best practice" when it comes to error handling errors in a consistent way in a C library.  There are two ways I've been thinking of:  Always return error code. A typical function would look like this:  MYAPI_ERROR getObjectSize(MYAPIHandle h, int* returnedSize);   The always provide an error pointer approach:  int getObjectSize(MYAPIHandle h, MYAPI_ERROR* returnedError);   When using the first approach it's possible to write code like this where the error handling check is directly placed on the function call:  int size; if(getObjectSize(h, &amp;size) != MYAPI_SUCCESS) {   // Error handling }   Which looks better than the error handling code here.   MYAPIError error; int size; size = getObjectSize(h, &amp;error); if(error != MYAPI_SUCCESS) {     // Error handling }   However, I think using the return value for returning data makes the code more readable, It's obvious that something was written to the size variable in the second example.  Do you have any ideas on why I should prefer any of those approaches or perhaps mix them or use something else? I'm not a fan of global error states since it tends to make multi threaded use of the library way more painful.  EDIT: C++ specific ideas on this would also be interesting to hear about as long as they are not involving exceptions since it's not an option for me at the moment... It's my understanding that the phrase "Winter is Coming" is the motto of the Stark house, when the story first reaches the wall it's implied that the winter is not a periodic season like it is in our world.  Does the winter refer to a particularly severe season or does a winter only occur every few years? On iOS 7, there is a feature under Cellular in Settings called: Use Cellular Data For:. This lists all of the apps I have on my iPhone 4 with individual On/Off Switches to disable or enable cellular data. So, I disable it on several of my apps, one of which being Music. When I open my Music app, it tells me…     Cellular Data is Turned Off for "Music"   You can turn on cellular data for this app in Settings.   This alert does not occur once, but every time I clear the Music app from my multitasking and re-open it. Is there a way to dismiss this alert once and forever?  The alert looks something like this, but for Music: I would like to know how to get the version information of an installed program that doesn't have the      --version or -version   method implemented. How to get a UK visa refund I applied online for a visa application to the UK. I'm from Sri Lanka. Yesterday I cancelled the appointment, I changed my mind. I will not go to the visa appointment. Now my question is how I get my refund? Show that $a(-1) = (-1)a = -a $. regex error - nothing to repeat In the context of topological spaces, I see the following major countability properties:  A space is:   "separable" iff it has a countable dense subset "second countable" iff if has a countable basis "first countable" iff the neighbourhood system of every point has a countable local basis.   (Definitions taken from Counterexamples in Topology by Steen and Seebach, 2nd ed. 1978 -- there may be differences in wording from other sources.)  The question I have is: "separable" into what, exactly? By which I mean to say: what is the thinking behind calling such a condition "separable"?  It appears not to be related to the concept of "separation axioms", which do immediately and obviously invoke an intuitive notation of separation, neither does it seem to have anything to do with "separated sets".  (Anyone using the spelling "seperable" or "seperated" will be immediately downvoted. :-) ) Less than or equal sign If I know for two numbers a and b that    $${a &lt; b }$$  Then is it correct to say that    $$ a \leq b $$  I know that the second statement is true as long as the first one is. It seems OK as it is true but from the other side it seems kinda weird (to me), to say that, if you know, that a is strictly less that b.It's like you lose some extra information. How to implement a follow author (or user) function? Is it possible to implement a Follow button for authors of posts in Drupal 7, so that users can:   Follow any one they wish, and Be notified about the new posts of those authors.   This sounds like 'Mashable Follow button' for authors.  Do you have any suggestions about how to implement this? The exercise is: Prove that $-(-v)=v$ for every $v \in V$  Proof Suppose  $v \in V$ and $V$ is a vector space. Then $-(-v) \in V$ as result of the scalar multiplication property and $-(-v)=-(-1\cdot v)=-1 \cdot(-1\cdot v) =(-1 \cdot-1)\cdot v = 1 \cdot v = v $ The desired result $-(-v)=v$ holds.  The solution manual gives the proof:  Proof   I just wanted to make sure that the way I did the proof isn't missing anything?Thanks How are echo and print different in PHP? Possible Duplicate:          Is there any major and fundamental difference between these two functions in PHP? Are there non-legal consequences for wizards that meddle with time? Is there a *simple* example showing that uncorrelated random variables need not be independent?