i have this method  public function getArticles($order){         $stmt = $this-&gt;db-&gt;prepare("SELECT * FROM articles ORDER BY :order");         $stmt-&gt;bindParam('order',$order);         $stmt-&gt;execute();         $results = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);         return $results;     }   that im calling like this  $articles-&gt;getArticles('created DESC');   but when i trying to do 'created ASC' it will not change the order? i have tryed with two $vars and with backtics around the column, but i cant get it to work and i do not get any errors to work with it just pulls the rows in the same order every time.  Found the solution on   $orders  = ["name","price","qty"]; $key     = array_search($_GET['sort'], $orders); $orderby = $orders[$key]; $direction = _GET['direction'] == 'DESC' ? 'DESC' : 'ASC'; $query   = "SELECT * FROM `table` ORDER BY $orderby $direction";
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 should I do when the GETDEB repository is down? I'm trying to install programs/files from the getdeb repo but get a "check your internet connection" error.  Programs than I've tried include Qbittorrent and Mozilla-Plugin-VLC.    Through the terminal I get the following errors:  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps qbittorrent amd64 2.8.2-1~getdeb2   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/q/qbittorrent/qbittorrent_2.8.2-1~getdeb2_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   &amp;  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps mozilla-plugin-vlc amd64 1.1.10-1~getdeb1   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/v/vlc/mozilla-plugin-vlc_1.1.10-1~getdeb1_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   I'm not having any problems adding/removing other programs/files from my machine.  Is there a problem with GETDEB repo (and if so, is there any way to fix it on my end) or is there something wrong with my computer's configuration? How to make a disk image and restore from it later? I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, , etc.) I've broken something (X, grub, unknowns) and I can't get it back to work. Especially for a newbie like me, it's easier (and much faster) to just reinstall the whole shebang than try to troubleshoot several layers of failed &quot;fixing&quot; attempts. Coming from Windows, I expect that there is some &quot;disk image&quot; utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot. What's the Linux equivalent of Windows disk imagers like  or ?  Note: I found a similar question: Wrong posts number on Review section Lately it's happening to me this:  After completing one or more "First Posts" reviews, I go back to the Review Section main page:   And the post counter shows that there are still posts to review. I click the link to review them, but there is nothing.  Refreshing the page doesn't solve the issue: it shows the wrong number again. Prove inequality $n<3^n$ using mathematical induction Prove that $n&lt;3^n$ where $n \in \mathbb N$,  when $ n=1 $, I have proved it's true. And assumed when $n = p$ , $p&lt;3^p$ is true. Can any body help me in showing that it is true for $n =p+1$ I understand there is a method for solving simultaneous modular equations. For example; $$x = 2 \mod{3}$$ $$x = 3 \mod{5}$$ $$x = 2 \mod{7}$$ We find numbers equal to the product of every given modulo except one of them - giving $5 \cdot 7$, $3 \cdot 7$ and $3 \cdot 5$. We then find the multiplicative inverses of these numbers with modulo equal to the number missing from the product. The numbers found are then 2, 1 and 1 in this case. The value of x is then given by: $$x = 2 \cdot (5 \cdot 7) \cdot 2 + 3 \cdot (3 \cdot 7) \cdot 1 + 2 \cdot (3 \cdot 5) \cdot 1 = 233 = 23 \mod{3\cdot5\cdot7}$$  But I do not understand how this method correctly gives the value of $x$. I understand that the Chinese remainder theorem proves that there is a unique value of $0\le x \lt 3\cdot5\cdot7 \mod{3\cdot5\cdot7}$ but can someone please explain why this method finds this value of x? Adding new ROLES and USERS through REST in GeoServer I use GeoServer stable version 2.14.1 and get error messages when trying to add new roles and users via REST. I suspect that the GeoServer REST documentation is buggy. When I call the REST interface of my GeoServer instance, I can see that the roles are accessible through the URI http://localhost:8080/geoserver/rest/security/roles. Users are under the URI http://localhost:8080/geoserver/rest/security/usergroup/users. I can query both resources via GET request, but adding new resources via POST or PUT will not work. A POST request to create new roles ends up with status code 405 (Method not allowed). After trying to create new users comes the status code 500 (Internal Server Error). For this, the GeoServer-REST documentation has been referencing the paths  /roles/roles/{role}  for new roles () or  /usergroup/users/  for new users () since several GeoServer versions. But when I use them, this always ends with Status code 404 (Not Found). How can I add new roles and users through REST in GeoServer? The workarround from @implssv in  does not work for me. Prove that $\sqrt 2 + \sqrt 3$ is irrational I have proved in earlier exercises of this book that $\sqrt 2$ and $\sqrt 3$ are irrational. Then, the sum of two irrational numbers is an irrational number. Thus, $\sqrt 2 + \sqrt 3$ is irrational. My first question is, is this reasoning correct?  Secondly, the book wants me to use the fact that if $n$ is an integer that is not a perfect square, then $\sqrt n$ is irrational. This means that $\sqrt 6$ is irrational. How are we to use this fact? Can we reason as follows:  $\sqrt 6$ is irrational  $\Rightarrow \sqrt{2 \cdot 3}$ is irrational.  $\Rightarrow \sqrt 2 \cdot \sqrt 3$ is irrational  $\Rightarrow \sqrt 2$ or $\sqrt 3$ or both are irrational.  $\Rightarrow \sqrt 2 + \sqrt 3$ is irrational.  Is this way of reasoning correct? Irreducible polynomial is always separable in char 0 field Quite simply (and similarly to my other questions about previous versions of this feat  and ) I want to know if this feat is balanced and if not then what should be done to improve it? Since the last iteration I have changed the wording as per David Coffron's answer, increased the time and monetary cost as well as added in the action requirement to activate the rune as per Ruse's answer and increased the costs as per linksassin's answer     Rune Caster      Prerequisites: ability to cast at least one spell of 1st level or higher      When you take this feat you can imbue your spells of 1st level or higher into a rune by casting the spell as a rune, this means that you must have the object you want to put the rune on within reach for the entire duration of the casting as well as any tools required to make the rune.      When casting a rune you add the time listed in the cost time table to the casting time and the cost listed in the cost time table to the components of the spell in accordance with the stored spell.      \begin{array}{|l|l|l|} \hline \text{Spell level} &amp; \text{Time (hrs)} &amp; \text{Cost (GP)}\\ \hline 1 &amp; 1 &amp; 50 \\ \hline 2 &amp; 2 &amp; 100\\ \hline 3 &amp; 4 &amp; 500\\ \hline 4 &amp; 6 &amp; 1,000\\ \hline 5 &amp; 8 &amp; 5,000\\ \hline 6 &amp; 12 &amp; 10,000\\ \hline 7 &amp; 16 &amp; 50,000\\ \hline 8 &amp; 18 &amp; 100,000\\ \hline 9 &amp; 24 &amp; 500,000\\ \hline \end{array}      When making a rune you choose a trigger which is touch and/or command word and can be specified to only a group of people/creatures or a body part. When defining creatures that can activate the rune you may be as specific or general as you want. The DM interprets the designated creatures as your character would have interpreted them when you made the rune.      When you store a spell in a rune some of the ranges are altered, a range of touch becomes a range of self, a range and target keeps the same range and the person who activates the rune designates the target and range with an aoe sets the origin to the center of the rune, lastly a range of self stays the same.      When a rune is activated the spell is released acting as if it had just been cast without requiring any components or concentration. The rune then disappears leaving no trace of its presence. To activate a rune you must complete the trigger, this means speaking any command words and physically touching the rune each if applicable, this requires the activator to use the object interaction action while within reach for touch runes and while within 60 ft for command words. If both triggers are used then they must both be fulfilled within the same turn. How could I retrive full internal storage of an Android smartphone in order to restore data? Radius of Convergence of power series of Complex Analysis I have come across the following few questions on past exams papers.. I know how to solve these type when it is of the form $a_nz^n$ but don't have a clue what to do with these. Any help would be greatly appreciated!  (i) $\displaystyle\sum_{n=0}^\infty \bigg(\dfrac{1}{2n}\bigg)z^{3n}$.  (ii) $\displaystyle\sum_{n=0}^\infty(2^n+i)(z-i)^n$.  (iii) Show that the radius of convergence of $\displaystyle\sum_{n=0}^\infty z^{n!}$ is $1$ and that there are infinitely many $z \in \mathbb{C}$ with $|z|=1$ for which the series diverges. Finding the search terms behind 'not provided' Direct Link to a Comment Disable OS X startup sound How can I permanently disable the startup sound (or chime) in Yosemite?  (I am using a late-2014 13" macbook pro)  I already tried several options found here and there :    installed StartNinja.app => did not work installed Auto-Mute.app  => did not work tried to install the old StartupSound prefPane => did not work tried the command "sudo nvram SystemAudioVolume=%80" => volume does not change (I also tried other values than 80, such as 00, 01, or nothing)   NOTE: I know that it is possible to mute the next startup sound by turning the volume down, but this is not a permanent solution. 3/4 circle with plus in it? After I recently updated my phone about a day ago, this strange sign showed up on the top left that I have never seen before. Does anyone know what it means? Or how to get rid of it? Why do "df" and "du" commands show different disk usage? I cannot access ubuntu system on my pc, the error message: "the system is running in low graphics mode" and I tried some commands I searched from internet.   I found out a problems seems there is no available disk space. I used "df" and "du" commands to check, the results are as follow:  du -j --max-depth=1 23G  ./home 3.3G ./usr  ......  28G   and  df -Th  filesystem   Type   size    used   available   use%    mounted on  /dev/sda5    ext4   68G     68G    0           100%    /   how would I clean up the system for more disk space? $f,g$ continuous from $X$ to $Y$. if they are agree on a dense set $A$ of $X$ then they agree on $X$ Problem:      Suppose $f$ and $g$ are two continuous functions such that $f: X \to Y  $ and $g : X \to Y $. $Y$ is a a Hausdorff space. Suppose $f(x) = g(x)  $ for all $x \in A \subseteq X $ where $A$ is dense in $X$, then $f(x)  = g(x) $ for all $x \in  X $.   Attempt at a solution:  Put $h(x) = f - g $. Therefore, $h: X \to Y $ is continuous and $Y$ is Hausdorff by hypothesis. Also we know $h(x) = 0 $ for all $x \in A $ such that $A$ is dense in $X$. I want to show that $h(x)$ vanishes everywhere in $X$. We can show $h(x) = 0 $ for all $x \in X \setminus A $. Suppose $h(x) &gt; 0 $ on $X \setminus A$. Pick points $y_1,y_2 \in Y $. Since $Y$ is Hausdorff, can find open set $O_1, O_2 \subseteq Y $ which are disjoint such that $y_1 \in O_1$ and $y_2 \in O_2$. By continuity, $f^{-1}(O_1), f^{-1}(O_2)$ are open in $X$.   I know that if I can show that one of the $f^{-1}(O_i)$ lies in $X \setminus A $, then we would have a contradiction since we have non-empty open set in $X \setminus A$ and this implies $A$ cannot be dense in $X$. But this is the part I am stuck. Any help would greatly be appreciated.  Also, Would be be possible to prove this without using the Hausdorff condition on $Y$? Should we restrict signup for a service to Facebook accounts only? Push Notification Badge Count Not Updating How can I improve Ubuntu overall system performance?