Which files I need to delete from the system of a rooted device to delete completely the recovery mode, and in which folder I can find them? Ty
Is there a way to disable recovery mode so it won't be possible to factory reset your phone?  Basically what I am trying to do, is that it should be impossible to factory reset the phone as there is no recovery partition.  (Example format the recovery partition, or hide the option of factory reset on the recovery menu, build a custom recovery etc.)  P.S.. I was thinking of maybe removing a system app (example package installer) and making it a user app, and therefore when you factory reset the phone it won't start cause the system app is missing, but when I tried that, the phone wouldn't start even without resetting it, as the system needs the system app to start, ( I thought that maybe even though I removed the app from being a system app, the phone would still start as it's still there as a user app, and only after resetting the phone - that the user apps get deleted, the phone won't start as it's missing the app).  Thanks in advance
I'm a trainee teacher and I need to pass a skills test in maths, but I'm having trouble in this particular area of algebra in finding the nth term of any sequence. I've been given a series of questions to answer one of them is:  Find the nth term of the sequence 3, 8, 15, 24.  I not only need to know the answer but more importantly the technique. This is GCSE level. Why use a prime number in hashCode? Dual Canadian and British citizen - healthcare coverage in the UK? How can I search for special characters? How to convert a string of bytes into an int? How can I convert a string of bytes into an int in python?   Say like this: 'y\xcc\xa6\xbb'  I came up with a clever/stupid way of doing it:  sum(ord(c) &lt;&lt; (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))   I know there has to be something builtin or in the standard library that does this more simply...  This is different from  for which you can use int(xxx, 16), but instead I want to convert a string of actual byte values.  UPDATE:  I kind of like James' answer a little better because it doesn't require importing another module, but Greg's method is faster:  &gt;&gt;&gt; from timeit import Timer &gt;&gt;&gt; Timer('struct.unpack("&lt;L", "y\xcc\xa6\xbb")[0]', 'import struct').timeit() 0.36242198944091797 &gt;&gt;&gt; Timer("int('y\xcc\xa6\xbb'.encode('hex'), 16)").timeit() 1.1432669162750244   My hacky method:  &gt;&gt;&gt; Timer("sum(ord(c) &lt;&lt; (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))").timeit() 2.8819329738616943   FURTHER UPDATE:  Someone asked in comments what's the problem with importing another module. Well, importing a module isn't necessarily cheap, take a look:  &gt;&gt;&gt; Timer("""import struct\nstruct.unpack("&gt;L", "y\xcc\xa6\xbb")[0]""").timeit() 0.98822188377380371   Including the cost of importing the module negates almost all of the advantage that this method has. I believe that this will only include the expense of importing it once for the entire benchmark run; look what happens when I force it to reload every time:  &gt;&gt;&gt; Timer("""reload(struct)\nstruct.unpack("&gt;L", "y\xcc\xa6\xbb")[0]""", 'import struct').timeit() 68.474128007888794   Needless to say, if you're doing a lot of executions of this method per one import than this becomes proportionally less of an issue. It's also probably i/o cost rather than cpu so it may depend on the capacity and load characteristics of the particular machine. Ubuntu to Kubuntu switch! I have been running Ubuntu for about a year, now I would like to switch to kubuntu. Is it possible that I can port all the configuration data from the home folder of Ubuntu to kubuntu? (Without causing some serious trouble) If I copy all them contents of the home folder (Including the hidden files and folders) will I be able to get the same application configurations ? I know that copying the Thunderbird folder copies the emails on the newer installation, will it work to other applications? heredoc for Windows batch? Redirect automatically when selecting an item from a select drop-down list This page does it the way I want it to:   But I want to find a better way using jQuery, can anyone point me to a good script that uses jQuery to accomplish this? Every integer is congruent to the sum of its digits mod 9 This is a question from the free Harvard online abstract algebra .  I'm posting my solutions here to get some feedback on them.  For a fuller explanation, see  post.  This problem is from assignment 6.  The notes from this lecture can be found .     Prove that every integer $a$ is congruent to the sum of its decimal digits modulo 9.   Let $s$ be an $(n+1)$-digit integer given by $s=a_n\cdot10^n+\dots+a_2\cdot10^2+a_1\cdot10^1+a_0\cdot10^0$ with $a_i\in\mathbb{Z}$ such that $0\leq a_i\leq9$.  Then $ \begin{align} s\,\mathrm{mod}\,9&amp;=\bar{s}\\ &amp;=\overline{a_n\cdot10^n+\cdots+a_2\cdot10^2+a_1\cdot10^1+a_0\cdot10^0}\\ &amp;=\overline{a_n\cdot10^n}+\overline{\cdots}+\overline{a_2\cdot10^2}+\overline{a_1\cdot10^1}+\overline{a_0\cdot10^0}\\ &amp;=\overline{\overline{a_n}\cdot\overline{10^n}}+\overline{\cdots}+\overline{\overline{a_2}\cdot\overline{10^2}}+\overline{\overline{a_1}\cdot\overline{10^1}}+\overline{\overline{a_0}\cdot\overline{10^0}}\\ &amp;=\overline{\overline{a_n}\cdot1}+\overline{\cdots}+\overline{\overline{a_2}\cdot1}+\overline{\overline{a_1}\cdot1}+\overline{\overline{a_0}\cdot1}\\ &amp;=\overline{a_n}+\overline{\cdots}+\overline{a_2}+\overline{a_1}+\overline{a_0}\\ &amp;=a_n\,\mathrm{mod}\,9+\cdots+a_2\,\mathrm{mod}\,9+a_1\,\mathrm{mod}\,9+a_0\,\mathrm{mod}\,9 \end{align} $  Again, I welcome any critique of my reasoning and/or my style as well as alternative solutions to the problem.  Thanks. Short story identification: society partitioned off by high wall Fundamental Theorem of Calculus. Fundamental Theorem of Calculus says  Let $f$ be an integrable function on $[a,b].$ For $x$ in $[a,b],$  let $F(x)=\int_{a}^{x}f(t)dt.$ Then $F$ is continuous on $[a,b].$ If $f$ is continuous at $x_{0}$ in $(a,b),$ then $F$ is differentiable at $x_{0}$ and $F^{'}(x_{0})=f(x_{0}).$  Now my question is why we are saying that this is "Fundamental Theorem of whole Calculus".  It is clear that it connects intergal and differential calculus. But i am not getting the exact concept, why this is so important as its name is fundamental theorem of calculus. Why we says that it is fundamental theorem of calculus?  Please suggest me. Thanks in advance. How to calculate $\lim_{n\to\infty}(1+1/n^2)(1+2/n^2)\cdots(1+n/n^2)$? How can we compute the following limit:     $$\lim_{n\to\infty}(1+1/n^2)(1+2/n^2)\cdots(1+n/n^2)$$   Mathematica gives the answer $\sqrt{e}$. However, I do not know to do it. In classical logic, why is $(p\Rightarrow q)$ True if $p$ is False and $q$ is True? I've tried to construct examples of rings that match all except one of the properties in the definition of a Dedekind domain. (This is an old number theory qual question from Berkeleys MGSA website).  The only starting point that I can think of would be  $R:=K[X_1,X_2,\ldots]$  for $K$ a field. This is clearly integrally closed as any polynomial relation is contained in $K(X_1,\ldots,X_n)$ for some large enough $n$ and $K[X_1,\ldots,X_n]$ is integrally closed being a UFD.  The problem is then to get rid of enough ideals from this ring $R$, so that its dimension would be 1, but I can't seem to figure out what to do.  Anyone have any other ideas for rings that could work as a starting point? The polynomial ring with an infinite number of variables is pretty much the only example that I know of for how to construct a non-noetherian ring that's still a domain. I have a script myscript.sh  #!/bin/sh  echo $1 $2   which is used something like ...  ./myscript.sh foo bar   which gives me an output of ...  foo bar     but how can i make this script include custom command options? for example ...  ./myscript.sh -a foo and corespond to $1   and  ./myscript.sh -b bar and corespond to $2 $ f:\mathbb C\rightarrow \mathbb C$ defined by $f(z)=0$, if $Re(z)=0$ or $Im(z)=0$ and $f(z)=z$, otherwise. I have posted a proof below, and would appreciate it if someone could review it for accuracy. Thanks!   Problem:   Let n $\in$ $\mathbb{Z}$ with $n$ $\ge$ 3. Prove the following:   (a) Z(D$_{2n}$) = 1 if $n$ is odd.   (b) Z(D$_{2n}$) = {1, r$^k$} if $n$ = $2k$.   Note that $r$ and $s$ generate D$_{2n}$ with the group presentation { $r$,$s$ | $r$$^n$ = $s$$^2$ = 1, $rs$ = $sr$$^{-1}$ }   Proof:  part (a)   Let $n$ $\ge$ 3 where $n$ $\in$ $\mathbb{Z}$ and $n$ is odd.   For any x $\in$ Z(D$_{2n}$), x must commute with both $s$ and $r$, since both are in $D_{2n}$. Note that if $x$ commutes with both $s$ an $r$, then $x$ commutes with any element of $D_{2n}$ since $r$ and $s$ generate D$_{2n}$.    Then for any x$\in$ Z(D$_{2n}$), we have $xr$ = $rx$, where x is of the form $x$ = s$^j$r$^w$ (any such element can be arranged into this form via the relation $rs$ = $sr$$^{-1}$ and the fact that $r$ and $s$ generate D$_{2n}$). Note that since r and s have finite order, the exponents are modulo n and modulo 2 for $r$ and $s$ respectively.   Then we have  s$^j$r$^w$$r$ = $r$s$^j$r$^w$.   Which implies s$^j$r$^{w+1}$ = s$^j$r$^{w +- 1}$  In the case where the power of r on the RHS is $w$ - 1, it is clear we cannot have equality unless |r| = 1, which it is not. Note that if $j$ is even then we have only the $w$ + 1 case. Hence $x$ may be of the form $1$$r$$^w$ = $r$$^w$.   Also we have that x must commute with $s$, hence $s$$x$ = $x$$s$.   Then $s$$r$$^w$ = $r$$^w$$s$.  Which implies $s$$r$$^w$ = $s$$r$$^{-w}$.   Applying s$^{-1}$ to both sides we arrive at the task of finding when r$^w$ = r$^{-w}$ i.e when $w$ = $-w$. But since r has finite order we have:   $$ \bar{w} = (n-1)*w $$   where $\bar{w}$ is the residue class of w modulo n. Hence for some a $\in$ $\mathbb{Z}$$_+$   $$ w + an = wn - w $$  $$ 2w = wn - an $$ $$ 2w = n(w-a) $$   Now since 0 $\lt$ w $\le$ n we have that the LHS is greater than 0. Also since n $\ge$ w then (w-a) $\le$ 2, since otherwise the RHS would be greater than the LHS. So since n is odd we must have that (w-a) is even and hence (w-a) = 2, implying that 2w = 2n and hence n = w.   Hence x = $r$$^w$ = $r$$^n$ = 1. So Z(D$_{2n}$) = 1.   part (b)   From the argument above any x $\in$ Z(D$_{2n}$) must be of the form $s$$^j$$r$$^w$ for j even and j $\in$ $\mathbb{Z}$. Then x is of the form $r$$^w$ for $0$ $\lt$ w $\le$ $n$. Since $n$ is even we have the equation below is satisfied when $2w$ = $n$ or $w$ = $n$, since (w-a) $\le$ 2 but also (w-a) $\ge$ 0 for (w-a) $\in$ $\mathbb{Z}$$_+$.   $$ 2w = n(w - a) $$   Hence $r$$^w$ $\in$ Z(D$_{2n}$) when $2w$ = $n$, as desired. Prove $\left| \int_a^b f(t) dt \right| \leq \int_a^b \left| f(t) \right| dt$ I've been given a proof that shows the following:  If $f:[a,b]\to \mathbb C$ is a continuous function and $f(t)=u(t)+iv(t)$ then $$\left| \int_a^b f(t) dt \right| \leq \int_a^b \left| f(t) \right| dt$$ The proof begins by letting $\theta$ be the principle argument of the complex number $\int_a^b f(t)dt$ and there is one step in the proof I don't understand; can anyone explain to me why $$\int_a^b e^{-i\theta}f(t) dt=\Re\bigg(\int_a^be^{-i\theta}f(t)dt\bigg)$$  Would this not imply that the imaginary part of the left hand side is equal to $0$? I'm not sure why the LHS and RHS would be equal here. Proof of Russian Peasant Multiplication I'm studying a combinatorics text () in preparation for taking discrete math this upcoming semester. I've taken a fair amount of math in college, through Calculus II, but this is my first 500+ level math course.    In chapter 2 of the  book, the author introduces an algorithm for multiplication called Russian Peasant Multiplication. I want to prove that this algorithm will always result in the product of two numbers.  I've been chewing on the proof for a while now, and just can't seem to get any traction. Thanks in advance for any help.  Description of Algorithm  I'll try to explain the algorithm clearly. The goal of the algorithm is to find the product of two numbers $m$ and $n$. The below table is filled out for $m$ and $n$:  $$\begin{array}{c} m&amp;&amp;n&amp;\\ \hline \bigl\lfloor \frac{m}{2} \bigr\rfloor&amp;&amp; 2n \\ \bigl\lfloor \frac{m}{4} \bigr\rfloor&amp;&amp; 4n \\ \bigl\lfloor \frac{m}{8} \bigr\rfloor&amp;&amp; 8n \\ \bigl\lfloor \frac{m}{16} \bigr\rfloor&amp;&amp; 16n \\ \bigl\lfloor \frac{m}{32} \bigr\rfloor&amp;&amp; 32n \\ \end{array}$$  The sequence of numbers in both columns is the sequence $a_n = 2a_{n-1}\text{ where }a_1=2$. The columns are extended down until the value in the left column is equal to the number one. After filling out the table, the product is found by adding the values of the right column where the left column is an odd number.  For example, to multiply 18 and 37 with the algorithm:  $$\begin{array}{c} m&amp;&amp;n&amp;\\ \hline 18 &amp;&amp; 37 \\ 9 &amp;&amp; 74 \\ 4 &amp;&amp; 148 \\ 2 &amp;&amp; 296 \\ 1 &amp;&amp; 592 \\ \end{array}$$  To find the product, cross out values of the left column where the value of the right column is even:  $$\begin{array}{c} m&amp;&amp;n&amp;\\ \hline \require{enclose} \enclose{horizontalstrike}{18} &amp;&amp; \enclose{horizontalstrike}{37} \\ 9 &amp;&amp; 74 \\ \enclose{horizontalstrike}{4} &amp;&amp; \enclose{horizontalstrike}{148} \\ \enclose{horizontalstrike}{2} &amp;&amp; \enclose{horizontalstrike}{296} \\ 1 &amp;&amp; 592 \\ \end{array}$$  And add the remaining numbers in the right column to get the result: $18\times37=74+592=666$  Alternate Description of Algorithm  As an aside, here is a shorter way to describe the algorithm, repeat the below steps until the left column == 1:  • Halve the last number in the first column • Write the result below (discard the remainder) • Double the last number in the first column. • Write the result below.   Now, for every even number in the first column, delete the adjacent number in the second column. Add the remaining numbers in the second column.  What I've done so Far  I haven't been able to get much of anywhere on the proof. One thing I did was create a bit of a different way of arriving at the same outcome:  $$\begin{array}{c} m&amp;&amp;n&amp;&amp;\text{index}&amp;&amp;\text{remainder}&amp;&amp;\text{if remainder == 1, }n\times2^{Index}&amp;\\ \hline 18 &amp;&amp; 37 &amp;&amp; 0 &amp;&amp; 0 \\ 9 &amp;&amp; 74 &amp;&amp; 1 &amp;&amp; 1 &amp;&amp; 74\\ 4 &amp;&amp; 148 &amp;&amp; 2 &amp;&amp; 0 \\ 2 &amp;&amp; 296 &amp;&amp; 3 &amp;&amp; 0 \\ 1 &amp;&amp; 592 &amp;&amp; 4 &amp;&amp; 1 &amp;&amp; 592\\ \end{array}$$  Which brings to light the relationship between this algorithm and binary numbers (the fourth column in the above table is the product in binary, read bottom to top).   I also wrote some Python functions to help me explore the problem, Serializing and Deserializing Expression Trees in C# Is there a way to Deserialize Expressions in C#, I would like to store Expressions in a Database and load them at run time.