I have a problem with malicious ads on my mobile website, which redirects the user to app store. Mainly on the android browser and Safari for iOS.  Is there a way to block redirects for e.g. using javascript ? Maybe some event with preventDefault() function ?
Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A.  Typically this Javascript looks something like this:  &lt;script type="text/javascript"&gt;   if (top.location.href != self.location.href)      top.location.href = self.location.href; &lt;/script&gt;   My question is: As the author of the parent page P and not being the author of the inner page A, how can I prevent A from doing this break-out?  P.S. It seems to me like it ought to be a cross-site security violation, but it isn't.
A regular function can contain a call to itself in its definition, no problem.  I can't figure out how to do it with a lambda function though for the simple reason that the lambda function has no name to refer back to.  Is there a way to do it?  How? Using latexdiff with git Okay, this should be super easy to do but I just can't find the way.  I have a background image with a solid colour layer on top of it, and I would like to add text on top of everything in such a way that the filling of the text is the image in the background. I have tried selecting the text shape and deleting that selection shape in the solid colour layer, but it just looks wrong.   Can anyone help me with this? Many thanks in advance. Benefits of using backtick (`) in MySQL queries? In MySQL we can create queries with or without the backtick (`) symbol. Example:   SELECT * FROM TEST; SELECT * FROM `TEST`;   Both works fine in mysql-console.  Is there any technical difference between them?  Is there any benefit using (`) over over simple queries? How to reduce title bar height? degree of freedom of a rigid body 5 or 6? I'm confused here. I have a three particle (rigid) system. What would be the degree of freedom? I found out five. 3 coordinates for center of mass and 2 for describing orientation. But we have only three constraints, i.e. three equations that reduce 9 coordinates by 3, 9 - 3 = 6, which gives 6 degrees of freedom?? Did I miss something above? Given the case I made two independent changes in one file: eg. added a new method and changed another method.  I often don't want to commit both changes as one commit, but as two independent commits.  On a git repository I would use the Interactive Mode of  to split the hunk into smaller ones:   git add --patch   What's the easiest way to do this with Subversion? (Maybe even using an Eclipse plug-in)  Update: In , Ryan calls it: “The Tangled Working Copy Problem.” For $n\geq 3$ there exist $x,y\in S_n$ such that $x$ and $y$ have order $2$ and $xy$ has order $n$. Assume that $n\geq 3$. Let $S_n$ be the symmetric group with $n!$ elements. Prove that there exists $x$ and $y$ in $S_n$ such that $x$ and $y$ have order $2$ and $xy$ has order $n$.  For $n=3$, it is easy to see that $x=(1, 2)$ and $y=(1, 3)$ works. How to prove it for the general case? How to properly write multiple authors in bibtex file? Can a continuous real function take each value exactly 3 times? Can you be tripped by an AoO while standing up? $-1$ is a quadratic residue modulo $p$ if and only if $p\equiv 1\pmod{4}$ I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks. I asked this question for many people/professors without getting a sufficient answer, why in QM Lebesgue spaces of second degree are assumed to be the one that corresponds to the Hilbert vector space of state functions, from where this arises? and why 2-order space that assumes the following inner product:  $\langle\phi|\psi\rangle =\int\phi^{*}\psi\,dx$  While there is many ways to define the inner product.  In Physics books, this always assumed as given, never explains it, also I tried to read some abstract math books on this things, and found some concepts like "Metric weight" that will be minimized in such spaces, even so I don't really understand what is behind that, so why $L_2$? what special about them? Who and how physicists understood that those are the one we need to use? A recent downvote drew my attention to my  four years ago to . I edited the answer to update the links and to (very slightly) change the tone of the answer. I was in a very bad mood at the time of the answer.  Still, reading the comments, I think I was largely correct: it's better for the site if we encourage people to do a little research before posting. Maybe even just the "two minutes of searching" that I refer to in the answer.  I was considering deleting the answer, but decided to bring the old debate back to Meta, instead.  "Was I right, or was I right?" Increase iPhone call history How would one create an iterative function (or iterator object) in python? Why are pointers such a leading factor of confusion for many new, and even old, college level students in C or C++?  Are there any tools or thought processes that helped you understand how pointers work at the variable, function, and beyond level?  What are some good practice things that can be done to bring somebody to the level of, "Ah-hah, I got it," without getting them bogged down in the overall concept? Basically, drill like scenarios. Question:  Show that $n^2 + 3n + 5$ is not divisible by $121$, where $n$ is an integer. tarring in parallel An Oceanographer friend at work needs to back up many months worth of data.  She is overwhelmed so I volunteered to do it.  There are hundreds of directories to be backed up and we want to tar/bzip them into files with the same name as the directory.  I can do this easy enough serially - but - I wanted to take advantage of the several hundred cores on my work station.  Question:  using find with the -n -P args or GNU Parallel, how do I tar/bzip the directories, using as many cores as possible while naming the end product:  origonalDirName.tar.bz2?  I have used find to bunzip 100 files simultaneously and it was VERY fast - so this is the way to approach the problem though I do not know how to get each filename to be that of each directory. Auto-mounting network shares per user I have a server that has a number of CIFS shares that need to be accessed on a per-user basis. For example, I have a Music share which I have full access to, but my wife has read-only access.  When either myself or my wife log into our Ubuntu 11.04 laptop I would like these shares to be automatically mounted per user. Now I understand that if I mount as -t cifs without specifying a user then it will use the USER environment variable. However, I also need to specify a password, so how can I do that when each user has a different password?  I think my questions are:   Is there a way for me to have a per-user /etc/fstab? If not, is there a way to specify that a mount is only applicable to a certain user? Also, the share password is always the same as the local password. Is there a way to specify that this password should just pass through from the client to server rather than having to specify it in a credentials file somewhere?   Or maybe I'm missing something and there's a completely different solution. Can anyone help?