T_STRING error even when I don't have any PHP code, just the open close PHP markings
PHP error in .xml file?
How to pretty print XML from Java? I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this?  String unformattedXml = "&lt;tag&gt;&lt;nested&gt;hello&lt;/nested&gt;&lt;/tag&gt;"; String formattedXml = new [UnknownClass]().format(unformattedXml);   Note: My input is a String. My output is a String.   (Basic) mock result:    &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;root&gt;   &lt;tag&gt;     &lt;nested&gt;hello&lt;/nested&gt;   &lt;/tag&gt; &lt;/root&gt; Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that:   wrong crontab notation permissions problem environment variables   This community wiki aims to aggregate the top reasons for crontab scripts not being executed as expected. Write each reason in a separate answer.  Please include one reason per answer - details about why it's not executed - and fix(es) for that one reason.  Please write only cron-specific issues, e.g. commands that execute as expected from the shell but execute erroneously by cron. Get string after character How can edge rings be selected in a predictable way? When trying to select multiple edge-rings Shift-Alt-RMB sometimes loops get selected in the one (green) way or the other (red) way.  I couldn't derive a general rule.   How can two or more face-rings following one direction be selected ?  (Easy to reproduce with a default torus mesh.) finding the index of a max value in R Is there a way to find review articles by the keyword? When I search for papers using some keywords in academic databases (like Google Scholar), there are lots of papers, but I would like to read literature reviews first because I’m new in that area. (By literature reviews, I mean article-length papers that analyze existing work on a specific topic.)  So I think it would be helpful for me if there were a way to find literature reviews using the keyword or using the paper’s title. I want to categorize papers I’ve found by its document type (research, survey, review, etc).  What I've tried is using a specific academic database (ScienceDirect), which provides an advanced search, in which one can filter the paper by its type (original research article, review article, short survey, etc) – but I feel some limitations of this method. I think I can also do this by adding the word review to my keywords for searching or by reading a paper’s abstract, number of references and guessing whether it is review article or not.  Is there a more efficient way to find review articles by the keyword?  (My research area is computer science.)  UPDATE  "feel some limitations" in my post, I'm not sure but it seems that ScienceDirect only searches for literatures that belongs to ElseVier company. I think It doesn't cover the journal articles well, comparing to e.g) Google Scholar so I said I feel some limitations of it How to process a multi column text file to get another multi column text file? I have a text file:  a   aa  aaa     b   bb  bbb     c   cc  ccc d   dd  ddd     e   ee  eee     f   ff  fff g   gg  ggg     h   hh  hhh     i   ii  iii j   jj  jjj   How can I process it and get a 2 column file like this:  a   aa aaa b bb  bbb c   cc ccc d dd  ddd e   ee eee f ff  fff g   gg ggg h hh  hhh i   ii iii j jj  jjj   Or a three column file like this:  a   aa  aaa b   bb  bbb c   cc  ccc d   dd  ddd e   ee  eee f   ff  fff g   gg  ggg h   hh  hhh i   ii  iii j   jj  jj   I prefer to get awk solution but other solutions are welcomed too. What are good out of the box alternative geocoding solutions to Esri's services? Esri's  will retire at the end of the year, what are good GIS services that can replace the North American and US Streets geocoders?  I have totally excluded Esri's replacement, the  as it is a subscription service. How to use Parameterized MessageFormat with non-Value attributes of JSF components I'm using IEEEtran to format an article, and I wanted to include an image. I included the graphicx and hyperref packages, and used the following code, like normal, to include an image.  \begin{figure}[!t] \centering \includegraphics[width=3in]{fetch} \caption{Pipeline: Fetch Instruction} \label{fig:fetch} \end{figure}   What appears, however, is this:    Fetch.png is a file in the directory, and if I remove it, pdflatex errors instead of producing an output. I'm using MiKTeX 2.9 on Windows 7. Any ideas? Make a fake random distribution? Sometimes a "real" random event seems unfair and makes players frustrated. For instance a enemy has probability of 20% to cause double damage("critical hit"). Thus he could make 4 critical hits in a row with 1/725 probability. It's not as small as it sounds.  I hope the probability could be adjusted after each hit. If the player just got a critical hit, the probability decreases for the next hit. Otherwise it increases.  Is there a mathematical model for this behaviour? How does "proof of effort" make a question better? It seems like many questions by new users are downvoted immediately.  Sometimes there is a comment to the tune of "lacks research", "we're not here to do your homework", or "show us some effort".  Now I wonder, what does it matter how much work someone has done before posting?  If someone can ask a good question in 5 seconds, more power to them.  To illustrate this point, look at how you could "improve" a question to include proof of effort.  You could put in 5 failed code snippets and their in- and output.  This would make for very long questions with a high noise ratio.  Another suggestion is to add "research".  By "research", I suppose most programmers mean "Google".  So this is basically a suggestion to add a list of fruitless Google queries.  That doesn't sound interesting either.  How can "proof of effort" turn a bad question into a good one? What is the difference between lands and mana? What is the relationship between lands and mana in Magic and what do each of them do?  A good answer should especially include how a new player should think about them.    Note:  This is an attempt to create a canonical question about the relationship between lands and mana in Magic.  Beginners are often confused about this given the same symbols are used to mean different things across basic lands, non-basic lands, and mana costs.  This can lead to confusion about , about , or even about . Compute $P(Y<3X)$ using joint PDF I'm given a joint pdf  $f_{X,Y}(x,y)=2e^{-x-y}, 0&lt;x&lt;y, 0&lt;y $  and asked to compute $P(Y&lt;3X)$. To do this, I let $Y=3X$ (the boundary) and found that the region of integration is under this line.  To find $P(Y&lt;3X)$, it seems to me that the integral for this region be written as   $P(Y&lt;3X)=\int_0^\infty \int_0^{3x} 2e^{-x-y} dy dx  $  However this isn't right, as the boundaries are actually   $P(Y&lt;3X)=\int_0^\infty \int_x^{3x} 2e^{-x-y} dy dx  $  Why is this? I'm having a hard time seeing how to construct these boundaries (especially the fact that the $y$ boundary goes from $x$ to $3x$ instead of $0$ to $3x$)  Thank you. When changing fields, should I focus more on describing past research or connecting it to the new area in my statement of purpose? I want to change my field from molecular biophysics to theoretical ecology. While they are basically required some same basic background (physics, math, programming), the rest is quite irrelevant. In my current draft of this part, about a half is about this the problem and the result of the work, another half is for my contribution and what I've learnt. Having said that, should I focus less on describing the work and leave space for the thing that will be useful for the next research?  Below is copy from .     What have you already done? What problems have you solved, or at least worked on? What independent projects have you been part of? What were your key contributions? What did you learn? What did you teach the world? How do your results compare to what was already known? What original ideas are you most proud of? Be specific, technical, credible, and confident (but not arrogant). Refer the reader to your web page for more details. Have a web page with more details: preprints, project reports, source code, videos, etc. jQuery Validate Plugin - How to create a simple custom rule? Should the number "0" be pronounced "zero" or "oh"? Calculate the sum of the infinite series $\sum_{n=0}^{\infty} \frac{n}{4^n}$ A previous problem had us solving $\sum_{n=0}^{\infty} \frac{1}{4^n}$ which I calculated to be $\frac{4}{3}$ using a bit of mathematical manipulation.   Wonderful. Thank you for all the prompt responses.  Could anyone suggest an alternate technique that does not involve differentiation? How to perform case-insensitive sorting in JavaScript? Word that means "the opposite of what you would expect" I'm looking for a word that means the opposite of what one would expect. This word might be used to express the surprise that a teenager's grandmother uses text messaging much more than he does, or that a city seems brighter at night than it does during the day.   I'm not seeking the word ironic or irony which refer to the use of something to describe its opposite experience or emotion.