If $X$ is finite dimensional, $A$ is a convex dense subset, prove  that $\mathrm{Aff}(A)=X$. Here $\mathrm{Aff}(A)$ is the affine hull of $A$, we have the expression $\mathrm{Aff}(A) = \{x\in X: x = \sum_{i=1}^n \lambda_i x_i, \forall x_i\in A,\forall \lambda_i\in\mathbb{R},\sum_{i=1}^n \lambda_i = 1 \}$.
I am trying to prove that the affine hull of a set $X \subseteq \mathbb{R}^d$ is equal to the affine hull of the clojure of that set: $$ \text{aff}(X) = \text{aff}(\text{cl}(X)). $$  Proving $\text{aff}(X) \subseteq \text{aff}(\text{cl}(X))$ is easy, but containment in the other direction is harder.  I am assuming there is a sequence $\{ x_k \}_{k=1}^\infty \subseteq X$ such that $\lim_{k\to \infty} x_k = x^*$. The point $x^*$ is obviously contained in $\text{aff}(\text{cl}(X))$. But I am not sure how to show it is also in $\text{aff}(X)$, specifically because I am not sure how to show that $x^*$ lies on a line connecting two points in $X$.  Any suggestions on how to surmount this hurdle are welcome.
"...would have trouble imagining...": Is this present participle or gerund? How to compute PCA scores from eigendecomposition of the covariance matrix? Given a data matrix $\mathbf X$ of $12 \times 7$ size with samples in rows and variables in columns, I have calculated centered data $\mathbf X_c$ by subtracting column means, and then computed covariance matrix as $\frac{1}{N-1} \mathbf X_c^\top \mathbf X_c$.  The dimensions of this covariance matrix are $7 \times 7$. After that I have calculated the eigenvalue decomposition, obtaining eigenvector matrix $\mathbf V$ with eigenvectors in columns.  Now I want to know about projections (i.e. principal component scores in PCA): is it $\mathbf{V}^\top \mathbf{X}_c$ or $\mathbf{X}_c \mathbf{V}$?  mean_matrix = X - repmat(mean(X),size(X,1),1); covariance = (transpose(mean_matrix) * mean_matrix)/(12-1);  [V,D] = eig(covariance); [e,i] = sort(diag(D), 'descend'); V_sorted = V(:,i); The limit of a sum $\sum_{k=1}^n \frac{n}{n^2+k^2}$ as $n\rightarrow\infty$ Calling future method from batch class? How do I complete "Find the Bitizen"? What does increased caster level affect? Find all integer solutions to Diophantine equation $x^3+y^3+z^3=w^3$ Compute all integer solutions to the equation  $$x^3+y^3+z^3=w^3$$ Can I use my iPhone as a "remote" for my iPad? Loop background music? I am using the nnls() function from the nnls package in R to do a linear regression for regressors $x_i$ and observations $y$. The function delivers beta coefficients $\beta_i\geq{0}, \forall i$. However, is it possible to apply the constraints only to some regressors so that $$\beta_k \geq 0 \quad k \in \{1...,10\}, k\neq i \\  \beta_i \in \mathbb{R} \quad i \in \{1...,10\}$$ given that I have 10 regressor variables? The nnls package also offers the possibility to enforce some coefficients to be negative and others to be positive via the function nnnpls(). However, I only want the positive constraint for some parameters, the other ones can be either positive or negative (i.e., unconstrained). Can decimal numbers be considered "even" or "odd"? How do you serialize an object in C++? I have a small hierarchy of objects that I need to serialize and transmit via a socket connection.  I need to both serialize the object, then deserialize it based on what type it is.  Is there an easy way to do this in C++ (as there is in Java)?  Are there any C++ serialization online code samples or tutorials?  EDIT: Just to be clear, I'm looking for methods on converting an object into an array of bytes, then back into an object.  I can handle the socket transmission. How do i create a linestring from points sort by date in PostgreSQL?  I tried:  SELECT observations.id,    ST_MakeLine(observations.geom ORDER BY observations.date) AS newgeom    FROM   observations     GROUP BY    observations.id;   This is going wrong. It returns me a linestring with same coordinates.  So, instead of a line from a to b, it gives me a to a.    What am I doing wrong? How do you handle uneven tiles while rendering a tile map? Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes [more like an L then a square] as well as larger then the 40x40px that my current tiles are).    I have also attached the tile sheet I am using for the tiles to show you what the corners and tops look like compared to the rest of the tiles.  What I’m thinking is I might be able to just draw them using the same array I have if I use the tiles width and height instead of a set WxH? I dont know how well this will work, but were the blocks that will have different values will be blocks the player/NPCs can’t step on then it may not be an issue, again I’m not even sure if that is a viable solution.  My code in case you want to see how I'm currently handling it:  (pastebin) (edit:im not handling it, meant how I'm currently doing the map)  tl;dr - how can I take take my 2d looking tile map and change it to have different size tiles? or is there a better way to do what I am trying to do? Is there a name of a method that I should be looking for while googling? I'm using Ubuntu 17.10 with GNOME 3. How can I show all open windows of a certain application using the sidebar (aka Ubuntu Dock)? Right now I have to right-click and select "all windows" to see my other open windows.   Is there a quicker way to do this? How to set the background color of the Linux console screen? Note: I reworked the question to clarify the issues. This is a trivial question that can be answered in several parts because the question has several attributes.  Unfortunately, the question may be reworked when the person asking the question apprehends (knows) some parts of the answer as well as the structure of the question.  Therefore, the question is presented from a different point of view than the original one.  How to change the color setting¹ of the Linux console, using a shell utility? How to change the color setting¹ of a terminal emulator, using a shell utility?  Originally, I wanted to change the background color of the Linux console during the execution of a shell script. The following proposition works as I wanted.  #!/bin/sh  # set the background color of the terminal tput setab 6 clear  printf "%s\n" 'background: cyan'  # do some tasks  cd /usr/src/initramfs pwd ls -l  # the background of the shell output is cyan   Nonetheless, someone may encounter several glitches (or difficulties).   For instance, if the screen is not cleared, the background color is only applied to the text output, during a shell script execution. If the command tput setab 6 is submitted with the command line and the screen is not cleared, the background color is only applied to a small portion of the output text. If the command tput setab 6 is submitted on the command line and the screen is cleared, the background color is applied to the full screen but only persists until another command is submitted. [...]  ¹ background color Asking the position of a person in a sequence How to ask the position(?) of a president (like 10th) of a country, correctly? How can I play sound in Java? Writing C# debug output to .txt file How to align prices in columns when both 2 digit and 4 digit variations of a price exist? I am trying to display data similar to coinmarketcap with prices for coins, some above 1$ in which case they are rounded to 2 zeroes, some below 1$ in which case they have 4 digits following the decimal. I saw a bunch of posts here where people have suggested to use right alignment for numeric applications/prices  Approach 1 Decimal aligned   1. $13,700.05  2.      $0.0048   Approach 2 Right aligned   1. $13700.05  2.   $0.0048   Which of these approaches do you suggest? Thank you for your time