How to determine where cursor is in a string in a form element? I have an input.  &lt;input name="inputName" id="inputId" value="Hello" /&gt;   Lets pretend that the cursor is after the e in hello, like so:  He|llo   How can I determine the position of the cursor within that string?  Meaning, how can I make it tell me that the cursor is right after string{1} (or before string{2})?  Edit: Really though, my end goal is determine if the cursor is at the end of the string.  I don't need to know if its in the middle.  If it's at the end of the string, I am capturing arrow presses and will make it jump to the next form element.  If it's at the beginning or middle, then I am not making that jump to the next form element.  Jumping around on arrow presses works already, but it jumps irregardless of where the cursor is in the string.
How to get the caret column (not pixels) position in a textarea, in characters, from the start? How do you get the caret position in a &lt;textarea&gt; using JavaScript?  For example: This is| a text  This should return 7.  How would you get it to return the strings surrounding the cursor / selection?  E.g.: 'This is', '', ' a text'.  If the word “is” is highlighted, then it would return 'This ', 'is', ' a text'.
Looking for a command to create the geometry line symbol (\overline with arrows on both ends) I need a way of encoding the geometry line symbol. $\overline{AB}$ gives me the line segment symbol and $\overrightarrow{AB}$ gives me the ray symbol, I need a way to get a bar over the letters that has arrows on both ends. $\overrightleftarrow{AB}$ does not work.   Thanks! Get list of all tables in Oracle? In Trailhead we have the query to get the Contacts for the Account named "SFDC Computing", with an inner query.   SELECT Name, (SELECT LastName FROM Contacts) FROM Account WHERE Name = 'SFDC Computing'   It works fine for my purposes.  "Contacts" is the name of the relationship, per Trailhead. So, I went to Object Manager and examined the Account object's "Fields and Relationships". There is nothing named "Contacts"!   In general, how do I get the name of the relationship, for use in similar SOQL queries? The cast to value type 'Int32' failed because the materialized value is null How can you sync Blender configs between multiple machines? I run Blender on several machines, it is a hassle to copy configs around, in order that you don't have to configure everything from scratch every time. Is there a sync functionality that does this? How is acceleration measured if there is change only in the direction of velocity & not magnitude? The formal definition of acceleration is      It is the measure of how fast the velocity changes with respect to time.   Now, when the magnitude of velocity changes, acceleration $$\vec{a} = \frac{d \vec{v}}{dt}$$ and its unit is $m.s^{-2}$ .  But what about the case where the velocity only changes its direction keeping its magnitude constant? The definition can then be      Acceleration is the measure of how fast the velocity changes its direction with respect to time.   But how can I calculate the acceleration then?? What should be the unit then??? Please help. Why isn't Arthur woken up by the kick? When are attributive nouns plural? Sorry for the title, it is not very evident and intuitive but I really do not how to tell it better...  Well, you know, several times, or better, many times, we use this form:  If I want to say:      "development of special weapons was   the first point in Hitler's   program..."   I will say this (a better form):      "special weapon development was..."   OK...  is it      "special weapon development"   or      "special weapons development" (note   the plural...)   what's the grammar rule in order to understand how to use this very used form? The keyboard on my laptop seems to be typing by itself:   It sometimes types characters like 134, whether by itself or when I hit certain keys. Repeating characters may appear unexpectedly. The system volume may change by itself, or windows like the Print dialog or Web browser may appear.   This can happen without any input or as I type, and may occur more often when certain keys are pressed. Sometimes, the keyboard fails to respond altogether. This is happening regardless of the software involved.  Is there a ghost in my keyboard—is my keyboard broken?  A sample of text from the keyboard might look like this (normal QWERTY...ASDF...ZXC... sequence is expected):   QWERTYUIOPASDF)(G@*HKLZXCVBN QWERTYIOPASDFGL!#ZXCVB13 QWERTYUIOPASDFGHJKLZXCVB!#N qwertyu41iopasdf19g13h28j113k4113zxcvb4n qwerty4u1iopasdf0g7h1jklzxcvb13m qwert13uuuuuuuuuuuuuuuiopasdf87091134ghhhhhhhhhhhhhhhhhhhhhhh13jk13zxcvb14      This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. How can I cure lycanthropy? I really want to get rid of it. I've been through the whole companion’s quest line and cured Kodlak's. I killed all 5 witches and have 4 of the heads left in my inventory.  I've been back to that same flame and tried to use it with the head, but nothing going; activating it does nothing. I've heard this is how you cure it; however I have not heard a first-hand account of anyone actually curing it.  If you have, can you explain what you do? Do you go to the same tomb where you fought Kodlak's beast form? Do you do something special with the witch head in your inventory, or just have it in there and activate the harbinger flame or whatever? Compare two objects in Java with possible null values Share your experiences on exploring iOS 7 with us..  Whether you found hidden or little-known feature of iOS 7 or can explain how a big feature makes a difference, we're looking for objective reports of how the new OS affects your workflow.  Also provide details on how to achieve that feature, and if possible, include a relevant image too (hold Home and Lock for a screenshot on your iOS device).    Please post one tip per answer. Please also check to see if your answer has already been posted - duplicate answers will be deleted in favour of the original answer on any given topic. To search answers for this question use inquestion:101382 (or inquestion:this, directly from the question page) in addition to your search terms in the search box in the upper right hand corner of this page. How can one show there is no holomorphic function $f$ on the open unit disc $\mathbb{D}$ such that it extends continuously to $\frac{1}{z}$ on $\partial\mathbb{D}$? I mean $f$ takes value $\frac{1}{z}$ when $|z|=1$ and continuous here.  Thank you. Pivot rows into multiple columns I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:  ╔══════════╦══════════╗ ║ PersonID ║ OptionID ║ ╠══════════╬══════════╣ ║        1 ║ A        ║ ║        1 ║ B        ║ ║        2 ║ C        ║ ║        3 ║ B        ║ ║        4 ║ A        ║ ║        4 ║ C        ║ ╚══════════╩══════════╝   I need to pivot that data so the results are:  ╔══════════╦═════════╦══════════╦══════════╗ ║ PersonID ║ OptionA ║ Option B ║ Option C ║ ╠══════════╬═════════╬══════════╬══════════╣ ║        1 ║       1 ║        1 ║          ║ ║        2 ║         ║          ║        1 ║ ║        3 ║         ║        1 ║          ║ ║        4 ║       1 ║          ║        1 ║ ╚══════════╩═════════╩══════════╩══════════╝   Any suggestions? In Windows XP we can search for files that contain a defined keyword (inside all files types).  Windows 7 can look inside files for a keyword, but only for text files. (*.doc, *.txt, *.inf, ...), not (*.conf, *.dat, *.*, ...).   don't contain any filter I can use for this.  How is this possible? Implicit 'which is', 'which are' A new study has shown that millions of pieces of junk floating in  space could be a big hazard for satellites orbiting Earth.   Is there an implicit 'which are' in front of floating in space? Why is 'which are'  not written? If a function $f$ is continuous $\implies$ $|f|$ is continuous.(Answered by Myself) $(i)$ Given a function $f:E \rightarrow \mathbb{R}$ define $|f|:E \rightarrow \mathbb{R}$ by $|f|(x)=|f(x)|$ for $x \in E$ show if $f$ is continuous at $c \in E$ then so is $|f|$.        $(ii)$ Now the converse is not true, find $f$ such that $|f|$ is continuous but $f$ is not. Why isn’t the definite article used in "The commission commanded that work [...] should cease"? How to give different permissions to multiple groups of users? I installed Ubuntu 12.04 server and want to give full folder access say example: "Folder01" to group "Group01' and Limit "Group02" for read access only. How I can do this. Allowing all/different file type uploads