Here i am trying to do the validation for the html input form. here i want to return false if the input is not a number. i want to return false if anything else other than number is supplied as input.  How can i do this? what is the pattern for the number validation  &lt;form class="form-horizontal" name="product-form" method="post" action="go.php" role="form" enctype="multipart/form-data" onsubmit="return validateForm();"&gt;  &lt;div class="form-group"&gt;                 &lt;label class="control-label col-sm-2" for="product_price"&gt;Product Price&lt;/label&gt;                 &lt;div class="col-sm-10"&gt;                   &lt;input type="text" class="form-control" name="product_price" id="product_price" placeholder="36000" required&gt;                 &lt;/div&gt;               &lt;/div&gt; &lt;/form&gt;   Javascript  function validateForm() {     var x = document.forms["product-form"]["product_price"].value;     if (x == null || x == "") {         alert("price must have only numbers");         return false;     } }
Is there a quick way to set an HTML text input (&lt;input type=text /&gt;) to only allow numeric keystrokes (plus '.')?
How can we replace $\sup$ with $\max$ in definition of subordinate norm for finite-dimensional vector space? It's become clear that last night's (Tues Jan 8th 2019) patches to Windows 7 broke SMB2 networking in Lanman Server.  One or both of KB 4480970 and KB 4480960 results in any OS that uses SMB2 (such as Windows XP, some Windows 7, and same generation server OS' and Mac OS X machines (certainly 10.10, 10.11 not sure about others yet)) being unable to connect to Windows 7 Pro shares.  Client machines repeatedly prompt for login despite credentials being correct. Installation of Miktex So before I reformatted (to get rid of Windows), I simply used this command to open documents by putting it at the end of the ~/.bashrc file:  alias commandless= 'gnome-open ./Documents/the-linux-command-line.pdf; gnome-open ./Documents/linux.odt'   But now everytime I start the terminal, it says:  bash: alias: gnome-open ./Documents/the-linux-command-line.pdf; gnome-open ./Documents/linux.odt: not found   before even typing anything in, and when I run the command nothing happens, not even error messages. How many individual lights can an arduino control I want to use a regular Arduino board to control LEDs - what is the most lights I can control individually from the board?  Is there a tutorial on how to hook it up? NULL values inside NOT IN clause using System; using System.Security.Permissions; using Microsoft.SharePoint; using Microsoft.SharePoint.Security; using Microsoft.SharePoint.Utilities; using Microsoft.SharePoint.Workflow;  namespace Change_Title_Event.Change_Title {     /// &lt;summary&gt;     /// List Item Events     /// &lt;/summary&gt;     public class Change_Title : SPItemEventReceiver     {        /// &lt;summary&gt;        /// An item is being added.        /// &lt;/summary&gt;        public override void ItemAdding(SPItemEventProperties properties)        {            properties.AfterProperties["Title"] = "Kevin: Changed by event receiver at" + DateTime.Now.TimeOfDay.ToString();            base.ItemAdding(properties);        }       } }   Where simple example, which works perfect on my local Sharepoint 2010. It is sandboxed.  But when I package this solution, it do not work on Sharepoint Online. I does not give any Errors either.  I think I am doing something wrong, something simple, but I can't simply find anything on Google about it.  Here is another who asks on the MSDN forum, but gets a very wierd reply, that I do not understand. Is there a way to "auto login" in PuTTY with a password? Is there a way to configure a password for a stored session in ?  I know there is the capability to specify an "auto-login username" (under Connection/Data), but is there a way to do the same with the password? Ruby block and unparenthesized arguments I extracted simple example:  require 'pp' x = 1..3 pp x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end pp x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} }  pp(x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end) pp(x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} })   I am wondering why first pp produces:  [1, 2, 3]   While all the oders are giving:  [{:value=&gt;1, :double=&gt;2}, {:value=&gt;2, :double=&gt;4}, {:value=&gt;3, :double=&gt;6}]   I assume it has something to do with operator precedence. Where can I find good explanation? "Oriented" vs. "orientated" Can we have a way to edit bounty custom message? I put up  over on SO with the assumption that the text would be formatted like it is for a question or answer.  I'm not really sure if I was incorrect in my assumption, or if I just formatted my text improperly, as I can't go back and edit what I put in.  Am I missing an obvious feature?  If not, would it be reasonable to request bounty-text edits—perhaps with moderator-approval to prevent abuse?  Edit: I was trying to use markdown to produce an unordered list as part of my bounty.  What you see in the link is a blob of text with dashes separating phrases Parallel universes: are there an infinite amount of universes? Parallel universe: in every universe, you are presented with a different decision. Does that mean there are an infinite amount of parallel universes? I.e., if in one universe I choose to go left, I am then presented with different choices vs if i choose right, and that creates more universes with more decisions to be made.  Or does it mean that in the end of one's life we end up in the same place, meaning that its just one parallel universe that eventually collides with the other. Including all the jars in a directory within the Java classpath How to get exact camera view? I'm currently a beginner when it comes to 3D modelling but doing okay so far. I'm struggling a bit when it comes to the final renders of my scene, specifically on the camera view I want. Sometimes its to zoomed in and sometimes to zoomed out that it's gone out of the environment of the blender. I realized the settings for the camera on blender are for actual cameras / photography and I'm no expert on that too. A tip on how to control them precisely would be nice. Thank you. how to change the distance between tick mark and tick label This is a little bit off topic as it is not exactly related to TeX.  I saw recently that  was updated to 1.020 which comes with math table support.  Does any one had a chance to play with this font and use it with unicode-math, and in particular with the LuaTeX engine?  I am very interested in purchasing a complete set of this nice fonts family. However I am concerned about its usability with the unicode-math package. Unlike Cambria Math or XITS Math, Minion Math does not come with a single font, instead it has 20 (4 weights 5 optical sizes) fonts. So it will be better to know how it works before spending 700 euro.  In particular, say the following minimal document, will it use correct optical size of the fonts for each of the three formulas? I had trouble with using correct optical size of Minion Pro fonts with fontspec. I worked it out with the SizeFeatures and OpticalSize. However, I am not so sure if the same strategy will work for Minion Math with unicode-math. In addition, in Cambria Math, etc., the bold symbols and alphabets are chosen directly from the unicode math enabled fonts. But in Minion Math, from the glyph tables on their websites, there seems no bold alphabets in each font. So will the mathbf in the document below work out of box?  \documentclass{article} \usepackage{fontspec} \setmainfont{Minion Pro} \usepackage{unicode-math} \setmathfont{Minion Math} % or what ever fonts name actually is  \begin{document} \fontsize{5}{5}\selectfont \[ \mathbf{E} = mc^2 \] \fontsize{10}{10}\selectfont \[ \mathbf{E} = mc^2 \] \fontsize{36}{36}\selectfont \[ \mathbf{E} = mc^2 \] \end{document} Why did skilled wizards use He-Who-Must-Not-Be-Named? Pursuant to , it's plausible that the typical witch or wizard would use 'He-Who-Must-Not-Be-Named' (if they assume Taboo Spell is intact after death of Voldemort). But, why would the Aurors and those in the Ministry of Magic (who had first rate protection) also use it? Even Snape (the Half-Blood Prince) hesitated to say 'Voldemort', and he was under the protection of Dumbledore, Dumbledore being the only wizard Voldemort ever feared.  What was the point of the Death Eaters being scared to say 'Voldemort' when, ostensibly, Voldemort wasn't even alive? Yes, it's true that some believed Voldemort would return, but, at the time, it was just that -- a belief. Were people scared that the Death Eaters might give a list of all those who used Voldemort's name to Voldemort upon his return? Will having multiple domains improve my seo? Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all.  The title of my "Website" says:    &lt;title&gt;Used cars - buy and sell your used cars here&lt;/title&gt;   Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page.  Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms.  Lets say the term "used cars" has 20 million searches each month.  Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)?  The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right?  What are the downsides for this?  I already know about google spiders not liking redirects, but there are many methods of redirecting...  Is this a good idea generally? How to determine if .NET code is running in an ASP.NET process? I have an instance of a general purpose class that will be executed both under ASP.NET and a stand alone program. This code is sensative to the process where it is being run - that is, there are certin methods that should not called if running under ASP.NET. How do you determine if the code is executing in an ASP.NET process?  The solution I am currently using is answered below.    I wish someone would add a comment as to why this question has gotten downvoted and/or propose a better way to ask it! I can only assume at least some folks have looked at the question and said "what an idiot, ASP.NET code is .NET code". I am curious as to why "nay" replaces the simple unequivocal "no" in the context of voting.  My research in Merriam-Webster tells me that "nay" means "no" (not the other way around) and the first known use of "nay" appeared in 1400s. Since the use of "no" existed before 1400 and the word remains to be used afterward, why would "nay" become the preferred choice of word when it comes to voting. Any idea?