Syntax error in PHP PDO SQL
How can I prevent SQL injection in PHP?
So what does Cyanogen Inc shutting down mean for CyanogenMod and similar ROMs? So Cyanogen Inc (cyngn), known for their support for their support for CyanogenMod and their efforts to integrate Cyanogen OS into devices such as the OnePlus One, Alcatel POP Mirage, and . Cyanogen Inc just recently .  What does this mean for CyanogenMod, Cyanogen OS, and the devices which originally shipped with Cyanogen OS? Will they no longer receive OTA updates? Draw integers independently & uniformly at random from 1 to $N$ using fair d6? I wish to draw integers from 1 to some specific $N$ by rolling some number of fair six-sided dice (d6). A good answer will explain why its method produces uniform and independent integers.  As an illustrative example, it would be helpful to explain how a solution works for the case of $N=150$.  Furthermore, I wish for the procedure to be as efficient as possible: roll the least number of d6 on average for each number generated.  Conversions from  to decimal are permissible.    . Display Blank when Referencing Blank Cell in Excel 2010 I have an Excel 2010 workbook that contains a number of individual worksheets. The cells on one of the sheets are linked to individual cells on two other worksheets in the same workbook.  I'm using a direct cell reference that essentially says that whatever value is entered into a particular cell on one sheet also populates cells on two other sheets.  I used the (=) function with the cell reference to accomplish this.  The issue I'm running into is that, even when the primary cell is left blank, the cells that populate from that primary cell will display 0, rather than remaining blank themselves.  I want the subordinate cells to remain blank if the primary cell they're linked to is blank. In SQL Server, how do I generate a CREATE TABLE statement for a given table? I've spent a good amount of time coming up with solution to this problem, so in the spirit of , I'm posting it here, since I think it might be useful to others.   If anyone has a better script, or anything to add, please post it.  Edit: Yes guys, I know how to do it in Management Studio - but I needed to be able to do it from within another application. How to mount PCIe SSD from MacBook Air in another computer I got this SSD out of an Apple laptop that's broken from liquid damage.  What is this connection called and how do I mount this storage device to retrieve data from it? It looks like PCIe. Does Apple sell a part to mount this via USB adapter or something? How to check for empty xml files when parsing through multiple xml files Natural Sort in MySQL I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page? Does Java have buffer overflows? Does Java have buffer overflows? If yes can you give me scenarios? I have a txt file which actually is a html source of some webpage. Inside that txt file there are various strings preceded by a "title=" tag.  e.g.   &lt;div id='UWTDivDomains_5_6_2_2'  title='Connectivity Framework'&gt;    I am interested in getting the text Connectivity Framework to be extraced and written to a separate file.  Like this, there are many such tags each having a different text after the title='some text here which i need to extract '  I want to extract all such instances of the text from the html source/txt file and write to a separate txt file. The text can contain lower case, upper case letters and number only. The length of each text string(in characters) will vary.  I am using PowerGrep for windows. Powergrep allows me to search a text file with regular expression inout. I tried using the search as        title='[a-zA-Z0-9]  It shows the correct matches, but it matches only first character of the string and writes only the first character of the text string matched to the second txt file, not all string.   I want all string to be matched and written to the second file.  What is the correct regular expression or way to do what i want to do, using powergrep?  -AD. A clock in freefall Time dilation  using Schwarzschild metric for a non rotating spherical body is: $$t_0=t_f\sqrt{1-\frac{2GM}{rc^2}}$$  For such a non rotating spherical body, what would the time dilation of a clock in vacuum free-falling from infinity be?  (If the answer is non-trivial; a high level outline of the calculation would suffice / be appreciated)  Edit: I am currently working on an iOS app that is trying to model the mechanism underpinning relativity.  So, far the mechanism that I have created is shockingly simple and shockingly good at conforming to Relativity.  However, I am trying to break it.  I am trying to find any possible areas where the two may diverge.  I have noted that using my model a clock in freefall will experience no time dilation, i.e. $t_0=t_f$ and I want to make sure Relativity agrees.  I have noted the gravitational component of time dilation above.  Since my clock is moving one might also expect a kinematic time dilation.  I can calculate the velocity of my clock: $$E_k=\frac{1}{2}mv^2$$ $$E_p=\frac{-GMm}{r}$$ $$v=\sqrt{\frac{2GM}{r}}$$ Plugging this velocity into the kinematic time dilation equation: $$\Delta t'=\frac{\Delta t}{\sqrt{1-\frac{v^2}{c^2}}}$$ $$\Delta t'=\frac{\Delta t}{\sqrt{1-\frac{2GM}{rc^2}}}$$  At this point one might make the observation that the kinematic dilation is the inverse of the gravitational dilation and therefore conclude that: $$t_0=t_f$$ I want to collect the most common mistakes, misconceptions, pitfalls, etc that (La)TeX and Friends users make. Please one answer for each mistake, misconception, pitfall, etc.  I am only interested in more technical, objective cases rather than psychological, social, subjective cases.  From this complete infinite list of technical and objective cases, we can have a reference how  to teach newbies much better directly or indirectly via writing a good book.  The technical and object cases are, for example, as follows.   Beginners sometimes use $\huge E=mc^2$ with the hope they will get a huge formula. It actually does not produce the expected result. The correct way is \huge $E=mc^2$. Beginner sometimes use longtable inside table because they assume longtable is the longer version of tabular which is able to be sandwiched in table. etc. Failed to fetch jessie backports repository I'm using a docker image as a base for my own development that adds the jessie backports repository in its Dockerfile and uses that to install a dependency. This image uses the following command to add the repository:  echo "deb http://ftp.debian.org/debian jessie-backports main" &gt;&gt; /etc/apt/sources.list   The problem is that fetching packages from the backports repository now  fails with the following error (this used to work previously):  W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404  Not Found  W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found   I looked on that server, and those paths are indeed not present there.  I tried to figure out on the Debian backports site whether this particular repository should still be available, and I didn't find any indication that this was deprecated or something like that.  Is this a temporary issue with the repository, or is the jessie-backports repository not available anymore? And if this is not a temporary issue, what options do I have to use this or an equivalent repository without upgrading to the newer Debian stable version? The difference between an analogy and a metaphor? Many a time I've asked what the difference is between an analogy and a metaphor. I've asked it to my teacher, on internet sites, to my parents, so on and so forth. I got a different answer every time, and I never fully grasped what the difference is, so what is the difference? Suppose I am given a $2$x$2$ matrix $A=$ \begin{pmatrix} a &amp; b \\ c &amp; d \end{pmatrix}  And an initial vector $x_n$ = \begin{pmatrix} x_0 \\ y_0\end{pmatrix}.  Under repeated iteration $x_{n+1} = Ax_n$, we find that $x_{n+1}$ converges to a line in the direction of the $eigenvector$  of $A$ of the form $X$= $[u,mu]$ where $m$ is the slope of the line.  I know that this process somehow also involves the largest $eigenvalue, \lambda,$ of $A$, though I am unsure how it connects.  My question is: How does the largest eigenvalue connect to this repeated iteration, how do I find the slope of the line of convergence $m$, and what is meant by the "direction of the eigenvector"? wp_customize_image_control default value Recommended way to save uploaded files in a servlet application Prove that for any prime p, there is a complete set of mod p residues {q1, . . . , qp}, where each qi is prime. I used the theorem {a, a+n, a+ 2n, . . .} contains infinitely many primes if gcd(a, n) = 1 but haven't got much progress. Any comment will be helpful! Unitarily evolving a separable state into an entangled one The line numbers for the text of a paragraph with an equation defined by \begin{align} command do not show as expected. How to fix this?    The LaTeX codes are attached here.   \documentclass[a4paper, 12pt]{article} \usepackage[utf8]{inputenc}    % Use the UTF-8 encoding \usepackage{amsmath}           % For the use of math \usepackage{amsfonts} \usepackage{amssymb}           % For the use of AMS symbols \usepackage{indentfirst}       % For indentation \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}  \usepackage{lineno} \linenumbers  \usepackage{titlesec} \titleformat*{\section}{\large\bfseries} \titleformat*{\subsection}{\normalsize\bfseries} \titleformat*{\subsubsection}{\normalsize}   \renewcommand{\baselinestretch}{1.5}    \usepackage{authblk}           % Use author package \renewcommand*{\Authfont}{\large} \renewcommand*{\Affilfont}{\normalsize\normalfont}  \makeatletter \g@addto@macro\normalsize{%   \setlength\abovedisplayskip{0pt}   \setlength\belowdisplayskip{0pt}   \setlength\abovedisplayshortskip{0pt}   \setlength\belowdisplayshortskip{0pt} } \makeatother  \title{\textbf{Globally cumstomize the spacing between the text and equation}}    \date{}  \begin{document}  \maketitle  \section{Air filter} The air filter is simulated by the Control Valve module (AFT in Fig. 2(a)). The pressure drop through the air filter ($ \Delta P_{af} $) is given by the following equation [11,16]. \begin{align} \Delta P = \Delta P_{d} \left( \frac{m}{m_{d}}\right)^{1.84}  \left( \frac{T}{T_{d}}\right)  \left( \frac{P}{P_{d}}\right)^{-1}  \end{align} where, $ \Delta P_{af} $ is the pressure drop, $ m $ is the mass flow rate, $ T $ is the temperature, and $ P $ is the pressure, and subscript $ d $ denotes the design condition.  \newpage \section{Air compressor (AC)} The AC operating characteristics can be described by its performance map, which relates the following dimensionless operational variables. The AC operating characteristics can be described by its performance map, which relates the following dimensionless operational variables. \begin{align} &amp; \text{Relative pressure ratio:} &amp;&amp; PR_{r} = \frac{PR-1}{PR_{d}-1}\\ &amp; \text{Relative isentropic efficiency:} &amp;&amp; \eta_{r} = \frac{\eta}{\eta_{d}} \\ &amp; \text{Relative corrected mass flow:} &amp;&amp; m_{cor,r} = \frac{\left(\frac{m_{in}}{P_{in}}\sqrt{T_{in}}\right)}{\left(\frac{m_{in,d}}{P_{in,d}}\sqrt{T_{in,d}}\right)} \\ &amp; \text{Relative corrected speed:} &amp;&amp; N_{cor,r} = \frac{\left(\frac{N}{\sqrt{T_{in}}}\right)}{\left(\frac{N_{d}}{\sqrt{T_{in,d}}}\right)} \end{align} where, $ \eta $ is the efficiency, $ N $ is the shaft speed, and $ PR = P_{in}/P_{out} $. Subscript $ cor $ denotes the corrected value, $ r $ denotes the relative value, $ in $ denotes the inlet, and $ out $ denotes the outlet.  \end{document}