PHP SQL injection prevention
How can I prevent SQL injection in PHP?
I'm confused, does the absorption and emission determine the color of something? Or does that only happen when something is emitting energy?  When light hits an object, the photons get absorbed, then emitted with a different wavelength right? How to calculate stays against 90/180 visa rules? Some destinations have a "90/180 rule" which says you can come and go but you must not spend over 90 days out of any 180 days in the area.  concerns this rule.  At least Schengen and Turkey have this rule, probably depending on where the traveller is from and what kind of visa they apply for.  Maybe I'm a dummy but I've always had a lot of trouble trying to add up how many days I've spent in such places when I've entered and left several times over recent months.  Is there an easy way to do this I'm missing or is it difficult for everybody? I'm guessing something based on counting backwards from the end date might be the trick?  Maybe you know of an app or website that can do this for you. Currently, a user does not get any notification when a trivial edit (less than 6 characters, by a user who has the ) is made on one of his/her posts. As in .  Even though the user is trust-worthy (owing to the rep of the user), wouldn't it be nice for the OP to get a notification whenever an edit is made, even trivial? I read news on the BBC (on its website) this morning. When I was reading the news I noticed the definite article the was missing in a sentence. As per my opinion, the reporter missed the article the. But I also thought that the reporter also had some point as he did not use the article there. So I just wanted to confirm so landed here to get some help on it.     On the website:      It also proclaimed the group's leader, XYZ  (name), as caliph and   "leader for Muslims everywhere".      As per my opinion it should have been:      It also proclaimed the group's leader, XYZ  (name), as the caliph and   "leader for Muslims everywhere".   Source link: I have the following diagram:    However, this looks a bit ugly, I would like a version that looks a little bit better. For example, size the last arrow such that the T_\phi is moved to the right.  This is the code which I am using to do this:  \begin{align*}   \xi \colon &amp;\lb \to \mathcal{L}(\hh)\\   &amp;\phi \mapsto T_\phi. \end{align*}   Where \lb and \hh just give the names for those spaces. Does anybody have a suggestion how I would improve the look of this function definition? How $\frac{1}{n}\sum_{i=1}^n X_i^2 - \bar X^2 = \frac{\sum_{i=1}^n (X_i - \bar X)^2}{n}$ How   $\frac{1}{n}\sum_{i=1}^n X_i^2 - \bar X^2 = \frac{\sum_{i=1}^n (X_i - \bar X)^2}{n}$   i have tried to do that by the following procedure:  $\frac{1}{n}\sum_{i=1}^n X_i^2 - \bar X^2$  =$\frac{1}{n}(\sum_{i=1}^n X_i^2 - n\bar X^2)$  =$\frac{1}{n}(\sum_{i=1}^n X_i^2 - \sum_{i=1}^n\bar X^2)$  =$\frac{1}{n} \sum_{i=1}^n (X_i^2 - \bar X^2)$  Then i have stumbled. I am looking for a story about the future of mankind, in which most people have been enslaved in a virtual reality. It ends with the revelation that the people are just lying there imagining their lives with their heads in a trough of feed.  It explains that chemists began to create compounds that could be released into the air to manipulate citizens - causing them to live, shop, think as desired by whoever was in charge. Eventually these tools got subtle enough that they could simulate reality using just these airborne compounds.  This was clearly a prescient view of what later became computer-based virtual reality fiction. Did all Headmasters get a portrait in Hogwarts? Throughout the Harry Potter series, we see that deceased Headmasters of the school get a semi-sentient portrait of themselves in the Headmaster's Office, at the service of the current Headmaster. Do all Headmasters get a portrait? What are the conditions of getting one? For instance, there are a couple of times when Dumbledore is temporarily deposed as Headmaster: Dolores Umbridge takes over the job in Order of the Phoenix, and Minerva McGonagall takes the job in Chamber of Secrets and Half Blood Prince. Will Umbridge and McGonagall have portraits in the Headmaster's Office when they expire? Consider the following table:  id  title   genre1  genre2  genre3  genre4  genre5 1   Movie1  Thriller    Crime   NULL    NULL    NULL 2   Movie2  Fantasy NULL    NULL    NULL    NULL 3   Movie3  Political   Philosophical   Historical  NULL    NULL 4   Movie4  Science Fiction NULL    NULL    NULL    NULL   When I unpivot genre1, genre2, ... the NULL values are removed, so that, for example, the rows for Movie1 would be:  id title  genre     original_column 1  Movie1 Thriller  genre1 1  Movie1 Crime     genre2   Is there a way to include NULL values, for example:  id title  genre     original_column 1  Movie1 Thriller  genre1 1  Movie1 Crime     genre2 1  Movie1 NULL      genre3 1  Movie1 NULL      genre4 1  Movie1 NULL      genre5   I can SELECT ISNULL(genre1, '*'), ISNULL(genre2, '*') ..., but suppose I want the values to appear as NULL? Is there a better way than:  WITH  -- SELECT that unpivots table AS unpivoted SELECT unpivoted.id,    unpivoted.title,    ,CASE unpivoted.genre WHEN '*' THEN NULL ELSE unpivoted.genre END    ,unpivoted.original_transaction FROM unpivoted   Also, I notice that the query that returns the source data to be unpivoted MUST have an alias. For example:  SELECT ... FROM   -- *must* give it an alias or it's a syntax error   (SELECT ... FROM) AS source    UNPIVOT(genre for original_column IN (genre1,genre2, genre3,genre4,genre5))   Does anyone know why? I have not found a way to refer to the alias anywhere in the query. Is there any true inertial reference frame in the universe? Is there any true  in the universe?  Newton's first law states that an object at rest remains at rest, and an object performing uniform motion performs uniform motion, until and unless acted upon by an external force, if viewed from an inertial frame. It is the definition of an inertial frame of reference. And Newton's second law states that the net external force acting on a particle equals its mass times its acceleration. Thus we need to have an inertial frame in order for Newton's 1st and 2nd laws to be applicable.  Scientists claim that Earth is an inertial frame, either the  frame or the  frame.  Why is that? Earth's different parts have different accelerations when it performs rotational motion about its axis. Now you may say that Earth's axis is inertial, but the Earth is also revolving around the Sun. Thus Earth's frame should be non-inertial.  Even supposing that earth's frame is inertial, then it means that rest of the universe is non-inertial, because only a frame that moves with constant velocity with respect to an inertial frame is also an inertial frame and according to various scientific experiments there is no other matter in this universe which satisfies that criterion. Now you may say that earth is an approximate inertial frame, but still, my question is: is there any perfect inertial frame in the universe where Newton's laws are exactly applicable? How do I escape the wildcard/asterisk character in bash? For example:  me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR   and using the \ escape character:  me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR   I'm obviously doing something stupid.  How do I get the output BAR * BAR? Show a connected metric space (X,d) is $\epsilon$-chainable for $\epsilon &gt;0$       $\epsilon$-chainable Definition      (X,d) is $\epsilon$-chainable if given any two points $a,b \in X$, $\exists$ a finite set $\{ x_0,x_1,...,x_n\}$ of points in X with $x_0 = a$, $x_n=b$ and $d(x_{n-1},x_n)&lt;\epsilon$, $\forall$ n      Clopen Definition      A set is clopen $iff$ its boundary is empty      Connected Metric Definition      Let $(X,d)$ be a metric space. It is connected $iff$ it has no proper subsets which are clopen      The following are equivalent:         $X$ is connected   The only subsets of $X$ that are clopen are $\emptyset$ and $X$   $\nexists$ non-empty, disjoint, open sets $A$ and $B$ such that $X=A\bigcup B$   $\nexists$ non-empty, disjoint, closed sets $A$ and $B$ such that $X=A\bigcup B$         Theorem      Let $(X,d)$ be a metric space, and let $S$ be any subset of $X$. Then $S$ is closed $iff$ $S^c$ is open.     So how would someone show this exactly?  Let the set $A$ be the set of all elements in $(X,d)$ that can be reached from $a\in X$ in a finite number of steps with length less than $\epsilon$.  Does this mean that there should be no isolated points? (an isolated point would be at distance infinity from any other point, or distance zero from itself, since $\epsilon &gt;0$ we don't want this?)  Knowing that $X$ is connected $\implies$the only subsets of X that are clopen are $\emptyset$ and $X$  Also, by construction of A;   A is the set of all $\epsilon$-chains between any element and $a$  And, so $A^c = \emptyset$ if $A$ was $\epsilon$-chainable (because A has to have a path from all elements to a, for this to be true, the complement wouldn't have anything in it)  Leaving only $A$ as the remaining clopen set  Does this make any sense? Or should an alternative be used, and how to formalize it.  Thanks. GBM vs XGBOOST? Key differences? I am trying to understand the key differences between GBM and XGBOOST. I tried to google it, but could not find any good answers explaining the differences between the two algorithms and why xgboost almost always performs better than GBM. What makes XGBOOST so fast? The additive group $\mathbb{G}_a$ over an infinite field $k$ is not a topological group An algebraic group is not necessarily a topological group, since for an algebraic group, the product map $G \times G \to G$ is continuous when $G \times G$ is given the Zariski topology, which is finer than the product topology.   So does this tell you that the additive group $\mathbb{G}_a$ over an infinite field $k$ is not a topological group? The underlying variety of $\mathbb{G}_a \times \mathbb{G}_a$ is $\mathbb{A}_k^1 \times_k \mathbb{A}_k^1 = \mathbb{A}_k^2$, whose Zariski topology is the cofinite topology, where every open set is also open in the product topology (since $\mathbb{A}_k^1$ also has the Zariski topology). How to know current name of the database in Django? I have interesting bug that I have experienced before but has gone away on its own. This one is not going away though.  I have a giant stripe or chunks missing from my desert biome, I would say probably 7 chunks long.  I'm guessing the chunks are corrupted or something, what was hoping to figure is whether it can repaired or reverted.  Here is a picture of the problem. I have a raster aerial photo.  I have county wide parcel data.  I want to clip/screen shot the raster at each individual parcel.  Think of this application - a post card with an image of your house --here is your house--  I want to have each parcel attribute to contain information + hyperlink of the aerial photo.  Any other solutions welcome, but this is the only method I could think of. Although I am unsure of how to achieve it efficiently.  Using ArcInfo 10. How to make password-less login work I generated a key and copied it to my target:  ssh-keygen ssh-copy-id username@hostname   I left the the location of the key as default and did not set any passphrase.  For a small while after that, I was able to ssh username@hostname without being prompted for a password, and then it stopped working for some reason. What are underfull hboxes and vboxes and how can I get rid of them? Vertical uniform circular motion.. can it really be uniform? This is the picture in my mind:    For centripetal force, I learned that: $T-mg\cos\theta= \frac{mv^2}{r}$  In vertical circular motion, the velocity is naturally going to decrease as kinetic energy is converted to potential energy as the particle moves up the circle- and thus resulting into a non-uniform circular motion.  However, I was told that if tension changes accordingly, the velocity will remain constant(as from the equation). What I do not get about this part of the explanation is that which force will balance mgsinθ (tangential force in the diagram  )?