Traversing the View Hierarchy on an iPhone or iPad
How do I inspect the view hierarchy in iOS?
I'm a Sri Lankan passport holder. I'm planning to travel to China in January and have to transit in Malaysia. I wonder whether I can obtain a Malaysian transit visa in KLIA 2 when I'm flying back to Sri Lanka. JavaScript variables declare outside or inside loop? Is the set of partial order relations over $ \mathbb{N}$ countable? I think it's uncountable but don't know how to prove this. I would be very helpful if someone could also give some kind of a strategy for proving uncountability, in particular how to find injective or surjective functions that help proving this. Intuitive explanation of why $\dim\operatorname{Im} T + \dim\operatorname{Ker} T = \dim V$ I'm having a hard time truly understanding the meaning of $\dim\operatorname{Im} T + \dim\operatorname{Ker} T = \dim V$ where $V$ is the domain of a linear transformation $T:V\to W$. I've used this equation several times in many problems, and I've gone over the proof and I believe that I fully understand it, but I don't understand the intuitive reasoning behind it. I'd appreciate an intuitive explanation of it.  Just to be clear, I do understand the equation itself, I am able to use it, and I know how to prove it; my question is what is the meaning of this equation from a linear algebra perspective. I’m currently working on a solar powered boat with a modest sized team of people. For our competition we are only allowed to have 3 12v batteries on board but we are allowed to have up to 52v at any point in our setup. We are hoping to kick up the speed of our outboard motor for the sprint portion of the completion and are looking into using a boost converter for this.   After doing a little research I’m a bit confused about how they fundamentally work. From what I can tell they take in a voltage and current and put out a higher voltage with a lower current with some level of efficiency. But it seems to be independent from the load( in this case the motor) which doesn’t make much sense to me because I thought the current would be determined by whatever my load is. How do loads actually interact with boost converters?( The simpler the better.)  For reference we are using the Saietta 119r motor system and I’m considering using the MPS MPQ3425 boost converter. How do I use formatting in comments? I see some people write comments that are for example - in italics.  I do not see any way of doing that while writing my comments. Why is it so? Computing $\int_{-\infty}^\infty \frac{\sin x}{x} \mathrm{d}x$ with residue calculus This refers back to $\int_{-\infty}^\infty \frac{\sin x}{x} \mathrm{d}x = \frac\pi2$ already posted. How do I arrive at $\frac\pi2$ using the residue theorem? I'm at the following point: $$\int \frac{e^{iz}}{z} - \int \frac{e^{iz}}{z},$$ and I would appreciate any help. Warning: preg_replace(): Unknown modifier Simulate repeated rolls of a 7-sided die with a 6-sided die What is the most efficient way to simulate a 7-sided die with a 6-sided die? I've put some thought into it but I'm not sure I get somewhere specifically.  To create a 7-sided die we can use a rejection technique. 3-bits give uniform 1-8 and we need uniform 1-7 which means that we have to reject 1/8 i.e. 12.5% rejection probability.  To create $n * 7$-sided die rolls we need $\lceil log_2(  7^n ) \rceil$ bits. This means that our rejection probability is $p_r(n)=1-\frac{7^n}{2^{\lceil log_2(  7^n ) \rceil}}$.  It turns out that the rejection probability varies wildly but for $n=26$ we get $p_r(26) = 1 - \frac{7^{26}}{2^{\lceil log_2(7^{26}) \rceil}} = 1-\frac{7^{26}}{2^{73}} \approx 0.6\%$ rejection probability which is quite good. This means that we can generate with good odds 26 7-die rolls out of 73 bits.  Similarly, if we throw a fair die $n$ times we get number from $0...(6^n-1)$ which gives us $\lfloor log_2(6^{n}) \rfloor$ bits by rejecting everything which is above $2^{\lfloor log_2(6^{n}) \rfloor}$. Consequently the rejection probability is $p_r(n)=1-\frac{2^{\lfloor log_2(  6^{n} ) \rfloor}}{6^n}$.  Again this varies wildly but for $n = 53$, we get $p_r(53) = 1-\frac{2^{137}}{6^{53}} \approx 0.2\%$ which is excellent. As a result, we can roll the 6-face die 53 times and get ~137 bits.  This means that we get about $\frac{137}{53} * \frac{26}{73} = 0.9207$ 7-face die rolls out of 6-face die rolls which is close to the optimum $\frac{log 7}{log6} = 0.9208$.  Is there a way to get the optimum? Is there an way to find those $n$ numbers as above that minimize errors? Is there relevant theory I could have a look at?  P.S. Relevant python expressions:  min([ (i, round(1000*(1-(  7**i )  /  (2**ceil(log(7**i,2)))) )/10)  for i in xrange(1,100)], key=lambda x: x[1]) min([ (i, round(1000*(1- ((2**floor(log(6**i,2))) / (  6**i ))   )    )/10)  for i in xrange(1,100)], key=lambda x: x[1])   P.S.2 Thanks to @Erick Wong for helping me get the question right with his great comments.  Related question: Given a compact set $K$ and closed set $E,$ prove: $E\cap K\neq \emptyset $ Let $K\subseteq \mathbb{R}^n$ be a compact set and $E\subseteq \mathbb{R}^n$ a closed set, such that: $$\inf\{d(x,y):x\in K, y\in E\}=0$$ where $d(x,y)=\sqrt{\sum_j(x_j-y_j)^2}$ Prove: $E\cap K\neq \emptyset $  I tried to work with the definitions of compact and closed sets, and I understand that from what's given of the distance between elements in $K$ and $E$, that they are very close,  but couldn't really get further. Any help appreciated. If a microsite uses the same logo as the main site, which "home" should it link to? Which 'home' should the microsite's logo link to - the main site or the microsite?  Consider that...    The content and layout of the microsite is the only differentiator  Half the users reach the microsite from the main site.   The microsite doesn't have it's own URL (it's www.mainurl/microsite) The microsite has the same logo and header style (so you almost can't tell you've left the main site) Can someone identify the fonts used in the words "nature methods" in the following image?    I think that the word "nature" is in Times or Times New Roman (?) but can't figure out what font the word "methods" is in.  Any ideas? What is so bad about singletons? Problems with Curve Modifier Using the properties of real numbers, verify commutativity on complex numbers. I have just started self-studying Linear Algebra after a 3 year hiatus from mathematics (in an extended neuroscience foray), and I want to ensure that I am sufficiently verifying commutativity of complex numbers by using the properties of real numbers.  My attempts...  (1) Commutativity of Addition:   Verify that $w + z = z + w$ for all $w, z \in \mathbb{C}$.  $$w + z = (a + bi) + (c + di) \hspace{10mm}\text{by definition of }\mathbb{C}$$ $$\hspace{13mm} = a + (bi + c) + di \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{17mm} = a + (c + bi) + di \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{16mm} = (a + c) + (bi + di) \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{19mm} = (c + a) + (di + bi) \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{13mm} = c + (a + di) + bi \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{17mm} = c + (di + a) + bi \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{17mm} = (c + di) + (a + bi) \hspace{11mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{13mm} = z + w \hspace{34mm}\text{by definition of }\mathbb{C}$$  $$\blacksquare$$  This seems a bit verbose to me - is it acceptable to combine steps? For example, rather than:  $$w + z = (a + bi) + (c + di) \hspace{10mm}\text{by definition of }\mathbb{C}$$ $$\hspace{13mm} = a + (bi + c) + di \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{17mm} = a + (c + bi) + di \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ can I instead write: $$w + z = (a + bi) + (c + di) \hspace{10mm}\text{by definition of }\mathbb{C}$$ $$\hspace{48mm} = a + (c + bi) + di \hspace{10mm}\text{by associativity and commutativity in }\mathbb{R}$$?  (2) Commutativity of Multiplication:  Verify that $wz = zw$ for all $w, z \in \mathbb{C}$.  $$\hspace{-14mm}wz = (a + bi)(c + di) \hspace{24mm}\text{by definition of }\mathbb{C}$$ $$\hspace{4mm} = a \cdot c + a \cdot di + bi \cdot c + bi \cdot di \hspace{10mm}\text{by distribution in }\mathbb{R}$$ $$\hspace{9mm} = a \cdot c + bi \cdot c + a \cdot di + bi \cdot di \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{35mm} = c \cdot a + c \cdot bi + di \cdot a + di \cdot bi \hspace{10mm}\text{by multiplicative commutativity in }\mathbb{R}$$ $$\hspace{1mm} = c(a + bi) + di(a + bi) \hspace{20mm}\text{by distribution in }\mathbb{R}$$ $$\hspace{5mm} = (c + di)(a + bi)\hspace{34mm}\text{by distribution in }\mathbb{R}$$ $$\hspace{4mm} = zw \hspace{55mm}\text{by distribution in }\mathbb{R}$$ $$\blacksquare$$  This also seems a bit wonky to me. Any and all suggestions on clearing up my verification, reasoning, etc. would be greatly appreciated! This is a question from the book Methods of Real Analysis by R. R. Goldberg.     If $(s_n)$ is a sequence of real numbers and if $$\sigma_n=\frac{s_1+s_2+\cdots+s_n}{n}$$ then prove that: $\operatorname{{lim sup}}\sigma_n \leq \operatorname{lim sup} s_n$.   I don't have any idea how to start working on this problem. Please help. Thanks. I was working on a Beamer presentation, and noticed that, if I open a group scope and use a \tiny, the font size will bet set, but there will be a large space between lines. However, if I issue a \par at the end of the paragraph, it works as intended:  \documentclass[t]{beamer} \newcommand{\shortlipsum} {Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue euneque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra}  \begin{document} \begin{frame} \shortlipsum  {\tiny \shortlipsum\par   % &lt;--- removing this \par will break line spacing } \end{frame} \end{document}   Here's a comparison between not using and using \par:    Am I doing it the right way? Why is \par the right way? Prevent windows from going into sleep when my program is running? Can somebody help me understanding the fouries series coefficients?  I know that if we have:  $$f(t) = \sum_{n=1}^N A_n \sin(2\pi nt + Ph_n) \tag{where $Ph_n$ = phase}$$  And because of the $\sin(a+b)$ formula: $$ f(t) = \sin(2\pi nt + Ph) = \sin(2\pi nt )\cos(Ph_n) + \cos(2\pi nt )\sin(Ph_n)$$ Then:  $$\sum_{n=1}^N A_n \sin(2\pi nt + Ph) = \sum_{n=1}^N (A_n\sin(2\pi nt )\cos(Ph_n) + A_n\cos(2\pi nt )\sin(Ph_n))$$ And by definition: $$a_n = A_n\cos(Ph_n)$$ $$b_n = A_n\sin(Ph_n)$$ Then:  $$f(t) = \sum_{n=1}^N A_n \sin(2\pi nt + Ph) = \sum_{n=1}^N (a_n\sin(2\pi nt ) + b_n\cos(2\pi nt ))$$ Where does the $A_n$ in the first formula come from? Could somebody explain me where does the $\frac{a_0}{2}$ in the formula below come from? $$f(x) = \frac{a_0}{2}+\sum_{n=1}^\infty (a_n \cos(nx) + b_n \sin(nx))$$  And the most important:  How can I proof the formulas for the $a_n$ and $b_n$ coefficients?  PLEASE, I'm searchinf for these answers for DAYS. If you're interested in grammar, as I am, I am sure you have delved into a thought process about infinitive to, and like me, you have probably questioned what it is, or what it could be defined as. My mind always wants to place it in the Eight Parts of Speech, and I know this is foolish of me to some regard, so I stray from it, but I still wish to designate it under something that can be explain it. So, this is the motivation for this post, this question: What is the infinitive to, and why?  Here are my thoughts: There are three real possibilities, going back through the times. First, we can say that it is part of the verb that comes after it (to go, to run, etc.). This could be supported by the claim that you are not supposed to "split" infinitives ("To boldly go"), but only that.   Secondly, we could consider it a subordinator. I came across this designation most recently in my studies of modern and transformational grammar. As of right now, it is still the one I accept, especially as a result of the trend of designating more phrases as clauses. It works, except it's weird. Do we call this a unique subordinator as a result of how it operates? For example, to-infinitive clauses call for non-finite verb forms, which typically have an implied subject as a part of their clause. For example, "I want to go to the store." In the infinitive clause, "I" is the implied subject, as a understand. So, again, this works. However, things get a little weird when other subordinators come into play. For example, "I'm excited for you to win the competition." Now, if I'm right, those of you will say that "for" is a preposition here, as a result of the new-grammar stuff, but I'm going to count it as a subordinator, as defined by my own beliefs and that of a lot of other grammars. So, how do the clauses work in such a sentence? According to transformational grammar, "for you to win the competition" is defined as an ordinary clause. So, does that mean that it also contains a secondary clause within itself (the infinitive clause part)? If so, how do those two clauses work in conjunction to each other when one is so integrated? "For you to win the competition" looks to just be one clause, but if that's the case, doesn't "to" have to represent something else?  This moves us on to the third way to look at things, which is to consider "to" as auxiliary verb, a defective one at that. There are a lot of things to support this, and it even allows for the split infinitive. Furthermore, it calls for a non-finite verb form to follow, like an auxiliary. But, as I said before, it's defective in the way that is all it can function as.  As I said, I still accept to as a subordinator, but I want to be proven wrong or right. Wrong by showing evidence of it being something else, or right by showing how clauses operate when it seems to be layered up.