I want to write the if condition by using greater than or less than symbol inside java script in xsl. I used like this '&lt;' , but getting SyntaxError: missing ) after condition in the html.  Please share your suggestions.  &lt;![CDATA[     if(1 &lt; 1){         alert('yes');     }else{         alert('no');     }; ]]&gt;
82746
i have a tiny little problem with xslt, js and html entities, eg. within a template:  &lt;script type="text/javascript"&gt;     &lt;xsl:value-of select="/some/node"/&gt;     for (var i = 0; i &amp;lt; 5; i++) {         //            ^^^ js error     } &lt;/script&gt;  &lt;script type="text/javascript"&gt;     &lt;xsl:value-of select="/some/node"/&gt;     for (var i = 0; i &lt; 5; i++) {         //            ^ xslt error     } &lt;/script&gt;  &lt;script type="text/javascript"&gt;     &lt;xsl:value-of select="/some/node"/&gt;     // &lt;![CDATA[     for (var i = 0; i &lt; 5; i++) {         //            ^ becomes &amp;lt;     }     // ]]&gt; &lt;/script&gt;   &lt;script type="text/javascript"&gt;     &lt;xsl:value-of select="/some/node"/&gt;     for (var i = 0; i &lt;xsl:value-of disable-output-escaping="yes" select="string('&amp;lt;')"/&gt; 5; i++) {         // works of course     } &lt;/script&gt;   does anyone have an idea where my problem could come from? i always thought the xslt processor would leave the content of a &lt;script/&gt; element unescaped when using the html output method ...  i run libxslt2 version 1.1.24 on OSX which was installed using macportsports ...
28788
The following code gives me an error:  \documentclass[12pt]{article} \usepackage[margin=2cm]{geometry} \usepackage [english]{babel} \usepackage{amsmath, amssymb} \usepackage{enumitem, array} \begin{document} {\begin{minipage}[t]{\textwidth} \begin{enumerate}[label=(\roman*)] {\setlength\itemindent{10pt}\item  \begin{equation*} \begin{array}{&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}}  \hline x &amp; l_{[x]} &amp; d_{[x]} &amp; l_{x+1} &amp; \mathring{e}_{[x]} \\ \hline \end{array} \end{equation*}} \end{enumerate} \end{minipage}} \end{document}   Note: for various reasons, I have to keep minipage there. For some reason, this code gives me an error when it compiles. It gives the following output:     The errors either say there is a } missing or a $ missing. My eyes don't see such a thing!
120737
How to use if-then-else structure in LaTeX? I need an example of odd and even page.  if odd then   command 1 else   command 2
90864
I very rarely meet any other programmers!  My thought when I first saw the token was "implies that" since that's what it would read it as in a mathematical proof but that clearly isn't its sense.  So how do I say or read "=>" as in:-  IEnumerable&lt;Person&gt; Adults = people.Where(p =&gt; p.Age &gt; 16)   Or is there even an agreed way of saying it?
24985
I saw , but I didn't see a JavaScript specific example. Is there a simple string.Empty available in JavaScript, or is it just a case of checking for ""?
75985
I am trying to paste Isabelle code into a LaTeX document using the listings package.  The nearest language= options seem to be ML and Haskell.  Some of the code contains blocks delineated by quotation marks ("...") within which there are keywords.    Specifying language=ML or language=Haskell does not embolden keywords within the "..." blocks (e.g. " ... if ... ").  On the other hand, setting otherkeywords={if} does embolden keywords within quotation blocks, but also picks up variable names like shift.  \documentclass{article} \usepackage{listings} \lstset{language=ML,         otherkeywords={if,then,else,return,"}         }  \begin{document}   \begin{lstlisting}     "if foo then bar * shift"    \end{lstlisting} \end{document}
7248
If I try to run a;;b in sh, I get this error:  sh: &lt;number&gt;: Syntax error: ";;" unexpected   If I try a;;;b I get the same error, not ;;; instead of ;;, so I think that ;; means something, although I don't know what does it mean.  Here is an example:  $ echo A;;echo B sh: 1: Syntax error: ";;" unexpected $ echo A;;;echo B sh: 1: Syntax error: ";;" unexpected $ echo A; ;echo B sh: 1: Syntax error: ";" unexpected   Here you can see that when I use ; ; instead of ;; the error is different, pertaining to the fact that I used ; without a command before. ;; seems to be a different operator, although I don't know what it applies to.
67538
How does "${2:-}" work in an 'if-then-else example' below?  Somehow I cannot help but think that being ${2:-} it means the second argument, but I am curious what the colon(:) and dash(-) after the digit 2 mean?    if [ "${2:-}" = "Y" ]; then      prompt="Y/n"      default=Y   elif [ "${2:-}" = "N" ]; then      prompt="y/N"      default=N   else      prompt="y/n"      default=   fi    read -p "$1 [$prompt] " REPLY &lt;/dev/tty
673
Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.
88520
In my javascript I have this      loopDeLoop:         while (foo !== bar) {             switch (fubar) {                 case reallyFubar:                     if (anotherFoo == anotherBar) {                         break loopDeLoop;                     }                     break;                 default:                     break;             }         }   But JSLint says... lint warning: use of label  Here's the notes from        Labels   JavaScript allows any statement to have a label, and labels have a separate name space. JSLint is more strict.      JSLint expects labels only on statements that interact with break: switch, while, do, and for. JSLint expects that labels will be distinct from vars and parameters.   How do I construct the above to get rid of the warning?  Thanks, Greg
7928
I wanted to add custom JavaScript code on certain nodes. I have written this code in the html.tpl.php template, but this doesn't work. (donate is the path alias for a node.) &lt;?php if(arg(0) == 'DONATE'): ?&gt;   &lt;script&gt;     (function() {       // ...     );   &lt;/script&gt; &lt;?php endif; ?&gt;
58707
In bash manual, Section 6.5 Shell Arithmetic says  &lt;= &gt;= &lt; &gt; comparison == != equality and inequality   &amp;&amp; logical AND || logical OR   Their meanings seem to imply they are used for conditional expressions. But they appear in the section for arithmetic expressions.   So can they be used in conditional expressions?  In Section 6.4, we already have operators for conditional expressions, which are similar to &lt;=,&gt;=,&lt;,&gt;,==,!= for arithmetic expressions:     arg1 OP arg2      OP is one of ‘-eq’, ‘-ne’, ‘-lt’, ‘-le’, ‘-gt’, or ‘-ge’. These   arithmetic binary operators return true if arg1 is equal to, not equal   to, less than, less than or equal to, greater than, or greater than or   equal to arg2, respectively. Arg1 and arg2 may be positive or negative   integers.   We also already have operators for  conditional expressions, which are similar to &amp;&amp; and || for arithmetic expressions:   -a and -o for test i.e. [...] &amp;&amp; and || for [[...]].   Since we have the operators introduced for conditional expressions, why do we need those similar operators introduced for arithmetic expressions? Can they be used in test commands?  We know that if is followed by a test command     The syntax of the if command is:  if test-commands; then consequent-commands; [elif more-test-commands; then more-consequents;] [else alternate-consequents;] fi    [...] and [[...]] both take conditional expressions within and create test commands. Can they take arithmetic expressions?  What makes me even confused is when [...] and [[...]] with arithmetic expressions in them are used as test command, [...] behaves incorrectly, while [[...]] correctly:  $ if [ 1 &gt; 2 ]; then echo h; else echo b; fi h $ if [ 1 &lt; 2 ]; then echo h; else echo b; fi h $ if [[ 1 &lt; 2 ]]; then echo h; else echo b; fi h $ if [[ 1 &gt; 2 ]]; then echo h; else echo b; fi b
19103
What's the difference between &lt;b&gt; and &lt;strong&gt;, &lt;i&gt; and &lt;em&gt; in HTML/XHTML? When should you use each?
104083
Is there a standard TeX or LaTeX code for a symbol that bears the same relation to  \prec\prec that \ll bears to &lt;&lt; ?  (And how do I get TeX code to get rendered in a question posted here?  I'm accustomed to writing things like $\sum_{n=0}^\infty \frac{x^n}{n!}$ on math.stackexchange.com and having it look the way you'd expect it to.)
102266
I am trying to compile a document with equations but whenever I use \begin{eqnarray}..\end{eqnarray} or \begin{align}...\end{align} or anything like this I get the error msg !Missing $ inserted.&lt;inserted text&gt;$. However if I type those equations without using \begin{eqnarray}...\end{eqnarray} or similar things I do not get any error msg and my document runs perfectly.  Even this simple thing does't work....Please help...  \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{amssymb}  \begin{document}  \begin{align} $=$  \end{align} \end{document}
92842
Inequalities where one side is represented as a character or word are stripped as HTML tags if no spaces are included.  For instance:  1 &lt; n &lt; 4 (works fine because of spaces)  1 &lt; this shows up because of the space preceding "this"  The second line does not have a space after the &lt;, so it's treated as an HTML tag, despite the fact that there is no &gt; to close it (see the markdown of this question for a better understanding). Because of that, it's stripped, and inequalities are "invisible." I was editing a question, and this confused me for a while.  I think it's unintentional; it would be better to check for the closing &gt; rather than assume &lt; + a letter is an HTML tag.
38518
How do I produce a conditional expression with large brackets? For example: X = 0 if a=1, 1 otherwise, with a large left bracket and specifying each condition in a line?