I have problem with querying by function and binding with used variables.  public function get_where($what, $condition, $thing)     {         $this-&gt;statement = "SELECT * FROM $this-&gt;table WHERE :what :condition :thing";          $stmt = $this-&gt;db-&gt;pdo()-&gt;prepare($this-&gt;statement);          $stmt-&gt;bindParam(':what', $what);         $stmt-&gt;bindParam(':condition', $condition);         $stmt-&gt;bindParam(':thing', $thing);          $stmt-&gt;execute();          return $result = $stmt-&gt;fetchAll();     }   Usage:  $result = $QueryBuilder-&gt;table('calendar')     -&gt;get_where('MONTH(date)', '=', '9');  var_dump($result);   Result is empty array  As you can see I pass to this function MONTH(date) as what, = as condition and 9 as thing.  But it doesn't work, empty array  But when I manually change   $this-&gt;statement = "SELECT * FROM $this-&gt;table WHERE :what :condition :thing";  to  $this-&gt;statement = "SELECT * FROM $this-&gt;table WHERE MONTH(date) = 9";  it works perfectly.  So why is wrong here? : /    In addition I can say that by doing   $result = $QueryBuilder-&gt;table('calendar')     -&gt;get_where('1', '=', '1');  I get all rows in result
Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh-&gt;prepare('SELECT * FROM :table WHERE 1'); if ($stmt-&gt;execute(array(':table' =&gt; 'users'))) {     var_dump($stmt-&gt;fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"
Does $\{f_ng_n\}\to fg$ uniformly? I was putting the following in /etc/sysctl.conf in Ubuntu 16.04 and ipv6 was disabled.  net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1   In Ubuntu 18.04 I have to add the following to grub.  GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"   Just wanted to have confirmation whether this is the new way in Ubuntu 18.04 to disable IPv6. This is a  about understanding and remediating the Heartbleed security issue.   What exactly is CVE-2014-0160 AKA "Heartbleed"? What is the cause, what OSs and versions of OpenSSL are vulnerable, what are the symptoms, are there any methods to detect a successful exploit?   How can I check to see if my system is affected? How can this vulnerability be mitigated? Should I be concerned that my keys or other private data have been compromised? What other side effects should I be concerned about? What is the capacity of this circuit? I simply can't figure out what the capacity of this circuit is.  I can do the math myself, I just need a hint how to create an equivalent circuit where it is obvious what is parallel and what is in series... Is there a more efficient way to clamp real numbers than using if statements or ternary operators? I want to do this both for doubles and for a 32-bit fixpoint implementation (16.16). I'm not asking for code that can handle both cases; they will be handled in separate functions.  Obviously, I can do something like:  double clampedA; double a = calculate(); clampedA = a &gt; MY_MAX ? MY_MAX : a; clampedA = a &lt; MY_MIN ? MY_MIN : a;   or  double a = calculate(); double clampedA = a; if(clampedA &gt; MY_MAX)     clampedA = MY_MAX; else if(clampedA &lt; MY_MIN)     clampedA = MY_MIN;   The fixpoint version would use functions/macros for comparisons.  This is done in a performance-critical part of the code, so I'm looking for an as efficient way to do it as possible (which I suspect would involve bit-manipulation)   EDIT: It has to be standard/portable C, platform-specific functionality is not of any interest here. Also, MY_MIN and MY_MAX are the same type as the value I want clamped (doubles in the examples above). How find this sum $\sum\limits_{n=0}^{\infty}\frac{1}{(3n+1)(3n+2)(3n+3)}$ Find this sum     $$I=\sum_{n=0}^{\infty}\dfrac{1}{(3n+1)(3n+2)(3n+3)}$$   My try: let     $$f(x)=\sum_{n=0}^{\infty}\dfrac{x^{3n+3}}{(3n+1)(3n+2)(3n+3)},|x|\le 1$$   then we have $$f^{(3)}(x)=\sum_{n=0}^{\infty}x^{3n}=\dfrac{1}{1-x^3}$$ then we find the $f(x)$,Following is very ugly(can you someone can post your follow solution,) have other simple methods? Thank you very much. How to use SSH to run a local shell script on a remote machine? I have to run a local shell script (windows/Linux) on a remote machine. I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B. The local and remote computers can be either Windows or Unix based system. Is there a way to run do this using plink/ssh? Error - SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM Uniform continuity of $\sin(x\sin x )$ for all $x\in (0,\infty)$ Why is the main page showing only the user login form? (Automatic Bike Project) amount of torque required to change gears? I am planning to build an electronically controlled automatic bike transmission for my senior design project. I'm personally more of an electrical guy, so dealing with the mechanics is somewhat new to me. I would have loved to use an off-the-shelf electronic derailleur, but alas, they are too cost prohibitive (the school has allotted a budget of $115 per student and we're a group of two, so we have $230 to spend). So I'm going to need to make my own like several other people have done.  I am planning on using the bike's current derailleurs and replacing the hand shifters with motors of some sort to pull on the cables. Of course, we're going to need a certain amount of torque to shift up (and much less for shifting down) and a holding torque to ensure that we don't accidentally slip down a gear.   I have not bought a bike yet, I'm looking at a Diamondback bike that I found on Craigslist (it looks like a hybrid bike). So I'm wondering if there are any average measurements for the required torque.  And of course, I'm sure there are many people more experienced in bicycling than I am. So if you have a better solution, please feel free to shout it out. I'm all ears. SHOWPLAN permission denied when including execution plan in Data Explorer If I select the "Include execution plan" checkbox in the Data Explorer, the query fails:     SHOWPLAN permission denied in database 'StackOverflow'.     I see that  following maintenance. I don't know whether there was any recent maintenance. It's been several days since the data was updated and longer since an update was deployed, if that's related. How do I add newlines between lines printed on the command line? Mail logs are incredibly difficult to read. How could I output a blank line between each line printed on the command line? For example, say I'm grep-ing the log. That way, multiple wrapped lines aren't being confused. Is it safe to set xp_cmdshell value 1? I need to use xp_cmdshell in one of SQL job.So is it safe to reconfigure xp_cmdshell to 1 or can i set value 1 in the starting of SQL statements and set it back to 0 in the end of SQL Statement ? Every Function in a Finite Field is a Polynomial Function From a bank of past master's exams I am going through:     Let $F$ be a finite field. Show that any function from $F$ to $F$ is a polynomial function.   I know that finite fields are fields of $p$ elements for $p$ prime [EDIT: It's actually $p^n$ for $p$ prime; see comment below]. Since I have $p$ choices for the $p$ elements to map to, then I have $p^p$ distinct functions. I think every function can be written in the form $f(x) = a_{p-1}x^{p-1} + \dots + a_0x^0$. For then given the values $f(0), f(1), \ldots f(p-1)$, I can solve for the coefficents by the linear system of equations  $$ a_0 + \sum_{i=1}^{p-1} n^i a_i = f(n).$$  This then gives me a $p-1 \times p-1$ square matrix over the field $\mathbb{F}_p$:  $$\left( \begin{array}{ccccc} 1&amp; 0 &amp; 0 &amp; \ldots &amp; 0 \\ 1&amp; 1 &amp; 1 &amp; \dots &amp; 1 \\ 1&amp; 2 &amp; 4 &amp; \dots &amp; 2^{p-1} \\ \vdots &amp; \vdots &amp; \vdots &amp; &amp; \vdots \\ 1 &amp; p-1 &amp; (p-1)^2 &amp; \dots &amp; (p-1)^{p-1} \end{array} \right) \left( \begin{array}{c} a_0 \\ a_1 \\ a_2 \\ \vdots \\ a_{p-1} \end{array}\right)  = \left( \begin{array}{c} f(0) \\ f(1) \\ f(2) \\ \vdots \\ f(p-1) \end{array} \right)$$  If I can show this matrix is invertible, then I can always find the $a_i$. But I am a bit stumped on how to show this (partially because I don't think I've ever done linear algebra in a vector space over a finite field). It does not seem easy to show linear independence, or nonzero determinant, or full row rank.    Alternatively (I just thought of this), can I show this is true by arguing that the map between the two sets (the set of polynomials of degree $p-1$; and the set of functions $F \to F$) is injective, and that it must be a bijection because the sets have the same cardinality $p^p$? Kendo Grid & Rich text Editor of Sharepoint 2013 I am using Google Chrome. I re-installed it today as it was crashing when I start it. I guess may be that this was due to any of my Extensions or Google Update. I disabled my extensions but it was still crashing. Now I installed an old version of chrome from . However, Chrome automaticallyuppdates itself (although Windows asks me before installing and I don't grant it permissions, its still annoying to get Google update asking me permission after a couple of minutes.   I saw the question at  however, it doesn't seem to hlp me. i disabled the service and I stopped it as well, but the problem still persists. I also tried to look into the registry according to the following link:  but the "Policies" section of my registry doesn't contain any folder called "Google". I use Windows 7 - 64 bit Home Premium Service pack 1.  Could anybody help? Thanks a ton! How many solutions has the equation $\sin x= \frac{x}{100}$ ? I have some data which looks like:  sampleA    ATGC    10   100 sampleA    ATGC    120  230 sampleA    ATGC    200  110   I want to print the min and max using the values in both column 3 and 4. So my output should look like:  sampleA   10  230   Thanks in advance I have a large hole in a mesh that I'm trying to fill:    I've been trying an approach like this:    I'm finding it quite tough, since the number of vertices around the perimeter of the hole don't match a grid.  Is there a better approach to filling a hole like this?