Problem : Let $f$ be a real valued continuous function on $[-1,1]$, such that $f(x)=f(-x)$ for all $x \in [-1,1]$. Show that for every $\epsilon \gt 0$  there is a polynomial $p(x)$ with rational coefficients such that for every $x \in [-1,1]$, $$|f(x)-p(x^2)| \lt \epsilon$$.  This problem had appeared in ISI JRF exam, 2017.  I know that the set of polynomials with rational coefficients over $[-1,1]$ is dense in the set of real valued continuous functions on $[-1,1[$. So I'm directly using it here.  So for every $\epsilon \gt 0$ three exists a polynomial with rational coefficients $q(x)$ such that for all $ x \in [-1,1]$, $|f(x)-q(x)| \lt \epsilon$.  Since $f(x)=f(-x)$ for all $x \in [-1,1]$, we have $|f(x)-q(|x|)| \lt \epsilon$ for all $x \in [-1,1]$.  I am stuck here. What can be done next? Applying Stone-Weierstrass again to get $p$ as required? Thanks.
Proposition      Let $\mathcal{P_e}$ be the set of functions $p_e(x) = a_o + a_2x^2 +  \cdots + a_{2n}x^{2n}$, $p_e : \mathbb{R} \to \mathbb{R}$      Show that all $f:[0,1]\to\mathbb{R}$ can be uniformly approximated by   elements in $\mathcal{P_e}$   Attempt:    Since we are talking about polynomials let's try play with Weierstrass Theorem  By definition $\mathcal{P_e}$ is dense in  $C^0([0,1], \mathbb{R})$ , if for every funciton $f \in C^0([0,1], \mathbb{R})$, $\exists p_e \in \mathcal{P_e}$ such that $\forall \epsilon &gt; 0, \forall x \in [0,1], ||p_e-f||&lt; \epsilon$  So we want to show $\|p_e - f\| &lt; \epsilon$  Try something like...since every continuous function is approximated by polynomials i.e. $\forall \epsilon &gt; 0,\ \|f - p\| &lt; \epsilon$, therefore let $p$ be a polynomial, $p = a_0 + a_1x + a_2x^2 + a_3x^3 + \cdots$  $$\|p_e - f\| \leq \|f - p\| + \|p - p_e\|$$  $$\Rightarrow \|p_e - f\| &lt; \epsilon + \|p_o\|,$$ where $p_o$ is an odd polynomial  $$\Rightarrow \|p_e - f\| &lt; \epsilon + \sup_x|a_1+a_3+\cdots+a_{2_n+1}|$$  Stuck.   In any case, $p$ and $p_o$ is poorly defined. What would be the standard approach to prove the proposition?
If an polynomial has a complex root, is it necessary that the conjugate of that root is also a root of the polynomial? I am not sure about this. Please comment on this. Getting Windows 7 admin account password? Why are my JavaScript objects equal to Proxy {} Creating your own Tinyurl style uid I'm writing a small article on humanly readable alternatives to Guids/UIDs, for example those used on TinyURL for the url hashes (which are often printed in magazines, so need to be short).  The simple uid I'm generating is - 6 characters: either a lowercase letter (a-z) or 0-9.   "According to my calculations captain", that's 6 mutually exclusive events, although calculating the probability of a clash gets a little harder than P(A or B) = P(A) + P(B), as obviously it includes numbers and from the code below, you can see it works out whether to use a number or letter using 50/50.  I'm interested in the clash rate and if the code below is a realistic simulation of anticipated clash rate you'd get from generating a hash. On average I get 40-50 clashes per million, however bare in mind the uid wouldn't be generated a million times at once, but probably only around 10-1000 times a minute.  What is the probability of a clash each time, and can anyone suggest a better way of doing it?  static Random _random = new Random();  public static void main() {     // Size of the key, 6     HashSet&lt;string&gt; set = new HashSet&lt;string&gt;();     int clashes = 0;     for (int n=0;n &lt; 1000000;n++)     {         StringBuilder builder = new StringBuilder();          for (int i =0;i &lt; 7;i++)         {             if (_random.NextDouble() &gt; 0.5)             {                 builder.Append((char)_random.Next(97,123));             }             else             {                 builder.Append(_random.Next(0,9).ToString());             }         }          if (set.Contains(builder.ToString()))         {             clashes++;             Console.WriteLine("clash: (" +n+ ")" +builder.ToString());         }          set.Add(builder.ToString());         _random.Next();         //Console.Write(builder.ToString());     }      Console.WriteLine("Clashes: " +clashes);     Console.ReadLine(); }   UPDATE:   from this question  I really asked two questions here so I was cheating. The answer I was after was rcar's, however Sklivvz's is also the answer to the 2nd part (an alternative). Is it possible to make a custom unique id generator in a database, or would it be client side (which would be 2 possible reads first)?  The general idea I was after was using Ids in databases or other stores that can be used by phone or printed material, not a giant 16 byte guid.  UPDATE 2: I put the formula for two mutually exclusive events above instead of 2 independent ones (as getting an 'a' the first time doesn't mean you can't get an 'a' the second time). Should've been P(A and B) = P(A) x P(B) Restore default apt repositories in sources.list from command line I am looking for the best method to restore /etc/apt/sources.list to default from the command line.  Is there no way to reference the source code of the package which generates this file or something like that? I want a trusted and version-independent way of restoring this file.  Solutions Ruled Out  Before you mark this as a duplicate, note that I have reviewed  already. It is only applicable if you have the Ubuntu GUI available. This question is specific to the command line.  I have also reviewed  where the accepted solution is someone pasted the contents of their sources.list file. This is not an appropriate way to restore the file as the intentions of the person providing the file contents cannot be verified and the file is subject to change with new releases.  I checked out the , but this is also not from Ubuntu so I do not plan to use it. $\sum (-1)^n/n$ fails the p-series test, but passes the alternating series test? How to get less spacing in math mode LaTeX commands like this:  Here again, four different simulations are run on networks of size  $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G} = 250 \times\ 250 = 62500$, and $C^{G} = 500 \times\ 500 = 250000$...   When compiled generate the following:    The spacing in math mode really irritates me. There's too much white space around the equal sign, and the multiplication sign has more right padding than left padding. Is there any way to reduce this spacing? Fourier series of Log sine and Log cos In Terraria I often try to defeat spazmatism first, but when he transformed, his flamethrower killed me. What is easiest way to kill The Twins? I've seen papers (e.g., in Science) where the first two authors are listed in non-alphabetical order, and yet there are asterisks behind their names to say that they contributed equally.   It seems strange to me, because if the two authors are in alphabetical order, then it could be that the first author contributed more or the two contributed equally, and this can be made clear with asterisks in the paper if it's the latter case. When they're in non-alphabetical order, however, if someone only sees the author list without seeing the paper, he/she will likely assume that the first author contributed most.  So my question is: Are there particular reasons why people do that? (This  is related, but I don't think the answers there get to my question.) How does Newtonian mechanics explain why orbiting objects do not fall to the object they are orbiting? I am working on a SQL query that reads from a SQLServer database to produce an extract file. One of the  requirements to remove the leading zeroes from a particular field, which is a simple VARCHAR(10) field. So, for example, if the field contains '00001A', the SELECT statement needs to return the data as '1A'.  Is there a way in SQL to easily remove the leading zeroes in this way? I know there is an RTRIM function, but this seems only to remove spaces. I have a code that prints a table with 2 rows. I want to keep format of it and change 2 rows into 3.   \documentclass[conference]{IEEEtran}  \usepackage{pgfplots} \usepackage{siunitx} \usepackage{multirow} \begin{document}  \begin{table}[h] \caption{Family data set results} \label{tbl::Fam} \centering \begin{tabular}{|l|l|c|c|c!{\vrule width 2pt}l|l|c|c|c|} %\noalign{\hrule height 2pt} \hline \textbf{Column}&amp;\textbf{Algorithm}&amp;\textbf{min}&amp;\textbf{max}&amp;\textbf{std}l&amp;\textbf{Column}&amp;\textbf{Algorithm}&amp;\textbf{min}&amp;\textbf{max}&amp;\textbf{std}\\\hline \multirow{2}{*}{age}&amp;Original&amp;9&amp;2.8&amp;100&amp;\multirow{2}{*}{employer\_type}&amp;Original&amp;13&amp;2&amp;10\\ \cline{2-5} \cline{7-10}&amp;PrivBayes&amp;2&amp;95&amp;96&amp;&amp;PrivBayes&amp;2&amp;100&amp;100\\\hline \multirow{2}{*}{education\_level}&amp;Original&amp;7&amp;2&amp;98&amp;\multirow{2}{*}{marital\_status}&amp;Original&amp;10&amp;2&amp;100\\ \cline{2-5} \cline{7-10}&amp;PrivBayes&amp;2&amp;6&amp;96&amp;&amp;PrivBayes&amp;2&amp;6&amp;100\\\hline \hline %\noalign{\hrule height 2pt} \end{tabular} \end{table}  \end{document}   In this picture, I have 2 algorithms {Original, PrivBayes}. I want to change 2 algorithms into 3 algorithms with keeping the format of table. Can you please help me to do it? I know the new SPFx will be released for Sharepoint 2016 sometime in the year 2017. But are there any plans to also bring this for Sharepoint 2013?  Are there any possibilities/hacks to add a Sharepoint app created with SPFx in the Sharepoint 2013 app catalog? What is the correct pronunciation of "the"? The is sometimes pronounced &quot;tha&quot; (/ðə/) or &quot;thi&quot; (/ðiː/). Which is the correct pronunciation of this word? Are both correct and used interchangeably at specific places? If the second question is correct, please provide the rule of pronouncing at different places. Display command in xterm titlebar My Bash Prompt is currently setting the xterm titlebar using the following sequence:  PS1='\033]0;\u@\h&gt;\w\007'   Is there an easy way to display the current command in the titlebar. For example, if I am tailing a file using tail -f foo.log, I want my titlebar to say tail -f foo.log. How to convert a 3 column csv file into a table (or matrix) I have an CSV input file format like this, with a nucleotide sequence in field 1, text in field 2, and an integer in field 4:  ATGC,CD3,56 ATGC,CD4,67 ATGC,IgD,126 ATGC,IgM,127 AGTC,CD3,67 AGTC,CD4,78 AGTC,IgD,102 AGTC,IgM,89 TCGA,CD3,334 TCGA,CD4,123 TCGA,IgD,456 TCGA,IgM,80 CGTA,CD3,54 CGTA,CD4,32 CGTA,IgD,82 CGTA,IgM,117   I opened this CSV file using Numbers in Mac it's display as 3 columns format, however, I want to convert it to the table(or Matrix) format (also a CSV file), making the first column, the nucleotide sequences, into a header, and want the result to also look like a table (or Matrix):       ATGC  AGTC  TCGA  CGTA CD3  56    67    334   54 CD4  67    78    123   32 IgD  126   102   456   82 IgM  127   89    80    117   Below is a section from my real input CSV file (sample input.txt):  AGAATAGTCTGATTCT,-,,38 AGAATAGTCTGATTCT,AnnexinV,,51 AGAATAGTCTGATTCT,CD127,,39 AGAATAGTCTGATTCT,CD138,,3 AGAATAGTCTGATTCT,CD14,,2 AGAATAGTCTGATTCT,CD16,,4 AGAATAGTCTGATTCT,CD19,,10 AGAATAGTCTGATTCT,CD20,,6 AGAATAGTCTGATTCT,CD24,,21 AGAATAGTCTGATTCT,CD25,,4 AGAATAGTCTGATTCT,CD27,,87 AGAATAGTCTGATTCT,CD3,,235 AGAATAGTCTGATTCT,CD34,,5 AGAATAGTCTGATTCT,CD38,,18 AGAATAGTCTGATTCT,CD4,,412 AGAATAGTCTGATTCT,CD43,,99 AGAATAGTCTGATTCT,CD5,,430 AGAATAGTCTGATTCT,CD56,,3 AGAATAGTCTGATTCT,CD8,,7 AGAATAGTCTGATTCT,IgD,,4 AGAATAGTCTGATTCT,IgM,,2 TGTGGTAGTTCGTCTC,-,,9 TGTGGTAGTTCGTCTC,AnnexinV,,42 TGTGGTAGTTCGTCTC,CD127,,6 TGTGGTAGTTCGTCTC,CD138,,4 TGTGGTAGTTCGTCTC,CD16,,40 TGTGGTAGTTCGTCTC,CD19,,7 TGTGGTAGTTCGTCTC,CD20,,2 TGTGGTAGTTCGTCTC,CD24,,24 TGTGGTAGTTCGTCTC,CD25,,2   How can I do this using Linux text formatting commands? What is rank deficiency, and how to deal with it? Open chrome and launch the settings page Is there any easy way on Windows to log %CPU time per process over time to a file for later analysis?  As far as I can see...   Task manager shows me the %CPU per process but only visually - no way to save to a file. Perfmon will let me save to a file, and will additionally create a time-based file (taking snapshots at specified time intervals) - which is almost what I want, except that as far as I can see it can't break down the %CPU by process. Process Explorer will let me break down by process, but it will only save the file as a snapshot of a single point in time   So, none of these are quite what I need: I need to get a file that contains something like 'top 10 processes by CPU, every 15 seconds, until I stop the monitoring' The reason I need this because I have a machine on which some process is causing occasional brief spikes in CPU usage several times a day and I need to find out which process is the culprit.    Can anything do that, or have I missed some feature of perfmon or process explorer?