I try to make and INSERT INTO with a variable for table but i can't make it work.  here is my code :      $tb = "mytable" ; $req = $bdd-&gt;prepare('INSERT INTO :tb (users, info)                 VALUES(:users, :info)')             or exit(print_r($req-&gt;errorInfo())); $req-&gt;execute(array(             'tb' =&gt; $tb,                 'users' =&gt; $name,             'info' =&gt; $website,             ));   I get this message : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''mytable' (users, info' at line 1 )   I really don't know what i should change...  thanks a lot
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"
How is the system call in Linux implemented? When I invoke a system call in user mode,how did the call get processed in OS?  Does it invoke some some executable binary or some standard library?  If yes,what kind of thing it needs to complete the call? I am using UBUNTU 18.10 and I had problem with TL-WN822n v5 driver in UBUNTU and Kali (4.19.0-kali5-amd64)  The problem is driver=rtl8xxxu so I found a driver in this page :   and installed the driver on Kali and it worked perfectly fine but when I wanted to install it on my ubuntu, after I ran the sudo dkms install rtl8192eu/1.0; I got this error :   Kernel preparation unnecessary for this kernel.  Skipping...  Building module: cleaning build area... 'make' all KVER=4.18.0-25-generic...(bad exit status: 2) ERROR (dkms apport): binary package for rtl8192eu: 1.0 not found Error! Bad return status for module build on kernel: 4.18.0-25-generic (x86_64) Consult /var/lib/dkms/rtl8192eu/1.0/build/make.log for more information.   and This is my Log file (/var/lib/dkms/rtl8192eu/1.0/build/make.log) :  DKMS make.log for rtl8192eu-1.0 for kernel 4.18.0-25-generic (x86_64) Sun Jul  7 13:35:02 +0430 2019 make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/4.18.0-25-generic/build  M=/var/lib/dkms/rtl8192eu/1.0/build  modules make[1]: Entering directory '/usr/src/linux-headers-4.18.0-25-generic'   CC [M]  /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’? make[2]: *** [scripts/Makefile.build:325:/var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o] Error 1 make[1]: *** [Makefile:1534:_module_/var/lib/dkms/rtl8192eu/1.0/build] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-25-generic' make: *** [Makefile:1710: modules] Error 2   What's the problem ?? ASP.NET MVC How to pass JSON object from View to Controller as Parameter I have a complex JSON object which is sent to the View without any issues (as shown below) but I cannot work out how Serialize this data back to a .NET object when it is passed back to the controller through an AJAX call. Details of the various parts are below.     var ObjectA = {         "Name": 1,         "Starting": new Date(1221644506800),          "Timeline": [             {                 "StartTime": new Date(1221644506800),                 "GoesFor": 200              }             ,             {                 "StartTime": new Date(1221644506800),                 "GoesFor": 100              }          ]     };   I am not sure how this object can be passed to a Controller Method, I have this method below where the Timelines object mirrors the above JS object using Properties.  public JsonResult Save(Timelines person)   The jQuery I am using is:          var encoded = $.toJSON(SessionSchedule);          $.ajax({             url: "/Timeline/Save",             type: "POST",             dataType: 'json',             data: encoded,             contentType: "application/json; charset=utf-8",             beforeSend: function() { $("#saveStatus").html("Saving").show(); },             success: function(result) {                 alert(result.Result);                 $("#saveStatus").html(result.Result).show();             }         });   I have seen this question which is similar, but not quite the same as I am not using a forms to manipulate the data.   I have also seen references to using a 'JsonFilter' to manually deserialize the JSON, but was wondering if there is a way to do it nativly though ASP.NET MVC? Or what are the best practices for passing data in this way? Graphing $y = \frac{x^2-4}{x-2}$ I'm trying to graph the function $y = \frac{x^2-4}{x-2}$.  I factored the numerator into $(x+2)(x-2)$, and then canceled the common factor (x-2), leaving the function as $y = x + 2$.    Is it acceptable to graph the original function as $y = x + 2$, a straight line with domain and range all real numbers?  Or do you have to restrict the domain as in the original function?  Thanks, Sean Unique quadratic subfield of $\mathbb{Q}(\zeta_p)$ is $\mathbb{Q}(\sqrt{p})$ if $p \equiv 1$ $(4)$, and $\mathbb{Q}(\sqrt{-p})$ if $p \equiv 3$ $(4)$ I want to prove the assertion:      The unique quadratic subfield of $\mathbb{Q}(\zeta_p)$ is $\mathbb{Q}(\sqrt{p})$ when $p \equiv 1 \pmod{4}$, respectively $\mathbb{Q}(\sqrt{-p})$ when $p \equiv 3 \pmod{4}$.   My first attempt is this. In $\mathbb{Z}[\zeta_p]$, $1-\zeta_p$ is prime and $$ p = \epsilon^{-1} (1-\zeta_p)^{p-1} $$ where $\epsilon$ is a unit.  Since $p$ is an odd prime, $(p-1)/2$ is an integer and  $$ \sqrt{\epsilon p } = (1-\zeta_p)^{(p-1)/2} $$ makes sense and belongs to $\mathbb{Z}[\zeta_p]$.    How do I deal with the $\epsilon$ under the square root?  I guess the condition on the congruence class of $p$ comes from that.  Is this even the right way to proceed?  Uniqueness is not clear to me either.  I thought about looking at the valuation $v_p$ on $\mathbb{Q}$, extending it to two possible quadratic extensions beneath $\mathbb{Q}(\zeta_p)$, then seeing how those have to extend to common valuations on $\mathbb{Q}(\zeta_p)$, but I didn't see how to make it work.  I would appreciate some help. How to multiply a BigDecimal by an integer in Java Is it possible in Leaflet that popup opens on mouse-over, not on click?  This is working for just one marker at a time, but I need it for a bigger number of markers:  marker.on('mouseover', function(e){     marker.openPopup(); }); Function whose inverse is also its derivative? What are some good examples of a function  $f : \mathbb{R} \to \mathbb{R}$ where its derivative is equal to its inverse? I attempted to find a monomial that satisfied it by starting with $f(x) = ax^b$ and showing that $f^{-1}(x) = f'(x) \implies b-1=\frac{1}{b} \implies b=\phi$ and got $$f(x) = \frac{x^\phi}{\sqrt[\phi]{\phi}}$$ Which seems to work according to WolframAlpha, but I'm having trouble double-checking it. Any other ideas? I'm asking this because my HDD (Hard Disk) has 5 years, and ultimately (this year) it gave me many headaches. Many moths ago I has Windows 7 (and 10 T.P. since april) and all was good. But after a moment, instantly, all gets reversed: veeery slow, and actions which will take a tiny time, at these moment the time seems frozen (for example, instead a 1 minute boot, it turned to 5-8 minutes boot). I formatted and installed Windows every 2 months because it was the time which runs good before it gets slooww. Seeing the abuse of privacity in W10, I changed to Ubuntu 15.04 and the things lasted more in time... But again, HDD error. Click, trying to read, click, trying to read... And the upper bar (title of window/buttons of volume, language, wifi, etc.) disappeared. The left bar (where are the app's icons) was empty and the file explorer said the resource wasn't available (or something like these error). I restarted and nothing happens. I had to press CTRL+D to boot-up Ubuntu, but after hours... the same error (can't do anything except moving the mouse/cursor).  Welcome to the routine: copy files with live-cd to a pendrive, wipe HDD and install all again. And the things was calmed again... and the errors comes again. And after 2 weeks, I had to do the same. Now my PC works fine, but yesterday I heard a few "clicks" from the HDD.  Now, I remembered this  and I came to Disks and the HDD shows a new value; normally, the problematic number was "pending sectors", always changing, but now, in "irrecoverable sectors", the number is different of zero.  I never had "reallocated sectors". Now, neither. And now, while I write this lines, I've 5 "pending s." and 9 "irrecoverable s.". If this helps, the "read error rate" is 42, 5 for "write error rate".      Very well!! While I was writing "write error rate", I heard 2   clicks. And while writing this, one click more.   And 123 "CRC error rate". So, with this information: is my HDD dying? It'll last days or months? I think this problem will kill the disk in a not very far time.  The drive is a Western Digital Green 1TB-WDC WD10EARS-00Y5B1 (80.00A80) S.N.: WD-WCAV5J301610  PS: When I boot with CTRL+D, many times the system is in "RO mode"; I can't save/download files, Unity doesn't find apps when I write their name {click again, now, while I write the text} and, after a few hours, a crash like the lines above How to exclude jars generated by maven war plugin? I wanted to send a single email to different users. I save an email to drafts and send the email to a user and it goes to the sent box instead of staying in the drafts box. Is there a way I can send an email repeatedly from the drafts box? What are your favorite English language tools? Let $f:\mathbb{R}\to\mathbb{R}$ be a map sending closed intervals to closed intervals. Prove that $f$ is continuous or find a counter example.  WLOG we just have to prove continuity at $0$ and we can also assume that $f(0)=0$ and $f(1)=1$ (by considering $x\mapsto (f(x)-f(0))/(f(1)-f(0))$ ).  I build up this question while thinking of the question . How to cook fall-off-the-bone beef spare ribs in oven or on stove top? All,  I would like to cook spare ribs to a fall-off-the-bone consistency.  I don't have access to a grill.  I know how to do that with pork shoulders (dry rubbed, then uncovered in the oven at low heat for 6-8hrs), but spare ribs are a different type of animal.  They are individually smaller pieces (my ribs are sawed in chunks), and they are fairly fatty, with a big bone.  What should I do?  Should I pan-sear them first, do I need some liquid in the dish?  Should I cover them?  Thanks,  JDelage I am using the  for GNOME Shell, similar to the old Maximus extension for GNOME 2 / Unity. When I maximise a window, the title and menu bars are hidden.  But I don't want the minimise, maximise or close buttons to appear in the Activity Bar. , so I have been able to remove the minimise and maximise buttons by disabling them in Tweak Tool.  How do I similarly disable/remove the close (X) button?  (I guess this is the opposite of ) How to hide terminal output when executing a command? Integrate $e^{ax}\sin(bx)?$ Is there a general formula for finding the primitive of $$e^{ax}\sin(bx)?$$  I've done this manually with $a=9$ and $b=4$ using Euler's formulas. But it takes a bit of time. Is there a pattern here? If $z_{1},z_{2},z_{3}$ are three complex number Such that $|z_{1}| = 2\;\;,|z_{2}| = 3\;\;, |z_{3}| = 4\;\;$ Then $\max$ of $|z_{1}-z_{2}|^2+|z_{2}-z_{3}|^2+|z_{3}-z_{1}|^2$  $\bf{My\; Try::}$ Let $z_{1}=2\left(\cos \alpha+i\sin \alpha\right)$ and $z_{2}=3\left(\cos \beta+i\sin \beta\right)$ and $z_{3}=4\left(\cos \gamma+i\sin \gamma\right)$ So $$f(\alpha,\beta,\gamma) = 58-\left[12\cos(\alpha-\beta)+24\cos(\beta-\gamma)+16\cos(\gamma-\alpha)\right]$$ Now How can I calculate $\max$ of $f(\alpha,\beta,\gamma)$ Help me Thanks I know that there is a very similar question, but I'm not interested in highlighting. What I'm looking for is some tool in Linux to edit pdf files. I've tried pdfedit which did the work for me, but if freezes after a few edits. I've tried this tool under Ubuntu 9.10 and under KDE Fedora 14 and the same thing happens. I've tried Okular but the notations are too big to fill out exercises from pdf workbooks.    Is there any tool that suits this job? I don't care whether it is open source or I have to pay a reasonable price for it. What is __init__.py for? What is __init__.py for in a Python source directory?