Visually scroll UIScrollView content in Interface Builder
Add UI elements to UIScrollView?
I'm not sure if there's a better place to ask this or not.   Why, at least here in America, is the standard electrical system set up for alternating current (AC) rather than direct current (DC)? I'm just completing a long-distance move and realizing how many DC adapters I have and how many of my devices require DC power:   All of my guitar pedals. My alarm clock. My external hard disks. My USB car HDD dock.   ... and the list goes on. If we're almost constantly having to use DC adapters to convert AC into DC, why isn't the standard DC, other than because people resist change? A guy scammed me, but he gave me a bank account number & routing number. Can I use that to take out what he owes me? Who are the clients of my shared iTunes library? Is it possible to see who is currently connected and listening to a shared iTunes library? Is it possible to see which songs they listen to and how many/often?  It's not really important; I'm just curious about it. Would be nice to know which colleagues love my music… The recipe that I used did not call for cornstarch or corn syrup. The result is that they are slightly wet. Can I do anything to dry them up, such as dusting them with corn flour?  I did dredge them in a mixture of confectioners sugar and corn flour; it helped a little, but I think I will find a recipe that has corn starch in it for next time! I am using a Collection (a HashMap used indirectly by the JPA, it so happens), but apparently randomly the code throws a ConcurrentModificationException. What is causing it and how do I fix this problem? By using some synchronization, perhaps?  Here is the full stack-trace:  Exception in thread "pool-1-thread-1" java.util.ConcurrentModificationException         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)         at java.util.HashMap$ValueIterator.next(Unknown Source)         at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:555)         at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)         at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)         at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)         at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)         at org.hibernate.engine.Cascade.cascade(Cascade.java:130) I have over 400 open-ended responses. The total has been coded by one rater, and a 10% identical sample of the total has been coded by 2 raters. There is a choice of 14 nominal codes, of which the rater can use any number per case, though most cases have between 1-4 codes. Which statistical test is the most appropriate to determine if I have inter-rater agreement on the 10% sample?   Also am I right in assuming that I will need to treat each code as a variable and look for the level of agreement for each variable?   I'm using SPSS 21.  Much thanks, Kellie I have been given the task to rewrite a function as a sum of an even and an odd function. But when I went to analyze the parts of the original function I noticed that one part was neither even nor odd.   The original function was: $g(x) = (x + 1) / (x^2 - 3x + 4$)  After analyzing I realized that when using f(-x) to determine symmetry it produced a 'neither' result. How would I go about writing a function that is neither even nor odd as an even function. (It would have to be an even function as the (x+1) part of the original function is odd and since I need to write it as a sum of even and odd, the denominator would need to be even. Solving trigonometric equations of the form $a\sin x + b\cos x = c$ Suppose that there is a trigonometric equation of the form $a\sin x + b\cos x = c$, where $a,b,c$ are real and $0 &lt; x &lt; 2\pi$. An example equation would go the following: $\sqrt{3}\sin x + \cos x = 2$ where $0&lt;x&lt;2\pi$.  How do you solve this equation without using the method that moves $b\cos x$ to the right side and squaring left and right sides of the equation?  And how does solving $\sqrt{3}\sin x + \cos x = 2$ equal to solving $\sin (x+ \frac{\pi}{6}) = 1$ File permissions and saving How do I render a Twig template and load a CSS file from a controller? Is this considered a good practice for rendering a Twig template and loading a CSS file from a controller?   DefaultController.php  namespace Drupal\acme\Controller;  use Drupal\Core\Controller\ControllerBase; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Template\TwigEnvironment;  class DefaultController extends ControllerBase implements ContainerInjectionInterface  {   /**   * @var Drupal\Core\Template\TwigEnvironment   */   protected $twig;    public function __construct(TwigEnvironment $twig)   {     $this-&gt;twig = $twig;   }    public static function create(ContainerInterface $container)   {     return new static(       $container-&gt;get('twig')     );   }    /**    * hello    * @param  string $name    * @return string    */   public function hello($name)    {      $template = $this-&gt;twig-&gt;loadTemplate(       drupal_get_path('module', 'acme') . '/templates/hello.html.twig'     );      $markup = [       '#markup' =&gt; $template-&gt;render([ 'name' =&gt; $name ]),       '#attached' =&gt; [ 'css' =&gt; [           drupal_get_path('module', 'acme') . '/assets/css/acme.css'         ]       ]     ];      return drupal_render($markup);   } }   acme.routing.yml  acme_hello:   path: '/acme/hello/{name}'   defaults:     _content: '\Drupal\acme\Controller\DefaultController::hello'     _title: 'acme Title'   requirements:     _permission: 'access content'   hello.html.twig  &lt;div class="acme-hello-text"&gt;   &lt;h1&gt;Hello {{ name }}!&lt;/h1&gt; &lt;/div&gt; We are beginning to go down the path of mobile browser support for an enterprise e-commerce webapp (Java/Servlet based).  Of course there are many decisions to be made, but it seems to me the cornerstone is to be able to reliably detect mobile browsers, and make decisions on the content to be returned accordingly.  Is there a standard way to make this determination (quickly) based on the http request, and ideally glean more information about the given browser and device making the request (screen size, html capabilities, etc?).  I would also appreciate any supplemental information that would be of use from someone who has gone down this path of taking an existing large scale enterprise webapp and architect-ing out mobile browser support from the development side.  [edit] I certainly understand the request header and the information about a database of standard user agents is a great help.  For those talking about 'other' request header properties, if you could include similar standardized name / resource of values that would be a big help.  [edit] Several users have proposed solutions that involve a call over the wire to some web service that will do the detection.  While I'm sure this works, it is not a good solution for an enterprise e-commerce site for two reasons: 1) speed.  A call over the wire for every page request to a third party would have huge performance implications.  2) dependency/legal.  We'd tie our website response time and key functionality to their service, which is horrible for legal and risk reasons. Symbolic coordinates for a hyperbolic grid? Rephrasing     (one year later)    (original question is below)   Apparently the original question wasn't clear, or nobody knows an answer (or both).  So I will try to rephrase it.   Look at your favorite .  This question asks for a labeling system for the points.  Of course we could draw the grid on the Poincare disk, and use real numbers (the (x,y) coordinates of each point), but in practice that would raise all sorts of precision issues that could surely be avoided if one had a proper symbolic coordinate system.  You shouldn't need real numbers if you're staying on grid points!  Just like (2,3)+(0,1) is trivial to do by hand (or in your head) for the square grid, we'd like some form of symbolic coordinates (i.e. consisting of finite sequences of symbols) for a hyperbolic grid, in which simple operations on small grid vectors are similarly easy.  If you take some sequence of left and right turns in a hyperbolic grid city, what should you keep track of in your head so you can take the optimal route back to your starting point?  In a Euclidean square grid, it is {(int)X, (int)Y, (enum)direction you are facing}, and we all know how to use this.  Is there any hyperbolic grid where this question has a nice answer?    Original Question  If we consider the Euclidean plane, then a square grid works well with using two integers (the coordinates) as a representation for vectors that lie on the grid.  Does anybody know of a similarly nice representation for working in the hyperbolic plane?  Desirable features of any such system:  $-$ It should be easy to add two vectors.  $-$ It should be easy to see if two vectors are the same.  $-$ It should be easy to see if two vectors are close.  $-$ It should be easy to rotate a vector by an angle that is a symmetry of the grid.  $-$ Every point in the plane should be near some vector. (The grid shouldn't have large empty regions.)   Note that "addition" using continuous coordinates would most naturally be defined in terms of parallel transport, and it is neither commutative nor associative.  On a grid, however, the issue of orientation needs to be addressed differently, since parallel transport along arbitrary grid vectors will introduce rotations that are not a symmetry of the grid, so to remain on the grid, addition will need to be defined using something other than parallel transport.  Since hyperbolic grids have an exponential number of points (as a function of distance from the origin), our symbolic coordinates will need to have a length proportional to the length of the vector.  Don Hatch has a web page which gives some .  ("Easy" means an efficient algorithm that is doable by hand, like how the algorithms for addition and subtraction using the standard digit-sequence representation of integers can be used for the Euclidean square grid. Using hyperbolic functions of real numbers, always keeping track of enough digits to identify the nearest grid point, does not count as easy!)    Addendum: Many readers seem to be disturbed by a little voice saying "But vectors don't make sense in the hyperbolic plane!": What that voice is really saying is that the hyperbolic plane doesn't give you all the nice properties you are used to in Euclidean space or in vector spaces.  So if you define vectors as objects having specific properties you are used to (such as having a direction that is unaffected by parallel transport), then that definition may not correspond to anything in the hyperbolic world.  You could use the term isometry, but that is typically a fixed mapping from the space to itself, and in the hyperbolic plane the isometry corresponding to a vector would depend on the starting point. (However, isometries will be central to any solution, I assume.) And a geodesic is a fixed path within the space, no different from a hyperbolic line or segment.  The paper  offers one solution.  offer another.  I deliberately leave them undefined in this question, as I am looking for any workable system. I am looking for an example of a sequence which shows that, $a_{n+1} - a_n \to 0$ as $n \to \infty$ does not imply that sequence $a_n$ converges. I have a feeling that the sequence should be an oscillatory one but I am unable to think of an example. Unique (non-repeating) random numbers in O(1)? The question  only deals with flights in the US sourced from the  . Is there some similar source for EU, Asia etc? what is the surface area of a cap on a hypersphere? According to , let the sphere have radius $R$, then the surface area a spherical cap of height $h$ and base radius $a$ is given by $$S=2\pi Rh=2\pi(a^2+h^2).$$  What is this value for an n-dimensional hypersphere? If it helps simplify the problem we can assume $R=1$ and $a=0.5$.   Many thanks. I am not sure which conjunction to use in the following context:        I know about programming but I have a little bit of confusion in Java programming.   I know about programming although I have a little bit of confusion in programming.    I know about programming however I have a little bit of confusion in Java programming. How fast would someone have to run to run over water? I was thinking about Flash, the superhero, or the little boy in the Incredibles.   There is  that doesn't answer a lot. Especially, I don't think surface tension would help a lot for a human to run over water, I think one would have to build on the inertial effect of the water.  There is one empirical approach based on figuring out the speed at which bare-footed water skiing is done, but I wasn't able to find a decent number. Still the difference may be that a hypothetical runner would have to propulse herself over the water, which may or may not make the thing more difficult.  Hence, I raise the question here. A screen of mine burnt out, and was replaced with a screen of lower resolution. It works in safe mode as that is in 800x600 resolution, but when I try to boot to normal mode, it fails. Is there a way to change the resolution for normal mode in safe mode? 3 questions about Algebraic Geometry and Zariski topology I've read this exercise on my book, but I don't know how to prove it... Can someone help me?  Let X $\subseteq \mathbb{A}^n$ be an algebraic set, and $f, g:X\rightarrow k$ two regular functions.  a) If we see $f$ as an application $X \rightarrow \mathbb{A}^1(k)$, prove that $f$ is continuous in the Zariski topology.  b) If $X$ is irreducible and an open $U \subseteq X$ exists such that $f_{|U} = g_{|U}$, prove that $f=g$.  c) Give an example of $X, f$ and $g$ such that $f \neq g$ but $f_{|U} = g_{|U}$ in an open $U \subseteq X$.  Thank you!  For b) I have been able to prove that:  Let E be the subset where $f = g$ so E is closed (Why? I know that $E = (f,g)^{-1}(\Delta_{k})$ but... why is $(\Delta_{k})$ closed?). So $U \subseteq E \Rightarrow \bar{U} \subseteq \bar{E}=E$ (beacuse E is closed) $\Rightarrow X \subseteq E$, because $\bar{U}=X \Rightarrow E = X$ and $f=g$ in X.