I'm using this code:       function ucfirst(field) {        field.value = field.value.substr(0, 1).toUpperCase() +       field.value.substr(1); }   this is working if i have a city like california ==> California. But if I have new york it will not convert the first letter.   Any tips how to make this code work?
Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.
I am an Indian citizen studying in Italy on an Italian visa that expires 19 November, 2015. I have permesso di soggiorno. I want to visit the United Kingdom for my vacations for a week during March. I know the procedures already, however I am a little bit confused about the amount that I must show as a proof of support with my bank statements. I will stay for a week with my friends who are also students in Italy and will be in London for 5 days. What would be the amount in Euros that I need to show for my visit to UK? Why is Ubuntu Software Center dropping previously provided applications? Ubuntu Software used to provide Pinta, KolourPaint, Audacity, and others, but they are no longer available there. I have to use apt to install them.   Why has Ubuntu Software 3.20.5 stopped providing applications that it used to?  Ubuntu 16.04 Ubuntu Software Center 3.20.5  Thanks in advance for your help! When I enter single quote ' in terminal it goes to some other mode, and commands don't execute. What is this mode and when do we use it?  root@sai:~# ' &gt; ls &gt; ' ls : command not found root@sai:~# Simplifying and evaluating $\cot 70^\circ+4\cos 70^\circ$ I'm struggling to understand the concept of quantum entanglement. I've distilled my understanding into an analogy, and I need your help to validate it. Here it is:  Let's say I receive two envelopes. Both envelopes have this written on them:     Hello! Open this letter...   If the paper inside is red, then other envelope has blue paper.   If the paper inside is blue, then other envelope has red paper.   So, if I open one letter, and the paper inside is red, then I know the other letter contains the blue paper.  Is this equivalent to quantum entanglement? The fact that I will know the color of the other paper when I open (i.e. observe) one envelope?  In theory, if one of the letters "appeared" in a different galaxy, I would still know the color of the paper inside that letter, just by opening my letter, instantly, correct?  Before I open the letter, is the paper inside each envelope in superposition (??), i.e. 50/50, red or blue?  In this analogy, I am assuming that what's written on the letters is true. Is this a correct assumption in quantum physics? I think so yes?  In real quantum physics, would I be able to change the color of one paper, so that I change the color of the other one? No right? Do I need a Japanese transit visa when arriving at Narita and departing from Haneda? Surface area inside cylinder Find the surface area of the part $\sigma$: $x^2+y^2+z^2=4$ that lies inside the cylinder $x^2+y^2=2y$  So, the surface is a sphere of $R=2$. It looks there should be double integral to calculate the surface, but how, which way? How can I check the version of the available package in the Ubuntu repositories without installing it? How can $\pi$ be irrational if it can be calculated using an infinite series of rational numbers? How does CoffeeScript's existential operator work? How to make a div 100% height of the browser window Evaluate $\lim\limits_{x \to a} \frac{x^m-a^m} {x-a}$ I am non-EU citizen working in Germany. Can I travel to UK without a visa? The origin of the value of speed of light in vacuum How do I transfer my Destiny account from Xbox 360 to Xbox One? Robot arm move a box I have a spreadsheet full of addresses to geocode in ArcMap 10.  I've added the spreadsheet to the map, then started to geocode them via the context menu's "Geocode addresses" item.  Many were matched automatically, and most of the unmatched I've been able to resolve within the Interactive Rematch dialog. But I have a handful of addresses where I get no result at all.  I can, however, locate these points on Google Maps, and I can get the latitude and longitude that way.  How can I enter that data into the table to locate the missing points?  I have tried editing the data and putting the lat/lon values into the X and Y columns, (via Edit Features -> Start Editing, then Open Attribute Table on the context menu).  But when I Flash the point, I don't see it.  The lat &amp; lon are consistent with the other data points on the map (i.e., not swapped, and using the correct sign).  How can I add the points to the table? enumitem breaks beamer's itemize despite fixes I thought I had tamed enumitem. I had this  and this .  Then I tried a [&lt;+-&gt;] construct. It failed. Commmenting the enumitem section prevents errors but I'd rather not have to do this.  On its current state, this code produces two errors, one because of the [&lt;+-&gt;] and another because of the \onslide.   \documentclass{beamer}   \usepackage{enumitem}  \setitemize{label=\usebeamerfont*{itemize item}%    \usebeamercolor[fg]{itemize item}    \usebeamertemplate{itemize item}}%https://tex.stackexchange.com/a/24491  \setenumerate[1]{%    label=\protect\usebeamerfont{enumerate item}%          \protect\usebeamercolor[fg]{enumerate item}%          \insertenumlabel.}%https://tex.stackexchange.com/a/45950   \begin{document}  \begin{frame}  \begin{itemize}[&lt;+-&gt;]  \item 1  \item 2  \end{itemize}  \onslide&lt;2&gt;{text}  \end{frame}  \end{document} Use a vector as an index to a matrix Zero morphism does not depend on zero object I want to prove that zero morphism does not depend on zero object. Let a zero object $0 \in \mathcal{C}$.  I supposed that exists another zero object $0' \in \mathcal{C}$, and I considered $0: A \to B$ and also $$A \to 0 \to 0' \to B$$ But I don't know to prove that zero morphism $0: A \to B$ not does not depend on zero object. Can anybody give me a suggestion?