C++ is executing cmd command by input possible?
How to convert a std::string to const char* or char*
Why more (and varying number of) logical reads with read ahead (prefetch)? After creating tpch database in my SQL Server, I tried below query:      set statistics io on     DBCC DROPCLEANBUFFERS;             select top 100 * from dbo.lineitem order by l_partkey;   The table lineitem has a non-clustered index on l_partkey. I issued the above queries for several times and found out that the logical reads vary each time:      Table 'lineitem'. Scan count 1, logical reads 1019, physical reads 4, read-ahead reads 1760, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.     Table 'lineitem'. Scan count 1, logical reads 1007, physical reads 4, read-ahead reads 1720, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.     Table 'lineitem'. Scan count 1, logical reads 1030, physical reads 4, read-ahead reads 1792, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   From the post here: , I know it could be caused by read ahead behavior.  BUT exactly why read ahead could cause more logical reads? How does it change the SQL Server behavior? Like SQL Server may read more index page since it's in cache anyway?  Anyway, I disabled read ahead and issue the above query again. Now it reports the same amount of logical reads each time. BUT the logical reads is much smaller!!      Table 'lineitem'. Scan count 1, logical reads 404, physical reads 160, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   So my question is, why the read ahead feature could cause many more and various logical reads count?  Out of curiosity, I tried another query without the "order by":      select top 100 * from dbo.lineitem   Here's the result without read ahead:      Table 'lineitem'. Scan count 1, logical reads 5, physical reads 3, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   Here's the result with read ahead:      Table 'lineitem'. Scan count 1, logical reads 15, physical reads 2, read-ahead reads 3416, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   The one with read ahead still has more logical reads. So, why? How can I limit ssh *remote* port forwarding? I need to limit which ports can be remotely 'ssh -R' forwarded by an user.  I know about permitopen option on authorized_keys, but as it says on man page it only limits local 'ssh -L' port forwarding  As discussed  a user would get the same with netcat or similar, but in this case user has no shell access  I also found  that talks about using selinux or LD_PRELOAD, but I never configured selinux before and can't find info on how to do that with LD_PRELOAD.  maybe someone have made a patch for openssh to implement that?  EDIT: I've found  so I guess it's not yet implemented How to completely disable Siri on Sierra? True Definition of the Real Numbers I've found lots of resources that say this is a real number if it's not rational, but what is a real number, really?  I mean what is the definition of a real number?  If nothing else, anyone know of a resource where I could find out myself?  Thanks! In C#, I want to initialize a string value with an empty string.  How should I do this?  What is the right way, and why?  string willi = string.Empty;   or  string willi = String.Empty;   or  string willi = "";   or what? Minimal $ab$ for Rational Number $a/b$ in an Interval Given rational numbers $L$ and $U$, $0&lt;L&lt;U&lt;1$, find rational number $M=a/b$ such that $L \le M&lt;U$ and $(a\times b)$ is as small as possible---$a$ and $b$ are integers. For example,    If $L=66/101$ and $U=19/29$ then $M=17/26$. If $L=66/101$ and $U=19/28$ then $M=2/3$.   Right now I'm using a naive search that is exponential in complexity. Is there a better method?  If it is of any help, it can be assumed the prime factorization of numerator and denominator of $U$ and $L$ are known. How to process a multi column text file to get another multi column text file? I have a text file:  a   aa  aaa     b   bb  bbb     c   cc  ccc d   dd  ddd     e   ee  eee     f   ff  fff g   gg  ggg     h   hh  hhh     i   ii  iii j   jj  jjj   How can I process it and get a 2 column file like this:  a   aa aaa b bb  bbb c   cc ccc d dd  ddd e   ee eee f ff  fff g   gg ggg h hh  hhh i   ii iii j jj  jjj   Or a three column file like this:  a   aa  aaa b   bb  bbb c   cc  ccc d   dd  ddd e   ee  eee f   ff  fff g   gg  ggg h   hh  hhh i   ii  iii j   jj  jj   I prefer to get awk solution but other solutions are welcomed too. Using Iterator with ModelBuilder for clipping and splitting in ArcMap? Why are the characters on the keyboard all capitalized? Why are all the letters (A, B etc) and all the writings (Home, Page Up etc) on the keyboard, capitalized?    Especially, the letters, because a new user could rightly expect uppercase letters to be entered upon pressing those keys to find the contrary. How can I reorder my divs using only CSS? What is different about the Mac ISO image? At that location there is an ISO image which is described as "This image is adjusted to work properly on Mac systems."  What specific problems on the Mac does this image address that the standard images don't? I ask because I need to know which ISO to recommend to Apple Mac users. What does "All things X" mean? How do I transfer a file from a guest account on a MacBook Air? What does “times” mean in the newspaper “Washington Times”?  I have always wanted to ask about this, but feared it might be so obvious that I would look like a fool. For that many times, I haven't before experienced that level of hesitation with any other question, but I think now is the right time to ask, anyway. Sequences in $C(X)$ converging uniformly implies uniform boundedness and equicontinuity Let $X$ be a metric space and let $\{ f_n \}_{n \geq 1}$ be a sequence in $C(X)$. Show that if $\{ f_n \}_{n \geq 1}$ converges uniformly on $X$ then $\{ f_n \}_{n \geq 1}$ is both uniformly bounded and equicontinuous.  Could I get a hint? I've just executed a long-running process from the bash prompt. In hindsight, I wish I'd run time on it, or noted down the time at which I kicked it off.  Is there any way of getting this information retrospectively? The .bash_history doesn't seem to include timestamps.  In my particular case it's Mac OS X, but I'm interested in general Unix/Linux solutions.  To clarify, the process has now completed, and I'd prefer not to run it again unless absolutely necessary! SEO in Stack Overflow Integral of $\sqrt{1-x^2}$ using integration by parts I need your help with this: Let $f$, $p$, and $g$ be a polynomials in $F[x]$, assume that $f$, $g$, and $p$ are nononzero.  If $\gcd(f,p)=1$ and $fg$ is divisible by $p$ with no remainder, I need to prove that $g$ is  divisible by $p$ with no remainder  Thanks. How to set up reverse tethering over USB? My HTC G2 phone is rooted and running Cyanogenmod 7 I don't have a data plan. Sometimes I want to connect the phone to the Internet when there isn't Wi-Fi, to update Market apps, backup SMS messages to Gmail, sync new contacts from Gmail, etc.  Things I can't do with USB mass storage mode. I have a Windows 7 Professional computer connected to the Internet, but I'm not allowed to set up an ad-hoc Wi-Fi network.  (If I do, they will notice and hunt me down.)   Is there a way for the phone to access the Internet through the USB connection to the computer?  If so, how do I set it up?