I unlocked the bootloader in my OnePlus 5 right after it was delivered, so there was nothing to erase. Then I flashed TWRP and SuperSU. It comes with DM-Verity (and /data force encrypted). I tried re-locking, but later I have to erase all data again before unlocking bootloader. So the questions are:   Why is it required to erase all data when unlocking bootloader? Even with device encryption on? Can I avoid the erase?
I understand that unlocking the bootloader will wipe my Android phone, but have been looking around for why.  Seems to be by design, but what is the reasoning for that design?  Is it some security concern, some obscure technical reason, or just for lulz?  I'm looking for something solid to chew on here, something more than because "that's how it is".
What is the amplitude of a light wave? Referring to this question   I'm curious about what is a amplitude of a light wave. Especially for light from a thermic source. I find that the minimum in-call volume on my HTC Desire is still far to loud on some calls.  Since I got the phone, I have flashed several different custom ROMs, radio updates, etc, and have had the issue throughout.  Do you know of any way (setting, hack, app, whatever) to reduce the minimum volume?  My device is rooted and I am currently running one of the CyanogenMod 7 (Gingerbread) nightly builds. Efficiently storing query-affecting settings in a database I want to know how to efficiently store query-affecting settings in a large analytical database (MS SQL Server). By efficiency I mean no hardcode (1) and fast/optimal query processing (2).  My example  I've got a massive table of sales orders. Let's simplify it to two columns:  SalesOrder  OrderID      int      Primary Key  OrderDate    date   I need to retrieve the list of orders for the last X days and this X should be configurable. That's why I introduce a table of settings where I define it:  Admin_Configuration  SettingName   (PK)|      SettingValue  ------------------|------------------  DaysBack          |          30      It allows me not to hardcode this "30" in query definitions. Then I would run queries like:  SELECT OrderId   FROM SalesOrder as S   JOIN Admin_Configuration as A     ON A.SettingName = 'DaysBack'   WHERE [OrderDate] &gt; DATEADD(DAY, -A.SettingValue, GETDATE());   Performance  It avoids hardcoding, but leads to a performance problem. This query runs much slower than it would've, had I simply hard-coded 30 in the WHERE clause.  My understanding is that optimizer doesn't know how large my SettingValue is and assumes the worst - that all rows would be retrieved from the SalesOrders table, thus leading to a suboptimal query plan.  Trying a scalar function yielded even worse results. I'm desperate enough to have a separate view which stores these hardcoded settings but I've been refraining from it with hopes for a better solution.  Here is the original query plan (with a join): 4 seconds elapsed   Here is the plan with subquery, as :  SELECT orderid FROM [SalesOrder] as s WHERE s.OrderDate &gt; dateadd(DAY,    (SELECT -NumValue    FROM Admin_Configuration where SettingName = 'DaysBack'   )     , getdate())   7 seconds elapsed, slightly slower   As for the ideal performance: I just hardcoded 20, the query took 2 seconds. It needs mentioning that the Admin_Configuration table contains only 18 rows, hence it shouldn't affect performance.  SELECT OrderId   FROM SalesOrder as S   JOIN Admin_Configuration as A     ON A.SettingName = 'DaysBack'   WHERE [OrderDate] &gt; DATEADD(DAY, -20, GETDATE());   Using parameters would mean that I'd have to replace views (that I use now) with stored procedures/table-valued functions, which is unacceptable in my case Limit $\lim\limits_{x\to0}{\frac{\ln{(e+x)}-e^x}{\cos^2{x} -e^x}}$ Without using L'Hopital's rule find: $$\lim_{x\rightarrow 0}{\frac{\ln{(e+x)}-e^x}{\cos^2{x} -e^x}}$$ I found the first derivative because I planned to use Taylor series:  \begin{align} \frac{d}{dx}{\left(\frac{\ln{(e+x)}-e^x}{\cos^2{x} -e^x}\right)} &amp;=\frac{\left(\frac{1}{x+e}-e^x\right)\left(\cos^2{x} -e^x\right)-\left(\ln(x+e)-e^x\right)\left(\sin{2x}-e^x\right)} {(\cos^2{x} -e^x)^2}\\ &amp;=\frac{\frac{1}{x+e}-e^x}{\cos^2{x}-e^x}-\frac{\left(\ln(x+e)-e^x\right)\left(\sin{2x}-e^x\right)}{(\cos^2{x} -e^x)^2} \end{align}  However, it seems I haven't gone so far. Should I start from the beginning and try a different method?  Source in Croatian: 2.kolokvij, matematička analiza I have a atmega8 that is working with 3.6V dc, I need to control some 12V relays with a not chip (7404), what is the simplest way to do this? I have connected a 12V dc to the relays, so when I connect the relays to the chip and then the atmega8, the current returns to the atmega through the not chip. Is this solution correct? There a better way to do this? How to prove this limit exists: $a_{n+2}=\sqrt{a_{n+1}}+\sqrt{a_{n}}$ Question: Consider a sequence $\{a_{n}\}$ such that $a_{1},a_{2}&gt;0$, and for all $n \in \mathbb{N}$ we have:  $$a_{n+2}=\sqrt{a_{n+1}}+\sqrt{a_{n}}$$  Prove that :  $\displaystyle\lim_{n\to\infty}a_{n}$ exists and find this limit.  My work: If this limit exists, let $\displaystyle\lim_{n\to\infty}a_{n}=x&gt;0$; then we have $$x=\sqrt{x}+\sqrt{x}\Longrightarrow x=4$$ But I can't see how to prove the limit of $\{a_{n}\}$ exists. Thank you for you help! How to remove shutdown option in start menu of Windows 10 I have a PC that should always be on. I recently upgraded to Windows 10 from Windows 7. In Windows 7 I changed the default action of the power button in the start menu to log off from my machine so that I could not accidentally shut it off. However in Windows 10 the start menu changed and this doesn't appear to be possible anymore?   I wonder how the shutdown option can be removed from the start menu. I cannot find any information about it but I expect this to be possible. Here's my source:  #!/bin/bash  echo "Running script to free general cached memory!" echo ""; echo "Script must be run as root!"; echo ""; echo "Clearing swap!"; swapoff -a &amp;&amp; swapon -a; echo ""; echo "Clear inodes and page file!"; echo 1 &gt; /proc/sys/vm/drop_caches; echo "";   It clears caches and stuff, and it echoes that it needs to be run as root in the terminal. I basically just want the script to cease running if it detects it's not being executed as root.   Example:  "Running script to free general cached memory!" "Warning: script must be run as root or with elevated privileges!" "Error: script not running as root or with sudo! Exiting..."   If run with elevated privileges, it just runs as normal. Any ideas? Thanks! I am  with the Google login for Pokemon Go. Is there any way, be it contacting support or through Trainer Club, to either link my Google account to a new Trainer Club account or transfer my account to a Trainer Club account?  It seems like a better idea to have a Trainer Club account, so if there are Google login problems it won't matter.  Does anyone know if something like this is possible? Let $\,f : \mathbb{R} \rightarrow \mathbb{R}$ be a infinitely differentiable function that is  increasing and bounded. Then is it true that $\lim_{x\to \infty}f'(x)=0$? How to prove this statement: $\binom{r}{r}+\binom{r+1}{r}+\cdots+\binom{n}{r}=\binom{n+1}{r+1}$ Let $n$ and $r$ be positive integers with $n \ge r$. Prove that   Still a beginner here. Need to learn formatting.  I am guessing by induction? Not sure what or how to go forward with this.  Need help with the proof. Citing a range of papers using numeric keys as in \cite{a, b, c} -> [1-3] How can I cite a range of papers, the output is a range of numbers, instead of a list of numbers? In other words, when I type  ... some dummy text here is due to me \cite{me1, me2, me3, me4} ...   I want the output to be     ... some dummy text here is due to me [3-6] ...   instead of     ... some dummy text here is due to me [3.4.5.6] ...   (I use LaTeX, and am currently using the amsart class and whatever it includes. But I am open to other suggestions.) What is the preferable setup for MiKTeX to keep all packages up-to-date easily? Note: I will expand this question with more specific points when I have my own internet connection and more time (we're moving in, so I'm at a friend's house).  This question is broad, involved, and to some degree subjective.  (I started out as a physics-only student, but eventually decided to add a mathematics major. I am greatly interested in mathematics; the typical curriculum required for physics students is not deep or thorough enough; mathematics is more general (that means work!); and it only requires a few more classes. Naturally, I enjoy  immensely.)  This question asks mainly of undergraduate-level study, but feel free to discuss graduate-level study if you like.  Please do not rush your answer or try to be comprehensive. I realize the StackOverflow model rewards quick answers, but I would rather wait for a thoughtful, thorough (on a point) answer than get a fast, cluttered one. (As you probably know,  produces clear, useful writing; and a properly-done comprehensive answer would take more than a reasonable amount of time and effort.) If you think an overview is necessary, that is fine.  For a question this large, I think the best thing to do is focus on a specific area in each answer.    Update: To Sklivvz, Cedric, Noldorin and everyone else: I had to run off before I could finish, but I wanted to say I knew I would regret this; I was cranky and not thinking clearly, mainly from not eating enough during the day. I am sorry for my sharp responses and for not waiting for my reaction to pass. I apologize.  Re: Curricula:   Please note that I am not asking about choosing your own curriculum in college or university. I did not explicitly say that, but several people believed that was my meaning. I will ask more specific questions later, but the main idea is how a physics student should study mathematics (on his or her own, but also by choosing courses if available) to be a competent mathematician with a view to studying physics.  I merely mentioned adding a mathematics major to illustrate my conclusion that physics student need a deeper mathematical grounding than they typically receive.   And now I have to run off again. Color Transfer from colored image into grayscale image Could gravity accelerate light? I took a look at  but my question is not the same.  I have unique keys encrypting each plaintext (in CBC mode, AES-256) and I do not use a key to encrypt more than one plaintext. Is it insecure to use null IVs in this case? If it is insecure, why? Two diagrams side by side I am trying to put two feynman diagrams side by side, but they get displayed below eachother. I am using feynmf and subfloat. This normally works for pictures.  \begin{figure}[ht!]       \centering     \subfloat{          \begin{fmfgraph*}(40, 25)         \fmfstraight          \fmfbottom{wm,i2,z2}           \fmftop{wp,i1,z1}           \fmf{dashes}{wp,i1,z1}           \fmf{dashes}{z2,i2,wm}           \fmf{dashes,caption=$W^{+}$}{i1,i2}         %  \fmf{dashes,caption=$Z^0$}{i2,z1}          % \fmf{dashes,caption=$Z^0$}{i2,z2}         \fmfv{lab=$Z^0$}{z1}         \fmfv{lab=$Z^0$}{z2}     \fmfv{lab=$W^+$}{wp}     \fmfv{lab=$W^-$}{wm}         \end{fmfgraph*}     }      \subfloat{          \begin{fmfgraph*}(40, 25)         \fmfstraight          \fmfbottom{wm,i2,z2}           \fmftop{wp,i1,z1}           \fmf{dashes}{wp,i1,z1}           \fmf{dashes}{z2,i2,wm}           \fmf{dashes,caption=$W^{+}$}{i1,i2}         %  \fmf{dashes,caption=$Z^0$}{i2,z1}          % \fmf{dashes,caption=$Z^0$}{i2,z2}         \fmfv{lab=$Z^0$}{z1}         \fmfv{lab=$Z^0$}{z2}     \fmfv{lab=$W^+$}{wp}     \fmfv{lab=$W^-$}{wm}         \end{fmfgraph*}     }      \caption{Exchange of W boson}     \end{figure} Is it true that smell is lost flavor? This is a maxim that I hear frequently, especially as a defense of cooking methods that don't produce a lot of aroma: if the aroma is in the air, it means it's left the food.  As an example, some people complain about the lack of aroma produced in sous vide cooking, to which the sous vide advocates retort that this is evidence that more flavor is in the food.  Likewise, I recently saw , where he went for a low-and-slow approach that produces little aroma: here, too, he claimed the flavor-retention defense to its lack of appeal. "Don't be disappointed, but my roasting technique doesn't flood your kitchen with good Sunday roast smells. This is a good thing, because smells are lost flavor" he said, while "SMELL = LOST FLAVOR" popped up on the screen.    I suppose it stands to reason, and that's the appeal of this explanation, but is it the truth? Does smelling a food necessarily imply that the final product will be less flavorful, and is it strictly because the aroma is escaping? How long can eggs be unrefrigerated before becoming unsafe to eat? A friend of mine accidentally left a carton of eggs on her counter, unrefrigerated, for three days. The eggs had been previously refrigerated both at the store and at home. Now she's planning to do some more cooking which requires eggs, and is wondering if it's still safe to use them for baking. I believe she is planning on baking cookies with them, so they would be baked at fairly high temperatures for probably at least 10 minutes. Would this be safe, or are eggs left unrefrigerated for that long not safe for consumption?