So I recently learned about the concept of a One Time Pad; and I from what I understand it means that if a XOR key is completely random and equal to or longer than the plaintext, it makes it so that anyone trying to break the encryption would basically only be able to narrow it down to all appropriate possibilities from the selection field.   Is there a way to renew the key over each transmission between clients sharing a key? In other words, if the original key is xxxxxxxxxxxxxxxx and the sent data is made of the first half being a message and the next half being some form of data, can a pre-determined protocol be fed the data to generate a new full-length key? Or is it impossible to do this without compromising the integrity of the randomness of the new key? What would theoretically be required of such a protocol to make it secure?  Thanks in advance!
For multiple OTP keys, why not do this:  Key = Hash[(EC)DH Shared Secret + Counter]  The counter will increase per message, and the output of the hash will be random for each new unique input into it. What are the problems or weaknesses with this design??  EDIT: For clarification: both parties will have the shared secret from an ECDH exchange, random numbers from Pythons os.urandom for generating the ECC key
Subject–verb agreement not clear in "Is two bars OK?" Is the following correct?     Can I get some chocolate for myself? Yes, you can but not much.   Is two bars OK?   Is there any rule to explain the sentence above?  The dialogue's taken from Grammar Textbook Round-Up Level #3. Input image strip without stretching to fit output frame When you add an image strip to the Video Sequence Editor, it stretches/shrinks your image to fit the full output frame.  How can I add an image at its original resolution?  For example, if I add a 60x60 pixel image, it should appear very small in the final 1080p render. How to convert standard IP address format string to hex and long? I am trying to create the following trigger:      CREATE TRIGGER update_customers AFTER INSERT ON wp_usermeta     FOR EACH ROW      BEGIN             if new.wp_metakey = first_name then insert into test_customer(first_name) values (new.wp_meta_value);     END   I keep getting a 1064 error that says, "You have an error in your SQL syntax; check the manual that corresopons to your MySQL server version for the right syntaxt to use near " at line 5"  What am I doing wrong? I try to clean my mid-2015 Macbook Pro with Retina display by wiping the screen with a damp cloth and then immediately drying.  However, there seems to be left some residue/streak marks, which look very oily. Sometimes these disappear after a few minutes, but they are still very unsightly, and a bit worrying (is there something wrong with my screen?)  I'm wondering if there are other cleaning techniques which avoid this issue, or whether this is completely normal behaviour.  Thank you! Would a wormhole be able to move? show that the interval of the form $[0,a)$ or $(a, 1]$ is open set in metric subspace $[0,1]$ but not open in $\mathbb R^1$ On the metric subspace $S = [0,1]$ of the Euclidean space $\mathbb R^1 $, every interval of the form $A = [0,a)$ or $(a, 1]$ where $0&lt;a&lt;1$ is open set in S. These sets are not open in $\mathbb R^1$   Here's what I attempted to show that $A$ is open in $S$. I have no idea how it is not open in $\mathbb R^1$.  Let $M = \mathbb R^1$, $x \in A  = [0,a)$ . If $x = 0$, $ r \leq \min \{a, 1-a\}, \\\  B_S(0; r) = B_M(0,r)\cap[0,1] = (-r, r) \cap[0,1] = [0,r) \subseteq A $  If $x \neq 0, r \leq \min \{x,|a-x|, 1-x\},  \\B_S(x; r) = B_M(x,r)\cap[0,1] = (x-r, x+r) \cap[0,1] \subset (0,x) \text{ or } (x, 1) \subset A$ Is it a good practice to always scale/normalize data for machine learning? What is the difference between [@] and [*] when referencing bash array values? says:  If the index number is @ or *, all members of an array are referenced.  When I do this: LIST=(1 2 3) for i in &quot;${LIST[@]}&quot;; do   echo &quot;example.$i&quot; done  it gives the desired result: example.1 example.2 example.3  But when I use ${LIST[*]}, I get example.1 2 3  instead. Why? Edit: when using printf, @ and * actually do give the same results. Start a git commit message with a hashmark (#) If $I$ and $J$ are ideals in a ring $R$ with $1$ such that $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n \in \mathbb{N}$ If $I$ and $J$ are ideals in a ring $R$ with 1 which are  co-maximal, i.e $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n$ in $\mathbb{N}$  Work done:     Should I proceed using    By taking $$K=I^m+J^m \neq R$$  Let $$S=\{I,J \in R \mid I^m+J^n \neq R \}$$ be the required partially order set ordered by inclusion then  $$I+J \subseteq I^n+J \subseteq I^n+J^m \subseteq \ldots $$  Then, I think this chain doesn't have an upper bound...as $I^m+J^n \neq R$ for all $ m,n \in \mathbb N$. Am I right??  Thanks for any help!! Where can I get a device with 'Ubuntu for phones' pre-installed? Canonical has recently announced , which is Ubuntu with a specific interface for mobile devices.  Where can I get phones with this version of Ubuntu pre-installed? If no devices are available yet, where can I pre-order one? Placement of varistor with respect to fuse My design includes a pretty standard AC/DC converter powered by mains for intended use at home. For overvoltage and overcurrent protection, I am planning to use a combination of varistor and fuse placed before the power converter.  I understand it is good practice to put the fuse before the varistor - in an overvoltage event, the varistor will draw a large current that may blow the fuse, protecting the rest of the circuit and even the upstream circuitry.  However, due to extremely tight layout, it is very hard to put the fuse before the varistor.  What risk am I running if I put the varistor before the fuse?  What if I put a second fuse in series with the varistor? Does it negate the varistor's protection of the downstream circuit? lualatex MWE not working I am trying to pass a member function within a class to a function that takes a member function class pointer.  The problem I am having is that I am not sure how to properly do this within the class using the this pointer.  Does anyone have suggestions?  Here is a copy of the class that is passing the member function:  class testMenu : public MenuScreen{ public:  bool draw;  MenuButton&lt;testMenu&gt; x;  testMenu():MenuScreen("testMenu"){     x.SetButton(100,100,TEXT("buttonNormal.png"),TEXT("buttonHover.png"),TEXT("buttonPressed.png"),100,40,&amp;this-&gt;test2);      draw = false; }  void test2(){     draw = true; } };   The function x.SetButton(...) is contained in another class, where "object" is a template.  void SetButton(int xPos, int yPos, LPCWSTR normalFilePath, LPCWSTR hoverFilePath, LPCWSTR pressedFilePath, int Width, int Height, void (object::*ButtonFunc)()) {      BUTTON::SetButton(xPos, yPos, normalFilePath, hoverFilePath, pressedFilePath, Width, Height);      this-&gt;ButtonFunc = &amp;ButtonFunc; }   If anyone has any advice on how I can properly send this function so that I can use it later. How can I save application settings in a Windows Forms application? What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I provide.  Now, I want to save the path value to a file for later use. This would be one of the many settings saved to this file. This file would sit directly in the application folder.  I understand three options are available:   ConfigurationSettings file (appname.exe.config) Registry Custom XML file   I read that the .NET configuration file is not foreseen for saving values back to it. As for the registry, I would like to get as far away from it as possible.  Does this mean that I should use a custom XML file to save configuration settings?  If so, I would like to see code example of that (C#).  I have seen other discussions on this subject, but it is still not clear to me. I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what? I am talking about when you click on the icons in the dock This command gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true  which works for Unity Launcher, (obviously) does not work.  Related to: Want \section* to change the page header In a book, I have several numbered sections followed by an unnumbered section. I have placed an \addcontentsline following the \section* that introduces the unnumbered section, so that it will appear (unnumbered) in the ToC; that works fine. However, the page headers for the unnumbered section are continued from the last numbered section.  I am using fancyhdr with the following setup:  \pagestyle{fancy} \fancyheadoffset{0in} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}  \fancyhf{} \fancyhead[LE,RO]{\thepage} \fancyhead[C]{\bfseries \draftinfo} \fancyhead[LO]{\sf\rightmark} \fancyhead[RE]{\sf\leftmark} \fancyfoot[C]{\bfseries \draftinfo} \fancypagestyle{plain}{%   \fancyhead{} % get rid of headers   \renewcommand{\headrulewidth}{0pt} % and the line } This is problem 6.2 from the 3rd edition of Principles of Mathematical Analysis.      Problem 6.2: Suppose $f\geq 0$, f is continuous on $[a, b]$, and $\int_a^b f(x) \, dx = 0$. Prove that $f(x)=0$ for all $x \in [a, b]$.   I'm looking for a critique of my proof. It's a pretty easy problem, but I am always wary of making too bold of assumptions, especially on these low level/fundamental proofs. I'll be using Rudin's notation and refer to theorems from the text (If I should include the text of each theorem, feel free to leave a comment... I'm lazy but could probably use the TeX practice :p)  Proof: Assume, for contradiction, that $f&gt;0$. Then, for any partition $P$ we have the Lower Riemann Sum: $L(P, f)=\sum_{i=1}^n m_i \, \Delta x_i$. At least one $\Delta x_i$ must be positive, since $a &lt; b$, and each $m_i$ must be positive since we have $f&gt;0$ by assumption, so certainly $\sup f &gt; 0$. That means $L(P, f)&gt;0$. Thus, we have: $$0 = 0(b-a) &lt; L(P,f)\leq \sup L(P, f) = \inf U(P,f) =L$$ where the last string of equalities holds because our function is continuous on a compact interval, so is integrable by theorems 6.8 and 6.6. So our integral has value $L&gt;0$. This is in contradiction to our given assumption that $\int_a^b f(x) \, dx = 0$, so we must have that $f=0$ on $[a, b]$. $\Box$  So, I am wondering if my proof is correct (and is presented well). Also if someone could enlighten me as to what Rudin means when he say "Compare this with exercise 1," I'd be appreciative. Is it a hint or is there something else he expects you to notice? there are a lot of things I could compare :)...  Exercise 6.1: Suppose $\alpha$ increases on $[a, b]$, $a \leq x_0 \leq b$, $\alpha$ is continuous at $x_0$, $f(x_0)=1$, and $f(x)=0$ if $x\neq x_0$. Prove that $f$ is Riemann-Stieltjes Integrable and that $\int f \, d\alpha = 0$