getting wrong output in java String, and == sign
How do I compare strings in Java?
AMPscript Error with XML I have a Partner sending some data to a Triggered Email/Data Extension which includes a column for XML data.   The trigger is erroring and not allowing the data to get to the Data Extension.   Below is what they are sending over. Is the formatting of the XML incorrect?  XML data that I've used in the past in Data Extensions starts with....   &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;   This version of XML starts with... {"XML":  Could that be it?  {"To": {"SubscriberKey": "test@acme.com", "ContactAttributes": {"SubscriberAttributes": **{"XML":** "&lt;root&gt;&lt;ITEM&gt;&lt;ITEM_PRODUCT_NAME&gt;dark chocolate nuts &amp; sea salt&lt;/ITEM_PRODUCT_NAME&gt;&lt;ITEM_PRODUCT_SKU&gt;15127&lt;/ITEM_PRODUCT_SKU&gt;&lt;ITEM_PRODUCT_URL&gt;https://www.test.com/15127.html&lt;/ITEM_PRODUCT_URL&gt;&lt;ITEM_PRODUCT_IMG_URL&gt;https://www.test.com/images/nuts.png&lt;/ITEM_PRODUCT_IMG_URL&gt;&lt;ITEM_QTY&gt;1&lt;/ITEM_QTY&gt;&lt;ITEM_SUBSCRIPTION_PRICE&gt;12.59&lt;/ITEM_SUBSCRIPTION_PRICE&gt;&lt;ITEM_TOTAL&gt;12.59&lt;/ITEM_TOTAL&gt;&lt;/ITEM&gt;&lt;ITEM&gt;&lt;ITEM_PRODUCT_NAME&gt;crunchy peanut butter&lt;/ITEM_PRODUCT_NAME&gt;&lt;ITEM_PRODUCT_SKU&gt;41800&lt;/ITEM_PRODUCT_SKU&gt;&lt;ITEM_PRODUCT_URL&gt;https://www.test.com/images/butter.png&lt;/ITEM_PRODUCT_IMG_URL&gt;&lt;ITEM_QTY&gt;1&lt;/ITEM_QTY&gt;&lt;ITEM_SUBSCRIPTION_PRICE&gt;11.37&lt;/ITEM_SUBSCRIPTION_PRICE&gt;&lt;ITEM_TOTAL&gt;9.55&lt;/ITEM_TOTAL&gt;&lt;/ITEM&gt;&lt;ITEM&gt;&lt;ITEM_PRODUCT_NAME&gt;pear cinnamon &amp; pecan&lt;/ITEM_PRODUCT_NAME&gt;&lt;ITEM_PRODUCT_SKU&gt;17227&lt;/ITEM_PRODUCT_SKU&gt;&lt;ITEM_PRODUCT_URL&gt;https://www.test.com&lt;/ITEM_PRODUCT_URL&gt;&lt;ITEM_PRODUCT_IMG_URL&gt;https://www.test.com/images/apples.png&lt;/ITEM_PRODUCT_IMG_URL&gt;&lt;ITEM_QTY&gt;1&lt;/ITEM_QTY&gt;&lt;ITEM_SUBSCRIPTION_PRICE&gt;12.59&lt;/ITEM_SUBSCRIPTION_PRICE&gt;&lt;ITEM_TOTAL&gt;12.59&lt;/ITEM_TOTAL&gt;&lt;/ITEM&gt;&lt;/root&gt;", "SHIPPING_LNAME": "Tester", "FIRST_NAME": "Test", "LAST_NAME": "Tester", "ORDER_TOTAL_SAVINGS": -5.97, "MERCHANT_ORDER_ID": "1810002352", "SHIPPING_ADDRESS_STATE": "NY", "ORDER_PLACE_DATE_LONG": "Fri 11 January 2019", "SHIPPING_ADDRESS_ZIP": "10004", "ORDER_SHIPPING": 0.00, "CARD_TYPE": "Visa", "ORDER_SUBTOTAL": 47.32, "ORDER_PLACE_DATE_SHORT": "01/11/2019", "SHIPPING_FNAME": "Test", "SHIPPING_ADDRESS_TOWN": "new york", "ORDER_TOTAL": 47.32, "CARD_EXPIRE": "12/2027", "CARD_HOLDER": "Test Tester", "SHIPPING_ADDRESS_1": "75 broad st", "SHIPPING_ADDRESS_2": "fl 23"}}, "Address": "acme@test.com"}}   AMPSCRIPT IN EMAIL Calling the XML....  %%[   var @LOOPINGAPPENDIX  set @LOOPINGAPPENDIX = AttributeValue("LOOPINGAPPENDIX")  set @productRows = BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM", 0)  ]%%   %%[   for @j = 1 to RowCount(@productRows) do       set @productXML = Concat("", Field(Row(@productRows, @j), "XML"), "")      set @ITEMPRODUCTNAME = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_NAME", 0), 1), "Value"))      set @ITEMPRODUCTSKU = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_SKU", 0), 1), "Value"))      set @ITEMPRODUCTURL = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_URL", 0), 1), "Value"))      set @ITEMPRODUCTIMGURL = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_IMG_URL", 0), 1), "Value"))      set @ITEMQTY = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_QTY", 0), 1), "Value"))      set @ITEMSUBSCRIPTIONPRICE = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_SUBSCRIPTION_PRICE", 0), 1), "Value"))      set @ITEMTOTAL = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_TOTAL", 0), 1), "Value"))      set @rowColor = Iif(Mod(@j,2) == 0, "#efefef", "#ffffff")   ]%%   %%[endif]%%   %%[next @j]%% I need to update a vector layer's data when the visibility is turned back on.  My update does not occur when the visibility is off.  To what signal do I need to connect to catch the visibility change? I have a command that I want to have run again automatically each time it terminates, so I ran something like this:  while [ 1 ]; do COMMAND; done;   but if I can't stop the loop with Ctrl-c as that just kills COMMAND and not the entire loop.  How would I achieve something similar but which I can stop without having to close the terminal? Is there a way to add some custom font on a website without using images,  or some other graphics?  For example, I was working on a wedding website, and I found a lot of nice fonts for that subject. But I can't find the right way to add that font on the server. And how do I include that font with CSS into the HTML? Is this possible to do without graphics? Modifying cat command to number paragraphs and display last paragraph only I have a text file for which I need to do three things:   Modify the "cat" command to highlight keywords whilst showing the complete contents of the file.  Modify the "cat" command to automatically number the paragraphs. These are separated by a single blank line.  Modify the "cat" command to display the final paragraph only.    The tricky part is that all of these need to be done by modifying the cat command.   I've seen many forum posts explaining that cat is not meant for this - and I can entirely see why. However, the challenge is that I have to use cat! How do I print an IFrame from javascript in Safari/Chrome Can someone please help me out with printing the contents of an IFrame via a javascript call in Safari/Chrome.  This works in firefox:  $('#' + id)[0].focus(); $('#' + id)[0].contentWindow.print();   this works in IE:  window.frames[id].focus(); window.frames[id].print();   But I can't get anything to work in Safari/Chrome.  Thanks  Andrew Radio antenna producing waves in the visible spectrum If a radio could produce waves in the visible light spectrum, what would the result be?  This is a thought experiment that I've pondered for a few years now.  I realize there are a few/many real-world constraints, but if we lifted these constraints for the sake of thought, what could we expect?  Personally, I don't see why we wouldn't observe visible light emitting from the antenna, disregarding any light from Blackbody Radiation. Does WaitForMultipleObjects() reset all auto-reset events? Surface of genus $g$ does not retract to circle (Hatcher exercise) I'm trying to install Linux alongside my 64-bit Windows 8 and went into my partition manager to find this structure.    In order to create partitions for my Linux install I need to free up some space. I see that the last partition is an empty recovery partition, as you can see highlighted, it's 100% free.  I was wondering is it okay to just remove this partition seeing as it doesn't appear I'll be losing anything?  Not sure if this helps but this is on a Fujitsu AH532 running Windows 8 64-bit with UEFI. How to check if a string contains a substring in Bash I have a string in Bash: string=&quot;My string&quot;  How can I test if it contains another string? if [ $string ?? 'foo' ]; then   echo &quot;It's there!&quot; fi  Where ?? is my unknown operator. Do I use echo and grep? if echo &quot;$string&quot; | grep 'foo'; then   echo &quot;It's there!&quot; fi  That looks a bit clumsy. Why does the area of a bar in a histogram represent the frequency of that particular class In a bar-graph, the height of the bars represent the frequency of a particular category but it is counter-intuitive that in a histogram, instead of the height of the bar(which represents the frequency density), the area of the bar represents the frequency of the particular class. Why is this so? Residuals correlated positively with response variable strongly in linear regression Does there exist a surjective homomorphism from $(\mathbb R,+)$ to $(\mathbb Q,+)$ ? Does there exist a surjective homomorphism from $(\mathbb R,+)$ to $(\mathbb Q,+)$ ?  ( I know that there 'is' a   'surjection' , but I don't know whether any surjective homomrophism from $\mathbb R$ to $\mathbb Q$ exist or not . Please help . Thanks in advance ) $R/Ra$ is an injective module over itself Let $R$ be a PID, $a\in R$ be a nonzero nonunit in $R$. Prove that $R/Ra$ is an injective module over itself.   If $R$ is a PID, every $R$- divisible module is injective, but the question concerns with $R/Ra$-module, so I have no idea to solve this problem. Help me. Web-mapping with editing capabilities? Evaluate $\lim \limits_{n\rightarrow\infty}\sin^2(\pi\sqrt{n^2 + n})$ I'm struggling to find the limit at infinity of : $$\lim \limits_{n\rightarrow\infty}\sin^2(\pi\sqrt{n^2 + n}), n\in\Bbb N$$ I know it is $1$ but I don't understand why this is wrong :  $\sin^2(\pi\sqrt{n^2 + n}) = \sin^2(\pi*n\sqrt{1 + \frac{1}{n}})$.  So $\lim \limits_{n\rightarrow\infty}\sin^2(\pi\sqrt{n^2 + n}) = \lim \limits_{n\rightarrow\infty}\sin^2(\pi*n\sqrt{1 + \frac{1}{n}}) =  \lim \limits_{n\rightarrow\infty} \sin^2(\pi*n) = 0$.  Thanks. Limit of derivative is zero. Does it imply a limit for f(x)? Typesetting 144...4 with "n times" under the 4's is easy, but what about \sqrt{144...4}? Inspired by  on the math StackExchange, suppose you want to typeset the square root of the number 144...4, that is, 1 followed by n 4's. If you write $\sqrt{1\underbrace{44\ldots4}_{n\ \text{times}}}$, as in the current version of the question, you get a huge radical sign that reaches down to match the "n times" text below the number. Is there an elegant way to typeset this so that the radical sign looks like it would with $\sqrt{144\ldots4}$, but also keeping the underset text in the right place? Create a local texmf tree in MiKTeX In TeX Live there are TEXMFLOCAL for admin and TEXMFHOME for user pre-defined, but in MiKTeX there’s by default no local texmf tree installed, though it is useful, cf. . Therefore my question:  How do I create a local texmf tree in MiKTeX?