EDIT 24-Feb-2016: PDO Cannot accept table names or column names as bindedparameters    I am looking for a workaround for using a loop to enter data using the $_GET array, because I cannot bindthe column namebecause PDO requires that it is manually entered.   Additionally, if do not bind the variable, and just use the $keyvariable as is, it opens up security vulnerabilities.  How do I work around this without having to manually enter each statement?  My PHP Page submits a form to itself and runs the following code:  $d=new db(); //tried putting this inside the foreach loop but encountered the same issue if($_SERVER['REQUEST_METHOD']=='GET'){     foreach($_GET as $key=&gt;$obj){          $d-&gt;query("update settings set :key=:obj where id='default'");         $d-&gt;bind(':key',$key);         $d-&gt;bind(':obj',$obj);         $d-&gt;execute();         echo "update settings set $key=$obj where id='default' &lt;br&gt;"; //for each loop works fine, each update statement is executable in sql without error     } }   In case you need a breakdown of the db Class:  class db {      private $stmt;     private $dbc;      public function __construct($dbname = null)     {         if ($dbname==null){$dbname='fake_db';}          $u = "root";         $p = "fake_password";         try {             $this-&gt;dbc = new PDO('mysql:host=127.0.0.1;dbname='.$dbname, $u, $p);             $this-&gt;dbc-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);         } catch (PDOException $e) {             $e-&gt;getMessage();         }     }      public function bind($param, $value, $type = NULL)     {         $this-&gt;stmt-&gt;bindParam($param, $value, $type);     }      public function rowCount()     {         return $this-&gt;stmt-&gt;rowCount();     }      public function lastInsertId()     {         return $this-&gt;dbc-&gt;lastInsertId();     }      public function beginTransaction()     {         return $this-&gt;dbc-&gt;beginTransaction();     }      public function rollBack()     {         return $this-&gt;dbc-&gt;rollBack();     }      public function endTransaction()     {         return $this-&gt;dbc-&gt;commit();     }      public function cancelTransaction()     {         return $this-&gt;dbc-&gt;rollBack();     }      public function debugDumpParams()     {         return $this-&gt;stmt-&gt;debugDumpParams();     }      public function run_query($query)     {         $this-&gt;stmt = $this-&gt;dbc-&gt;prepare($query);         $this-&gt;execute();     }      public function execute()     {         try {             return $this-&gt;stmt-&gt;execute();         } catch (PDOException $e) {             return $e-&gt;errorInfo;         }     } }
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"
What does negative R-squared mean? Let's say I have some data, and then I fit the data with a model (a non-linear regression). Then I calculate the R-squared ($R^2$).  When R-squared is negative, what does that mean? Does that mean my model is bad? I know the range of $R^2$ can be [-1,1]. When $R^2$ is 0, what does that mean as well? Years ago I read short story about a man sitting in his room. Suddenly appears the same man but from the future and gives him an advice about the future. Original man seems to agree to follow that advice. Man from the future goes away. Then another version of that man from another future comes and gives a completely opposite advice and begs original man to follow it. Then this second version of this man from future also left. Original man stays alone not knowing which advice from future he must follow. Can I find the connected components of a graph using matrix operations on the graph's adjacency matrix? If I have an adjacency matrix for a graph, can I do a series of matrix operations on the adjacency matrix to find the connected components of the graph? Distinct Sylow P subgroups What do repeating '^@' symbols in a logfile mean? A few times I have come across this in a log file:  Sep 17 09:35:57 00187d378926 ovpn-00187d378926[1701]: /sbin/ifconfig tun0 0.0.0.0 Sep 17 09:35:57 00187d378926 kernel: Kernel logging (proc) stopped. Sep 17 09:35:57 00187d378926 rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1707" x-info="http://www.rsyslog.com"] exiting on signal 15. ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@   What does it mean?  Sometimes it is a single line, other times it is lots of lines.  I usually see it happen on Debian 6 machines. Backtrack, Wi-Fi not working I've installed Backtrack 5R3 KDE, and I realized that my wireless is not working, but wired is working fine.  Here's the lshw output:     *-network         description: Ethernet interface         product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller         vendor: Realtek Semiconductor Co., Ltd.         physical id: 0         bus info: pci@0000:02:00.0         logical name: eth0         version: 05         serial: 04:7d:7b:b7:46:f8         size: 100MB/s         capacity: 100MB/s         width: 64 bits         clock: 33MHz         capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation         configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.2.2 latency=0 link=yes multicast=yes port=MII speed=100MB/s         resources: irq:42 ioport:2000(size=256) memory:f0404000-f0404fff memory:f0400000-f0403fff   lspci output:      00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:14.0 USB Controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04) 00:1a.0 USB Controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4) 00:1c.1 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 2 (rev c4) 00:1d.0 USB Controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA AHCI Controller (rev 04) 00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) Repeating determiners: “the X and (the) Y” I have a problem with the use of "the" after "and" where you would basically be connecting words. For example, which of the following is better:     The table and the chairs?   The table and chairs?   Or are both okay? What is the rule, and are there exceptions to it? Or is the rule just contextual and may vary between the sentences and meanings? I have a framed picture about two feet by three feet in size that weighs about one pound (not a sheet of paper). I want to hang it onto a wall that is of full-blown hard concrete and covered with paper wallpaper (not vinyl - just paper).  The default way would be to drill the concrete and insert an anchor but that would damage the wall surface.  Is there a way to hang such picture onto such wall without damaging the wall? Compact way to assign values by slicing list in Python Does "Erase Disk and Install Ubuntu" replace the default boot screen? I am new here. And I may replace a laptop's hard disk with Ubuntu. It's an HP Compaq notebook which has Windows 7 installed. So If I choose that install option, will it replace the screen that says F12 for boot options [actually it was esc]. I am just asking. I know that choosing that options erases your other partitions. I am assuming it gets replaced by grub2? My name includes space - How do I enter my username when typing command? My username in Minecraft is sun solar arrow. This name includes spaces. Situation - When I want to get OP privilege, a user who has OP privilege will enter: /op sun solar arrow  But my username includes spaces. So it shows an error message:  Invaild syntax  How do I enter my username? What is the term for the grandson of my aunt? I've just started to learn about the tensor product and I want to show: $$(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z}) \cong \mathbb{Z}/ \gcd(m,n)\mathbb{Z}.$$  Can you tell me if my proof is right:  $\mathbb{Z}/m\mathbb{Z}$ and $\mathbb{Z} / n \mathbb{Z}$ are both finite free $\mathbb{Z}$-modules with the basis consisting of one single element $\{ 1 \}$. So $(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z})$ has the basis $\{ 1 \otimes 1 \}$.  Therefore, any element in $(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z})$  is of the form $(ab) 1 \otimes 1$ and any element in $\mathbb{Z}/ \gcd(m,n)\mathbb{Z}$ is of the form $k 1 = k$ where $k \in \{ 0, \dots , \gcd(n,m) \}$.  I would like to construct an isomorphism that maps $ab$ to some $k$. Let this map be $ab (1 \otimes 1) \mapsto ab \bmod \gcd(n,m)$.  This is a homomorphism between modules: it maps $0$ to $0$ because it maps the empty sum to the empty sum. It also fulfills $f(a + b) = f(a) + f(b)$ because there is only one element, $a = 1$.   It is surjective. So all I need to show is that it is injective. But that is clear too because if $ab \equiv 0 \bmod \gcd(m,n)$  then both $a \equiv 0 \bmod n$ and $b \equiv 0 \bmod m$ so the kernel is trivial.  Many thanks for your help!! A isometric map in metric space is surjective? remove files when name does NOT contain some words I ran across this problem in my Analysis class and can't seem to come up with a good solution. Here's the question: Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals $A$. $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$.  I tried applying the Mean Value theorem like this: There exists a $c \in (a, x)$ st $f(x)-f(a)=f'(c)(x-a) \implies \frac{f(x)-f(a)}{x-a}=f'(c) \implies f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{c\to a}f'(c)=A$  However, I think this is wrong. I am pretty sure the Mean Value theorem is needed, but my application of it seems to be incorrect. Would somebody be able to point me in the right direction? Which characters unlock each scene? Proving a function is bounded Hi i was wondering if  anyone could help me with my revision This is a question of a past paper i'm stuck on.  Let $$f:[a,b]\to \Re$$ be Riemann intergrable. Part (a) is to prove that f is bounded and part (b) is to Give an example of a bounded function f that is not Riemann integrable  my attempt for part (a) is since f is Riemann intergrable then it is continuous on [a,b] which means that it must also be bounded? or is this incorrect i find this topic rather difficult  For part (b) i dont really have a clue i cant recall any function like the one they ask for Keyboard Shortcuts no longer working on GNOME 3.4.1 Why are high white balance temperatures redder when warmer objects are bluer? I know it's dumb to ask this type of questions. But, I still don't get this. I've read the "Black body" story and know that when it's heated, it gives off colors; 'warm' colors (red→orange→yellow..) that have low color temperatures, at low temperatures, (I mean, when it is cooler than afterwards) right? And, the black body gives off 'cold' colors (white→blue..) that have high color temperatures at high temperatures (when it is hotter than before), right? Correct? So there're two, yes, very dumb, questions and the latter one is dumber..     Why are that 'warm' colors said to have low temperatures? And 'cold' colors vice versa? So the redder colors have lower c/t and bluer colors have higher c/t, then   why does the camera's color temperature - adjusting slider has the bluer colors on the left, and the redders on the right?       Please, forgive me for my ignorance...