str_replace() to create self-closing tag DOMElement();
Why doesn't PHP DOM include slash on self closing tags?
I'm at a loss with “Dungeons and Dragons.” How does one play it, anyway? I'm no gamer at all, so this could be like a very silly, basic question for you guys. The thing is that I always read about "Dungeons and Dragons" game (not the video game, but the normal game to play with friends that are actually gathered together). And I would like to know how to play it.  I've read that it is a book (or several ones, which is more confusing for me to understand), but I've read somewhere that it can be played as a normal "table" game, with a board, and pieces, and somewhat weird dice (or sets of dice).  Is it like a normal game, where you pull the stuff out of a box and start to play?  I don't know if any of you watch the show "The Big Bang Theory", but I think they have played the game in a recent episode, and it looks just like a regular game.  I've Googled it for more information, but I haven't found anything as basic as I need, because I've never played a role game (except in a video game).  I just want to learn how to play, so I can get my friends into it to play it each time we get together. JavaScript equivalent to printf/String.Format I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET).  My basic requirement is a thousand separator format for numbers for now, but something that handles lots of combinations (including dates) would be good.  I realize Microsoft's  library provides a version of String.Format(), but we don't want the entire overhead of that framework. is there a way to get the option "Organize Desktop by Name" in Ubuntu 19.10 same as in 18.04? the option in Ubuntu 18.04 is "Organize Desktop by name"    But there is no option available in Ubuntu 19.10 I dual booted ubuntu 11.04/11.10 a while ago with a USB stick and i want to uninstall it.   I would like to completely uninstall the old version and get 12.04.  I have a 64 bit laptop. Please help! I normally dual-boot with 12.04 and Win XP pro sp3 on a Thinkpad R60.  I needed to reinstall windows because of problems piling up, so I ran the computer's built-in hard-disk recovery software.  I told it not to mess with the other partitions, but somehow it deleted the Linux partition.  That's what I was using to backup all of my windows files, so now everything I have is gone.  I just ran the USB setup with linux, and the partition is deleted - it just shows it as empty space.    Is there ANY way to get all of my files back? If refraction slows down light, isn't it possible to hold light still? I have a quick question about the refraction of light, and I'm sorry if it seems a bit simplistic or even stupid, but I'm still learning.  We know that when light passes through a denser medium, it slows down. However, is there a limit to that slowing down? If no, wouldn't it be possible, with some type of medium we make ourselves (like a crystal), to decrease the light's speed down to a point where we would be able to "see the photons moving forwards"?  I know it is way more complicated than that and that you can't see light unless some other light bounces off it, what I mean is slowing down light to an extreme and unusual speed). That sounds completely absurd but I can't seem to find what is wrong. Can anyone can explain it to me? :) Do virtual particles actually physically exist? What book would you recommend for scientists who are not statisticians?  Clear delivery is most appreciated. As well as the explanation of the appropriate techniques and methods for typical tasks: time series analysis, presentation and aggregation of large data sets. Is it possible to change the color of a single bar when the bar plot is based on symbolic values? I am beginner in LaTeX, trying to use it for industrial documents. I wonder if there is a way to change the color of only one bar of the plot below, ie "TestDetails", to illustrate it is a local macro and not a LaTeX keyword. I have been trying to experiment with point meta, but could not find a way.  \documentclass{article} \usepackage{filecontents}  \usepackage{pgfplots}  \usepackage{pgfplotstable} \pgfplotsset{width=.95\textwidth, compat=newest}   \begin{document}  \begin{filecontents}{data.csv} {Occurences}, {keyword} 215, item 159, SI 134, subsubsection 106, TestDetails 58, caption \end{filecontents}  \pgfplotstableread[col sep=comma]{data.csv}{\datatable}  \begin{tikzpicture} \begin{axis}[ /pgf/number format/.cd,1000 sep={}, width=0.8\linewidth,height=6cm, xbar, xmin=30, xmax=250, xtick=\empty, enlarge x limits={value=0.1, upper}, enlarge y limits=0.1, ytick=data,  y dir=reverse, xlabel= {}, y tick label style={major tick length=0pt}, yticklabels from table={\datatable}{[index]1}, nodes near coords, nodes near coords align=horizontal, ] \addplot [draw,fill=blue!50]table[ y expr=\coordindex, x index=0]{\datatable}; \end{axis} \end{tikzpicture}  \end{document} I have an image with a woman, and I need to make an ad (size 260mmx125mm). I want to put the woman to the left side, but then right side becomes empty. So, how I should solve the problem? I have picked the color from image, but it is definitely different than in the actual picture.  Should I use the Clone Stamp Tool in Photoshop, or there is a better way to do this?  By the way, it will be used in print, so I need a good quality. According to Ohm's Law, if the resistance is zero, the power dissipated by a resistor is unmeaning.  $$P_d = R \times I^2$$  $$I = \sqrt{ \frac {P_d}{R} }$$  Can one calculate the resistance given that power is defined? Only by knowing power, how can one calculate the maximum current of a zero-Ohm resistor?   I'm a bit confused as I've seen there is zero-Ohm resistors with specified power in the market. I am trying to make a map where you have to make a village from scratch, and I need help. I'm trying to make a /clone command happen relative to where a mob that's named house is, and I cant figure it out. Any help? How to find the running network services and the port and user I want to find a list of all network services running on my system, including details of the port and services and the users. I know that I need to use netstat, ps and fuser. but I don't know how to write the command. Do I need to write a shell script to find all of them? or I can use in a line of commands? Thanks for your help. How to prove that for all natural numbers, $4^n > n^3$? This is a problem set I have, it's not a homework but it's very important practice...  Send me some hints please, I don't want an answer I need to get it by myself but I'm failing miserably...   The problem is:     Prove that for all natural numbers $n$,  $4^n &gt; n^3$ Hexadecapole potential using point particles? We can get monopole $1/r$, dipole $1/r^2$, quadrupole $1/r^3$ and octupole $1/r^4$ potential falloff by placing opposite point charges at the corners of a point, line, square and cube, respectively. My book cryptically says "and so on", how does one get a $1/r^5$ and higher potential falloff with a finite number of point-charges in 3 dimensions? How to use sed to replace only the first occurrence in a file? Add transparency to an existing PNG I'd like to use this image on a web site.    What I need to do is change the background from black to transparent, so I can use the arrow on my site maintaining the page background.  I used Gimp to convert the image to .png, but how do I proceed now? How do I profile memory usage in Python? I've recently become interested in algorithms and have begun exploring them by writing a naive implementation and then optimizing it in various ways.  I'm already familiar with the standard Python module for profiling runtime (for most things I've found the timeit magic function in IPython to be sufficient), but I'm also interested in memory usage so I can explore those tradeoffs as well (e.g. the cost of caching a table of previously computed values versus recomputing them as needed). Is there a module that will profile the memory usage of a given function for me? is that function must be constant under the following conditions I'm talking about complex function   $f$ is analytic function on a region $D$ that include the point $z=0$. for every $n\in N$ such $\frac{1}{n}$ is in $D$ , the function follows this condition $|f(\frac{1}{n})| \leq \dfrac{1}{2^n}$   is that function must be constant ? I'm planning to buy a new Android phone and I'd like to be able to transfer the progress I have made at several games to the new device, so I won't have to play all the levels again from scratch.  I currently have an HTC Desire and will buy an HTC Evo 3D.  There's probably no simple/general solution to this.  But I was wondering if anyone did something similar and could provide some advice (e.g. where to look for files that might hold game progress information).