$value = $simpleXmlDoc-&gt;SomeNode-&gt;InnerNode;   actually assigns a simplexml object to $value instead of the actual value of InnerNode.  If I do:  $value = $simpleXmlDoc-&gt;SomeNode-&gt;InnerNode . "\n";   I get the value. Anyway of getting the actual value without the clumsy looking . "\n"?
Let's say I have some XML like this  &lt;channel&gt;   &lt;item&gt;     &lt;title&gt;This is title 1&lt;/title&gt;   &lt;/item&gt; &lt;/channel&gt;   The code below does what I want in that it outputs the title as a string  $xml = simplexml_load_string($xmlstring); echo $xml-&gt;channel-&gt;item-&gt;title;   Here's my problem.  The code below doesn't treat the title as a string in that context so I end up with a SimpleXML object in the array instead of a string.  $foo = array( $xml-&gt;channel-&gt;item-&gt;title );   I've been working around it like this  $foo = array( sprintf("%s",$xml-&gt;channel-&gt;item-&gt;title) );   but that seems ugly.  What's the best way to force a SimpleXML object to a string, regardless of context?
How to search the internet for terms with special characters Conditionally run a view if another view has no results I'm using Ubuntu 16.04 and there's no fglrx! I'm using Ubuntu 16.04 and there's no fglrx! What happened? Hilbert, Gödel, and "God equations" - a 19th century lesson for 21st century physicists? It seems there are a lot of respected physicists appearing on pop-sci programs (discovery channel, science channel, etc.) these days spreading the gospel of   Three examples, quickly: 1) Many programs feature Michio Kaku saying that he is on a quest to find an equation, "perhaps just one inch long," which will "describe the whole universe."  2) Max Tegmark has come out with  in which he expresses the gut feeling that "nothing is off-limits" to science.  The subtitle of this book is My Quest for the Ultimate Nature of Reality.  3) In the series  there is talk about a search for the "God equation."  (A good counter-example would be Feynman, but his self-described "non-axiomatic" or "Babylonian" approach does not seem popular with physicists today.)  Is there any sense among physicists that it might be impossible to articulate the "ultimate nature of reality" in equations and formal logic?  It seems to me that physicists are following in the footsteps of the 19th century mathematicians (led by Hilbert) who were on a similar quest which was put to rest by Gödel's incompleteness theorems in 1931.  Is there any appreciation for how the Incompleteness Theorems might apply to physics?  Has any progress been made on  for the 20th century?  Shouldn't this be addressed before getting all worked up about a "God equation?" This is a nice problem on series convergence that I recently stumbled upon. Given a non-negative sequence of real numbers $(a_n)$ such that $$\sum_{n=1}^\infty a_n &lt; \infty,$$ show that there exists a non-decreasing sequence of non-negative numbers $b_n$ such that $$b_n \to \infty \quad\text{ and } \quad \sum_{n=1}^\infty a_n b_n &lt; \infty.$$ In other words, for every convergent series with non-negative terms, there is another convergent series with "substantially larger" terms.  I have a solution (see below), but maybe someone else has a different, simpler, and/or more elegant solution. Reinhardt's main strength is his shielding abilities and the protection he provides for his team, but Are there any abilities that cannot be blocked by Reinhardt's barrier field? I'm trying to connect 32 I²C "root of trust"  devices.    I'm thinking about a good way that does that, I mean what kind of communication should I use? A digital multiplexer that selects a device? but based on what? switching on the VDD source? but that needs reinitialization of the device and that takes time. How to update Wine to the latest version? I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval. I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings? What is the name of the default font in math mode? I draw figures in Inkscape. When I label elements within the figures with variable names that I have used in the underlying TeX document, I would like them to look exactly the same as in the document. (e.g. l does not look the same as $l$)  What is the name of the math mode font so I can select it correctly in the Inkscape font list?  If the exact font should not be available, what is a similar looking font that is present on most systems? I’m having trouble finding an official clarification of this, so I’m wondering if anyone has found a ruling:  Solarians gain powers known as stellar revelations. These are either “photon” or “graviton” revelations. It is specifically mentioned they can be used out of combat, though most include improved effects or separate powers that can only be used “while attuned” - a state a Solarian enters during combat. They may be photon or graviton attuned, at the player’s choice, and are able to increase their level of attunement each round until they become fully attuned to one or the other. However, apart from the very powerful “zenith revelations”, nowhere in the rules mentions whether photon revelations may only be used while photon attuned, or graviton revelations only while graviton attuned. The revelations themselves usually say “while attuned or fully attuned” for the more powerful effects, without mentioning the mode, and there’s no general rule in the class feature that answers this question.  Is there an official ruling on whether the “only while attuned” power of a photon revelation can be used when the character is graviton attuned, or vice versa? I suspect the answer is yes but it’s hard to tell based on the core rules. Vertical Text in Wpf TextBlock Is it possible to display the text in a TextBlock vertically so that all letters are stacked upon each other (not rotated with LayoutTransform)? I am trying to create a map in both Leaflet and OpenLayers 3 which displays the  layer EMAP8 from the WMS http://wms.nlsc.gov.tw/wms. I can't get it to work. I can open the layer in QGIS, but when I try to use it in Leaflet like this:  var overlay_taiwanemapen0 = L.tileLayer.wms('http://wms.nlsc.gov.tw/wms', {     layers: 'EMAP8',     format: 'image/png',     transparent: true,     continuousWorld : true, });   or in OpenLayers 3 like this:  var lyr_taiwanemapen = new ol.layer.Tile({     source: new ol.source.TileWMS(({         url: "http://wms.nlsc.gov.tw/wms",         params: {"LAYERS": "EMAP8", "TILED": "true"},     })),     title: "taiwane-map(en)", });   I get nothing displayed. I can see layers being requested, and data being transferred, but nothing on the map.  What am I doing wrong? Proving $\gcd \left(\frac{a}{\gcd (a,b)},\frac{b}{\gcd (a,b)}\right)=1$ How would you go about proving that $$\gcd \left(\frac{a}{\gcd (a,b)},\frac{b}{\gcd (a,b)}\right)=1$$  for any two integers $a$ and $b$?  Intuitively it is true because when you divide $a$ and $b$ by $\gcd(a,b)$ you cancel out any common factors between them resulting in them becoming coprime. However, how would you prove this rigorously and mathematically? I downloaded and installed Ubuntu from the official site. However, I don't know if I installed the 32-bit or 64-bit version.  In Windows 7 I could right click My Computer and it listed which version it was.  Is there an easy way to check in Ubuntu? Recursively replace string in files I want to replace the backslash in the string page_path\example_filename.txt with a forward slash.  I also want to be able to run this on a large file system and have it recursively search all directories.  I found someone on the web who said to use grep, xargs, and sed but I wasn't able to get it to work. I've been trying different variations on delimiters and escape characters, but didn't get it.  Here is the command I was trying to run: grep -lr -e 'page_path\\' * | xargs sed -i 's/page_path\/page_path//g'  Thanks in advance. On the one hand, I'm aware that  in the US do not have a valid government ID. On the other hand, traveling within the US requires you to show a piece of ID wherever you go - even when taking a Greyhound.   So let's say you're an American who has a large number of cash in their pocket but no ID whatsoever. Would you be able to get from New York to San Francisco or from Seattle to Miami? If so, what are your options? Even though I do have plenty of identification documents, I find it enjoyable to be able to travel anonymously. I have seen this construction quite often:      Online ads have been around since the dawn of the Web, but only in   recent years have they become the rapturous life dream of Silicon   Valley.   What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to:      Online ads have been around since the dawn of the Web, but only in   recent years they have become...   And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now. How to understand a volatility based ETF like VXX The ETF VXX is based on the volatility index VIX. If volatility goes up, VIX goes up and VXX goes up. Similar thing for the downside. Now when I buy an ETF like SPY, I can conceptually understand that I am buying a small portion of each of the underlying companies. So if an underlying company stock makes a move, the ETF SPY makes a move in  the same direction.  But when I buy VXX, what exactly is the underlying? It is VIX. I am unable to grasp the concept of 'volatility' as the underlying. I can visualise only stocks and commodities as the underlying because in my understanding, the unerlying needs to be something physical (let us say stocks are physical commodities for this example).  Can someone explain the concept of 'volatility' as the underlying?  Is the word 'underlying' even appropriate in this case or is the word 'underlying' only to be used for derivative products?