I have a form that contain input fields one for domain and one for folder name. now i want to validate these two fields before submitting the form.I am using .  how can i validate my fields on custom build rules  1) domain url will not contain http:// or / at the end     http://google.com wrong    google.com/     wrong    google.com      correct   2) folder name without any "/" at the start or at the end     foldername/ wrong    /foldername wrong    foldername  correct   this is the code that i am trying.  &lt;form id="f"&gt;     &lt;label for="domain"&gt;Domain&lt;/label&gt;     &lt;input type="text" value="subdomainname.abc.com" id="domain" name="domain" maxlength="50" size="30"&gt;      &lt;label for="newfolder"&gt;Folder Name &lt;/label&gt;     &lt;input type="text" name="newfolder" maxlength="50" size="30" id="newfolder"&gt;      &lt;input type="submit" value"configure"&gt; &lt;/form&gt;   this is validation   $(function() {     var v = $('#f').validate({         rules: {             domain: {                 required: true                  // custome rule              },             newfolder: {                 required: true,                 // custome rule             }         },         messages: {             domain: {                 required: "Enter a valid url"             },             newfolder:{                 required: "Folder name incorrect"             }         },         submitHandler: function(form) {             alert('submit');           }     });           });
How do you create a simple, custom rule using the jQuery Validate plugin (using ) that doesn't use a regex?  For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked?
How long does it usually take for published articles to show up on Google Scholar? The title pretty much says it all - what's the typical delay with which Google Scholar indexes newly published articles? (Note I'm not talking about citations, but about the article showing up at all.)  Edit: the article in question went for over six months after being published (in a well-regarded Springer journal with its own Wikipedia page) without appearing on Google Scholar, until it received a citation, at which point it was added to Google Scholar almost immediately. One more motivation to write papers that get cited. :)  Edit 2: Another article in an even more mainstream journal took a little over seven weeks. Is Tactical Down-Voting ever valid? Has anyone noticed any tactical downvoting of their, or other people, answers?  For example, in a recent answer to a question, my answer described a possible solution.  Shortly afterwards, another answer appeared following the solution I had mentioned.    I know that this is completely in the spirit of the site, however my answer had been down voted even though it was still as valid as it ever was.  Another poster also had his equally valid solution down voted.  There is no way of knowing the reason behind the down voting, as no comments were left, but I am suspicious as to the ethics behind down voting someone else's valid answer in the hope of making their own answer more prominent.  Are people really that desperate to gain reputation?  I have seen comments in other posts that suggest that tactical downvoting has occurred.  So, does anyone think that it is acceptable to downvote another post, even though it is still correct but may not provide a complete answer, to make their own appear more favourably? How to highlight paragraph (linebreak preserving) as well as itemize, tabular etc.? I want to highlight changes which are introduced by myself in the pdf document. So far the soul package is very neat but it does throw errors when I want to highlight not only paragraphs but also some itemize environments, and I don't want to highlight the items separately. Also the \cite{...} command is not supported by \hl. I recently posted a slightly different question:   BTW: What I liked most over other approaches like pdfcomments etc. is that the \hl command from soul has a very exact and clear output, no icons, no clicking etc. involved. Together with todonotes it's very good and almost all I need. Let $Z_i,Z_2,\ldots$ be IID Random Variables with density $f$. Suppose that $P(Z_i&gt;0)=1$ and that $\lambda=\lim_{x \to 0+} f(x)&gt;0$. How can I show that $X_n=n \times \min\{Z_i\}$ has a limiting exponential distribution with mean$1/\lambda$?  I know that the CDF of the first order Statistic is for $t&gt;0$  $$F_{min \{ Z_i \}} (t)= 1- \left[ 1-F(t) \right]^{n}$$  Convergence in distribution requires that $F_n (t) \to F(t)$ for some distribution function $F$ but I cannot quite take the limit of the above, with $t$ replaced by $x/n$, as the distribution is not known. I guess I have to insert the second piece of information somewhere but I do not recognise where.  Could you please give me a hint or two?  Thank you. Do Indian passport holders with UK Tier 2 need to get a tourist visa for Mexico? I'm an Indian passport holder currently resident in the UK under a Tier 2 (General) visa and planning on going to Mexico on a holiday. So I was looking into the rules on the Mexican embassy in the UK and :     According to the new regulations who entered into effect on 18th, May   2016 (article 26 of the Guidelines and Requirements for Migratory   Services) regarding foreign nationals visiting Mexico, holders of a   valid UK visa, regardless their nationality, are not required to apply   for a Mexican visa as a tourist, business (Non-Lucrative Activities)   or transit visitors for a stay of up to 6 months. This regulation does   not apply to British Travel Document holders.   However, :     PERMANENT RESIDENT IN THE UK (ILR / ILE / PERMANENT RESIDENTS)        According to Mexican regulations which came into force in June 2009,   Permanent residents in the United Kingdom wishing to travel to Mexico   do not require a visa to enter the country as tourists or business   visitors for up to 180 days and as visitors in transit for up to 30   days, regardless their nationality.   So which one is correct? Are Tier 2 holders with an Indian passport allowed visa-free / visa on-arrival entry to Mexico? How to change the background color only for the current page? Suppose A is a 3*3  symmetric matrix s.t.  $$\begin{pmatrix} x &amp; y &amp; 1 \\   \end{pmatrix} A  \begin{pmatrix} x  \\  y\\ 1\end{pmatrix}  = xy -1 $$  let p be the no. of positive eigen value of A and q = rank(A)-p, then p=? q=?  what matrix A should be I can't find?? When one should use spacing line \quad or \, According to , POST is used to create a resource:  The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.  According to , PUT is used to create or replace a resource:  The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI.  So which HTTP method should be used to create a resource? Or should both be supported? London Heathrow airport - do I need a transit visa? I am traveling from the US to India via London Heathrow on November 6. I will be at LHR on 7th at 6:20 am and departing at 9:25 pm. I'm an Indian national and have a valid US visa.  Do I need a transit visa to stay airside?  I have been scared that British Airways have stopped a few people from boarding flights (no details just rumors).  Do I need a transit visa to stay landside? I want to do some sightseeing. What are the chances of getting past officials using transit without visa concession?  Real stories will help a lot to calm the butterflies in my stomach. jQuery Isotope filter to no items? Finding the derivatives of sin(x) and cos(x) We all know that the following (hopefully):  $$\sin(x)=\sum^{\infty}_{n=0}(-1)^n \frac{x^{2n+1}}{(2n+1)!}\ , \ x\in \mathbb{R}$$  $$\cos(x)=\sum^{\infty}_{n=0}(-1)^n \frac{x^{2n}}{(2n)!}\ , \ x\in \mathbb{R}$$  But how do we find the derivates of $\sin(x)$ and $\cos(x)$ by using the definition of a derivative and the those definition above?  Like I should start by doing:  $$\lim_{h\to\infty}\frac{\sin(x+h)-\sin(x)}{h}$$  But after that no clue at all.  Help appreciated! Compare means of group with a mean of a subgroup Check if table exists in SQL Server I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements.  When you Google for the answer, you get so many different answers. Is there an official/backward and forward compatible way of doing it?  Here are two possible ways of doing it. Which one among the two is the standard/best way of doing it?  First way:  IF EXISTS (SELECT 1             FROM INFORMATION_SCHEMA.TABLES             WHERE TABLE_TYPE='BASE TABLE'             AND TABLE_NAME='mytablename')     SELECT 1 AS res ELSE SELECT 0 AS res;   Second way:  IF OBJECT_ID (N'mytablename', N'U') IS NOT NULL     SELECT 1 AS res ELSE SELECT 0 AS res;   MySQL provides the simple   SHOW TABLES LIKE '%tablename%';    statement. I am looking for something similar. Let I and J be ideals of a ring R. Show by example that the set of products {xy | x ∈ I, y ∈ J} need not be an ideal Let I and J be ideals of a ring R. Show by example that the set of products {xy | x ∈ I, y ∈ J} need not be an ideal, but that the set of finite sums of products of elements of I and J is an ideal. This ideal is called the product ideal, and is denoted by IJ.   I want to check if my work on the first part makes any sense. I am not sure if I am picking the right example.  If I let R = Z and I = (2) and J = (3) then I has multiples of 2, and J has multiples of 3  6 will divide the product IJ if we add 2 and 3 though we get 5 in IJ, but I am not sure if 5 Divides IJ. What to do with sudden wealth? How to prove that it is a group? The  page indicates "the hats get put back in their boxes on January 4th". Aside from the pure terror that sentence seems to invoke, I was curious of exactly when this is going to be.  I know that the hats have caused a bit of a time warp at times (for example the starred chat hats). Will this be true of the removal process as well?  Do we get our hats until 23:39 UTC Jan 4th, are they removed at the end of UTC Jan 3rd? Unmarshal a single element list fails Protagonist becomes the avatar of an alien deity and has to cope with adversary god