prepare() seems a bit tedious and unnecessary for a majority of my code. If I send a string in a SQL command, why can't I just sanitize it with real_escape_string? What's the difference? That's what I've been doing all the time and it worked well against SQL injections... Thanks.
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?
Can you enter the Schengen area with a UK visa? I'm working in Lee's book on topological manifolds and have gotten stumped on the first question in chapter 5, the chapter on cell complexes.  The problem is:   Let $D$ and $D'$ be two closed cells not necessarily of the same dimension.     Show that any continuous map $f:\partial D \to \partial D'$ can be extended to a continuous map $F:D \to D'$ such that $F(Int \; D) \subseteq Int \; D'$. Given points $p \in Int \; D$ and $p' \in Int \; D'$, show that $F$ can be chosen so $F(p) = p'$. Show that if $f$ is a homeomorphism then $F$ can be chosen to be a homeomorphism.   I proved the first part roughly as follows: First suppose $D$ and $D'$ are convex and each contain $0$ in their interior (in their respective ambient spaces).  Then every element other than $0$ in $D$ can be expressed uniquely in the form $\lambda q$ where $q \in \partial D$ and $\lambda\in (0,1]$ (an equivalence relation on the chords connecting $0$ to boundary points partitions $D- \{0\}$).  I then define the map $F(\lambda q) = \lambda f(q)$ which is continuous since if $\lambda_n q_n \to \lambda q$ in $D$ then $F(\lambda_n q_n) \to F(\lambda q)$.  Lastly $\lambda q \in Int \; D$ implies $\lambda &lt;1$ and so $\lambda f(q)$ is an interior point of $D'$ since $f(q)$ is a boundary point and $D'$ is convex.    Now if we suppose $D$ and $D'$ are arbitrary closed cells there are homeomorphisms $g_1: \overline{\mathbb{B}^n} \to D$ and $g_2: \overline{\mathbb{B}^m} \to D'$ (where possibly $m=n$) then we have that $g_2^{-1}\circ f \circ g_1$ is a continuous map between the boundaries of two closed balls and so by the first part can be extended to a continuous map $F:\overline{\mathbb{B}^n} \to \overline{\mathbb{B}^m}$.  The mapping $g_2 \circ F \circ g_1^{-1}$ is a continuous map that satisfies the desired claim.    My issue is that parts 2 and 3 don't seem (to me at least) to follow that easily from the proof I constructed.  Maybe my proof is wrong and I'm not seeing it, but more likely I think that I'm missing the spirit in which Lee is intending for us to approach this problem. Where does the word "dog" come from? How can I automatically name files being exported based on input parameters What is ubuntu 14.04 doing while showing "stopping early crypto disks"? I created a virtual machine to install ubuntu 14.04 on VirtualBox 4.2.12.*. I created virtual CD to install it with fixed-size virtual disk of 200GB. After successful installation, it restarted as usual. But after showing message of below, it hangs. Actually, I created virtual machines to install ubuntu at Virtual Box successfully several times. It's very easy. The installed ubuntu versions ranged from 9.10, 13.04 and even 14.04 before. I don't know why this time it hangs at restarting after successful installation. The only difference between this failure restart and previous successful ones is that the virtual disk is much larger, 200GB. It failed three times.  * Deactivating swap... [OK] * Stopping remaining crypto disks... [OK] * Stopping early drypto disks... [OK] Can NDSolve handle discontinuous data? English equivalent for the Persian idiom "send someone out in pursuit of black chickpeas" "To send somebody out in pursuit of some black " is a Persian idiom that implies 'to make or ask someone to run an errand so that you be able to have/ buy some time in order to deal with your private affairs in their absence', like having or continuing a (secret) conversation with someone else.   According to its etymology, since 'black garbanzos/chickpeas' were rarely available in the markets, when someone wanted to buy them, they had to search many stores for a long time, and most of time they couldn't find them at all.   Today, its meaning has changed somehow, and it doesn't necessarily mean that we ask someone to run an impossible errand, but it means we use that errand as an excuse to send them away for a while just to have time to do something in their absence.   Example scenario:   Suppose your classmate has come to your house and you are talking about some girly issues in the sitting room. Now you want to tell her a big secret about one of your classmates, but not in the presence of your younger sister who is sitting there too. So you ask her to go to the market and buy some snacks for you. In this way, you will have some time to continue your conversation until she is back. So you might say to your friend:     Well, I sent my sister out in pursuit of some black chickpeas.  I'm sure that she won't be back for another 15 minutes, so we can talk more freely now."   And your sister, before leaving the house, might sarcastically say to you:     Okay, but I know this is just an excuse, and you are just sending me in pursuit of some black chickpeas!!! so don't think that you can fool me!   Is there any idiom, expression or proverb that conveys the same meaning or connotation in English (i.e. to make or ask someone to do an errand just in order to buy time so that you can deal with some of your private affairs)?   I have found to be/go on  but I'm not sure if I can use it or not. Index entries duplicated for captions Is there any way to see the timetable for a  bus route?  On their website I can see the routes map, but I'd me more interested in seeing where the bus is going to stop for a given route.  E.g. if a bus goes from Rotterdam to Amsterdam, I'd like to see each stop. maybe that's an idiot question. Given a finite field $k$ and some irreducible polynomial $f(x) \in k[x]$, then $k_f \cong k[x]/(f(x))$? I know that it's true if $k$ is the prime field and I think that the statement is not true for general finite fields, however I could not find any counter example.  Thanks in advance. Running a script during booting/startup; init.d vs cron @reboot I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system.   The use of @reboot (this method was mentioned in  by hs.chandra) is some what simpler, by simply going into crontab -e and creating a @reboot /some_directory/to_your/script/your_script.txt and then your_script.txt shall be executed every time the system is rebooted. An in depth explanation of @reboot is   Alternatively by embedding /etc/init.d/your_script.txt into the second line of your script ie:  #!/bin/bash # /etc/init.d/your_script.txt  You can run chmod +x /etc/init.d/your_script.txt and that should also result for your_script.txt to run every time the system is booted.  Q1: What are the key differences between the two? Q2: Which is more robust? Q3: Is there a better one out of the two? Q4: Is this the correct way of embedding a script to run during booting?  I will be incorporating a bash .sh file to run during startup. Scale Image Using PHP and Maintaining Aspect Ratio Use physical harddisk in Virtual Box What would be a good term for continuous testing post-deployment? I'm thinking of live production sites here, where there is a continuous community or much content being updated, sort of like a newspaper site or community site (the one I work at is a healthcare improvement company) and we have news articles, programs and so on.  While the underlying code is tested and released there are often production issues that come up, maybe certain pages stop working, style sheets suddenly don't appear like they did due to a service patch or some tweak done to improve production security or performance.  There is Acceptance Testing for when a deployment goes out to make sure things work right, Regression Testing to make sure nothing has been broken since previous releases.  Considering we've done these types of tests and things are working fine what would you call testing, or checking, the site to make sure things still work fine?  To be sure new pages are being crawled for search indexing?  To check that newly added pages are using plug-ins correctly?  Or so on.  My manager and I were discussing some issues that have cropped up and decided we needed to do something like this, but then to sort of note it in our status reports we didn't really have a name for it.  Anyone done this and have a term that might be good?  Or would you consider it covered by something like Continuous Acceptance Testing or some such term? Let $f(n) = \sum_{(k,n)=1} e^\frac{2\pi ik}{n}$. Show that $f(n) = \sum_{k=1}^{n}\left(\sum_{d\mid (k,n)} \mu(d)e^{\frac{2\pi ik}{n}} \right) $ Why don't I have this option?    here's my disk layout  sudo fdisk -l  Disk /dev/sda: 640.1 GB, 640135028736 bytes 255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x5b53cc54     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT /dev/sda2          409600  1153767021   576678711    7  HPFS/NTFS/exFAT /dev/sda3      1216962560  1250050047    16543744    7  HPFS/NTFS/exFAT /dev/sda4      1250050048  1250261679      105816    c  W95 FAT32 (LBA)  Disk /dev/sdb: 4005 MB, 4005527552 bytes 32 heads, 63 sectors/track, 3880 cylinders, total 7823296 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x20d8782d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *          63     7822079     3911008+   c  W95 FAT32 (LBA) How to quickly and safely defrost chicken? What is the safest, quick way to defrost chicken? Microwave? Running water over it? Which of the following polynomials are subspaces of $\mathbb{P}_n$ for an appropriate value of n? Definition. A subspace  of a vector space V is a subset H of V that has three properties  (a) The zero vector of V is in H.  (b) $\forall$ u, v $\in H$, we have  u + v $\in H$.   (c) $\forall$ u $\in H$, c scalar, we have c  u $\in H$.  For $n \geq$ 0, denote $\mathbb{P}_n$ to be the set of all polynomials of degree at most $n$.  Which of the following are subspaces of $\mathbb{P}_n$ for an appropriate value of $n$? Support your answer with reason.  (a) All polynomials of the form $p(t) = a + t^2$, where $a \in \mathbb{R}$.  (b) All polynomials of degree at most 3, with integers as coefficients.  Solution:  Both the statements (a) and (b) above are not subspaces of $\mathbb{P}_n$.  Reason:  For part (a), All polynomials of the form $p(t) = a + t^2$, where $a \in \mathbb{R}$, is not a subspace because it failed to meet the standards of the first property stated above, that is, the coefficient of the $t^2$ term is always a 1, therefore the zero vector is not in this subspace of polynomials.    For part (b), All polynomials of degree at most 3, with integers as coefficents is also not a subspace becuase it as well failed to meet the standards of the third property, that is, integer coefficents, when multiplied by a real scalar, will not necessarily be of integer type leading to integer coefficents. Thusly, the resulting polynomial will not be in the subset of polynomials $\mathbb{P}_n$. $\Box$  Can someone please look at this and see if I have the right idea and approach to this question. Thank You Is there a way I can avoid imperial ships? Whenever I am traveling on foot, imperial ships will fly by and drop down troops for me to fight. In a normal situation, this is no big deal and I will fight or flee to continue with my travels.  However this will also occur when I am doing a quest that requires me to locate and pick up items. This is an inconvenience as I cannot pick up items while in combat and I have to kill them before I can continue.  Is there a way I can "hide" and allow the ships to by pass my location? What does size of a directory mean in output of 'ls -l' command?