UIWebView delays shouldStartLoadWithRequest until scrolling is finished
How can I programmatically force-stop scrolling in a UIScrollView?
The following MWE produces a PDF whose TOC has two entries: “Foo” and “Bar” with correct page numbers. So far, so good. However, upon clicking on the link to “Bar”, I am taken to the page for “Foo” instead.  \documentclass{report} \usepackage{hyperref} \newcommand*\backmatter{\setcounter{chapter}{0}}  \begin{document} \tableofcontents \chapter{Foo} \backmatter \chapter{Bar} \end{document}   (Produced with pdflatex, run twice.)  This MWE is whittled down from a (much!) more complex document but the above does seem to reproduce the error reliably.  Re-setting the chapter count seems to confuse hyperref, even though the page references are still accurate. Notice that in my real document, \backmatter does other things, including setting the numbering style to alphabetical so there’s no chance of confusion even though both chapters are ostensibly labelled as “Chapter 1”.  How do I fix this? Is this a bug? Are there workarounds? Why does autoboxing make some calls ambiguous in Java? I noticed today that auto-boxing can sometimes cause ambiguity in method overload resolution. The simplest example appears to be this:  public class Test {     static void f(Object a, boolean b) {}     static void f(Object a, Object b) {}      static void m(int a, boolean b) { f(a,b); } }   When compiled, it causes the following error:  Test.java:5: reference to f is ambiguous, both method     f(java.lang.Object,boolean) in Test and method     f(java.lang.Object,java.lang.Object) in Test match  static void m(int a, boolean b) { f(a, b); }                                   ^   The fix to this error is trivial: just use explicit auto-boxing:  static void m(int a, boolean b) { f((Object)a, b); }   Which correctly calls the first overload as expected.  So why did the overload resolution fail? Why didn't the compiler auto-box the first argument, and accept the second argument normally? Why did I have to request auto-boxing explicitly? Radical of $\mathfrak{gl}_n$ I find it intuitive enough that the radical of $\mathfrak{gl}_n\mathbb F$ is the scalar matrices, but I have trouble finding an easy, but complete proof:  Proof. Let $\mathfrak s$ denote the scalar matrices. Clearly $\mathfrak s\subset\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$. Suppose that $\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$ is generated by more than one element, so that $X\in\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$, but $X\notin\mathfrak s$. We can change basis such that $\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$ is upper-triangular. (The change of basis leaves the scalar matrices invariant.) Then $X$ is upper-triangular.  I want to conclude that there exists a $Y\in\mathfrak{gl}_n\mathbb F$ s.t. $[X,Y]$ is not upper-triangular. How can I see that $Y$ always exists, except by waving hands? Turning a cipher into a hashing function find the minimum value given constraints How do I find the angle between two vectors? I have 3 points on my screen:  a = a point which is (c.x, 0) makes a line pointing straight up b = a user input touch, can be anywhere on the screen c = a moving object         a _______.________ |      |       | |      |       |  |   b  |       | |  .   |       | |   \  |       | |    \ |       |  |     \|       | |      | c     | |______._______|   I have drawn some lines so that you can see the vectors.  I want to be able to get the angle between a and b. I have tried this, but it doesn't work, does anyone know what I'm doing wrong?:  //v1 moving object float boxX = this.mScene.getLastChild().getX();  float boxY = this.mScene.getLastChild().getY();  //v2 user touch float touchX = pSceneTouchEvent.getX(); float touchY = pSceneTouchEvent.getY();       //v3 top of screen float topX = boxX; final float topY = 0;  float dotProd = (touchX * topX) + (touchY * topY);  float sqrtBox = (touchX * touchX) + (touchY * touchY); float sqrtTouch = (topX * topX) + (topY * topY);  double totalSqrt = sqrtBox * sqrtTouch; double theta = Math.acos(dotProd / Math.sqrt(totalSqrt));   The answer I usually get is between 0 and 1. How do I fix this so that I get the angle in degrees? Shifting -5 V to +5 V signal to 0 to +5 V for ADC I want to convert the  output voltage of an ECG (-5 to +5) to 0 - +5 volt for ADC. Should i use Op amp ? What is my problem in this picture? I simulated it in Proteus ... but when input voltage is higher than 4 V or lower than -4 V Vout gives an unexpected value.   Below is another simulink that have same problem ...    My idea to make this level of voltage is (Vin +10)/2 that give the range 0-5 V. Best way to add KeyEvents and faster Quit Changing Custom Post Type Name Order How well-known is the theology of Middle-earth, in Middle-earth? One thing that is notably absent in Middle-earth is any mention of temples, churches, priests or religious rites.  There are passing mentions of Men who would "worship" Sauron, but generally the world of Middle-earth seems much less religious than medieval Europe, or even classical antiquity.  One never hears about "the cult of Aule" or "the cult of Yavanna," although historically there were many "cults of Athena" or "cults of Poseidon."  Aragorn doesn't (to my memory) make an offering to Tulkas before battle, nor does he pray to Eru Ilúvatar for victory, and all the holidays and solemnities seem to commemorate historical figures, not religious ones.  This is especially strange in a world where there are still living witnesses, like Galadriel, to the actions of the Valar and other "divine" beings, and where there are still Maiar wandering around talking to people and putting on flashy firework shows.  Now, a lot of people talk about how Tolkien didn't want the Valar to be considered "gods," but at the same time he did use phrases like "the gods of old" numerous times.  Clearly, these beings would have qualified for worship in most cultures.  And even without the Valar being considered a true pantheon, there is still Eru, a closer analogue to the Christian God of Tolkien's beliefs, and we know the denizens of Middle-earth knew of him (Him?) because of the line "Eru, who in Arda is called Ilúvatar."  And yet, Ilúvatar seems not to be terribly important to anyone on a daily basis.  So my question is this: how familiar with the "theology" of Middle-earth were the citizens of Middle-earth?  Would the average merchant in Rohan know about the Valar and the Maiar and Iluvatar and the Music of the Ainur?  The average noble in Minas Tirith?  The younger Elves, like Legolas?  The Dwarf Lords?  Were the theological truths about the formation of the world, the Valar and the Maiar just so well known that they weren't worth commenting on, or had they been forgotten by most?  And if they had been forgotten, why wasn't the knowledge (whether through deliberate teachings or casual conversation) re-invigorated by witnesses like Gandalf or Galadriel? "along the river" vs "alongside the river"? In a question on "along" vs "alongside", I have seen this question and the correct answer on the web site makes me confused.      The question is: I enjoyed my walk _________________ the river.  a) along b) alongside  I selected "...along the river" as the correct answer, but on the web site it is shown as wrong and the correct answer is "alongside".  How can that be? I still do not agree, because I have studied the difference between the two. "along" is just the right preposition for thin and long places like road, path, street, beach etc".   So, why would the correct answer be "alongside" which simply means "next to"? Do you not think "along" seems to be better fitting?  Regards,  Note: I would be more than gratefull, if somebody show it to me in a video, like "a walk along the river" and "a walk alongside the river". Maybe I can understand the how "a walk along the river" and "a walk alongside the river" would take place. Maintenance plan for creating transaction log backups I have a database that is set to the 'Full' recovery model, and I'm creating a maintenance plan to backup the Transaction Log every 15 minutes. A full backup is then taken once every 24 hours.  I was wondering: will the maintenance plan for the transaction logs create a lot of different files every 15 minutes, or will it by default append to the same file for 24 hours?  Also: what is preferred? I couldn't find anything on this subject (or maybe I was Googling the wrong words).  Thanks for any pointers anyone can give me.  EDIT: I also see that the checkmark "Verify backup integrity" is OFF by default. Is there a risk with turning it on? It seems to be that it should be on by default, so is there a reason for not using this? Seeking podcasts related to geospatial technologies? I would like to make a list of podcasts related to geospatial technologies.  Do you listen to any that you find interesting and informative? Refer to an item in `dirs` I use pushd to work with multiple directories in bash and zsh. I've aliased dirs to dirs -v so that I get an ordered list when I want to see what's on the directory stack:  chb$ dirs 0  /Volumes/banister/grosste_daever_gh/2013-03-27/reader 1  /tmp/20130618202713/Library/Internet Plug-Ins 2  ~/code/foo/view/static/css 3  ~/Downloads   Is there a way (either in bash or zsh) that I can refer to one of the directories listed on the command line using an alias for its position on the stack? For example, instead of typing:  chb$ cp ~/code/foo/view/static/css/baz.css ~/code/bar/view/static/css/   I'd type:  chb$ cp &lt;2&gt;baz.css ~/code/bar/view/static/css/   ...or something like that, maybe using a dollar sign and a variable name instead of &lt;n&gt;. Compute the limit $\lim_{n \to \infty} \frac{n!}{n^n}$ I'm trying to define \conjunction by means of \textbullet instead of \bullet, since the latter looks too big in logical formulas.  How can I make the spacing around \conjunction to behave like the spacing around \bullet when there is an opening parenthesis just after it?  Compare (2) and (2'):     \documentclass[12pt]{article} \usepackage[paperwidth=10cm,paperheight=7cm,margin=1em]{geometry} \usepackage{amsmath} \usepackage{amssymb} \usepackage{ebgaramond-maths}  \DeclareMathOperator\conjunction{\raisebox{-0.25ex}{\textbullet}}  \begin{document}\begin{align} \intertext {Good spacing but bad size:} (\exists x(\forall y(\phi(y)\equiv y\!=\!x)&amp;\bullet Gx)\supset\psi)\\ \exists  x(\forall y(\phi(y)\equiv y\!=\!x)&amp;\bullet (Gx\supset\psi))\\ \intertext {Good size and spacing:} (\exists x(\forall y(\phi(y)\equiv y\!=\!x)&amp;\conjunction Gx)\supset\psi)\\ \intertext {Good size but bad spacing:} \exists  x(\forall y(\phi(y)\equiv y\!=\!x)&amp;\conjunction (Gx\supset\psi)) \end{align}\end{document}   This won't do:  \DeclareMathOperator\conjunction{\raisebox{-0.25ex}{\textbullet\ }}   because it adds an unwanted extra space to (1'). Does anyone know?  And a bigger question is what happens when you encounter this maximum? Is this the same number with other Windows OSs such as Vista, XP etc.? sql unique constraint on a 2 columns combination How can I add an empty directory to a Git repository? How do I get started with 'painting with light' photography? Tunnels being naturally dark may not be the most intuitive choice for a place to take pictures. But I love the '' work that artists such as '' are putting out and they're clearly seeking out places like tunnels, caves, garages... Dark places in other words, to create their works of art. Which brings two questions to mind:   How do I go about finding places that I can accomplish this sort of 'tunnel photography.' What are some techniques that I can use to 'paint with light' in my photography once I have found some locations?