This question has not been asked before.  That link above is no help.  When trying to pass TXTurl variable in URL everything after the hashtag does not pass as the variable because it is a fragment.  I was doing some reading, and it the variable does pass as %23.  I have been trying to change the # to a %23 before it goes into the database.    I have tried urldecode() urlencode() - I have tried the below myUrlEncode function I found.  function myUrlEncode($TXTurl) {     $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');     $replacements = array('!', '*', "'", "(", ")", ";", ":", "@", "&amp;", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]");     return str_replace($entities, $replacements, urlencode($TXTurl)); }   try {     $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);     // set the PDO error mode to exception     $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);      // prepare sql and bind parameters     $stmt = $conn-&gt;prepare("INSERT IGNORE INTO MyFAQlist (TXTurl, TXTlinkname)      VALUES (:TXTurl, :TXTlinkname)");     $stmt-&gt;bindParam(':TXTurl', $TXTurl);     $stmt-&gt;bindParam(':TXTlinkname', $TXTlinkname);     myUrlEncode($TXTurl);       // insert a row      $TXTurl = "$TXTurl";     // insert a row     $TXTlinkname = "$TXTlinkname";     $stmt-&gt;execute();   I want to replace # with %23 when inserting TXTurl into database.  Also Tried to use rawurlencode. ddint' work  $stmt = $conn-&gt;prepare("INSERT IGNORE INTO MyFAQlist (TXTurl, TXTlinkname)  VALUES (:TXTurl, :TXTlinkname)"); $stmt-&gt;bindParam(':TXTurl', $TXTurl); $stmt-&gt;bindParam(':TXTlinkname', $TXTlinkname); $TXTurl = rawurlencode($TXTurl);
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?
I never hear "scissor" or "pant" or "jean". It's always "scissors", "pants", and "jeans", respectively. Are they considered plural? How to make applications open on the correct monitor when using multiple monitors? I'm using Windows 8.1, which has much better multiple monitor support than Windows 7 (sort of). However when I'm in a full-screen app on one monitor, and I go to the Start menu on the other and open a desktop app, it opens on the opposite monitor because of it being on that one last time the app was used.  This suspends the full-screen app and switches to the desktop view on that monitor. I then have to drag the desktop app to the other monitor which I didn't have my mouse pointer near in the first place, then switch back to the full-screen app on that monitor by going to the upper-right corner.  This is so incredibly irritating, every time I plug in my laptop to my second monitor and try to use it, this happens. Not to mention whenever I have Netflix or any kind of video in the second monitor and it just randomly stops playing when I'm trying to work on the other screen.  Most likely there is going to have to be a third-party application to install to do this, right? I would really prefer if it was free, as this was less annoying in Windows 7 when the application would only open on top of the other that was on that monitor. This is one of the maybe two annoying things I don't like about Windows 8/8.1. Everything else is fantastic, to be honest. Factor analysis and regression Importance of PTR records on nameserver IP's? I have not yet experienced any DNS failures due to a missing PTR record, but am wondering:   Is there any added value in having a valid PTR record on a nameserver IP-address? There are similar questions for  and , but I'm after a Windows solution here.  The problem is as follows: I want to write several (js) script files in a folder, and have a  program monitor that folder for file changes and new files being added, and run a command whenever that happens (to compile them all into one single file).  The solution has to:   Monitor both file changes and new files being added, in a folder. Run a command only if there is any change.   It would be best if it either is a built-in solution (like a JScript or VBscript snippet), or something that does not require installation. Restoring a backup to an older version of SQL Server When trying to restore a backup to a SQL Server Express 2008 database I got the following error:  Restore failed for Server '...\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600.  That version is incompatible with this server, which is running version 10.00.2531.  Either restore the database on a server that supports the backup, or use a backup  that is compatible with this server. (Microsoft.SqlServer.Smo)   Is there a way to get a backup which is compatible with the older (in my case 10.00.2531) version from the newer (in my case 10.50.1600) version of SQL Server Express? Let $E$ be measurable and define $f:E\rightarrow\mathbb{R}$ such that $\{x\in E : f(x)&gt;c\}$ is measurable for all $c\in\mathbb{Q}$, is $f$ measurable?  There are a number of equivalent definitions for the measurability of a function and the most obvious one would be to show that $\{x\in E : f(x)&gt;c\}$ is measurable for all $c\in\mathbb{R}$.  Thus my strategy has been to consider an arbitrary irrational $y$ and use the density of the rationals in the reals to show that there exists some open set $O$ such that $m^*(O-\{x\in E : f(x)&gt;y\})&lt; \varepsilon$.  I would do this by choosing some rational $q&lt;y$, close enough to $y$, such that the set of values in $E$ which get sent under $f$ to values strictly greater than $q$ and less than or equal to $y$ is small enough.  But that doesn't in general seem possible since I could keep sending intervals of some fixed positive length to smaller and smaller regions just beneath $y$.  However conversely, such a function would not be enough for a counter example, since finding such a function only rules out this strategy, but doesn't necessarily entail non-measurability.  Is there a better definition of the measurability of a set I should use? or does the statement actually not imply measurability?  Thanks. What are the basics of commands in Minecraft Java Edition? App crash when editing comment or uploading image How to enable projection transformation in QGIS How to get instance variables in Python? Why does a balloon spiral in the air instead of moving in a straight line? Translation of these Cirth runes What is the translation of what's written below?  I think it may be the poem of the One Ring, but I'm not sure. Building where clause based upon parameters In the early days of C++ when it was bolted on top of C, you could not use NULL as it was defined as (void*)0. You could not assign NULL to any pointer other than void*, which made it kind of useless. Back in those days, it was accepted that you used 0 (zero) for null pointers.  To this day, I have continued to use zero as a null pointer but those around me insist on using NULL. I personally do not see any benefit to giving a name (NULL) to an existing value - and since I also like to test pointers as truth values:  if (p &amp;&amp; !q)   do_something();   then using zero makes more sense (as in if you use NULL, you cannot logically use p &amp;&amp; !q - you need to explicitly compare against NULL, unless you assume NULL is zero, in which case why use NULL).  Is there any objective reason to prefer zero over NULL (or vice versa), or is all just personal preference?  Edit: I should add (and meant to originally say) that with RAII and exceptions, I rarely use zero/NULL pointers, but sometimes you do need them still. Okay I have the following fitch proof almost figured out, from here I know I have to move forth in conlcuding but I don't know what I am missing  (2 premises)  S → (R ∨ P)  P → (¬R → Q)   my work below  new scope assume S   Rule: > elim  R ∨ P  New scope assume R  Q∨R     Rule: V intro  End scope – (new scope assume P)  ¬R → Q         Rule: > Elim  my confusion comes where I go from here  Q∨R            rule Taut Con ??  Goal:├ S → (Q ∨ R) I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion? How do I show that $\ln(x) = \lim_{n\to\infty} n (x^{1/n} - 1)$?  I ran into this identity on . I haven't been able to find any proof online and my efforts to get from $\ln(x) := \int_1^x \frac{\mathrm dt}t$ to that limit have been a failure. Can the graph of a bounded function ever have an unbounded derivative? Showing that Y has a uniform distribution if Y=F(X) where F is the cdf of continuous X Let $X$ be a random variable with a continuous and strictly increasing c.d.f. function $F$ (so that the quantile function $F^{−1}$ is well-deﬁned). Deﬁne a new random variable $Y$ by $Y = F(X)$. Show that $Y$ has a uniform distribution on the interval $[0, 1]$.  My initial thought is that $Y$ is distributed on the interval $[0,1]$ because this is the range of $F$.  But how do you show that it is uniform?