i need to pass this id  &lt;a href=&quot;edit.php?id=&lt;?php echo $row['user_id']; ?&gt;&quot;&gt;  in here &lt;?php if (isset($_POST['id'])) {      $id = $_POST['id'];  } else {      echo &quot;user not find&quot;;      die();  }   its echo &quot;user not find&quot;. why?
What's the difference when using GET or POST method? Which one is more secure? What are (dis)advantages of each of them?  ()
Test if a website is alive from a C# application I am looking for the best way to test if a website is alive from a C# application. Background My application consists of a Winforms UI, a backend WCF service and a website to publish content to the UI and other consumers. To prevent the situation where the UI starts up and fails to work properly because of a missing WCF service or website being down I have added an app startup check to ensure that all everything is alive. The application is being written in C#, .NET 3.5, Visual Studio 2008 Current Solution Currently I am making a web request to a test page on the website that will inturn test the web site and then display a result. WebRequest request = WebRequest.Create(&quot;http://localhost/myContentSite/test.aspx&quot;); WebResponse response = request.GetResponse();  I am assuming that if there are no exceptions thown during this call then all is well and the UI can start. Question Is this the simplest, right way or is there some other sneaky call that I don't know about in C# or a better way to do it. What is the best way to find the users home directory in Java? The difficulty is that it should be cross platform. Windows 2000, XP, Vista, OSX, Linux, other unix variants. I am looking for a snippet of code that can accomplish this for all platforms, and a way to detect the platform.  Now, you should be aware of  that user.home does not work correctly, so please do not provide me of textbook answers, I can find these myself in the manuals. How do I determine if an array is initialized in VB6? Passing an undimensioned array to the VB6's Ubound function will cause an error, so I want to check if it has been dimensioned yet before attempting to check its upper bound.  How do I do this? I'm looking for some way to run a batch file (.bat) without anything visible to the user (no window, no taskbar name, .etc..).  I don't want to use some program to do that, I'm looking for something cleaner. I've found  that uses VBScript, but I don't really like using VBS, either. I would like to search my table having a column of first names and a column of last names.  I currently accept a search term from a field and compare it against both columns, one at a time with       select * from table where first_name like '%$search_term%' or      last_name like '%$search_term%';   This works fine with single word search terms but the result set includes everyone with the name "Larry". But if someone enters a first name then a space, then a last name, I want a narrower search result. I've tried the following without success.         select * from table where first_name like '%$search_term%' or last_name      like '%$search_term%' or concat_ws(' ',first_name,last_name)      like '%$search_term%';   Any advice?  EDIT:  The name I'm testing with is "Larry Smith".  The db stores "Larry" in the "first_name" column, and "Smith" in the "last_name" column.  The data is clean, no extra spaces and the search term is trimmed left and right.  EDIT 2:  I tried Robert Gamble's answer out this morning.  His is very similar to what I was running last night.  I can't explain it, but this morning it works.  The only difference I can think of is that last night I ran the concat function as the third "or" segment of my search query (after looking through first_name and last_name). This morning I ran it as the last segment after looking through the above as well as addresses and business names.    Does running a mysql function at the end of a query work better than in the middle? Accessing a property of derived class from the base class in C# When should \cdot be used to indicate multiplication? Is this purely personal style, or are the generally accepted guidelines? Clearly, when dealing with numbers either $2 \cdot 2$ or $2 \times 2$ is needed, but within formulae where an absence of an operator implies multiplication, when should a \cdot be used? I tend to use it only sparingly if it aids in grouping. (Of course, barring the cases where it's required, e.g. a dot product.) The standard files/tools that report memory seem to have different formats on different Linux distributions. For example, on Arch and Ubuntu.   Arch  $ free               total        used        free      shared  buff/cache   available Mem:        8169312     3870392     2648348       97884     1650572     4110336 Swap:      16777212      389588    16387624   $ head /proc/meminfo  MemTotal:        8169312 kB MemFree:         2625668 kB MemAvailable:    4088520 kB Buffers:          239688 kB Cached:          1224520 kB SwapCached:        17452 kB Active:          4074548 kB Inactive:        1035716 kB Active(anon):    3247948 kB Inactive(anon):   497684 kB  Ubuntu  $ free              total       used       free     shared    buffers     cached Mem:      80642828   69076080   11566748    3063796     150688   58358264 -/+ buffers/cache:   10567128   70075700 Swap:     20971516    5828472   15143044   $ head /proc/meminfo  MemTotal:       80642828 kB MemFree:        11565936 kB Buffers:          150688 kB Cached:         58358264 kB SwapCached:      2173912 kB Active:         27305364 kB Inactive:       40004480 kB Active(anon):    7584320 kB Inactive(anon):  4280400 kB Active(file):   19721044 kB    So, how can I portably (across Linux distros only) and reliably get the amount of memory—excluding swap—that is available for my software to use at a particular time? Presumably that's what's shown as "available" and "MemAvailable" in the output of free and cat /proc/meminfo in Arch but how do I get the same in Ubuntu or another distribution? I am drawing some graphs with tangents. I calculated the tangent should be centered at x=57/27 which is approximately x=2.11. I'm currently using the pos and sloped keys for nodes to draw tangents, but I'm not happy about the result; the tangents don't really align.   I think this is because the pos key calculates the actual length of the graph while the graphs don't have the same length.  I'm sure I can somehow let LaTeX do the calculations for me so as to align the slopes vertically at an x value of my choice. But how?  PS: The below document requires a working installation of gnuplot to compile.    \documentclass{standalone}   \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{arrows, decorations.markings,intersections}  \makeatletter \tikzset{     nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,      my axis/.style={         postaction={             decoration={                 markings,                 mark=at position 1 with {                     \arrow[ultra thick]{latex}                 }             },             decorate,             nomorepostaction         },         thin,         -,         every path/.append style=my axis     } } \makeatother  \definecolor{headtitle}{RGB}{167,63,63}  \begin{document} \begin{tikzpicture}   \begin{axis}[%       axis line style={my axis},       xlabel = $U_A$,       ylabel = $S$,       xmin = 0, xmax = 3.25,       ymin = 0,       xtick={1,1.5},       xticklabels={$U_{B,\mathrm{initial}}$,$U_{A,\mathrm{initial}}$},       xticklabel style={             inner sep=0pt,             anchor=north east,             rotate=35         },       ytick=\empty,       height=.66\linewidth, width=\linewidth-4.5\tabcolsep,       axis lines*=left,       every axis y label/.style={at=(current axis.above origin),anchor=east},       every axis x label/.style={at=(current axis.right of origin),anchor=west}]%     \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(3*(3-x)+1);       } node[sloped,above,pos=.63333,       minimum height=1cm,minimum width=1cm] (SB) {} node[pos=0.6,pin=45:{\color{black}{$S_B$}}] {};      \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1);       } node[sloped,above,pos=.83333,       minimum height=1cm,minimum width=1cm] (SA) {} node[pos=0.25,pin=-15:{\color{black}{$S_A$}}] {};       \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1)+log(3*(3-x)+1);       } node[sloped,above,pos=.775,       minimum height=1cm,minimum width=1cm] (St) {} node[pos=0.525,pin=165:{\color{black}{$S_\mathrm{total}$}}] {};      \path (SB.south east) edge[headtitle,very thick] node {} (SB.south west);      \path (SA.south east) edge[headtitle,very thick] node {} (SA.south west);      \path (St.south east) edge[headtitle,very thick] node {} (St.south west);   \end{axis}% \end{tikzpicture}% \end{document} Atomic clocks were used in Hafele and Keatings experiment which supposedly helped to prove time dilation.    How can we be sure other forces didn't act upon the clocks as a result of their being at different speeds and elevations? Perhaps the elapsed time may have been the same for all and only appeared different as a result of the clock's atoms behaving differently in different environments.  How might the presence of dark matter (presumably all over the place) impacted the clocks if say the dark matter is stationary relative to the earth's rotation?  What experiments have been done to test the constancy of clocks at different speeds and elevations? In the Unity3D game engine, a common code sequence for getting remote data is this:  WWW www = new WWW("http://remote.com/data/location/with/texture.png"); yield return www;   What is the underlying mechanism here?  I know we use the yield mechanism in order to allow the next frame to be processed, while the download is being completed. But what is going on under the hood when we do the yield return www ?   What method is being called (if any, on the WWW class)? Is Unity using threads? Is the "upper" Unity layer getting hold of www instance and doing something?  EDIT:   This question is specifically about Unity3D internals. I'm not interested in explanations of how yield statement works in C#. Instead, I'm looking for an inside view of how Unity deals with these constructions, to allow, for example, to WWW to download a piece of data in a distributed manner across several frames. Google Chrome can't play some flash videos Some flash videos won't play in Chrome, while they play perfectly in other browsers. The player will load, but instead of showing a preview of the video and a play button on the middle of the video, the screen is black:    Here's an example of a  and here is a . The video that works is a Youtube video embedded on the site with , while the nonworking one is probably hosted by the website itself. In both cases it is using Flash. The site is popular and others don't seem to be experiencing this problem.  I am running Win7 64bit and I have no ad blockers installed.  I have found two common solutions to this problem, neither of which work:  Solution #1: .  Solution #2: .  Any suggestions? How well does T-Mobile's (US) Simple Choice plan work when in Europe? Let $C_*$ be a chain complex such that each $C_i$ is a torsion-free, finite-range abelian group with $C_i=0$ for all $i&lt;0$. Suppose that $C_i=0$ for all $i$ is large enough. The Euler characteristic of $C_*$ chain complex is defined as $$\chi(C_*)=\sum_{i\geq 0}(-1)^iRank(C_i)$$ Prove that $$\chi(C_*)=\sum_{i\geq 0}(-1)^iRank(H_i(C_*))$$  I have to prove that $\sum_{i\geq 0}(-1)^iRank(C_i)=\sum_{i\geq 0}(-1)^iRank(H_i(C_*))$, I think that one way to do this is by showing that $Rank(C_i)=Rank(H_i(C_*))$ but I do not know if this is true in general, in a nutshell, I want to show that the cardinality of the base of any $C_i$ is the same as the cardinality of the basis of the corresponding homology, how can I do this? Thank you How can I reduce the gap between the subfloat and its caption? I tried to use   \captionsetup[subfigure]{aboveskip=0pt}    but it doesnt work for me. Below is the snippet i have and the output  \begin{figure} \captionsetup[subfigure]{labelformat=empty} \captionsetup[subfigure]{aboveskip=0pt}     \centering     \subfloat[Ground Truth]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[Recurrent Neural Network]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}         \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-1-vrnn.png} }}     \\ \vspace{-0.5\baselineskip} \noindent\rule{14cm}{0.4pt}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-gt.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-rnn.png} }}     \\ \vspace{-1\baselineskip}     \subfloat[]{{\includegraphics[width=\textwidth]{ood-ms/ood-3-vrnn.png} }}     \\ \vspace{-1\baselineskip}     \caption{}     \label{fig:ms} \end{figure}   Here is the output I just got a short algorithm on my page, and it keeps getting aligned at the center of the page. But I want to have it aligned at the top, what do I have to do? Managing multiple asynchronous NSURLConnection connections Is there any way to keep the URLs in the same form they are saved within the .bib files when using biblatex-chicago with Biber? For instance, the entry  @misc{RussianEmpire.1855,  author = {Russian Empire},  year = {1855},  title = {Treaty of Shimoda},  url = {https://ru.wikisource.org/wiki/Симодский_договор_с_Японией_(1855)}, }   results in the following output:    While there certain are benefits to converting the link itself, this sort of output in the footnote makes it both ugly and difficult to re-enter the link when reading a printed copy. How would one proceed about to receive the output along the lines of ""?  Minimal working example:  %!TEX program = xelatex \documentclass{article}  \usepackage{fontspec} \usepackage[russian,british]{babel} \newfontfamily\russianfont[Script=Cyrillic]{CMU Serif}  \usepackage[CJK, Cyrillics]{ucharclasses} \setTransitionsForCyrillics{\russianfont}{} \usepackage{csquotes} \usepackage[labeldate,backend=biber]{biblatex-chicago} \addbibresource{bibliography.bib} \usepackage[unicode,hidelinks]{hyperref}  \begin{filecontents}{bibliography.bib} @misc{RussianEmpire.1855,  author = {Russian Empire},  year = {1855},  title = {Treaty of Shimoda},  url = {https://ru.wikisource.org/wiki/Симодский_договор_с_Японией_(1855)}, } \end{filecontents}  \begin{document}  Cyrillics support test: Тест\\  \cite{RussianEmpire.1855}  \end{document}   Output: How do I change the hostname without a restart? I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this? Who owns the copyright to S[OFU] content? What with  today, possibly this is a good time to ask: who actually owns the copyright to questions, answers and comments submitted to StackOverflow and relatives?  Over in , we have the OP reaching the conclusion that SO owns the copyright and is licensing it under CC-Attribution-Sharealike, with no apparent confirmation or denial from staff, and in  we have a moderator asserting that Jeff owns the copyright to SO content.  As I note in a comment on the latter, though (which was met with deafening silence), I'm failing to find any evidence that this is the case.  I've looked for any kind of terms of service I may have agreed to indicating that I am signing over ownership of my words when I hit submit, and I can't find one.  Certainly the fact that I'm agreeing to CC-Attribution-Sharealike licensing is clear enough, but it seems to me as if I am retaining copyright while agreeing to those licensing terms, and S[OFU] is using what I have written under that license.  What's the deal?  Did I forget about something that I agreed to in the signup process (and if so, why can't I find it afterward)?  Do the owners and administrators of S[OFU] believe that they own copyright to the UGC?  Just what is going on here?  Edit as to why this matters (from answer comment thread): If I retain copyright, I can also choose to license the original content to other parties under other terms (such as using a zero-requirements license, using an attribution-required license without sharealike, etc). If SO has the copyright, I can't.