PHP Blind SQL injection on my web application
How can I prevent SQL injection in PHP?
What is the difference between "INNER JOIN" and "OUTER JOIN"? What's the function of the "|" (pipe) operator? What does "restricted \write18 enabled" mean and why does TexLive keep reporting it? Choosing C++ debugger on linux For $X$ and $Y$ random variables; $X$ follows the uniform distribution.  (1): if $Y=-\log X$  (2): then it can be shown that $-\log X$ is distributed as $\exp(1)$ {i.e. exponential with mean 1}.  Why is this so? Intuitively statement (2) make sense to me. But i'd like a mathematical proof.  -Probably wrong working:  (1) seems to imply $\exp(-Y) = X$ (which is like saying $X$ is exponentially distributed, which is a contradiction, since its actually uniform!); or is it incorrect for me to do this since $X$ and $Y$ are random variables?  Ultimately how do I prove (2)?  Thanks I need to remove all files with .gif extension except one file with name say "filename.gif". What is the optimal way to go about doing this in terminal?  The command rm *.gif removes all gif files including the file filename.gif. General solution of expected value of E(f(X))? This is maybe a trivial question I came up while solving a few examples and understanding Markov/Chebyshev inequalities and subsequently in evaluating Chernoff bounds. Suppose $X$ is a random variable with some distribution $p$ and we need to evaluate $\mathbb{E}[f(X)]$. Here, $f(X)$ may or may not have the same distribution as $X$. In my case, if $f(X) = e^{sX}$, where $s&gt;0$. I would work out this problem by letting $Z = e^{sX}$ and   $\mathbb{E}[f(X)] = \mathbb{E}[Z] = \int_{\infty}^{\infty}z \hspace{0.2em}p(z)dz$.   Now I find the distribution of $Z$ as: $P\{ Z \leq z \} \implies P\{ e^{sX} \leq z \} \implies P\{ X \leq \frac{\log(z)}{s}\} = \int_{-\infty}^{\frac{\log(z)}{s}}x.p(x)dx $  thereby substituting this into the expectation one gets $\mathbb{E}[Z] = \int_{\infty}^{\infty}z\hspace{0.2em} \left(\int_{-\infty}^{\frac{\log(z)}{s}}x\hspace{0.2em}p(x)dx\right)^{\prime} dz$  According to the Law of Unconscious Statistician , this approximates distribution of $Z$ as $p$. I understand the backward proof through calculus, I don't follow the measure theory approach. For example I don't follow how this works if say $X \sim Gamma$. Is there a source I can read through for someone with no measure theory background? Chrome Extension Message passing: response not sent Given that $a,b,c$ are distinct positive real numbers, prove that $(a + b +c)\big( \frac1{a}+ \frac1{b} + \frac1{c}\big)&gt;9$   This is how I tried doing it:  Let $p= a + b + c,$ and $q=\frac1{a}+ \frac1{b} + \frac1{c}$.  Using AM>GM for $p, q$, I get:  $$\frac{p+q}{2} &gt; {(pq)}^{1/2}$$ $$\sqrt{(a + b +c)\bigg(\frac1{a}+ \frac1{b} + \frac1{c}\bigg)} &lt; \frac{\big(a+\frac1{a} + b+\frac1{b} + c+\frac1{c}\big)}2$$ And for any $x\in \mathbb{R}, \space \space x+\frac1{x}≥2.$ Thus,   $$(a + b +c)\bigg(\frac1{a}+ \frac1{b} + \frac1{c}\bigg)&lt;9, $$ which is the opposite of what had to be proven. What did I do wrong? Compile error with \href ToC and \apacite I would like to edit my document but I have a compile error somewhere between the \href and the apacite but can't locate it. I've tried blocking out code and taking out references, with varying results.  \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc}  % TOC, Citations, Refereneces, and Appendicies \usepackage{apacite} % \cite{ref1,ref2} %Warning - unsupported tocstyle code \usepackage[tocindentauto]{tocstyle}     \renewcommand{\thesection}{\Roman{section}}      \renewcommand{\thesubsection}{\arabic{subsection}.}     \renewcommand{\thesubsubsection}{\roman{subsubsection}.} %\usepackage{hyperref} %\urlstyle{same} %\hypersetup{ %   colorlinks=true, %   urlcolor=cyan, %   linkcolor=blue, %   citecolor=green, %   filecolor=magenta, %   pdftitle={Sharelatex Example}, %   pdfpagemode=FullScreen, %} \usepackage[toc,page]{appendix}  \begin{document}    ...to be installed \cite{church13,hershkowits97}. \bibliographystyle{apacite} \bibliography{bibliography} \end{document}   Here are the bibliography.bib entries then  @ARTICLE{church13,    author       = {K.H. Church and H. Tsang and R. Rodrigiguez and P. Defembaugh and R. Rumpf},    year         = 2013,    title        = {Printed circuit structures, the evolution of printed circuit boards},    journal      = {Circuit Insight},    volume       = {},    number       = {},    pages        = {},    howpublished = {},     url          = {http://www.808multimedia.com/winnt/kernel.htm}, }  @ARTICLE{hershkowits97,    author       = {N. Hershkowits and R.A. Breun},    year         = {1997},    title        = {Diagnostics for plasma processing (etch plasmas) (invited)},    journal      = {Review of Scientific Instrumentation},    volume       = {68},    number       = {1},    pages        = {880--885},    howpublished = {}, } I am from Nigeria and I'm doing a one year Internship program with The Marriott hotel in Wisconsin, I applied for the UK visitor visa two weeks ago to visit my fiance who lives and work in the UK, but I was refused the visa because the letter of my workplace that I provided was back dated of 2014 which they say they are not satisfy it accurately reflects my current employment circumstance. I also provided my pay slips, but they said they were not satisfied with it demonstrating the terms and conditions of my employment, and they also said I did not present any evidence to satisfy me having sufficiently strong ties and commitments in my country of habitual residence or elsewhere to motivate my timely departure from the UK. They said the documents my fiance presented were OK.  How soon can I re-apply for a UK visa after getting a refusal? How do I change the launcher commands? Buffering GeoJSON file using Python? I'm trying to perform a simple buffer on GeoJSON file using Python script. I am able to do it on a shapefile using Python script and on GeoJSON using QGIS fix distance buffer tool but I can't figure out how to do it on GeoJSON using Python script. I read many posts on it but none of them include working solely on GeoJSON. I also know that it is possible to convert GeoJSON to .shp but I need to work only with GeoJSON files.  My code that works for .shp file:  from osgeo import ogr  ds = ogr.Open(r'C:\vector files\tryyy.shp', 1) in_lyr = ds.GetLayer() out_lyr = ds.CreateLayer('new_buff44',in_lyr.GetSpatialRef(),ogr.wkbPolygon) out_lyr.CreateFields(in_lyr.schema) out_defn = out_lyr.GetLayerDefn() out_feat = ogr.Feature(out_defn) bufferDist = -0.00015075  for in_feat in in_lyr:      geom = in_feat.geometry()     out_feat.SetGeometry(geom)     for in_feat in in_lyr:          geom = in_feat.geometry().Buffer(bufferDist)         out_feat.SetGeometry(geom)         for i in range(in_feat.GetFieldCount()):             value = in_feat.GetField(i)             out_feat.SetField(i, value)         out_lyr.CreateFeature(out_feat)  del ds print "finish"   When I change the file from shp to geojson in the org.Open line I get:      NoneType' object has no attribute 'CreateFields'   I thought that if I read vector file as OGR datasource object then it doesn't matter which format is the original vector file.   Can someone help me understand what I should change so that the code will work on GeoJSON files? Newton's third law of motion states that every action has an equal and opposite reaction. That is the reason we do not sink into the earth, because when our weight exerts a force on the earth it also exerts an equal and opposite force on us.  But when we stand on quicksand or on fluids we can sink in. How is this possible? Does it not exert an equal and opposite force on us? Or are Newton's laws different in the case of fluids and substances of low densities? GPU compute grayed out How to return only the Date from a SQL Server DateTime datatype SELECT GETDATE()   Returns: 2008-09-22 15:24:13.790  I want that date part without the time part: 2008-09-22 00:00:00.000  How can I get that? change color of pgfplot bar plot I want to plot two bar plots next to each other. This works without a problem. However both use the first color defined in a pre or selfdefined colorseries. I tried to modify the color manually in the plot, but the color and fill definitions have no effect:  \documentclass[border=5mm]{standalone} \usepackage{pgfplots, pgfplotstable}  \begin{document}  \pgfplotstableread[header=false, col sep=comma]{  1, first item 5, second item }\datatable  \begin{tikzpicture}   \begin{axis}[             ,xbar     ,bar width=2ex, y=3ex     ,enlarge y limits={abs=0.75}     ,ytick={data} % (\empty,data,{coordinate list})     ,yticklabels from table={\datatable}{1}   ]   \addplot table [     ,red!20!black,fill=red!80!white,     y expr=-\coordindex, % Use negative coordinate index as y coordinate     x index=0 % Use first column as x coordinate   ] {\datatable};   \end{axis} \end{tikzpicture}  \end{document}   The plot is still in the default blue. Computing: $\int_0^1 \sqrt[3]{x\log{\frac{1}x}} \, \mathrm dx$ I'm using post thumbnails to link to a page.  Is it possible to add a class name to the post thumbnail image.  &lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" &gt;&lt;?php the_post_thumbnail(); ?&gt;&lt;/a&gt;&lt;/li&gt; How to highlight whole row and column under cursor in OpenOffice Calc? I need to work with large table. Something like in this illustation image will be helpfull for better orientation:    Is there some settings which makes this possible?