I have XML file like this  &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;     &lt;linearlayout layout_height="match_parent" layout_width="match_parent" orientation="vertical"&gt;   &lt;textview layout_height="wrap_content" layout_width="match_parent" text="Hello XML!"/&gt;   &lt;button layout_height="wrap_content" layout_width="wrap_content" text="Click Me"/&gt; &lt;/linearlayout&gt;   and i want each attribute of element be on it's own line like this  &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;     &lt;linearlayout    layout_height="match_parent"    layout_width="match_parent"    orientation="vertical"&gt;   &lt;textview      layout_height="wrap_content"      layout_width="match_parent"      text="Hello XML!"/&gt;   &lt;button      layout_height="wrap_content"      layout_width="wrap_content"      text="Click Me"/&gt; &lt;/linearlayout&gt;   how can i do this using 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;
Wrapfigure in an enumerate environment. I want to use wrapfigure in the enumerate environment. For example,   \documentclass[11pt, a4paper]{article} \usepackage{graphicx} \usepackage{float} \usepackage{wrapfig}  \begin{document} \normalsize {\bf Multiple Choice: } \begin{enumerate}     \item \begin{wrapfigure}{r}{4.5cm}           \includegraphics[scale=0.5]{Exam1_Fig1.jpg}           \end{wrapfigure}           As shown in the figure. This rock is phaneritic and contains quartz, K-feldspar, and plagioclase in nearly equal amounts. What is it? \\           (A) rhyolite \\           (B) basalt \\           (C) diorite \\           (D) ash-flow tuff \\           (E) granite \\ \end{enumerate} \end{document}   However, the figure inserted is not wrapped by the text, but put in a strange position. How to fix the problem?   Thank you! Suppose $f(x)$ and $g(x)$ are continuous function from $[0,1]\rightarrow [0,1]$, and $f$ is monotone increasing, then how to prove the following inequality: $$\int_{0}^{1}f(g(x))dx\le\int_{0}^{1}f(x)dx+\int_{0}^{1}g(x)dx$$ How can I add a class to a block with code (development) For theming reasons I'd like to add a specific class at the "block" level to some of the blocks I'm generating with a custom module. I know there is a module , but I would rather like to do it directly in code (there is no need to change is afterwards).   I also know of , but that does not seem to allow adding or editing classes.  Is it possible to add a class with to a block from within my module code? I'm using Drupal 7. Table column not align if give color for Table entries My code follows:  \documentclass{book} \usepackage{color,colortbl} \begin{document}  \begin{tabular}{ll&gt;{\color{red}}p{20pc}} a &amp;1 &amp;Test \end{tabular}  \end{document}   The output was:    Some unnecessary vertical space came before the last column. If I remove the tag \color{red} then everything works fine, how can I fix this?  Above said issue was fixed based on the suggestion given by David Carlisle and CarLaTeX, but the same problem was there if I use the supertabular environment, I used supertabular package for auto breaking table and the code follows:  \documentclass{book} \usepackage{color,colortbl,supertabular} \begin{document}  \begin{supertabular}{ll&gt;{\leavevmode\color{red}}p{4pc}&gt;{\leavevmode\color{black}}l&gt;{\leavevmode\color{black}}l&gt;{\leavevmode\color{red}}p{4pc}} a &amp;1 &amp;Test &amp;a &amp;1 &amp;Test\\ a &amp;1 &amp;Test &amp;a &amp;1 &amp;Test\\ \end{supertabular}  \end{document} What can cause an answer to get deleted without information about who actually deleted it? Usually when answer gets deleted directly (i.e. not as side effect of its parent question deleted) it says "deleted by [name here] [time stamp]". Plus, it always leave a revision.  However, I just stumbled over  on Stack Overflow:        Weird, don't you think? Looking in the , nothing strange in there and nothing strange in  as well.  Finally, the last straw... :        Another thought was maybe some automagical conversion to comment, but no such comment exists.  Can anyone shed some light over this phenomenon? Array index out of bound behavior Show $d_{1}(x_{n},x)\rightarrow{0}$ if and only if $d_{2}(x_{n},x)\rightarrow{0}$. Let $X=(0,\infty)$. Define two metrics on $X$ by   $d_{1}(x,y)=|x-y|$ and   $d_{2}(x,y)=|x-y|+|\frac{1}{x}-\frac{1}{y}|$   for all $x, y \in{X}$.   Let $(x_{n})$ be a sequence in $X$ and $x\in{X}$.   Show  $d_{1}(x_{n},x)\rightarrow{0}$ if and only if $d_{2}(x_{n},x)\rightarrow{0}$.  Note: $d_{1}$ and $d_{2}$ are then said to be equivalent metrics on $X$.  Since $d_{1}$ and $d_{2}$ are equivalent metrics, will it be sufficient to show $c*d_{2}(x,y)\leq{d_{1}(x,y)}\leq{C*d_{2}(x,y)}$?  So far I have the following: $d_{1}(x,y)=|x-y|\leq{|x-y|+|\frac{1}{x}-\frac{1}{y}|}=d_{2}(x,y)$. Therefore, $d_{1}(x,y)\leq{C*d_{2}(x,y)}$ where $C=1$. Is there a $c$ that would satisfy the left-hand side of the inequality?  Any help would be appreciated. (this is not homework) Make Javascript do List Comprehension "Contact us"... and then what? Good books on complex numbers I searched on this site but I found posts asking for books on complex analysis which I guess is not what I want.   I want a book on problems concerning with roots of unity, argand plane, exponential form, inequalities etc. Some examples : , , .  I don't think these types of problems are covered in a analysis book but I don't know. I think I want a book on algebra of complex numbers.   Are these topics covered in analysis book ? If not, please suggests some books on this topic. I guess my question is bit vague, sorry for that. :).      As suggested in the comments I would like to have books similar to . I'm working on a custom report (Visual Force) to generate specific charts(using apex:radar chart) to our client. The problem is that we have to export the information to PDF format. Using the technique of include "renderAs" property on APEX tag, the PDF is generated but the chart isn't included on the PDF and the apex tags, used to show detailed information in a table, seem to be unconfigured. Have anyone ever faced this kind of problem?     Thank you! Prove that $\bigcap_{k = 1}^\infty C_k$ is also compact and connected. Let $X$ be a Hausdorff space and let $C_0 \supset C_1 \supset ...$ be a decreasing sequence of compact connected subsets of $X$.  Prove that $\bigcap_{k = 1}^\infty C_k$ is also compact and connected.  I have the compact part.  Just don't know how to show it is connected. How do I convert a light circuit with a single pole switch to use two 3-way switches? I have a box in the hall which includes a 3-way switch (with another switch at the other end of the hall), a single pole switch to the garage lights and a single pole switch to the exterior lights on the garage.  The single pole switch to the garage is wired with a 3 wire plus ground. The white and black wires feed the garage lights from the switch and the red wire feeds the garage ceiling outlets and is hot all the time.  In the garage I would like to add a 3-way switch for the garage lights and another 3-way switch for the exterior garage lights.  In other words I would like to be able to turn on both of those light locations from both the inside hall and the garage as well. I know that I will of course have to replace the existing single pole switches in the hall with 3-way switches and add a junction box in the garage with 2 3-way switches in it.  The thing that I don't know is what wiring connections I need to make.  Can you help? Output the common lines (similarities) of two text files (the opposite of diff)? Diff is a great tool to display the changes between two files. But how to display the similarities of two text files (while ignoring the differences)?  I.e. sample input:  a: Foo Bar X Hello World 42  b: Foo Baz Hello World 23   Pseudo output (something like this):  @@ 2,3 =Hello World   Just sorting both files and using comm is not enough, because in that case the line information is lost. How to calculate $\lim_{x\to 1^+} \log (x)^{\log(x)}$? How to calculate $\lim_{x\to 1^+} \log (x)^{\log(x)}$ ? i know that its "1", but why? How can i calculate this?  Thank you very very much =) \begin{eqnarray*} M&amp;=&amp; \max{\left \{a,b,\frac{a+b}{2},\right}\\ &amp;&amp; a+b,a+b/2\Bigg\} \end{eqnarray*} pfsense more than 2 isp provider is it possible to bridge more than 2 isp provider using pfsense? what router or device can bridge 2 or more isp providers in a router? i am planning to bridge at lease 5 isp providers to create a very good internet connection, what can i do to link all 5 providers in 1 router? Identifying genes from a list of genes I have a gene list file. Some thing like this      SWT21     SSA1     NRP1     EFB1     TFC3     MDM10   I have another file which also contains the names of these genes in my list along with other essential information about them. The second file looks like this:  chrI    147593  151166  YAL001C -   TFC3 chrI    143706  147531  YAL002W +   VPS8 chrI    142173  143160  YAL003W +   EFB1 chrI    140759  141407  YAL004W +   YAL004W chrI    139502  141431  YAL005C -   SSA1 chrI    137697  138345  YAL007C -   ERP2 chrI    136913  137510  YAL008W +   FUN14 chrI    135853  136633  YAL009W +   SPO7 chrI    134183  135665  YAL010C -   MDM10   I want to extract those lines in the 2nd file which have gene names as are present in first file. A lot of textbooks and exam boards claim that light incident at exactly the critical angle is transmitted along the media boundary (i.e. at right-angles to the normal), but this seems to violate the principle of reversibility in classical physics.  How would a photon or ray travelling in the reverse direction "know" when to enter the higher refracting medium?  It can't know, so I conclude that such light is simply reflected?  Is this correct? Can we get an indication comments are hidden between the comments?