For example i have this quadratic form $q(x_1,x_2)=8{x_1}^2-4x_1x_2+5{x_2}^2$ , here it's a simple factoring:  $q\begin{bmatrix}x_1 \\x_2 \\x_3\\\end{bmatrix}=\begin{bmatrix}x_1 \\x_2 \\x_3\\\end{bmatrix} \cdot \begin{bmatrix}8x_1 &amp;-2x_2\\-2x_1&amp;5x_2\end{bmatrix}=\vec{x}^{T}A\vec{x} ,A=\begin{bmatrix}8 &amp;-2\\-2&amp;5\end{bmatrix}$.  But this is not always the case where one can simply see how the matrix is going to be ,so is there a certain method of finding this matrix?
I was wondering. If I have a bilinear symmetric form, it is easy to find its matrix. But, when I have a quadratic form, which is the procedure to do that?  I heard that one possibility is: If $q$ is my quadratic form, then $$f(x,y) = \frac{1}{4}q(x+y) - \frac{1}{4}q(x-y)$$ is the bilinear symmetric form associated, so the method reduces to find the matrix of $f(x,y).$   The point is that seems a little noising... How to find, in practice, the matrix of quadratic form?  Thanks in advance.
How can adding a 2nd IV make the 1st IV significant? I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant. Can I access private members from outside the class without using friends? Disclaimer Yes, I am fully aware that what I am asking about is totally stupid and that anyone who would wish to try such a thing in production code should be fired and/or shot.  I'm mainly looking to see if can be done. Now that that's out of the way, is there any way to access private class members in C++ from outside the class?  For example, is there any way to do this with pointer offsets? (Naive and otherwise non-production-ready techniques welcome) Update As noted in the comments, I asked this question because I wanted to write a blog post on over-encapsulation (and how it affects TDD).  I wanted to see if there was a way to say &quot;using private variables isn't a 100% reliable way to enforce encapsulation, even in C++.&quot;  At the end, I decided to focus more on how to solve the problem rather than why it's a problem, so I didn't feature some of the stuff brought up here as prominently as I had planned, but I still left a link. At any rate, if anyone's interested in how it came out, here it is:   (I suggest reading it before you decide that I'm crazy). If low-cost index funds are considered the best investment, why are there so many high-cost, managed funds? Question list on profile page not vertically aligned There's something wrong with the vertical alignment on the :   (click to enlarge)  On the , which uses a similar list but without the Favorite column, the vertical alignment is correct.  (Tested in the latest Firefox, Safari and Chrome on macOS Catalina.) I was going through the topic "formation of comparative and superlative".       The rule says     When two objects are compared with each other, the latter term of comparison must exclude the former, as in "Iron is more useful than any other metal". If we say "Iron is more useful than any metal", that is the same thing as saying    "Iron is more useful than iron", since iron is itself a metal.   I am finding difficulty to relate the rule with example. Understanding Bash's Read-a-File Command Substitution I am trying to understand how exactly Bash treats the following line:  $(&lt; "$FILE")   According to the Bash man page, this is equivalent to:  $(cat "$FILE")   and I can follow the line of reasoning for this second line. Bash performs variable expansion on $FILE, enters command substitution, passes the value of $FILE to cat, cat outputs the contents of $FILE to standard output, command substitution finishes by replacing the entire line with the standard output resulting from the command inside, and Bash attempts to execute it like a simple command.  However, for the first line I mentioned above, I understand it as: Bash performs variable substitution on $FILE, Bash opens $FILE for reading on standard input, somehow standard input is copied to standard output, command substitution finishes, and Bash attempts to execute the resulting standard output.  Can someone please explain to me how the contents of $FILE goes from stdin to stdout? How do I search for available packages from the command-line? I have successfully installed some packages using the command line 'sudo apt-get install packagename' when I have known in advance that those packages are available.  But how can I search for or get a list of what is available in the repositories? Number of bins when computing mutual information I want to quantify the relationship between two variables, A and B, using mutual information. The way to compute it is by binning the observations (see example Python code below). However, what factors determines what number of bins is reasonable? I need the computation to be fast so I cannot simply use a lot of bins to be on the safe side.  from sklearn.metrics import mutual_info_score  def calc_MI(x, y, bins):     c_xy = np.histogram2d(x, y, bins)[0]     mi = mutual_info_score(None, None, contingency=c_xy)     return mi Embedded Prolog Interpreter/Compiler for Java Let $G$ be abelian, $H$ and $K$ subgroups of orders $n$, $m$. Then G has subgroup of order $\operatorname{lcm}(n,m)$. How to deal with high correlation among predictors in multiple regression? A question I'm struggling with is to prove or disprove that the automorphism group of a finite cyclic group must be cyclic. I think the statement is false but have not been able to come up with a counterexample.  Thank you for any assistance you can provide. opengl storing multiple indices into indices buffer Maximal order of an element in a symmetric group Prove the following $A \setminus (B\setminus C) = (A\setminus B)\cap (A \cup C)$ I want to prove the following so I decide to rewrite the RHS  $$A \setminus (B\setminus C) = (A\setminus B)\cap (A \cup C)$$ $$ A\setminus(B\setminus C) = A\setminus (B \cap C^c) = A\cap (B\cap C^c)^c = A\cap(B^c\cup C) = (A\cap B^c)\cup(A\cap C) $$ there is way that $(A\cap B^c)\cup(A\cap C)\rightarrow (A\setminus B)\cup(A\cap C) = (A\setminus B)\cap (A \cup C)$?  thanks. EDIT  LHS: $$x\in A \vee x\in A\cap C \rightarrow x\in A \wedge x\in C$$ RHS: $$x\in A \wedge x\in A\cup C \rightarrow x\in A \vee x\in C$$  how it can help me? How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string? URL of cited web site in bibliography I am using natbib with the chicago style as bibliography style. I am trying to cite a web site, but in the bibliography the URL (given in the BibTeX entry) is not printed.   Is there a simple solution to this matter? What am I doing wrong?  ok, as a little example (the entries are generated via Mendeley)  @misc{Carlson2011,    author = {Carlson, Nicholas},   booktitle = {Businessinsider.com},   title = {{How Many Users Does Twitter REALLY  Have?}},   url = {www.businessinsider.com/chart-of-the-day-how-many-users-does-twitter-really-have-2011-31/3},   year = {2011} }   and the output in chicago-style looks like this:     Carlson, N. (2011). How Many Users Does Twitter REALLY Have? I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn't seem to be a simple way to do it from from the command line? Gravity as a gauge theory Currently, (classical) gravity (General Relativity) is NOT a gauge theory (at least in the sense of a Yang-Mills theory).   Why should "classical" gravity be some (non-trivial or "special" or extended) gauge theory? Should quantum gravity be a gauge theory?  Remark: There are some contradictory claims in the literature to this issue. To what extent gravity is "a gauge" theory?Obviously, GR is not a YM theory. So, why do some people say that gravity "IS" a gauge theory? I found this question relevant, e.g., then we handle GR in the Einstein-Cartan theory or any other theory beyond GR, like teleparallel theories or higher-derivative gravitational theories. So I think it could be useful to discuss the "gauge flavor" of gravity here. Points at integer distance How many points can one can place in $\mathbb{R}^n$, with the requirement that no $n+1$ points lie in the same $\mathbb{R}^{n-1}$-plane, and the euclidean distance between every two points is an integer?