Where should I ask a question about converting from Java to C++?
Give each site a parallel site for polling, recommendations and subjective-ish stuff
How do I programmatically log in a user with a POST request? 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? Does the rank-nullity theorem hold for infinite dimensional $V$? "Do the needful" -- Why is it used instead of asking a question? GOTO still considered harmful? Everyone is aware of Dijkstra's  (also  .html transcript and  .pdf) and there has been a formidable push since that time to eschew the goto statement whenever possible. While it's possible to use goto to produce unmaintainable, sprawling code, it nevertheless remains in . Even the advanced  control structure in Scheme can be described as a sophisticated goto.  What circumstances warrant the use of goto? When is it best to avoid?  As a followup question: C provides a pair of functions, setjmp and longjmp, that provide the ability to goto not just within the current stack frame but within any of the calling frames. Should these be considered as dangerous as goto? More dangerous?    Dijkstra himself regretted that title, for which he was not responsible. At the end of  (also  .pdf) he wrote:     Finally a short story for the record.   In 1968, the Communications of the ACM   published a text of mine under the   title "The goto statement considered   harmful", which in later years would   be most frequently referenced,   regrettably, however, often by authors   who had seen no more of it than its   title, which became a cornerstone of   my fame by becoming a template: we   would see all sorts of articles under   the title "X considered harmful" for   almost any X, including one titled   "Dijkstra considered harmful". But   what had happened? I had submitted a   paper under the title "A case against   the goto statement", which, in order   to speed up its publication, the   editor had changed into a "letter to   the Editor", and in the process he had   given it a new title of his own   invention! The editor was Niklaus   Wirth.   A well thought out classic paper about this topic, to be matched to that of Dijkstra, is , by Donald E. Knuth. Reading both helps to reestablish context and a non-dogmatic understanding of the subject. In this paper, Dijkstra's opinion on this case is reported and is even more strong:     Donald E. Knuth: I believe that by presenting such a   view I am not in fact disagreeing   sharply with Dijkstra's ideas, since   he recently wrote the following:   "Please don't fall into the trap of   believing that I am terribly   dogmatical about [the go to   statement]. I have the uncomfortable   feeling that others are making a   religion out of it, as if the   conceptual problems of programming   could be solved by a single trick, by   a simple form of coding discipline!" Lightning QuickAction (API) without modal How to measure GPU usage? Unable to set DYLD_FALLBACK_LIBRARY_PATH in shell on OSX 10.11.1 How to fix task manager memory column if it shows lies I have a problem in showing memory in task manager with memory and paging columns. Why it shows so small size usage? And maybe anyone knows how to fix it?  Here is a screenshot(working set, memory, page pool) sorted by most consuming: Is it possible to get the information for a device tree using /sys of a running kernel? Commonly for arm systems, device trees supply hardware information to the kernel (Linux). These device trees exist as dts (device tree source) files that are compiled and loaded to the kernel. Problem is that I do not have access to such a dts file, not even to a dtb file.   I have access to /sys and /proc on the machine and I wanted to ask if that would allow me to "guess the correct values" to be used in a dts?  Also potential answer could highlight additionally the aspect if the answer to this question also depends on whether the device tree interface was used in the first place (i.e. a dtb was created and provided to the kernel) instead of some more hacking "we simply divert from vanilla and patch the kernel so as to solve the device information problem for our kernel only"-solution? Cantrips seem to be the only type of spell that cares only about your class level. However, in the multiclassing section they are not mentioned, does this mean that cantrips use your character level, instead of your class level?  Does this mean a Warlock 2 / Fighter 15 can cast an Eldritch Blast with 4 beams just like a level 17 Warlock? MySQL Database User: Which Privileges are needed? The short installation instruction for WordPress () state that:     Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.   While setting up a new blog professionally I was wondering how that maps to what the MySQL database user privileges/permissions configuration offers me:   Data: SELECT, INSERT, UPDATE, DELETE Definition: CREATE, ALTER, DROP Extra: INDEX More:  LOCK TABLES REFERENCES CREATE TEMPORARY TABLES CREATE VIEW SHOW VIEW CREATE ROUTINE EXECUTE ALTER ROUTINE    I'm pretty sure for the first three groups, I named them Data, Definition and Extra here. But what about the others below the More entry? Normally I would say, those are not needed, but I would like to get a second opinion. "Which" vs. "what" — what's the difference and when should you use one or the other? What are the differences between consumer grade SSDs and the much more expensive enterprise SSDs? I am in need of a terabyte or so of storage space for Lucene indices on a testing server.  I'm having a hard time differentiating between disks like the  for about $450 vs  of dollars.  What concerns should I have regarding the 840 evo, and what should I be looking for?  This server will be used strictly for in-house testing purposes by our development team and will have to put up with periodic load testing. Find $P(n+1)$ for a polynomial P Fix a nonnegative integer $n$. Let $P(x)$ be a polynomial of degree $n$ (over the real numbers) such that for all $k\in\left\{0,1,\ldots,n\right\}$, we have $P(k)=\dfrac{k}{k+1}$. Find $P(n+1)$.   My attempt:  I consider a new polynomial $Q(x)=(x+1)P(x)-x$. This $Q$ is a polynomial of degree $\leq n+1$ satisfying: $Q(k)=0\quad\forall k\in\{0,1,2,\ldots,n\}$. Therefore $Q(x)=\lambda x(x-1)\cdots(x-n)$ for a certain real $\lambda$. Hence, $Q(-1)=\lambda \cdot (-1)^{n+1}(n+1)!$, but also $Q(-1)=(-1+1)P(-1)+1=1$. Comparing these, we get $\lambda \cdot (-1)^{n+1} (n+1)! = 1$, thus $\lambda=\dfrac{(-1)^{n+1}}{(n+1)!}$. Since $Q(n+1)=\lambda(n+1)!$ then $Q(n+1)=(-1)^{n+1} $, and from $P(x) = \dfrac{Q(x)+x}{x+1}$ we deduce: $$P(n+1)=\dfrac{(-1)^{n+1}+n+1}{n+2}.$$ I doubted that the answer were $P(n+1)=\frac{n+1}{n+2}$ but the term $(-1)^{n+1}$ wasn’t expected. Is there any mistake here? Does someone have an alternative proof? Over on another network site, a helpful user corrected the grammar of .  The answer now says     I believe it's valid.   where I originally wrote     I believe it valid.   Is the original sentence gramamatically (or at least idiomatically) correct or do I absolutely need a form of 'to be' here? (What's more, is 'to be' a copula or an auxiliary verb if used like this?)  I am quite certain that I have seen sentences like the original one in the past, but I am uncertain where. Given that I am frequently exposed to the somewhat made-up English of authors in the fields of sci-fi and fantasy, I might have fallen into a trap here.  Edit: I don't doubt that the correction is valid and enhances readability. If my app is live and users are facing a critical issue, can I upload another build and ask Apple to make it live within a day or two? find exec '{}' not available after > Exec allows us to either pass all arguments at once with {} + or to pass them one by one with {} \;  Now let's say I want to rename all jpeg, no problem doing this:  find . \( -name '*.jpg' -o -name '*.jpeg' \) -exec mv '{}' '{}'.new \;   But if I need to redirect output, '{}' isn't accessible after redirection.  find . \( -name '*.jpg' -o -name '*.jpeg' \) -exec cjpeg -quality 80 '{}' &gt; optimized_'{}' \;   This wouldn't work. I'd have to use a for loop, storing find's output into a variable before using it. Let's admit it, it's cumbersome.  for f in `find . \( -name '*.jpg' -o -name '*.jpeg' \)`; do cjpeg -quality 80 $f &gt; optimized_$f; done;   So is there a better way? I've believed for a long time that every Lie group can be decomposed as the semidirect product of a connected Lie group and a discrete Lie group. However, in , it is mentioned that this is not true, and that there exist obstructions to this decomposition. Unfortunately, the level of complexity in the answers goes a bit over my head.  This type of decomposition is also addressed in .  With this loss of faith in my intuition, I have three questions:   Is it true that Lie groups do not necessarily decompose into the semidirect product of a connected group and a discrete group? If this decomposition doesn't always work, then is there a particularly nice argument as to why it doesn't? If this decomposition doesn't always work, then is there a nice example I can use to convince myself that my intuition is wrong?   Edit: As much as I love Qiaochu Yuan's answer, which is thorough and (as usual) a role model among Stack Exchange answers, this is not what I'm looking for. I'm aware of the general extension problem, and that not every short exact sequence splits, but my intuition has led me to think that each Lie group can be decomposed this way. I will certainly play around with his outline for a construction, but I would much prefer a more concrete answer. Once again, thank you!  Edit: As of yet, playing with the construction suggested by Qiaochu hasn't yielded anything interesting. This question is still open to answers! When traveling to a country with a different currency, how should you take your money? Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?