I've used  String[] red = linija.split("(?!^)");   and now in this String array I want to know if red[0] is "/". Tried (red[0] == "/") and with "//", please help.
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?
Seeking alternatives to pgRouting for open source routing / network analysis? Using bm with eulervm gives inconsistent ‘’ characters I prefer to use bm package to bold math. However, I noticed that when used with eulervm, this gives inconsistent results for ‘&lt;’ and ‘>’ characters.  I wonder what causes it and can the usage bm be fixed to get proper ‘&lt;’.  \documentclass{article}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  %\usepackage{amsmath}  \usepackage[euler-digits,euler-hat-accent]{eulervm}  \usepackage{bm}  \begin{document}      \texttt{\hphantom{mathbold}\llap{bm}}: \quad $ 1 + 1 &lt; 3; \quad \bm{1 + 1 &lt; 3} $      \texttt{mathbold}: \quad $ 1 + 1 &lt; 3; \quad \mathbold{1 + 1 &lt; 3} $  \end{document} Converting from 7-speed to 10-speed rear wheel My Bridgestone MB-5 currently has a 7-speed rear wheel. I'd like to convert it to a 10-speed. Is this possible? Is it practical? I would like to be able to set a flag at the beginning of the main flag (say output) that tells if I want to produce a paper document or an electronic document.   Then I should check this flag to define or not empty pages, hypperref, oneside or twosides, etc.  How could I do that ? antonym for beneficiary Two Circles and Tangents from Their Centers Problem Let $\Gamma_1$ and $\Gamma_2$ be two non overlapping circles with centers $O_1$ and $O_2$ respectively. From $O_1$, draw the two tangents to $\Gamma_2$ and let them intersect $\Gamma_1$ at points $A$ and $B$. Similarly, from $O_2$, draw the two tangents to $\Gamma_1$ and let them intersect $\Gamma_2$ at points $C$ and $D$.  Prove that $AB=CD$.  I've done some extensive angle chasing on this but have been unable to make any real progress. Can't decide whether $ABCD$ is supposed to be rectangle (as in my diagrams), a parallelogram or even a trapezium. There is a homothety taking one circle to the other but as far as I can see this doesn't help as we don't have a clearly defined center to this.  Any help/hints would be greatly appreciated. How to overcome Acrobat Reader error 131 with a pdfLaTeX doc? I'm generating a PDF document with pdflatex (more precisely, latexmk invoked from TexMaker 3.4. My LaTeX install is TeXLive 20120719). I can read the document fine in Okular and Gmail's attachment preview, but a colleague that runs Acrobat Reader on Windows reports: "There was a problem reading this document (131)".  EDIT: The error disappears when using \usepackage[demo]{graphicx}, which puts black boxes instead of the real images. They are all PDFs, PNGs and JPGs. Instead of using demo, I added the code for a \demoincludegraphics command, which makes the file work in Reader when using it to replace the logo in the headers, as shown below. But enabling it (using \includegraphics instead of \demoincludegraphics) and removing everything else also works in Reader! There is some strange global interaction that makes the file appear broken to Reader when enabling all the graphics...  My code compiles fine, reason why I only attach the preamble and a simple text for a Minimal Working Example:  \documentclass[12pt,lettersize,twoside]{article}  \usepackage[utf8]{inputenc} \usepackage[spanish,es-tabla]{babel}   \usepackage[fixlanguage]{babelbib} \usepackage{amssymb,amsmath} \usepackage{graphicx}    \usepackage{array}    \usepackage{caption} \usepackage{subfig} \usepackage{rotating} \usepackage{booktabs} \usepackage{multirow} \usepackage{calc} \usepackage{stfloats} \usepackage{fixltx2e} \usepackage{url} \usepackage[colorlinks=true,linkcolor=blue,citecolor=red]{hyperref} \usepackage[all]{hypcap}  % Margins \usepackage[top=2cm, bottom=2cm, left=3cm, right=2cm]{geometry}  % Make header show up in the first page \makeatletter \renewcommand\maketitle{\par \begingroup     \renewcommand\thefootnote{\@fnsymbol\c@footnote}%     \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%     \long\def\@makefntext##1{\parindent 1em\noindent             \hb@xt@1.8em{%                 \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%     \if@twocolumn     \ifnum \col@number=\@ne         \@maketitle     \else         \twocolumn[\@maketitle]%     \fi     \else     \newpage     \global\@topnum\z@   % Prevents figures from going at top of page.     \@maketitle     \fi     \thispagestyle{fancy}\@thanks % was {empty} \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \makeatother  % Remove date field in title; Remove preceding vertical space \makeatletter \renewcommand{\@maketitle}{ \vspace{-3cm} \begin{center}% {\LARGE \@title}\\ \vspace{2mm}% {\@author} \end{center}% \par} \makeatother \makeatletter  % Demo includegraphic boxes \newcommand{\demoincludegraphics}[2][]{%   \setlength{\fboxsep}{-\fboxrule}% Remove frame separator/gap   \framebox{\rule{0pt}{100pt}\rule{150pt}{0pt}}% Framed box of 150pt x 100pt }  % Headers Config  \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead{} \renewcommand{\headrulewidth}{0.4pt} \setlength{\headheight}{2.2cm}  \addtolength{\textheight}{-1.62cm} \fancyhead[LO,RE]{\demoincludegraphics[height=1.6cm]{logo-slogan}} \fancyhead[LE,RO]{}  % Footers Config \fancyfoot{} \renewcommand{\footrulewidth}{0pt} \fancyfoot[C]{\thepage}  % Notas al pie etiquetadas por simbolos   \renewcommand{\thefootnote}{\fnsymbol{footnote}}  \title{Doc Title} \author{My name}  \begin{document}  \maketitle  This is a test. It includes graphics and other floats.   \end{document}   EDIT: I found a workaround: Processing the generated pdf file through Ghostscript, as follows:   gs -dSAFER -dBATCH -dNOPAUSE  -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf   where input.pdf is the file generated by pdfLaTeX, and output.pdf the one that will be readable by Adobe Reader and the rest of the PDF readers. How to explain the long lifetime of Rydberg atoms with Fermi golden rule? How to remove duplicate values from a multi-dimensional array in PHP Difference between var = {} and var = []? $$y'=x^2+y^2$$ I know, that this is a kind of Riccati equation, but is it possible to solve it with only simple methods? Thank you How to turn off Facebook notifications on Mac OS X? Given three variables, y and x, which are positive continuous, and z, which is categorical, I have two candidate models given by:  fit.me &lt;- lmer( y ~ 1 + x + ( 1 + x | factor(z) ) )   and  fit.fe &lt;- lm( y ~ 1 + x )   I hope to compare these models to determine which model is more appropriate. It seems to me that in some sense fit.fe is nested within fit.me. Typically, when this general scenario holds, a chi-squared test can be performed. In R, we can perform this test with the following command,  anova(fit.fe,fit.me)   When both models contain random-effects (generated by lmer from the lme4 package), the anova() command works fine. Owing to boundary parameters, it is normally advisable to test the resulting Chi-Square statistic via simulation, nonetheless, we can still use the statistic in the simulation procedure.  When both models contain only fixed-effects, this approach---and, the associated anova() command---work fine.  However, when one model contains random effects and the reduced model contains only fixed-effects, as in the above scenario, the anova() command doesn't work.  More specifically, I get the following error:   &gt; anova(fit.fe, fit.me)  Error: $ operator not defined for this S4 class   Is there anything wrong with using the Chi-Square approach from above (with simulation)? Or is this simply a problem of anova() not knowing how to deal with linear models generated by different functions?  In other words, would it be appropriate to manually generate the Chi-Square statistic derived from the models? If so, what are the appropriate degrees of freedom for comparing these models? By my reckoning:  $$ F = \frac{\left((SSE_{reduced}-SSE_{full})/(p-k)\right)}{\left((SSE_{full})/(n-p-1)\right)} \sim F_{p-k,n-p-1} $$  We are estimating two parameters in the fixed effects model (slope and intercept) and two more parameters (variance parameters for the random slope and random intercept) in the mixed-effects model. Typically, the intercept parameter isn't counted in the degrees of freedom computation, so that implies that $k=1$ and $p=k+2=3$; having said that I'm not sure if the variance parameters for the random-effects parameters should be included in the degrees of freedom computation; the variance estimates for fixed-effect parameters are not considered, but I believe that to be because the parameter estimates for fixed effects are assumed to be unknown constants whilst they are considered to be unknowable random variables for mixed effects. I would appreciate some assistance on this issue.  Finally, does anybody have a more appropriate (R-based) solution to comparing these models? Advantages of parallel over serial connections As far as my understanding goes, parallel data connections are faster than serial at the same frequency. However, when you increase the frequency in parallel you start getting bits 'cross-talking' and getting transferred onto the next bus. Serial however, since it's only a single bus line, can have the frequency increased to make it faster than parallel without a problem. Also, surely parallel is more expensive as it uses more lines.  So my question is, what actually is the benefit of using a parallel data connection over a serial one? Are there any? If not, why do we still use parallel connections? I'm desperatly confused by notations and formulations so if someone could clarify the following things a little Í would be deeply grateful. The Lie algebra $\mathfrak{so}(1,3)_+^{\uparrow}$ of the proper orthochronous Lorentz group $SO(1,3)_+^{\uparrow}$ is given by \begin{equation} [J_i,J_j]=i \epsilon_{ijk} J_k \end{equation} \begin{equation} [J_i,K_j]=i \epsilon_{ijk} K_k \end{equation} \begin{equation} [K_i,K_j]=- i \epsilon_{ijk} J_k \end{equation} We can now define new generators with the old ones $N^{\pm}_i= \frac{1}{2}(J_i \pm i K_i)$ which satisfy \begin{equation} [N^{+}_i,N^{+}_j] = i \epsilon_{ijk} N^{+}_k ,\end{equation} \begin{equation} [N^{-}_i,N^{-}_j] = i \epsilon_{ijk} N^{-}_k ,\end{equation} \begin{equation} [N^{+}_i,N^{-}_j] = 0. \end{equation} where we can see that $N^{+}_i$ and $N^{-}_i$ make up a copy of the Lie algebra $\mathfrak{su}(2)$ each. My problem is to get what is going one here mathematically precise. Are the following statements correct and if not why:  When we build the new operators from the old generators we complexified $\mathfrak{so}(1,3)_+^{\uparrow}$ \begin{equation}(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} = \mathfrak{so}(1,3)_+^{\uparrow}\otimes \mathbb{C} \end{equation} We saw that $\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C}$ is isomorph to two copies of the complexified Lie algebra of $\mathfrak{su(2)}$: $(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} \simeq \mathfrak{su(2)}_{\mathbb{C}} \oplus \mathfrak{su(2)}_{\mathbb{C}} $. Where exactly did we need that $\mathfrak{su(2)}$ is complexified here? The Lie algebras defined by $N^{\pm}_i$ are exactly those of $\mathfrak{su(2)}$ and we never use complex linear combination of $N^{\pm}_i$ or am I wrong here? $\mathfrak{su(2)}_{\mathbb{C}}$ is isomorph to $(\mathfrak{sl}(2,\mathbb{C}))_\mathbb{C}$: \begin{equation}\mathfrak{su(2)}_{\mathbb{C}} \simeq (\mathfrak{sl}(2,\mathbb{C}))_\mathbb{C} \end{equation} Here $(\mathfrak{sl}(2, \mathbb{C}))_\mathbb{C}$ denotes the complexified Lie algebra of $SL(2,\mathbb{C})$ Is $(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} \simeq (\mathfrak{sl}(2, \mathbb{C}))_\mathbb{R}$ correct?  Here $(\mathfrak{sl}(2, \mathbb{C}))_\mathbb{R}$ denotes the real Lie algebra of $SL(2,\mathbb{C})$ Is $(\mathfrak{so}(1,3)_+^{\uparrow})_\mathbb{C} \simeq (\mathfrak{sl}(2, \mathbb{C}))_\mathbb{C} \oplus (\mathfrak{sl}(2, \mathbb{C}))_\mathbb{C}$ correct?  I looked this topic up in different books and each seemed to state something different. One book even used three differrent versions of $\mathfrak{sl}(2,\mathbb{C}) $ namely: $\mathfrak{sl}(2,\mathbb{C}) $, $(\mathfrak{sl}(2,\mathbb{C}))_\mathbb{C}$ and $(\mathfrak{sl}(2,\mathbb{C}))_\mathbb{R}$.  states simply that $\mathfrak{sl}(2,\mathbb{C}) $ is the complexification of $\mathfrak{su(2)}$ without making any reference to $SL(2,\mathbb{C})$ which does not help me either. Any help would be great. How can I have  for Ubuntu? How to change css property using javascript Proving a relation between inradius ,circumradius and exradii in a triangle Prove that in a triangle $$r^2+r_1^2+r_2^2+r_3^2=16R^2-(a^2+b^2+c^2)$$ where the symbols have their usual meanings. I am looking for a smaller or elegant proof using trigonometry. A geometric proof would be super cool. I did prove it but it took me ages to do the calculation. Thanks. How to convert numbers between hexadecimal and decimal Primary filegroup is full SQL Server 2008