Android - How to validate url and add http://www
How to detect the presence of URL in a string
How does HOTP keep in sync? My understanding of  is that each password is unique and based on a counter.    $$PASSWORD = HOTP_1(K,C)$$  Where $C$ is an incremental counter.  What I wish to know, is how you keep the client and server in sync?  Looking at current systems (google authenticator), there appears to be no indication if the actual 'counter' number, but you can generate successive passwords at will.  What happens if, for example, the password you have generated uses $C = 5$, but the server is expecting $C = 3$?  Also, what is the 'integrity check' for?  Google cant seem to come up with a solution. I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&amp;@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;@#\/%=~_|])/i;     return text.replace(exp,"&lt;a href='$1'&gt;$1&lt;/a&gt;");  } Select Permissions Across Multiple Schemas Within the Same Database I have been asked by a client to implement some views for reporting purposes, the views will be accessed via PowerBI, Excel and SSRS. The designated user will only have access to the view and no underlying tables must be available to the user.  The problem I have encountered in that the SQL within the view touches 3 different schemas (All within the same database):   Pupil Provider  Security   The view is:  CREATE VIEW dbo.vTestPermissions AS SELECT a.Column1,        b.Column1,        c.Column1 FROM Pupil.Table1 a JOIN Provider.Table2 b ON a.Column1 = b.Column1 JOIN Security.Table3 c ON a.Column1 = c.Column1   The owners of the Tables/View are as follows:   Pupil.Table1 - Owner Pupil Provider.Table2 - Owner Provider Security.Table3 - Owner Security vTestPermissions - Owner dbo   When I select from the view I get an error:     The SELECT permission was denied on the object 'table3', database   'TEST', schema 'Security'   I have tried giving SELECT permission with and without the GRANT option to the schema, and the tables, but that makes the underlying tables available to the user.  Any help on this will be greatly appreciated. If I put my phone on my notebook's left corner, it shuts down. Can anybody give me reliable explanation as to why this is happening?? In Triangle, $\sin\frac A2\!+\!\sin\frac B2\!+\!\sin\frac C2\!-\!1\!=\!4\sin\frac{\pi -A}4\sin\frac{\pi -B}4\sin\frac{\pi-C}4$ To prove  $$\sin\frac A 2+\sin\frac B 2+\sin\frac C 2-1=4\sin\frac{\pi -A}4\sin\frac{\pi -B}4\sin\frac{\pi-C}4$$  My approach :   $$ \begin{align} \text{L.H.S.} &amp; = \sin\frac{A}{2}+\sin \frac{B}{2}+\sin\frac{C}{2} -1 \\[8pt] &amp; = 2\sin\frac{A+B}{4}\cos\frac{A-B}{4}+\cos\left(\frac{\pi}{2}-\frac{C}{2}\right)-1 \\[8pt] &amp; = 2\sin\frac{\pi -C }{4}\cos\frac{A-B}{4} - 2\sin^2\left(\frac{\pi -C}{4} \right) \\[8pt] &amp; =2\sin\frac{\pi -C }{4}\left\{ \cos\frac{A-B}{4} - \sin\left(\frac{\pi -C}{4} \right)\right\} \end{align} $$  Unable to move further please help. thanks. I've been trying to prove   $$\sum_{k=1}^{n}{(-1)^{k+1} {{n}\choose{k}}\frac{1}{k}=H_n}$$  I've tried perturbation and inversion but still nothing. I've even tried expanding the sum to try and find some pattern that could relate this to the harmonic series but this just seems surreal. I can't find any logical reasoning behind this identity. I don't understand . Is there any proof that doesn't require the integral transform? Alignment of numbers on the individual bars Is 'clamp' a formally recognized mathematical function? I was surprised to find the clamp function absent from  and . Is this mainly a concept particular to computer programming? Is it known by another name in mathematics? I'll be editing the Wikipedia shortly to include a reference to this function but I want to make sure I'm not omitting some synonymous terms I'm currently unaware of.  $$   \operatorname{clamp}(x) = \max( a , \min( x , b ) ) \in [a,b] $$ Minecraft Inventory Saving Contacts in Mavericks Messages display phone numbers instead of contact names Since updating to Mavericks the Messages app doesn't display the contact names for people I've been communicating with iMessage, it shows their phone number instead. My messages thankfully still stay synced between my iPhone and Messages on Mavericks. Why won't my YN-568EXII work with a flash trigger? I have a Canon 5DMk2 and have just bought 2 Yongnuo YN568EXII speed lights. I have an existing Yongnuo RF-603CII trigger, but I cannot get them to work together! Does anyone have any suggestions, as the manual is no use :( Thanks Steve How do I inspect the view hierarchy in iOS? Using getopts to process long and short command line options Will wolves attack and kill ocelots in Minecraft? I know they kill sheep. I just don't want my cats being eaten. Configuring dpkg stops processing when calling an HTTP request to Adobe Flash Player I recently moved to Linux, and I am in love with the experience. Opinions apart, I am having problems when running sudo dpkg --configure -a  My computer stops processing the command here:  You may know Adobe Flash Player is no longer supported, and I believe that could be why the command is unable to load pepperflashplugin-nonfree. I have tried fixing the problem by checking older posts here, but none of them was able to fix this problem. Constant term in Lagrangian Why can we always drop any constant term in a Lagrangian density in quantum field theory?  This issue is somehow related to the constant term being some kind of cosmological constant.  Can you please explain this issue? Underscores in custom fields While trying to perform a WP_Query using meta_query(), I had some trouble because the custom fields created by a plugin had _ in the beginning of its name.   Although I noticed it was stored this way in the database, I had no idea why it was there and thought I had to reference it without the underscore (for the record, that is wrong).  Why do some custom fields start with underscores and others don't? What are the underscores used for? Are they mandatory in some circumstances? How do I break out of a loop in Perl? I'm trying to use a break statement in a for loop, but since I'm also using strict subs in my Perl code, I'm getting an error saying:     Bareword "break" not allowed while   "strict subs" in use at ./final.pl   line 154.   Is there a workaround for this (besides disabling strict subs)?  My code is formatted as follows:  for my $entry (@array){     if ($string eq "text"){          break;     } } Proving an inequality by induction, how to figure out intermediate inductive steps? I'm working on proving the following statement using induction:  $$ \sum_{r=1}^n \frac{1}{r^2} \le \frac{2n}{n+1} $$  Fair enough. I'll start with the basis step:  Basis Step: (n=1) $$ \sum_{r=1}^n \frac{1}{r^2} \le \frac{2n}{n+1} $$ $$ \frac{1}{1^2} \le \frac{2}{1+1} $$ $$ 1 \le 1  \checkmark  $$  Inductive Step: $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{(n+1)+1} $$ $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{n+2} $$  My goal is to prove $\forall_{n\ge1} s(n) \implies s(n+1) $ or that this inequality holds true for all $n\ge1$.  I'm not quite sure to go from here on the inductive step. I understand that I need to basically work some clever substitution and manipulation into the problem to end up with: $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2n}{n+1} $$  However, I'm not quite sure what needs to done to obtain this after attempting a few times. How to clip an Openlayers OSM Background to a Vector Boundary?