How to prove exponential correspondence for tensors?

Question: Let ${\rm Vec}_{\mathbb{R}}$ denote the category of finite dimensional vector spaces over the real numbers. Let ${\rm Hom}_k(V,W)$ denote the space of multilinear maps $\underbrace{V\times\dots\times V}_{k\ times} \to W$ and $V_k^1$ denote the space of multilinear maps $\underbrace{V\times\dots\times V}_{k\ times} \times V^* \to \mathbb{R}$.
I want to show that there is a natural isomorphism between $Hom_k(V,V)$ and $V_k^1$. I have reduced the problem to showing the existence of a natural isomorphism between $Hom_k(V,V^{**})$ and $V_k^1$. Intuitively it is clear to me that such an identification can be accomplished by currying, that this is a vector space isomorphism should be verifiable simply by checking the definitions, and that naturality should follow from (some variant of) the Yoneda Lemma. However, I am having some difficulty finding the endofunctors in $Vec_{\mathbb{R}}$ that would allow me to verify all of these claims.
Reduction: I know that, given a finite dimensional vector space $V$, there is a natural isomorphism with $V^{**}$. Using hom functors, it isn't that difficult to extend this to a natural isomorphism between $Hom_k(V,V)$ and $Hom_k(V,V^{**})$.
What I have tried: I have tried to find functors $$f_1: Vec_{\mathbb{R}} \to Vec_{\mathbb{R}}, V \mapsto Hom_k(V,V^{**})$$ and $$f_2: Vec_{\mathbb{R}} \to Vec_{\mathbb{R}}, V\mapsto V_k^1.$$ However, given vector space homomorphisms $T:V\to W$, it is unclear to me how to find vector space homomorphisms $Hom_k(V,V^{**}) \to Hom_k(W,W^{**})$ or $Hom_k(W,W^{**}) \to Hom_k(V,V^{**})$ which would give the morphism part of the functors. First I tried using a contravariant hom functor, i.e. pre-composition by T, $$T \mapsto f(T(\cdot),\dots,T(\cdot)),$$ but the problem with this is that it only maps $Hom_k(W,W^{**}) \to Hom_k(V,W^{**})$, but clearly I need a map $Hom_k(W,W^{**}) \to Hom_k(V,V^{**})$.
So then I tried restricting from $Vec_{\mathbb{R}}$ to the subcategory $\mathbb{V}$, defined to be the category whose objects are all $n$-dimensional vector spaces over $\mathbb{R}$ and whose morphisms consist only of invertible linear transformations, and then finding functors $$f_1: \mathbb{V} \to Vec_{\mathbb{R}}, \quad f_2: \mathbb{V} \to Vec_{\mathbb{R}},$$ with the same rules of assignment for the objects as before, namely $f_1: V \mapsto Hom(V,V^{**})$ and $f_2: V \mapsto V_k^1$. Then I tried the following rule of assignment for morphisms for $f_1$: $$T\mapsto T^{-1} f(T(\cdot),\dots,T(\cdot))$$ -- this does map $Hom_k(W,W^{**})\to Hom_k(V,V^{**})$ as desired, but it turns out this satisfies neither associativity nor functoriality. Now I am stuck. I haven't tried to find a rule of assignment for morphisms for $f_2$, but it seems like one would run into the analogous problems.
However, without two endofunctors $f_1$ and $f_2$, I can't show that there is a natural transformation between them which is also an isomorphism and which is a vector space isomorphism when applied to objects.
In terms of exponential objects, I think what I want to show is equivalent to: $$ V^{V^k}   \cong \mathbb{R}^{V^k \otimes V^*} .$$ Then what I have reduced it to is showing $$ V^{V^k}   \cong (\mathbb{R}^{V^*})^{V^k} \cong \mathbb{R}^{V^k \otimes V^*} .$$ Now the left isomorphism is essentially easy, since $V \cong V^{**}:=\mathbb{R}^{V^*}$, so what I need to show is the right isomorphism, which is the vector space version of the natural exponential object correspondence. So if I can prove that $(X^Y)^Z \cong X^{Y \times Z}$ in $Set$, then maybe the proof will carry over almost word for word for the corresponding version in $Vec_{\mathbb{R}}$. I still need to look into this line of approach more, although so far I have not succeeded yet in demonstrating the naturality of the isomorphism $(X^Y)^Z \cong X^{Y \times Z}$ in $Set$, so it might not be as easy as I am hoping.
EDIT: If I can show that $Vec_{\mathbb{R}}$ is Cartesian closed, then this should follow from Exercise 1(b), section 6.6., p.123, of Awodey's Category Theory. Although the exercise is only to prove that we have an isomorphism, $(A^B)^C \cong A^{B \times C}$, but does not include a proof of naturality.
Answer: Your "functors" aren't actually functors. I'll stick to standard notations because "$\operatorname{Hom}_k(V,V)$" is too easy to mistake for the space of $k$-linears maps $V \to V$ for some field $k$... I'll also let the base field $\mathbb{R}$ be implied throughout.
Let's do the simplest case, $k=1$. Then you have a bifunctor
$$\operatorname{Hom} : \mathsf{Vec}^{\mathrm{op}} \times \mathsf{Vec} \to \mathsf{Vec}, \; (V,W) \mapsto \operatorname{Hom}(V,W)$$
It's not possible to compose that with the functor $\mathsf{Vec} \to \mathsf{Vec} \times \mathsf{Vec}$, simply because the (co)domains don't match... So the mapping $V \mapsto \operatorname{Hom}(V,V)$ doesn't yield a functor a priori. I can't see any reasonable way to make that into a functor. Your question is doomed from the start...

However you do have the bifunctor $\operatorname{Hom}$ as above. You also have another bifunctor, say $$\Phi : \mathsf{Vec}^{\mathrm{op}} \times \mathsf{Vec} \to \mathsf{Vec}, \; (V,W) \mapsto \operatorname{Hom}(V \otimes W^*, \mathbb{R}).$$
This is indeed a bifunctor; given $f : V' \to V$ and $g : W \to W'$, you get $\Phi(f,g) : \Phi(V,W) \to \Phi(V',W')$ given by $t \mapsto t \circ (f \otimes g^*)$ (where $g^* : \operatorname{Hom}(W', \mathbb{R}) \to \operatorname{Hom}(W,\mathbb{R})$ is precomposition by $g$).
These two functors are naturally isomorphic, when you restrict to finite-dimensional spaces. Indeed define a natural transformation $\eta : \operatorname{Hom} \to \Phi$ by:
\begin{align}
\eta_{(V,W)} : \operatorname{Hom}(V,W) & \to \operatorname{Hom}(V \otimes W^*, \mathbb{R}) \\
t & \mapsto (\eta(t) : v \otimes \psi \mapsto \psi(t(v)))
\end{align}
It's not hard (but it's a bit tedious) to check that this is a natural transformation. Both spaces have the same dimension, namely $(\dim V) (\dim W)$. So to check that this is an isomorphism for all $(V,W) \in \mathsf{Vec}^\mathrm{op} \times \mathsf{Vec}$, it suffices to check that this is surjective.
For a fixed couple $(V,W)$, let $(w_1, \dots, w_n)$ be a basis of $W$ (recall that it's finite dimensional), and let $(w_1^*, \dots, w_n^*)$ be the dual basis of $W^*$. Suppose given some $\beta \in \operatorname{Hom}(V \otimes W^*, \mathbb{R})$. Then you can let $\alpha \in \operatorname{Hom}(V, W)$ be defined by
$$\alpha(v) = \sum_{i=1}^n \beta(v \otimes w_i^*) \cdot w_i.$$
It is now a very tedious (but completely mechanical) check that $\eta_{(V,W)}(\alpha) = \beta$. The mapping is surjective between spaces of the same finite dimension, hence it's an isomorphism.

Finally, to get the general case, consider the functor $\bigotimes : \mathsf{Vec}^{\times k} \to \mathsf{Vec}$ given by $\bigotimes(V_1, \dots, V_k) = V_1 \otimes \dots \otimes V_k$, and compose it with the natural isomorphism $\eta$ to get a natural isomorphism
$$\operatorname{Hom}(V_1 \otimes \dots \otimes V_k, W) \xrightarrow{\cong} \operatorname{Hom}(V_1 \otimes \dots \otimes V_k \otimes W^*, \mathbb{R}).$$
But again this is contravariant in the $V_i$ and covariant in $W$, so you can compose with $V \mapsto (V, \dots, V)$ because this is covariant in everything...
Comment: Glad I could help! You're welcome!
Comment: This is perfect and breaks down everything into simple steps, thank you so much! I still need to go through the tedious and mechanical components (it seems like one of those things you need to do once in your life) -- I'll comment again if I'm unclear about something but given the amount of detail here I should be able to figure everything else out. Also it is reassuring to know that finding a functor was a doomed proposition, it is a nice sanity check. Also nLab says that the Hom and tensor product functors are the standard examples of bifunctors, so it makes that they should come up here.
Comment: You should write a textbook about something, this is a great answer -- it not only breaks down the solution clearly, but it even addresses why the original proposed approach fails to work. I was afraid I would never understand this but now I am confident that I will understand it -- thank you again!
Comment: Say that $\{v_1,v_2\}$ is linearly independent in $V$, and $\{\psi_1,\psi_2\}$ is linearly independent in $W^*$. Then there exists no $(u\otimes\omega)\in V\otimes W^*$ such that $(u\otimes\omega)=(v_1\otimes\psi_1)+(v_2\otimes\psi_2)$. So does $$\eta_{(V,W)}(t): (v_1\otimes\psi_1)+(v_2\otimes\psi_2)\mapsto (\psi_1 + \psi_2)(t(v_1+v_2)) = \psi_1(t(v_1))+\psi_1(t(v_2))+\psi_2(t(v_1))+\psi_2(t(v_2))?$$ or does $$\eta_{(V,W)}(t):(v_1\otimes\psi_1)+(v_2\otimes\psi_2)\mapsto\eta_{(V,W)}(t)(v_1\otimes\psi_2)+\eta_{(V,W)}(t)(v_2\otimes\psi_2)=\psi_1(t(v_1))+\psi_2(t(v_2))?$$
Comment: It has to be the second one, right, or else $\eta_{(V,W)}(t)$ is not only not linear, hence not an element of $Hom(V\otimes W^*,\mathbb{R})$, but not even well-defined due to properties of the tensor product, e.g. take $v\in V$, $\psi_1,\psi_2\in W^*$, then for $v\otimes\psi_1+v\otimes\psi_2$, the first method gives $2\psi_1(t(v))+2\psi_2(t(v))$ and the second gives $\psi_1(t(v))+\psi_2(t(v))$, but $v\otimes\psi_1+v\otimes\psi_2=v\otimes(\psi_1+\psi_2)$, and $\eta_{(V,W)}(t)$ returns $\psi_1(t(v))+\psi_2(t(v))$, thus only the second definition is a viable candidate-- is this correct?
Comment: Also the first one is impossible because it is not injective, whereas in order to be a vector space isomorphism $\eta_{(V,W)}(t)$ needs to be injective, i.e. for the first one we have that $(v_1+v_2)\otimes(\psi_1+\psi_2)$ and $v_1\otimes\psi_1 + v_2 \otimes \psi_2$ produce the same result but are in general not equal. But is the second one actually the correct definition? All the above shows is that it could be. I guess I will just have to test it on $\alpha$ perhaps, I am not sure.
Answer: $\newcommand{\Vec}{\mathsf{Vec}}$$\newcommand{\Hom}{\operatorname{Hom}}$$\newcommand{\id}{\operatorname{id}}$This is for my future reference so I never have to write out these proofs again.

Claim: $\Hom(-,-):\Vec^{op}\times \Vec \to \Vec$ is a functor.

(a) Given $V,W \in \Vec$, we define the object part of $\Hom$ as follows: $$(V,W)\mapsto \Hom(V,W) $$ where $\Hom(V,W)$ is defined to be the space of all linear transformations $S: V \to W$.
(b) Given $(V,W) \overset{(f,g)}{\to} (V',W')$, i.e. $f: V' \to V$, $g: W \to W'$ linear transformations, we define the morphism part of $\Hom$ as follows: $$\Hom(f,g):S \mapsto g \circ S \circ f .$$ Note that $g \circ S \circ f \in \Hom(V',W')$, hence $\Hom(f,g): \Hom(V,W) \to \Hom(V'W')$ as required.
(c) We now show that $\Hom$ preserves identity morphisms. Let $(\id_V, \id_W)= \id_{(V,W)}: (V,W) \to (V,W)$ be the identity morphism for $(V,W)$. Then we want to show that $\Hom(\id_V,\id_W)$ is the identity morphism for $\Hom(V,W)$. So again let $S \in \Hom(V,W)$, then by definition: $$\Hom(\id_V, \id_W): S \mapsto \id_W \circ S \circ \id_V =S .$$ Thus $\Hom(\id_V,\id_W)=\id_{\Hom(V,W)}$, which is what we wanted to show.
(d) Given $(V,W) \overset{(f_1,g_1)}{\to} (V',W')$ and $(V',W') \overset{(f_2,g_2)}{\to} (V'',W'')$, i.e. linear transformations $f_2: V'' \to V', f_1: V' \to V, g_1: W \to W', g_2: W' \to W''$. First we compute $$\Hom((f_2,g_2)\circ(f_1, g_1) )=\Hom( f_1 \circ f_2, g_2 \circ g_1): S \mapsto (g_2 \circ g_1) \circ S \circ (f_1 \circ f_2). $$ Note that $(g_2 \circ g_1) \circ S \circ (f_1 \circ f_2): V'' \to W''$ is a linear transformation, i.e. $(g_2 \circ g_1) \circ S \circ (f_1 \circ f_2) \in \Hom(V'',W'')$ as expected and required. Secondly we compute: $$\Hom(f_2,g_2)\circ\Hom(f_1,g_1):S \mapsto g_2 \circ (g_1 \circ S \circ f_1) \circ f_2 .$$ Again, $g_2 \circ (g_1 \circ S \circ f_1) \circ f_2: V'' \to W''$ is a linear transformation, i.e. an element of $\Hom(V'',W'')$. And by associativity of function composition we clearly have $$(g_2 \circ g_1) \circ S \circ (f_1 \circ f_2) = g_2 \circ (g_1 \circ S \circ f_1) \circ f_2, $$ from which it follows that $$\Hom((f_2,g_2)\circ(f_1,g_1))=\Hom(f_2,g_2)\circ\Hom(f_1,g_1), $$ i.e. $\Hom$ does commute with composition of morphisms as required. Thus $\Hom$ is a functor.

Claim: $\Hom$ is a bifunctor.

This follows from the fact that $\Hom$ is a functor whose domain is a product category, $\Vec^{op}\times \Vec$.

Claim: $\Phi:\Vec^{op}\times\Vec \to \Vec$ is a functor.

(a) Given $V,W \in \Vec$, we define the object part of $\Phi$ to be: $$\Phi:(V,W)\mapsto\Hom(V\otimes W^*, \mathbb{R}).$$
(b) Given $(V,W) \overset{(f,g)}{\to} (V',W')$, i.e. $f: V' \to V, g: W \to W'$ linear transformations, we define the morphism part of $\Phi$ to be: $$\Phi(f,g): \sigma \mapsto \sigma \circ (f \otimes g^*), $$ with $\sigma \in \Hom(V \otimes W^*, \mathbb{R})$, $g^*: (W')^*=\Hom(W',\mathbb{R}) \to \Hom(W, \mathbb{R})=W^*$, $g^*: \tau \mapsto \tau \circ g\ \forall \tau\in(W')^*$, $(f \otimes g^*): V' \otimes (W')^* \to V \otimes W^*$, since $f: V' \to V$, $g: W \to W' \implies g^* : (W')^* \to W^*$ (adjoint/pre-composition is contravariant), thus $$V' \otimes (W')^* \overset{(f \otimes g^*)}{\to } V \otimes W^* \overset{\sigma}{\to} \mathbb{R}, $$ thus $\sigma \circ (f \otimes g^*): V' \otimes (W')^* \to \mathbb{R}$ as required, and thus $\Phi(f,g): \Phi(V,W)= \Hom(V \otimes W^*, \mathbb{R}) \to \Hom(V' \otimes (W')^*, \mathbb{R}) = \Phi(V',W')$ as claimed.
(c) We now show that $\Phi$ preserves identity morphisms. Let $(\id_V, \id_W)=\id_{(V,W)}$ be the identity morphism for $(V,W) \in \Vec^{op} \times \Vec$. Then we want to show that $\Phi(\id_v, \id_W)=\id_{\Phi(V,W)}=\id_{\Hom(V \otimes W^*, \mathbb{R})}$. Given $\sigma \in \Hom(V \otimes W^*, \mathbb{R})$, we have that $$\Phi(\id_V, \id_W): \sigma \mapsto \sigma \circ (\id_V \otimes \id_W^*), $$ now since $(\id_V,\id_W):(V,W)\to(V,W)$, we have that $(\id_V \otimes \id_W^*):V \otimes W^* \to V \otimes W^*$, so that $\sigma \circ (\id_V \otimes \id_W^*) \in \Hom(V \otimes W^*, \mathbb{R})$. We have by definition of tensor product of linear maps that for all $u \otimes \tilde{w} \in V \otimes W^*$: $$(\id_V \otimes \id_W^*)(u\otimes\tilde{w})=(\id_V(u))\otimes(\id_W^*(\tilde{w}))=u \otimes (\tilde{w} \circ \id_W) = u \otimes \tilde{w}, $$ in other words $(\id_V \otimes \id_W^*)=\id_{V \otimes W^*}$, so $\sigma \circ (\id_V \otimes \id_W^*) = \sigma \circ \id_{V \otimes W^*}= \sigma$, so in conclusion $\forall \sigma \in \Hom(V \otimes W^*, \mathbb{R}), \quad \Phi(\id_V,\id_W): \sigma \mapsto \sigma$, thus $\Phi(id_V,\id_W)=\id_{\Hom(V \otimes W^*, \mathbb{R})} = \id_{\Phi(V,W)}$.
(d) We now show that $\Phi$ commutes with composition. Given $(V,W) \overset{(f_1,g_1)}{\to}(V',W') \overset{(f_2,g_2)}{\to}(V'',W'')$, i.e. linear transformations $f_2: V'' \to V'$, $f_1: V' \to V$, $g_1: W \to W'$, $g_2: W' \to W''$. First we compute $$ \Phi( (f_2,g_2)\circ(f_1,g_1) ) = \Phi( f_1 \circ f_2, g_2 \circ g_1  ):  \sigma \mapsto \sigma \circ ( (f_1 \circ f_2) \otimes (g_2 \circ g_1)^*  )  = \sigma \circ ( (f_1 \circ f_2) \otimes (g_1^* \circ g_2^*)   )  $$ Then we compute $$ \Phi(f_2,g_2)\circ\Phi(f_1,g_1):\sigma \mapsto (\sigma \circ (f_1 \otimes g_1^*))\circ (f_2 \otimes g_2^*) = \sigma \circ (f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^*). $$ Now $f_1 \circ f_2: V'' \to V$, $(g_2 \circ g_1): W \to W'' \implies (g_2 \circ g_1)^*: \Hom(W'', \mathbb{R}) \to \Hom(W, \mathbb{R})$, $(g_2 \circ g_1)^*: \tau \mapsto \tau \circ (g_2 \circ g_1) = (\tau \circ g_2)\circ g_1 = (g_1^* \circ g_2^*) (\tau)$. Furthermore $$  (f_2 \otimes g_2^*): V'' \otimes (W'')^* \to V' \otimes (W')*  $$ and $$ (f_1 \otimes g_1^*): V' \otimes (W')^* \to V \otimes W^*  $$ thus $$  (f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^*): V'' \otimes (W'') \overset{(f_2 \otimes g_2^*)}{\to} V' \otimes (W')^* \overset{(f_1 \otimes g_1^*)}{\to} V \otimes W^*  $$ in other words $$ (f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^* ): V'' \otimes (W'')^* \to V \otimes W^*.   $$ Similarly, since $(f_1 \circ f_2): V'' \to V$ and $g_1^* \circ g_2^*: (W'')^* \to W^*$, we have by the definition of tensor product of maps that $$ (f_1 \circ f_2) \otimes (g_1^* \circ g_2^* ): V'' \otimes (W'')^* \to V \otimes W^*, $$ hence it is at least plausible that the two maps are equal.
Let $(u, \tilde{w}) \in V'' \otimes (W'')^*$. Then $$ (f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^*) (u, \tilde{w}) = (f_1 \otimes g_1^*)( f_2(u) \otimes g_2^*(\tilde{w})   ). $$ Now since $f_2: V'' \to V'$, we have that $f_2(u) \in V'$ and since $g_2^*: (W'')^* \to (W')^*$, we have that $g_2^*(\tilde{w}) \in (W')^*$, thus $f_2(u) \otimes g_2^*(\tilde{w}) \in V' \otimes (W')^*$, which is the domain of $(f_1 \otimes g_1^*)$, so we can apply it, using once again the definition of tensor product of maps: $$ (f_1 \otimes g_1^*)( f_2(u) \otimes g_2^*(\tilde{w})   ) = f_1(f_2(u)) \otimes g_1^*(g_2^*(\tilde{w})) = (f_1 \circ f_2)(u) \otimes (g_1^* \circ g_2^*)(\tilde{w}) = ( (f_1 \circ f_2) \otimes (g_1^* \circ g_2^*)   )(u, \tilde{w}).  $$ In other words, we have shown that, for all $(u,\tilde{w}) \in V'' \otimes (W'')^*$, we have $$ [(f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^*)](u, \tilde{w}) = [(f_1 \circ f_2) \otimes (g_1^* \circ g_2^*)](u, \tilde{w}),   $$ i.e. that $(f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^*) = (f_1 \circ f_2) \otimes (g_1^* \circ g_2^*)$ (i.e. that $\circ$ and $\otimes$ play nicely with each other). Anyway this has as an immediate consequence that $$ \Phi((f_2,g_2)\circ(f_1,g_1))(\sigma) = \Phi(f_1 \circ f_2, g_2 \circ g_1)(\sigma) = \\ \sigma \circ [(f_1 \circ f_2) \otimes (g_1^* \circ g_2^*)  ] = \sigma \circ [ (f_1 \otimes g_1^*) \circ (f_2 \otimes g_2^*)   ] = \Phi(f_2,g_2) \circ \Phi(f_1, g_1) $$ for all $\sigma \in \Hom(V \otimes W^*, \mathbb{R})$, i.e. that $\Phi( (f_2,g_2)\circ(f_1,g_1)  ) = \Phi(f_2,g_2)\circ \Phi(f_1,g_1)$. Thus $\Phi$ commutes with composition, i.e. is functorial, and thus is a functor, as claimed.

Claim: $\Phi$ is a bifunctor.

This follows from the fact that $\Phi$ is a functor whose domain is a product category, $\Vec^{op}\times \Vec$.

Claim: There exists a natural transformation $\eta$ between $\Hom$ and $\Phi$.

A natural transformation $\eta$ is a family of morphisms in the target category ($\Vec$) indexed by the elements of the source category ($\Vec^{op} \times \Vec$), $\eta_{(V,W)}: \Hom(V,W) \to \Phi(V,W)$, such that, given $(V,W) \overset{(f,g)}{\to} (V',W')$, i.e. linear transformations $f: V' \to V$ and $g: W \to W'$, the following relationship holds: $$ \eta_{(V',W')} \circ \Hom(f,g) = \Phi(f,g) \circ \eta_{(V,W)}. $$  Note that: $$  \begin{array}{rccl}   \Hom(f,g): & \Hom(V,W) & \to & \Hom(V',W'), \\ \Phi(f,g): & \Phi(V,W) & \to & \Phi(V',W'), \\ \eta_{(V,W)}: & \Hom(V,W) & \to & \Phi(V,W), \\ \eta_{(V',W')}: & \Hom(V',W') & \to & \Phi(V',W'), \end{array}   $$ in other words all of the above compositions are defined, and both the morphism $\eta_{(V',W')} \circ \Hom(f,g)$ and the morphism $\Phi(f,g)\circ \eta_{(V,W)}$ map $\Hom(V,W) \to \Phi(V',W')$.
We now propose the following formula for the natural transformation $\eta$, which, given an object $(V,W)$ in the source category $(\Vec^{op} \times \Vec)$ returns a morphism between the two corresponding objects in the target category $(\Vec)$ defined by the functors $\Hom$ and $\Phi$, namely a morphism $\Hom(V,W) \to \Phi(V,W)$. In other words: $$  \eta: (V,W) \mapsto [ \Hom(V,W) \to \Phi(V,W)  ] .  $$ Anyway, we have that $\eta_{(V,W)}$ maps between the spaces $\Hom(V,W)$ and $\Phi(V,W) = \Hom(V \otimes W^*, \mathbb{R})$ according to the formula: $$ \sigma \mapsto [ \eta_{(V,W)}(\sigma): \sum_{i,j}  v_i \otimes \psi_j \mapsto \sum_{i,j}  \psi_j(\sigma(v_i))   ] , $$ i.e. $\sigma: V \to W$ and $\eta_{(V,W)}(\sigma): V \otimes W^* \to \mathbb{R}$, both linear.
So anyway, showing that $\eta$ is a natural transformation again comes down to verifying the equality (for arbitrary $(V,W) \overset{(f,g)}{\to} (V',W')$): $$ \eta_{(V',W')} \circ \Hom(f,g) = \Phi(f,g) \circ \eta_{(V,W)}.  $$ Remember that both sides map $\Hom(V,W) \to \Phi(V',W')$, so if we show that both sides evaluate to the same value when applied to an arbitrary $\sigma \in \Hom(V,W)$, we will have shown the equality between functions for arbitrary $(V,W) \overset{(f,g)}{\to} (V',W')$ and thus that $\eta$ is a natural transformation, i.e. all we have to do is show, for arbitrary $\sigma \in \Hom(V,W)$: $$  ( \eta_{(V',W')} \circ \Hom(f,g)   ) (\sigma) = (\Phi(f,g) \circ \eta_{(V,W)})(\sigma).   $$ Let's calculate the left-hand side first: $$ (\eta_{(V',W')} \circ \Hom(f,g))(\sigma) = \eta_{(V',W')}( \Hom(f,g)(\sigma)  ) . $$ Now by definition of $\Hom(f,g): \Hom(V,W) \to \Hom(V',W')$, we have that: $$ \Hom(f,g)(\sigma) = g \circ \sigma \circ f.  $$ Since $f: V' \to V, \sigma: V \to W,$ and $g: W \to W'$, we have that $g \circ \sigma \circ f: V' \to V \to W \to W'$ i.e. $g \circ \sigma \circ f: V' \to W'$, such that: $$\Hom(f,g)(\sigma)=g \circ \sigma \circ f \in \Hom(V',W'), $$ as expected and required. Also, since $\eta_{(V',W')}: \Hom(V',W') \to \Phi(V',W')$, we have as a result that $\eta_{(V',W')}(g \circ \sigma \circ f)$ is well-defined. Anyway, we have by definition of $\eta_{(V',W')}$ that: $$  \eta_{(V',W')}(g \circ \sigma \circ f) = \left[\sum_{i,j} v'_i \otimes \psi'_j \mapsto \sum_{i,j} \psi'_j((g \circ \sigma \circ f) (v'_i) )  = \sum_{i,j} \psi'_j(g(\sigma (f(v'_i))))   \right].  $$ Now let's calculate the right-hand side: $$ (\Phi(f,g) \circ \eta_{(V,W)})(\sigma) = \Phi(f,g) ( \eta_{(V,W)}(\sigma).$$ Now we have again by definition of $\eta$ that:$$ \eta_{(V,W)}(\sigma) = \left[  \sum_{i,j} v_i \otimes \psi_j \mapsto \sum_{i,j} \psi_j(\sigma(v_i))   \right] .  $$ Allow us to recall the definition of the morphism part of $\Phi$: $$ \Phi(f,g): \tau \mapsto \tau \circ (f \otimes g^*). $$ Thus, we can now evaluate the rest of the expression on the right-hand side: $$ \Phi(f,g) \left( \left[  \sum_{i,j} v_i \otimes \psi_j \mapsto \sum_{i,j} \psi_j(\sigma(v_i))   \right]   \right) = \left[  \sum_{i,j} v_i \otimes \psi_j \mapsto \sum_{i,j} \psi_j(\sigma(v_i))   \right] \circ (f \otimes g^*)   $$ Allow us to pause for a moment to recall the definition of $(f \otimes g^*): V' \otimes (W')^* \to V \otimes W^*$: $$ (f \otimes g^*): v' \otimes \psi' \mapsto (f(v')) \otimes (\psi' \circ g).  $$ Hence, the above equals: $$ = \left[  \sum_{i,j} v'_i \otimes \psi'_j \mapsto \sum_{i,j} (f(v'_i)) \otimes (\psi'_j \circ g) \mapsto \sum_{i,j} (\psi'_j \circ g)(\sigma (f(v_i')))  \right] $$  $$  = \left[ \sum_{i,j} v_i' \otimes \psi_j' \mapsto \sum_{i,j} \psi'_j(g(\sigma(f(v'_i))))   \right].  $$
Hence, we have shown that: $$ \eta_{(V',W')} (\Hom(f,g)(\sigma) = \left[  \sum_{i,j} v_i' \otimes \psi_j' \mapsto \sum_{i,j} \psi_j'(g(\sigma(f(v_i'))))  \right] = \Phi(f,g)(\eta_{(V,W)}(\sigma) ).    $$ Since $(V,W) \overset{(f,g)}{\to}(V',W')$ and $\sigma \in \Hom(V,W)$ were arbitrary, this completes the proof that $\eta$ is in fact a natural transformation from $\Hom(-,-)$ to $\Phi(-,-)$.

Claim: There is a natural transformation from $\Phi(-,-)$ to $\Hom(-,-)$ which is inverse to $\eta$, denote it tentatively $\eta^{-1}$.

In this claim, there are really two claims to unpack: (1) first, that there exists a natural transformation $\eta^{-1}$ taking $\Phi(-,-)$ to $\Hom(-,-)$, and (2) that $\eta(\eta^{-1}(\Phi(-,-)))=\Phi(-,-)$ and that $\eta^{-1}(\eta(\Hom(-,-)))=\Hom(-,-)$. (So perhaps really more like three claims packed into one.)
(1) We will start by trying to find a formula for $\eta^{-1}$ and then evaluating the first (sub-)claim.
We would need $\eta^{-1}$ to satisfy: $$ \eta^{-1}_{(V',W')}\circ \Phi(f,g) = \Hom(f,g) \circ \eta^{-1}_{(V,W)}  $$ for arbitrary $(V,W),(V',W') \in \Vec^{op}\times \Vec, f: V' \to V, g: W \to W'$ linear.
Note that: $$  \begin{array}{rccl} \Phi(f,g): & \Phi(V,W) & \to & \Phi(V',W'), \\ \eta^{-1}_{(V',W')}: & \Phi(V',W') & \to & \Hom(V',W'), \\ \eta^{-1}_{(V,W)}: & \Phi(V,W) & \to & \Hom(V,W), \\ \Hom(f,g): & \Hom(V,W) & \to & \Hom(V',W'),
 \end{array}  $$ hence both sides of the above equation map $\Phi(V,W) \to \Hom(V',W')$.
Let us start with $\tau \in \Phi(V,W) = \Hom(V \otimes W^*, \mathbb{R})$. Then $\tau$ is a linear map taking tensors of the form $\sum_{i,j} v_i \otimes \psi_j$, with $v_i \in V$ and $\psi_j \in W^*$, to real numbers. Applying $\eta^{-1}_{(V,W)}$ to $\tau$, we somehow want to get out of it a map in $\Hom(V,W)$, i.e. a linear transformation from $V$ to $W$.
Since $W$ is finite-dimensional, we can fix for it a basis $(w_1, \dots, w_n)$. Corresponding to that let $(\psi_1, \dots, \psi_n)$ be the dual basis of $W^*$. Then, given $\tau \in \Hom(V \otimes W^*, \mathbb{R})=\Phi(V,W)$, we will define $\eta^{-1}_{(V,W)}$ by: $$ \eta^{-1}_{(V,W)}: \tau \mapsto \left[ v \mapsto \sum_{i=1}^{n} \tau(v \otimes \psi_i) \cdot w_i  \right] .  $$ Now we have to begin the process of checking that this is a natural transformation, i.e. that for arbitrary $\tau \in \Hom(V \otimes W^*, \mathbb{R})= \Phi(V,W)$, that: $$ \eta^{-1}_{(V',W')}(\Phi(f,g)(\tau)) = \Hom(f,g) (\eta^{-1}_{(V,W)}(\tau) ).   $$
As before, let's start with the left-hand side first. We have that: $$ \Phi(f,g)(\tau) = \tau \circ (f \otimes g^*).  $$  From this it follows that: $$ \eta^{-1}_{(V',W')}(\Phi(f,g)(\tau) )= \eta^{-1}_{(V',W')}(\tau \circ (f \otimes g^*)) = \left[ v' \mapsto \sum_{i=1}^{n} (\tau \circ (f \otimes g^*) )(v' \otimes \psi_i') \cdot w_i'   \right]   $$ $$ = \left[ v' \mapsto \sum_{i=1}^{n} \tau( (f \otimes g^*)(v' \otimes \psi_i')  ) \cdot w_i'   = \sum_{i=1}^{n} \tau( f(v') \otimes (\psi_i' \circ g)  ) \cdot w_i' \right]. $$ Note that $\psi_i' \circ g: W \to W' \to \mathbb{R}$, i.e. $\psi_i' \circ g \in W^*$, and $f: V' \to V$, so $f(v') \in V$, such that $f(v') \otimes (\psi_i' \circ g   ) \in V \otimes W^*$, and thus $\tau ( f(v') \otimes (\psi_i' \circ g)   )$ is well-defined. Hence we have: $$ \eta^{-1}_{(V',W')}(\Phi(f,g) (\tau) ) = \left[  v' \mapsto \sum_{i=1}^{n} \tau (  f(v') \otimes (\psi_i'\circ g)   ) \cdot w_i'  \right], $$ which is clearly a map in $\Hom(V',W')$, as expected and required.
We will now calculate the right-hand side, as follows; we start with: $$\eta^{-1}_{(V,W)}(\tau) = \left[ v \mapsto \sum_{i=1}^{n} \tau(v \otimes \psi_i)\cdot w_i \right], $$ which is simply the definition of $\eta^{-1}_{(V,W)}$ as stated above. Clearly, this is in $\Hom(V,W)$ as expected and required. Now we apply the morphism $\Hom(f,g)$ to get an element in $\Hom(V',W')$, hopefully the same as before: $$\Hom(f,g)(\eta^{-1}_{(V,W)}(\tau) ) = \Hom(f,g)\left(  \left[  v \mapsto \sum_{i=1}^{n} \tau(v \otimes \psi_i) \cdot w_i  \right]  \right) = g \circ \left[  v \mapsto \sum_{i=1}^{n} \tau(v \otimes \psi_i) \cdot w_i   \right] \circ f. $$ Remembering that $f:V' \to V, f: v' \mapsto v$, we can rewrite the above as: $$ = g \circ \left[  v' \mapsto f(v') \mapsto \sum_{i=1}^{n} \tau( f(v') \otimes \psi_i  ) \cdot w_i   \right] = g \circ \left[  v' \mapsto \sum_{i=1}^{n} \tau( f(v') \otimes \psi_i  ) \cdot w_i   \right].$$ Remember now that $g: W \to W'$ is a linear transformation, hence we can distribute it over the sum to get: $$ = \left[  v' \mapsto g \left( \sum_{i=1}^{n} \tau( f(v') \otimes \psi_i  ) \cdot w_i \right)  \right] = \left[ v' \mapsto \sum_{i=1}^{n} \tau(f(v') \otimes \psi_i   )\cdot g(w_i)   \right]. $$ Remember, that since $f(v') \in V$, and $\tau: V \otimes W^* \to \mathbb{R}$ that $\tau (f(v') \otimes \psi_i) \in \mathbb{R}$, which is why $g$ distributes over it. Now let's remember that $(\psi_1, \dots, \psi_n)$ is the dual basis to $(w_1, \dots, w_n)$, and $(\psi_1',\dots, \psi_n')$ is the dual basis to $(w_1', \dots, w_n')$. Thus, if we want to claim that the expression we have just derived is equal to the expression for $\eta^{-1}_{(V',W')}(\Phi(f,g) (\tau)  )$, then we must show that: $$ w_i' = g(w_i) \implies \psi_i = \psi_i' \circ g,$$ and $$\psi_i' \circ g = \psi_i \implies w_i' = g(w_i).$$
Let's start with the first direction. Assume that $w_i'=g(w_i)$. Then: $$1=\psi_i'(w_i')=\psi_i'(g(w_i)) = (\psi_i' \circ g)(w_i).$$ Since $\psi_i$ is the unique element of $W^*$ such that $\psi_i(w_i)=1$, and we have shown above that $(\psi_i' \circ g)(w_i)=1$, it follows that $\psi_i = \psi_i' \circ g$, as we wanted to show.
Now let us show the second direction. Assume that $\psi_i' \circ g = \psi_i$. Then: $$1 = \psi_i(w_i) = (\psi_i' \circ g)(w_i) = \psi_i'(g(w_i)).$$ Since $w_i'$ is the unique element of $W'$ such that $\psi_i'(w_i')=1$, and we have shown above that $\psi_i' (g(w_i))=1$, it follows that $g(w_i)=w_i'$, which is what we wanted to show.
Therefore, we can in full faith and confidence interchange $g(w_i)$ with $w_i'$ whenever we interchange $\psi_i$ with $\psi_i' \circ g$. In particular, we have shown that: $$\left[ v' \mapsto \sum_{i=1}^{n}  \tau(f(v') \otimes \psi_i   ) \cdot g(w_i)  \right] = \left[ v' \mapsto \sum_{i=1}^{n} \tau( f(v') \otimes (\psi_i' \circ g)  ) \cdot w_i'   \right]. $$
In conclusion, we have shown that: $$\eta^{-1}_{(V',W')}(\Phi(f,g)(\tau)  ) = \left[ v' \mapsto \sum_{i=1}^{n} \tau( f(v') \otimes (\psi'_i \otimes g)   )\cdot w_i'  \right] = \Hom(f,g)(\eta^{-1}_{(V,W)}(\tau) ) .$$ Thus $\eta^{-1}$ really is a natural transformation, as had previously been claimed.
(2) Now, given that there is a natural transformation $\eta^{-1}$ taking $\Phi(-,-)$ to $\Hom(-,-)$, we want to see whether this natural transformation is inverse to the natural transformation $\eta$ we had defined earlier, which takes $\Hom(-,-)$ to $\Phi(-,-)$.
In particular, if we want to say that $\eta^{-1}$ is inverse to $\eta$, then we want to show that $\eta^{-1} \circ \eta$ is the identity natural transformation $\Hom(-,-) \to \Hom(-,-)$, and that $\eta \circ \eta^{-1}$ is the identity natural transformation $\Phi(-,-) \to \Phi(-,-)$. Thus we have to show that: $$\Hom(f,g) \circ \eta_{(V,W)}^{-1} \circ \eta_{(V,W)} = \eta^{-1}_{(V',W')} \circ \eta_{(V',W')} \circ \Hom(f,g), $$ and $$ \eta_{(V',W')} \circ \eta^{-1}_{(V',W')} \circ \Phi(f,g) = \Phi(f,g) \circ \eta_{(V,W)} \circ \eta^{-1}_{(V,W)}.$$ Note that this will follow if we can show that: $$\begin{array}{rcl} \eta_{(V,W)}^{-1} \circ \eta_{(V,W)} & = & \id_{\Hom(V,W)},  \\ \eta^{-1}_{(V',W')} \circ \eta_{(V',W')} & = & \id_{\Hom(V',W')},  \\ \eta_{(V,W)} \circ \eta^{-1}_{(V,W)} & = & \id_{\Phi(V,W)}, \\ \eta_{(V',W')} \circ \eta^{-1}_{(V',W')} & = & \id_{\Phi(V',W')},  \end{array}$$ since the identity morphisms satisfy the required commutativity relations by definition, i.e. by definition of identity morphism it holds that: $$\begin{array}{rcl}  \Hom(f,g) \circ \id_{\Hom(V,W)} & = & \id_{\Hom(V',W')} \circ \Hom(f,g) \\ \id_{\Phi(V',W')} \circ \Phi(f,g) & = & \Phi(f,g) \circ \id_{\Phi(V,W)}. \end{array} $$ Note also that if we show for arbitrary $(\tilde{V}, \tilde{W}) \in \Vec^{op} \times \Vec$ that $$\begin{array}{rcl} \eta^{-1}_{(\tilde{V}, \tilde{W})} \circ \eta_{(\tilde{V}, \tilde{W}) } & = & \id_{\Hom(\tilde{V}, \tilde{W} )},  \\ \eta_{ (\tilde{V}, \tilde{W} ) } \circ \eta^{-1}_{ (\tilde{V}, \tilde{W} ) }  & = & \id_{ \Phi( \tilde{V}, \tilde{W} ) }, \end{array} $$ then we will have proven all four of the above claims (since again $(\tilde{V}, \tilde{W})$ is chosen arbitrarily, and thus can stand for either pair $(V,W)$ or $(V',W')$ if we like). Showing the first equation: $$\eta^{-1}_{(\tilde{V}, \tilde{W})} \circ \eta_{(\tilde{V}, \tilde{W})} = \id_{\Hom(\tilde{V}, \tilde{W})}, $$ will prove the first claim, that $\eta^{-1} \circ \eta$ is the identity natural transformation $\Hom(-,-) \to \Hom(-,-)$. Showing the second equation: $$\eta_{(\tilde{V}, \tilde{W})} \circ \eta^{-1}_{(\tilde{V}, \tilde{W})} = \id_{\Phi(\tilde{V}, \tilde{W})}, $$ will prove the second claim, that $\eta \circ \eta^{-1}$ is the identity natural transformation $\Phi(-,-) \to \Phi(-,-)$.
Let $\sigma \in \Hom(\tilde{V}, \tilde{W})$ be arbitrary, we will now prove the first claim by showing that: $$\eta^{-1}_{(\tilde{V}, \tilde{W})}( \eta_{(\tilde{V}, \tilde{W})} (\sigma)   ) = \sigma. $$ By definition of $\eta$ given above, we have that: $$ \eta_{(\tilde{V}, \tilde{W})}(\sigma) = \left[  \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tilde{\psi}_j(\sigma(\tilde{v}_i) )  \right]. $$ Then it follows that: $$\eta^{-1}_{(\tilde{V}, \tilde{W})} (\eta_{(\tilde{V}, \tilde{W})} (\sigma )) = \eta^{-1}_{(\tilde{V}, \tilde{W})} \left(  \left[   \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tilde{\psi}_j ( \sigma (\tilde{v}_i) )   \right]   \right), $$ using the definition of $\eta^{-1}$ given above: $$ = \left[  \tilde{v} \mapsto \sum_{k=1}^{n} \left[   \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tilde{\psi}_j ( \sigma (\tilde{v}_i) )   \right] (\tilde{v} \otimes \tilde{\psi}_k) \cdot \tilde{w}_k      \right] = \left[  \tilde{v} \mapsto \sum_{k=1}^{n} (\tilde{\psi}_k(\sigma(\tilde{v})))\cdot \tilde{w}_k  \right]. $$  So we are done as long as we can show that: $$\sigma(\tilde{v}) = \sum_{k=1}^{n} (\tilde{\psi}_k(\sigma(\tilde{v}))) \cdot \tilde{w}_k .$$ Remember that $\tilde{\psi}_{k}(\tilde{w}_{\ell})=\delta_{k,\ell}$ by definition of these quantities (where $\delta_{k,\ell}$ is the Kronecker delta). Since $(w_1, \dots, w_n)$ is a basis for $W$, we can write uniquely: $$ \sigma(\tilde{v}) = \sum_{\ell=1}^{n} a_{\ell} \cdot \tilde{w}_{\ell}, $$ for some yet to be determined quantities $a_{\ell} \in \mathbb{R}$. Then for each $1 \le k \le n$, using linearity of $\tilde{\psi}_k$: $$\tilde{\psi}_{k} (\sigma(\tilde{v})) = \tilde{\psi}_{k} \left(  \sum_{\ell=1}^{n} a_{\ell} \cdot \tilde{w}_{\ell}  \right) = \sum_{\ell=1}^{n} a_{\ell} \tilde{\psi}_{k}(\tilde{w}_{\ell}) = \sum_{\ell=1}^{n} a_{\ell} \delta_{k, \ell} = a_k. $$ Therefore, we have shown that: $$\sigma(\tilde{v}) = \sum_{\ell=1}^{n} a_{\ell} \cdot \tilde{w}_{\ell} = \sum_{k=1}^{n} a_k \cdot \tilde{w}_k = \sum_{k=1}^{n} (\tilde{\psi}_k(\sigma(\tilde{v})) )\cdot \tilde{w}_k, $$ as we had wanted to do. Then for arbitrary $\tilde{v} \in \tilde{V}$ and arbitrary $\sigma \in \Hom(\tilde{V}, \tilde{W})$: $$\eta^{-1}_{(\tilde{V},\tilde{W})} (\eta_{(\tilde{V}, \tilde{W})} (\sigma(\tilde{v})) ) = \sum_{k=1}^{n} (\tilde{\psi}_k(\sigma(\tilde{v})))\cdot \tilde{w}_k = \sigma(\tilde{v}) , $$ $$ \iff \eta^{-1}_{(\tilde{V}, \tilde{W})} ( \eta_{(\tilde{V}, \tilde{W})} (\sigma)) = \sigma \iff \eta^{-1}_{(\tilde{V}, \tilde{W})} \circ \eta_{(\tilde{V}, \tilde{W})} = \id_{\Hom(\tilde{V}, \tilde{W})}.$$ It follows that $\eta^{-1} \circ \eta$ is the identity natural transformation $\Hom(-,-) \to \Hom(-,-)$.
Now let $\tau \in \Phi(\tilde{V}, \tilde{W}) = \Hom(\tilde{V} \otimes (\tilde{W})^*, \mathbb{R})$ be arbitrary. We prove the second claim by showing: $$\eta_{(\tilde{V}, \tilde{W})} (\eta^{-1}_{(\tilde{V}, \tilde{W})}(\tau)  ) = \tau. $$ One has: $$\eta^{-1}_{(\tilde{V}, \tilde{W})}(\tau) = \left[  \tilde{v} \mapsto \sum_{k=1}^{n} \tau(\tilde{v} \otimes \tilde{\psi}_k) \cdot \tilde{w}_k  \right],  $$ and thus further that: $$ \eta_{(\tilde{V}, \tilde{W})} (\eta^{-1}_{(\tilde{V}, \tilde{W})}(\tau)   ) = \eta_{(\tilde{V}, \tilde{W})}\left(  \left[ \tilde{v} \mapsto \sum_{k=1}^{n} \tau(\tilde{v} \otimes \tilde{\psi}_k) \cdot \tilde{w}_k   \right]   \right) = \left[ \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tilde{\psi}_j \left( \left[ \tilde{v} \mapsto \sum_{k=1}^{n} \tau(\tilde{v} \otimes \tilde{\psi}_k) \cdot
 \tilde{w}_k  )  \right] (\tilde{v}_i)    \right)    \right] $$ $$ = \left[ \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tilde{\psi}_j \left(  \sum_{k=1}^{n} \tau(\tilde{v}_i \otimes \tilde{\psi}_k) \cdot \tilde{w}_k   \right)     \right] = \left[ \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \sum_{k=1}^{n} \tau(\tilde{v}_i \otimes \tilde{\psi}_k  ) \tilde{\psi}_j (\tilde{w}_k) \right] $$ $$\left[  \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \sum_{k=1}^{n}\tau(\tilde{v}_i \otimes \tilde{\psi}_k) \delta_{jk} \right] = \left[ \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tau(\tilde{v}_i\otimes \tilde{\psi}_j )    \right] \in \Hom(\tilde{V} \otimes (\tilde{W})^*, \mathbb{R}  )=\Phi(\tilde{V}, \tilde{W}). $$ Now by linearity of $\tau$ we actually have immediately that: $$\sum_{i,j} \tau(\tilde{v}_i \otimes \tilde{\psi}_j) = \tau\left( \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j   \right). $$ To be even more explicit (the first equality is a definition, the second holds by linearity): $$\tau = \left[ \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \tau \left( \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j   \right)   \right] = \left[ \sum_{i,j} \tilde{v}_i \otimes \tilde{\psi}_j \mapsto \sum_{i,j} \tau(\tilde{v}_i \otimes\tilde{\psi}_j)    \right]. $$ In conclusion, we have shown that, for arbitrary $\tau \in \Phi(\tilde{V}, \tilde{W})$ that: $$\eta_{(\tilde{V},\tilde{W})}( \eta^{-1}_{(\tilde{V}, \tilde{W})}  (\tau)  ) = \tau \iff \eta_{ (\tilde{V}, \tilde{W} )}\circ \eta^{-1}_{(\tilde{V}, \tilde{W})} = \id_{\Phi(\tilde{V}, \tilde{W})}.$$ It follows that $\eta \circ \eta^{-1}$ is the identity natural transformation $\Phi(-,-) \to \Phi(-,-)$.
Thus not only (1) is $\eta^{-1}$ a natural transformation, but finally (2) we have shown that it is indeed inverse to the natural transformation $\eta$. Thus we have established the existence of a \textbf{natural isomorphism} between the functors $\Hom(-,-)$ and $\Phi(-,-)$.
In particular, we have shown that, for all $(V,W) \in \Vec^{op} \times \Vec$, we have: $$\Hom(V,W) \cong \Hom(V\otimes W^*, \mathbb{R} ), $$ in the category of finite-dimensional vector spaces, i.e. that $\Hom(V,W)$ and $\Hom(V\otimes W^*, \mathbb{R})$ are isomorphic as vector spaces for any choice of two finite-dimensional vector spaces $(V,W)$.
Answer: $\newcommand{\Vec}{\mathsf{Vec}}$$\newcommand{\Hom}{\operatorname{Hom}}$$\newcommand{\id}{\operatorname{id}}$My answer exceeded the character limit, so here's the last part:
Finally, to get the general case, consider the following functor: $$\bigotimes: \Vec^{\times k} \to \Vec, $$ which acts by: $$\bigotimes(V_1, \dots, V_k) = V_1 \otimes \dots \otimes V_k. $$

Claim: $\bigotimes$ is actually a functor.

We already gave the proposed object part above ($\bigotimes(V_1, \dots, V_k) = V_1 \otimes \dots \otimes V_k$), now the morphism part is proposed to be the following: $$\bigotimes(f_1, \dots, f_k) = f_1 \otimes \dots \otimes f_k, $$ perhaps unsurprisingly. Now we need to check that this actually constitutes a functor.
Let $\id_{(V_1,\dots,V_k)}=(\id_{V_1}, \dots, \id_{V_k})$ (this holds by definition of product category). Then: $$\bigotimes \id_{(V_1, \dots, V_k)} = \bigotimes (\id_{V_1}, \dots, \id_{V_k}) = \id_{V_1} \otimes \dots \otimes \id_{V_k}. $$ For $\bigotimes$ to be a functor, it is necessary that this be the identity morphism on $\bigotimes (V_1, \dots, V_k) = V_1 \otimes \dots \otimes V_k$. However, by definition of the tensor product, it is actually relatively clear that: $$\id_{V_1} \otimes \dots \otimes \id_{V_k}=\id_{V_1 \otimes \dots \otimes V_k} = \id_{\bigotimes(V_1, \dots, V_k)} . $$ Thus $\bigotimes$ preserves identity morphisms, $$\bigotimes \id_{(V_1, \dots, V_k)} = \id_{\bigotimes (V_1, \dots, V_k)}, $$ as required. Now we need to show that $\bigotimes$ is compatible with composition of morphisms, i.e. given: $$(V_1, \dots, V_k) \overset{(f_1, \dots, f_k)}{\to} (V_1', \dots, V_k') \quad \text{and} \quad (V_1',\dots, V_k') \overset{(g_1, \dots, g_k)}{\to} (V_1'', \dots, V_k''), $$ one has that: $$\bigotimes\left( (g_1, \dots, g_k) \circ (f_1, \dots, f_k)  \right) = \bigotimes(g_1, \dots, g_k) \circ \bigotimes (f_1, \dots, f_k). $$ Evaluating the left-hand side first, we have: $$\bigotimes \left( (g_1, \dots, g_k) \circ (f_1, \dots, f_k)  \right) = \bigotimes (g_1\circ f_1, \dots, g_k \circ f_k)= (g_1 \circ f_1) \otimes \dots \otimes (g_k \circ f_k). $$ Now evaluating the right-hand side, one finds: $$\bigotimes (g_1, \dots, g_k) \circ \bigotimes (f_1, \dots, f_k) = (g_1 \otimes \dots \otimes g_k) \circ (f_1 \otimes \dots \otimes f_k). $$ We showed, when proving that $\Phi$ is a functor, that the tensor product $\otimes$ plays nicely with composition $\circ$, so we have finally that: $$(g_1 \otimes \dots \otimes g_k) \circ (f_1 \otimes \dots \otimes f_k) = (g_1 \circ f_1) \otimes \dots \otimes (g_k \circ f_k). $$ In conclusion, we have shown that: $$\bigotimes\left( (g_1, \dots, g_k) \circ (f_1, \dots, f_k)  \right) = (g_1 \circ f_1) \otimes \dots \otimes (g_k\circ f_k) = \bigotimes(g_1, \dots,g_k ) \circ \bigotimes(f_1, \dots, f_k), $$ hence $\bigotimes$ is compatible with composition of morphisms and thus really is a functor, as claimed.
Claim: $op: \Vec \to \Vec^{op}$ is a contravariant functor.
The object part is the same as the object part of the identity functor: $op: V \mapsto V$.
For the morphism part, we have the following rule (as follows from the definition of dual category): $$op: \left( V \overset{f}{\to} V'   \right) \mapsto \left(  V \overset{f^{op}}{\gets} V'  \right). $$ Note that while $f$ is always a function (a linear transformation in fact), in general $f^{op}$ is not, i.e. only a morphism but not a function (although one can define it as a function in the case that $f$ happens to be an isomorphism).
Anyway, we need to show that $op$ is compatible with identity morphisms: $op(\id_V) = \id_{op(V)}=\id_V$. One has that: $$op \left( V \overset{id_V}{\to} \id_V   \right) \mapsto \left( V \overset{\id_V}{\gets} V \right). $$ Now since $\id_V$ is an isomorphism, we have that the left and right hand sides are equal, hence $op(\id_V)= \id_V$, as required.
Now we show that $op$ is compatible with composition of morphisms in a contravariant manner. $$op(g \circ f) = \left(  V \overset{(g\circ f)^{op}}{\gets} V''  \right) = \left(  V \overset{f^{op}}{\gets} V'  \right) \circ \left(  V' \overset{g^{op}}{\gets} V''  \right) = op(f) \circ op(g),  $$ as expected and required.
Because we have a natural isomorphism between $\Hom(-,-)$ and $\Phi(-,-)$, it follows that we also have a natural isomorphism between $\Hom((\bigotimes(-,\dots, -))^{op}, -  )$ and $\Phi((\bigotimes(-,\dots, -))^{op},- )$, i.e. for any $k-$tuple of finite-dimensional vector spaces $(V_1, \dots, V_k)$, and any finite-dimensional vector space $W$, one has that: $$\Hom(V_1 \otimes \dots \otimes V_k, W) \cong \Hom(V_1 \otimes \dots \otimes V_k \otimes W^*, \mathbb{R} ), $$ the isomorphism being natural.
Claim: $\times k: \Vec \to \Vec^{\times k}$ is a functor.
For the object part, we have simply: $$\times k (V) = \underbrace{(V, \dots, V)}_{k\text{ times}}, $$ and for the morphism part, given $V \overset{f}{\to} V'$, one has: $$\times k(f) = \underbrace{(V, \dots, V)}_{k\text{ times}} \overset{\underbrace{(f, \dots, f)}_{k \text{ times}}}{\to} \underbrace{(V', \dots, V')}_{k\text{ times}}.$$ Now one has fairly immediately that: $$\times k(\id_V) = (\id_V, \dots, \id_V) = \id_{(V,\dots, V)}. $$ Likewise, one also has fairly immediately that: $$\times k (g \circ f) = (g\circ f, \dots, g\circ f) = (g, \dots, g)\circ(f,\dots,f) = \times k(g) \circ \times k(f). $$ Thus $\times k: \Vec \to \Vec^{\times k}$ is a functor, as claimed.
Thus composing functors again, we get a natural isomorphism between $$\Hom\left( \left(\bigotimes( \times k (-)  )\right)^{op}, - \right) \quad \text{and} \quad \Phi\left( \left(\bigotimes(\times k (-))  \right)^{op},-   \right),$$ thus, as we wanted to show, for any choice of two finite-dimensional vector spaces $V$ and $W$, there is a natural isomorphism between: $$\Hom(\underbrace{V \otimes \dots \otimes V}_{k \text{ times}}, W) \quad \text{and} \quad \Hom(\underbrace{V \otimes \dots \otimes V}_{k\text{ times}} \otimes W^*, \mathbb{R}). $$


Difference between string[,] and string[][]

Question: Hopefully this is not a duplicate as I did do a search and found nothing.
At first glance I thought they would behave similarly but no.  One is a 2 dimensional array of string and the other is an array of string arrays, i.e. what you get back from (List<string[]>)obj.ToArray().
I know how to return the jagged array type using (List<string[]>)obj.ToArray().
How can I return 2d array using a similar concept, i.e. build up a collection object from other data and call ToArray or other method that will return a 2d array.
Thanks
Comment: What is the difference between a 2d array of strings and an array of string arrays? I don't see one... at least not in utility.
Comment: [**Arrays (C# Programming Guide)**](http://msdn.microsoft.com/en-us/library/9b9dty7d.aspx)
Comment: @evanmcdonnal `new[] { new string[1], new string[2] }`, that's possible with `string[][]` but not with `string[,]`.
Comment: classic case of diplopia
Comment: @hvd Ah, I see the difference now. I would never do that though... and I'd probably call you an idiot if you did :-&(
Comment: @evanmcdonnal Creating a jagged array when given a number of single dimensional arrays can be a useful operation; and it notably doesn't require copying the data the way a multidimensional array would.  You can also do the reverse; pull out an array and then expose it externally without needing to copy the elements.
Comment: @evanmcdonnal Why not? You expect to be able to store strings of different lengths in a `string[]`, would you not? What's so different about arrays of different lengths? It doesn't always make sense, but when it does, there's no reason to avoid it.
Comment: @Servy actually that makes sense but I'm typically using `List` in code like that.
Answer: One is a jagged array, where the other is a multidimensional array.
There are some differences.  A multidimensional array will guarantee each row having the length.  With a jagged array, each "row" is an array, and those arrays can be varying sizes.
Another difference is in memory layout.  A multidimensional array is a single object, the array elements are guaranteed to be closer together in memory.  Since a jagged array, is an array of arrays, there is no guarantee that the each array will be allocated sequentially in memory, particularly in multi-threaded situations.
It is also good to note that the .NET Framework Design Guidelines for Array Usage suggests to use jagged arrays over multidimensional:

√ CONSIDER using jagged arrays instead of multidimensional arrays.
Comment: Cool.  A downvote without an explanation why.
Comment: If you want your rows allocated sequentially in memory (ie, you are working with bitmaps / video buffer) then you will want a multidimensional array rather than a jagged array.
Answer: jagged array is string[][]
2d array is string[,]
In other words with string[,] each row has the same number of elements.
in string[][] each row may have a different number of elements.


Setting SVN permissions with Dav SVN Authz

Question: There seems to be a path inheritance issue which is boggling me over access restrictions.
For instance, if I grant rw access one group/user, and wish to restrict it some /../../secret to none, it promptly spits in my face.
Here is an example of what I'm trying to achieve in dav_svn.authz
[groups]
grp_W = a, b, c, g
grp_X = a, d, f, e
grp_Y = a, e,

[/]
* =
@grp_Y = rw

[somerepo1:/projectPot]
@grp_W = rw

[somerepo2:/projectKettle]
@grp_X = rw

What is expected: grp_Y has rw access to all repositories, while grp_W and grp_X only have access to their respective repositories.
What occurs: grp_Y has access to all repositories, while grp_W and grp_X  have access to nothing
If I flip the access ordering where I give everyone access and restrict it in each repository, it promply ignores the invalidation rule (stripping of rights) and gives everyone the access granted at the root level.
Forgoing groups, it performs the same with user specific provisions; even fully defined such as:
[/]
a = rw
b =
c =
d =
e =
f =
g = rw

[somerepo1:/projectPot]
a = rw
b = rw
c = rw
d =
e = rw
f =
g = rw

[somerepo2:/projectKettle]
a = rw
b
c
d = rw
e = rw
f = rw
g

Which yields the exact same result. According to the documentation I'm following all protocols so this is insane.
Running on Apache2 with dav_svn
Answer: After a bunch of headaches, I let this idle with * = rw at SVNParentPath level. Coming back to it, I suddenly had a stroke of obvious hit me; the read order was the issue.
Firstly, my naming conventions were flat out wrong as it should be
[<repo_name>:<path-in-repo>]
The main issue is the authz file expects an order of 'specificity' where the first read rule, or available match is applied. In my case, everything would match with the root and it would be one-and-done. thus by reversing my example ordering:
[groups]
grp_W = a, b, c, g
grp_X = a, d, f, e
grp_Y = a, e,

[ProjectPot:/]
@grp_W = rw

[ProjectKettle:/]
@grp_X = rw

[/]
* =
@grp_Y = rw

would make it accepted and perform as behaved. This is NOT DOCUMENTED and in my opinion is a serious snafu over something utterly trivial.
Answer: I ran into the same thing not long ago and also failed to come up with a solution.  Some cheap apache alias rules and or svn:external definitions may help but if it gets moderately complicated I don't think you can do it today.  WANdisco has had a number of requests for this feature and it may get enough momentum to merit an enhanced authz with non-inherited access and regular expression support.
Comment: Dav_svn authz has been around since 2001, I can't believe this hasn't been resolved. Is there a package for apache that performs the same functionality?
Answer: You have to give full url to access the repository that have permission otherwise need to give read permission like this.
[groups]
grp_W = a, b, c, g
grp_X = a, d, f, e
grp_Y = a, e,

[/]
* =
@grp_Y = rw
@grp_w = r
@grp_x = r
[somerepo1:/projectPot]
@grp_W = rw

[somerepo2:/projectKettle]
@grp_X = rw


Cannot install IBM Mobile First Platform Studio 7.1.0 in Eclipse Mars

Question:
Java EE IDE for Web Developers.
Version: Mars.1 Service Release  (4.5.1)

java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)
I tried to install IBM Mobile First Platform Studio 7.1.0 from Eclipse Marketplace, but I got this error:
The following solutions are not available: IBM MobileFirst Platform Studio 7.1.0 (id=com.ibm.imp.dojo.tools.licensed.feature.feature.group, com.ibm.imp.tools.wce.feature.feature.group, com.ibm.webtools.jquery.tools.licensed.feature.feature.group, site=http://public.dhe.ibm.com/ibmdl/export/pub/software/products/en/MobileFirstPlatform/mfpsupdate/)
Comment: Hi @Dony I am experiencing this issue as well. I am contacting development about it now and will get back to you once I receive a response.
Answer: The problem causing this has been identified and should hopefully be resolved soon (the plug-in is to be re-uploaded to the Eclipse Marketplace).
Solution: check again in a few hours.
Comment: Hi @Idan Adar, currently am not getting version 7.1 from eclipse market , please help me to install 7.1 version as am working on MF7.1
Comment: download the Eclipse installatio zip for MFP 7.1 from: http://mobilefirstplatform.ibmcloud.com/downloads/#past-releases


Passing forward Core Data Stack?

Question: I'm trying to learn Core Data and I'm pretty confused. The first tutorial I was following, from (London App Brewery) was using class cogen and accessing the context with:
let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext

However I recently bought and read core-data-by-tutorials by raywenderlich, and they set it up using manual/none. And created their own coreData Stack:
import Foundation
import CoreData
class CoreDataStack {

  private let modelName: String

  init(modelName: String) {
    self.modelName = modelName
  }

  lazy var managedContext: NSManagedObjectContext = {
    return self.storeContainer.viewContext
  }()

  private lazy var storeContainer: NSPersistentContainer = {

    let container = NSPersistentContainer(name: self.modelName)
    container.loadPersistentStores { (storeDescription, error) in
      if let error = error as NSError? {
        print("Unresolved error \(error), \(error.userInfo)")
      }
    }
    return container
  }()

  func saveContext () {
    guard managedContext.hasChanges else { return }

    do {
      try managedContext.save()
    } catch let error as NSError {
      print("Unresolved error \(error), \(error.userInfo)")
    }
  }
}

And then accessed it on the viewController using:
lazy var coreDataStack = CoreDataStack(modelName: "Potfolio")

But the tutorials are pretty simple and they don't mention passing the stack along. I just had an issue with data not saving, and after some digging in the tutorial code, I fond this in the app delegate:
guard let tabController = window?.rootViewController as? UITabBarController,
      let employeeListNavigationController = tabController.viewControllers?[0] as? UINavigationController,
      let employeeListViewController = employeeListNavigationController.topViewController as? EmployeeListViewController else {
        fatalError("Application storyboard mis-configuration. Application is mis-configured")
    }

    employeeListViewController.coreDataStack = coreDataStack

Which lead me to use the prepare:for() when using a segue to pass the stack forward. Which then did save the data I was trying to save.
So my question is: I cant imagine passing the core data stack along with the segue is the correct way to go about things? And if it isn't, whats the correct way to pass the stack forward?
Answer: You could pass the stack instance along via segues, but as you point out that doesn't feel right, and is prone to error. One way to accomplish this is to add a static instance to your CoreDataStack class.
class CoreDataStack {

  static let portfolio: CoreDataStack = {
    return CoreDataStack(modelName: "Portfolio")
  }()

  ...
}

This takes the place of your lazy var instantiated in your view controller. In its place you can add:
class EmployeeListViewController: UIViewController {

  let coreDataData = CoreDataStack.portfolio

  ...

}

In this example you create a single instance (singleton) that can be accessed from anywhere in your apps code.

Passing forward Core Data Stack?


Identify List View from contextMenuStrip click

Question: I have 8 listViews controls in my C# program.  I have just one contextMenuStrip that they all reference.
How can I know which listView control triggered the contextMenuStrip selection?
Comment: Check the `SourceControl` property of the `ContextMenuStrip`
Comment: See the notes [here](https://stackoverflow.com/a/53263702/7444103).
Answer: Thanks for that, it led me to the solution.
I needed to declare lvX in the class and then assign it in each of the listviews when hovered over.
private void lvStatus_MouseHover(object sender, EventArgs e)
{
  lvX = (ListView)sender;
}

Then when the contextMenuItem was selected I simply worked with the lvX
foreach (ListViewItem listItem in lvX.Items)
{
  listItem.Checked = true;
}

Answer: Addition to your solution and Jimi's. Here's another one.
Just handle the Click event of the clicked item as follow:
private void toolStripMenuItem_Click(object sender, EventArgs e)
{
(((sender as ToolStripItem).Owner as ContextMenuStrip).SourceControl as ListView)
    .Items.Cast<ListViewItem>().ToList().ForEach(lvi => lvi.Checked = true);
}

Or use lvi.Checked = !lvi.Checked if you want to toggle the Checked property.


Custom cursor doesn't move with page when scroll

Question: I have built a custom cursor, but im having an issue with its position when you scroll the page. Rather than following the mouse cursor, it stays where it was on the page until you move the mouse again and then it catches up.

let mouseCursor = document.querySelector(".cursor");

window.addEventListener('DOMContentLoaded', cursor);
window.addEventListener('mousemove', cursor);
document.addEventListener('mouseenter', () => mouseCursor.style.display = 'block');
document.addEventListener('mouseleave', () => mouseCursor.style.display = 'none');

if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i.test(navigator.userAgent)) {
      jQuery('.cursor').remove();
    } else {
      mouseCursor.style.display = 'block';
    }

function cursor(e){

    mouseCursor.style.top = "calc(" +e.pageY + "px - 1rem)";
    mouseCursor.style.left = "calc(" +e.pageX + "px - 1rem)";
}
.section{
height:200vh;
}

.cursor{
    display:none;
    width: 20px;
    height: 20px;
    border: 2px solid #f2f2f2;
    outline: 2px solid #000;
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
    transition-property: background, transform;
    transform-origin: center center;
    z-index: 20000;
    pointer-events: none;
}

Comment: Does this answer your question? [Element following mouse movement and scroll](https://stackoverflow.com/questions/58807504/element-following-mouse-movement-and-scroll)
Answer: You need to work with clientX/Y property not pageX/Y.
Because clientX/Y coordinates are relative to the top left corner of the visible part of the page, while pageX/Y is relative to the top left corner of the whole page.
Also, Instead of making your circle position:absolute , you have to change it to position:fixed;

Elements with fixed positioning are fixed with respect to the viewport

CSS absolute and fixed positioning

let mouseCursor = document.querySelector(".cursor");

window.addEventListener('DOMContentLoaded', cursor);
window.addEventListener('mousemove', cursor);
document.addEventListener('mouseenter', () => mouseCursor.style.display = 'block');
document.addEventListener('mouseleave', () => mouseCursor.style.display = 'none');

if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i.test(navigator.userAgent)) {
      jQuery('.cursor').remove();
    } else {
      mouseCursor.style.display = 'block';
    }

function cursor(e){

    mouseCursor.style.top = "calc(" +e.clientY + "px - 1rem)";
    mouseCursor.style.left = "calc(" +e.clientX + "px - 1rem)";
}
.section{
height:200vh;
}

.cursor{
    display:none;
    width: 20px;
    height: 20px;
    border: 2px solid #f2f2f2;
    outline: 2px solid #000;
    border-radius: 50%;
    position: fixed;
    transition: all 0.3s ease;
    transition-property: background, transform;
    transform-origin: center center;
    z-index: 20000;
    pointer-events: none;
}


Correct syntax for INNER JOIN in Access SQL?

Question: There's an error in join syntax. And I can't find it at all.
<code><asp:AccessDataSource ID="fav_data" runat="server" DataFile="~/paperhome_data.accdb"
                                SelectCommand="INNER JOIN (SELECT * FROM [music_data] [music_junc] ON [music_d_id].[music_data]=[music_d_id].[music_junc]) WHERE ([profile_id] = 2)"></asp:AccessDataSource>
                            <SelectParameters>
                        <asp:Parameter DefaultValue="2" Name="profile_id" Type="Boolean" />
                    </SelectParameters>
</code>
Answer: It's not easy to guess what you are trying to, but it could be something like this:
<code>"SELECT * FROM [music_data] INNER JOIN [music_junc] ON [music_data].[music_d_id]=[music_junc].[music_d_id]) WHERE ([profile_id] = 2)"
</code>
It seems as you really need to read up on SQL syntax. You will get nowhere trying to write SQL in the wild.
Comment: That did it, had to add an opening bracket after FROM. :)
Comment: Oops, sorry, but try to remove the closing bracket instead.
Comment: Works both ways. Interesting. :/


Show that the function is orthogonal

Question: show directly That the eigenfunction of the given Sturm-Liouville problem are orthogonal without explicitly solving for therm , and state the orthogonality conditions
$x{y}''+{y}'+\lambda xy=0$
${y}'(0)=0$
$y(1)=0$
You can help me with this problem, my doubt is that I want to solve this equation by the Cauchy euler, but ${y}'$ does not have the $x$ to be able to use this method, I do not have any change of variable, I am confused on how to raise this problem , I know, I would appreciate any input regarding this
Comment: Orthogonality is usually with respect to something...
Comment: The question is missing something.
Answer: A Sturm-Liouville form of your equation is
$$
                  -(xy')' = \lambda xy
$$
Your problem is singular at $x=0$, which means there is no a priori guarantee that solutions will have a finite value or a finite derivative at $x=0$. But, assuming you have two solutions $y_1,y_2$ of the problem that you stated with different corresponding eigenvalues $\lambda_1,\lambda_2$, then
$$
          (\lambda_1-\lambda_2)\int_0^1 xy_1(x)y_2(x) \\
    = \int_0^1 -(xy_1')'y_2+y_1(xy_2')' dx \\
    = \int_0^1 \frac{d}{dx}(-xy_1'y_2+xy_1y_2')dx \\
    = -xy_1'y_2+xy_1y_2'|_0^1 =0.
$$
Because $\lambda_1\ne\lambda_2$, then $\int_0^1 xy_1(x)y_2(x)dx=0$ must hold. So the two solutions will be orthogonal with respect to the weight function $x$.

Show that the function is orthogonal


Debian 10 PHP not parsing in apache (fresh install)

Question: I know this is an ancient problem with lots of answers but none of the existing solutions seem to be working.
This is a fresh install of Debian 10, apache2 has been installed and php (7.3).
Apache is not parsing PHP so just displays PHP code as text.
The PHP module is definitely loaded and I have run the following fixes:
a2dismod mpm_event && a2enmod mpm_prefork && a2enmod php7.3

And also tried:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

In the apache config file. There is a PHP config file that has this covered anyway.
I am not try to run files in the /home directory so is not the default block of that being the problem
I have now removed PHP and Apache and re-installed to get the same problem, rebooted and no further.
I installed PHP with:
apt install php libapache2-mod-php php-mysql

There are no errors in any logs and I have checked many answers on Stackoverflow with no further clues.
Comment: What is your default php version? You can check it with php -v. Have you tried to display phpinfo output? If not try this: https://www.hostinger.com/tutorials/how-to-create-phpinfo-file
Comment: 7.3 is the PHP version
Comment: Ok. Have you tried that with phpinfo, as I have mentioned before?
Comment: Yes it is is correct. I have found the problem, the site I was testing had a FilesMatch declaration in it's web root folder for PHP FPM handling PHP and HTML files. As FPM was not installed this overwrite did not work, not sure why it wasn't logged though.
Answer: I did solve this by enabling proxy and proxy_fcgi modules
a2enmod proxy proxy_fcgi

Comment: Please explain how the requests are handled by the PHP-FPM backend.


Como modificar data ddMMYYYY para dd/MM/YYYY em python

Question: Tenho um dataframe que tem um coluna com a data no formato 01012017 formato String) e preciso modificar ela para 01/01/2017
import pandas as pd
from datetime import date
data = pd.DataFrame(['01012017','02012017','03012017','01042017'])
data

inserir a descrição da imagem aqui
Preciso converter essas coluna de data para dd/mm/yyyy
Comment: https://pt.stackoverflow.com/questions/330458/como-formatar-datas-em-python
Answer: data[0] = pd.to_datetime(data[0], format='%d%m%Y').dt.strftime('%d/%m/%Y')

Altera a coluna para datetime com pd.to_datetime com o formato de data na string.
Converte os valores da coluna para um formato específico de data com dt.strftime.


Orthogonal Projection onto a Half Space

Question: How to find the projection(the closest point) of point $a$ to half-space $(p,x)\le\alpha$, where $p,x\in\mathbb R^n$,$\alpha \in \mathbb R$? $(p,x)$ is dot product.
Comment: $(p,x)=constant$ is a plane. If you set $(p,x)\leq constant$, you're making infinite planes, not half a plane
Comment: What is $(p,x)$ for you?
Answer: The problem is given by:
$$\begin{aligned}
\arg \min_{x} \quad & \frac{1}{2} {\left\| x - y \right\|}_{2}^{2} \\
\text{subject to} \quad & {a}^{T} x \leq b
\end{aligned}$$
Solving the KKT conditionn will yield:
$$ x = \begin{cases}
y & \text{ if } \; {a}^{T} y \leq b \\
y - \frac{{a}^{T} y - b}{ {\left\| a \right\|}_{2}^{2} } a & \text{ if } \; {a}^{T} y > b
\end{cases} $$
A MATLAB Code is given in my answer to Orthogonal Projection onto the Intersection of Convex Sets.
Answer: 1) Find a normal vector $\vec \nu$ to the hyperplane $\mathrm H = \{x|p.x = \alpha\}$ ;
2) Calculate the distance $d$ between $a$ and $\rm H$ ;
3) Then, then point you want is $a - d \vec \nu$.

Orthogonal Projection onto a Half Space


what filters affect ffmpeg encoding speed

Question: What are the options in this command that would cause my encoding speed to be 0.999x instead of 1.0x or higher?
ffmpeg -y \
-loop 1 -framerate 30 -re \
-i ./1280x720.jpg \
-stream_loop -1 -re \
-i ./audio.mp3 \
-vcodec libx264 -pix_fmt yuv420p \
-b:v 2500k -maxrate 2500k -bufsize 10000k \
-preset slow -tune stillimage \
-b:a 128k -ar 44100 -ac 2 -acodec aac \
-af "dynaudnorm=f=150:g=15" \
-g 60 \
-f flv tmp.flv

I am trying to figure out why would this only be encoding at 0.999x speed, is there anything that I could do to speed this up? 2 pass encoding? I cannot understand why the encoding speed is so slow?
Also please not i've tried present from slow - ultrafast, the encoding speed stays relatively unchanged.
Answer: The -re is the rate-limiting factor. It only feeds input in real-time so the encoder can't progress any faster.
Remove the -re before the inputs. Needed only when trying to simulate a real-time input or streaming to an output that expects its input in real-time.


A time field instead of end date in drupal 7 date field

Question: Is it possible to have a time field (for example in minute only) instead of end date of date field in drupal 7?
so that the user select start date and time and due time (in minute) and end datetime will be start datetime + due time?
Comment: You can collect just start date and duration (select list or text fiel), then you could use yourtheme_preprocess_page() http://api.drupal.org/api/drupal/modules!node!node.module/function/template_preprocess_node/7,  there you can get the start date and the duration and do your calculation. This is the php documentation for date http://php.net/manual/en/function.date.php .
Answer: The Date single day module for Drupal 6 worked great for this use case. There isn't a 7.x version yet, but there is an issue to port it.
Comment: There is a D7 version now.
Comment: Thanks, I wish there was a 7.x version too, maybe I port it to D7.


Web server on Amazon EC2 Ubuntu, port 80

Question: How to set up a web server on a EC2 Ubuntu on port 80?
There already seems to be a daemon listening on port 80 by default? What is that daemon and is it safe to kill it?

#lsof -i
java       1290   root   41u  IPv6   3856       TCP *:www (LISTEN)
Answer: It seems that the image you are using came with a web server by default. I saw a similar issue with the Fedora 8 LAMP image. I just killed the default daemon and install httpd from the yum repositories. Anyways I'd choose an image with no web server installed by default.
Which image are you using? Maybe the provider of the image has some documentation about the web server installed.
Comment: Futhermore, it looks like Tomcat or some other java based web server that is installed on the image he used.
Comment: @All: Yep, it appears so. My image came with a pre-installed java web server. I terminated it and went for a Fedora with LAMPP.


How to open gmap via bokeh in a zoom value that will show all markers?

Question: I run the following code, displaying google map via bokeh with markers on the map:
gmap_options = GMapOptions(lat=lat, lng=lng,
                           map_type=map_type, zoom=zoom)
p = gmap(api_key, gmap_options, title='PhotosTrip',
         width=bokeh_width, height=bokeh_height, tooltips=TOOLTIPS,
         tools=[hover, 'reset', 'wheel_zoom', 'pan'])
p.circle('x', 'y' , size=8, alpha=0.5,
                  color='black', source=source)

How can I select the proper zoom so all markers will be displayed when the map opens?
Comment: Are you asking for a dynamic way to set the zoom attribute for GMapOptions depending on the circle source? In that case you will have to create a separate function that determines the proper zoom value (as int), then update p.map_options
Comment: Yes. This is what I am after
Answer: Assuming that by omitting zoom it defaults to 12, and given the limited information, an approach would be as follows:
def get_outer_markers(marker_source):
    # read dataset
    # process dataset. See e.g. https://stackoverflow.com/questions/25787637/python-plot-only-the-outermost-points-of-a-dataset
    outer_markers = ...
    return outer_markers

def get_extremum_points(markers):
    # see e.g. https://stackoverflow.com/questions/31667070/max-distance-between-2-points-in-a-data-set-and-identifying-the-points
    longest_distance = ...
    return longest_distance

def convert_distance_to_zoom_value(distance):
    # Here you define your desired zoom
    # Define a formula that converts distance to the desired zoom
    return zoom_value

most_outher_markers = get_outer_markers(marker_source=source)
longest_euclidean = get_extremum_points(markers=most_outher_markers)
zoom_value = convert_distance_to_zoom_value(extremum_markers)

gmap_options = GMapOptions(lat=lat, lng=lng,
                           map_type=map_type, zoom=zoom_value)

Comment: The extremum_markers shall be the max of euclidian distance from the origin to the most outer markers. This distance is equivalent to the zoom_value. That is the value you pass to get_zoom_value(). You can find the proper formula by simple trial and error. For example, zoom_value = int(distance/123) # e.g. 10. 123 is a random value, the value you should experiment with. It is impossible for me to state what the proper value is for your case without any code.
Comment: I modified some function and variable names for clarity.
Comment: Not sure that I follow. I want that from a given coordinates of markers I will know which zoom to send to the GMapOptions so all the markers will be in view. The code above has no such calculation....
Comment: In other words, you write: "Define a formula that converts distance to the desired zoom" - but this is the heart of the question
Comment: Thank you for the effort. However, the heart of the issue was the zoom_value formula


Joint entropy of two random variables

Question: The joint entropy is the amount of information we get when we observe X and Y at the same time, but what would happen if we don't observe them at the same time.
For example, when i toss a coin, if i got tails i will only observe the variable X, but if i got heads i will only observe the variable Y. How could i find the entropy?
Answer: Entropy (joint entropy included), is a property of the distribution that a random variable follows. The available sample (and hence the timing of observation) plays no role in it.
Copying for Cover & Thomas, the joint entropy $H(X,Y)$ of two discrete random variables $X, Y,$ with joint distribution $p(x,y)$, is defined as
$$H(X,Y) = - \sum_{S_X}\sum_{S_Y}p(x,y)\log p(x,y) $$
Examine the expression: the sums are taken over all possible values of $X$ and $Y$, i.e. over all the values that belong to the support of each r.v. ($S_X$ and $S_Y$ respectively), irrespective of whether some of these values may not materialize or be observed in a sample. What we actually observe, or when, plays no role, in calculating entropy, and joint entropy in particular.
Turning to your specific example: The side of a coin itself can not be modeled as a random variable. A random variable maps events into real numbers. The side of a coin is not an event. Observing one of the two sides is an event.  Not observing a side, is an event. So let's define a random variable $X$ by "$X$ takes the value $1$ if heads is observed, $0$ otherwise". And define $Y$ by "$Y$ takes the value $1$ if tails is observed, $0$ otherwise". Assume the coin is fair. The joint distribution of these two random variables is then described by
$$\begin{align}
P(X=1,Y=1) &= 0 \\
P(X=1,Y=0) &= 0.5 \\
P(X=0,Y=1) &= 0.5 \\
P(X=0,Y=0) &= 0
\end{align}$$
Note that the numerical mapping we chose (the zero/one values) does not play, as numbers go, any decisive part in the probabilities assigned -we could have chosen a 5/6 mapping for $X$ and a 56/89 mapping for $Y$ (or whatever) -the allocation of probabilities in the joint distribution would have been the same (it is the underlying structure of events that is the critical factor).
Next, as always, we consider the distribution at non-zero values, so
$$H(X,Y) = - 0.5\log(0.5) - 0.5\log(0.5) $$
and using base-2 for the logarithm we get
$$H(X,Y) = - 0.5(-1) - 0.5(-1) = 1 $$
Finally, you can easily find that the entropy of $X$ (and likewise for $Y$) is
$$H(X) = - \sum_{S_X}p(x)\log p(x) = - 0.5(-1) - 0.5(-1) = 1 $$
So in this case $H(X,Y) = H(X) = H(Y)$. But the general expression for the decomposition of joint entropy is
$$H(X,Y) = H(X) + H(Y\mid X) = H(Y) + H(X\mid Y)$$
where $H(Y\mid X)$ and  $H(X\mid Y)$ are conditional entropies. Then we conclude that $H(Y\mid X) = H(X\mid Y) = 0$ in this case. The intuition is straightforward: given $X$ what has happened to $Y$ is certain (and likewise in reverse), so conditional entropy is zero.
Comment: +1 for the detailed answer with examples on a basic question!

Joint entropy of two random variables


Evaluating a function of a complex number at $\infty$

Question: How do I evaluate $\left[t^ze^{-t} \vphantom{\dfrac 11} \right]^{t=\infty}_{t=0}$, where $z=x+iy$ ?
Comment: Using the definition: $t^z=\exp(z\log(t))$.
Comment: Sadly the exponential function has an essential singularity "at infinity", so a casual attempt to evaluate an expression like this there seems prone to ambiguity.  Perhaps you'd be better off backing up a step and explaining what motivates this calculation.  If there is a sensible context, likely there is some way to take advantage of that to get a sound answer.
Answer: Your expression seems to come from the evaluation of an integral, therefore I assume that $t$ is real. Remeber that "evaluating" at real $\infty$ means in fact considering a limit. In your case, this is $\lim \limits _{t \to \infty} t^z \textrm e ^{-t}$. Let's investigate its modulus, maybe it will tell us something.
$$\lim \limits _{t \to \infty} |t^z \textrm e ^{-t}| = \lim \limits _{t \to \infty} t^x |t^{\textrm i y}| \textrm e ^{-t} = \lim \limits _{t \to \infty} t^x \underbrace {|\textrm e ^{\textrm i y \log t}|} _{=1} \textrm e ^{-t} = \lim \limits _{t \to \infty} \frac {t^x} {\textrm e ^t} = 0$$
This shows that $\lim \limits _{t \to \infty} t^z \textrm e ^{-t}$ evaluated in $\infty$ is $0$ regardless of $z$. On the other hand, you'll get into trouble when evaluating in $0$ if $x \le 0$! If $x > 0$, though, your whole expression will be $0$.
Answer: The magnitude is $t^xe^{-t}$, which approaches $0$, we know from basic Calculus.
Comment: @usainlightning: Even when working with real numbers, you only apparently "sub" - in reality you take limits.
Comment: I understand that the magnitude is $t^xe^-t$ but why can we not just sub in the values for $t=0$ and $t=\infty$ as we would do in a case concerning real numbers.
Answer: Quite possibly the expression $\left[t^ze^{-t} \vphantom{\dfrac 11} \right]^{t=\infty}_{t=0}$ was intended to mean $\left(\lim\limits_{t\to+\infty} t^z e^{-t}\right) - \left( 0^z e^{-0} \right)$.
I'm assuming $x$ and $y$ are supopsed to be real.
It $t$ is a positive realy number, one can say
\begin{align}
t^{x+iy} & = e^{(x+iy)\log t} = e^{x\log t}\left( \cos(y\log t) + i\sin(y\log t) \right) \\[8pt]
& = t^x \left( \cos(y\log t) + i\sin(y\log t) \right).
\end{align}
Then one has
$$
|t^z e^{-t}| = t^x e^{-t} | \cos(y\log t) + i\sin(y\log t)| = t^x e^{-t} \to 0\text{ as }t\to+\infty
$$
and therefore $t^z e^{-t} \to 0$ as $t\to+\infty$.
I was about to launch into some thoughts on how to define $0^z = 0^{x+iy}$, but then I realized that since this probably comes from an integral over the interval $(0,+\infty)$, one should really just think about
$$
\lim_{t\,\downarrow\,0} t^z e^{-t}.
$$
Reasoning similar to that above should show that that is $0$.
I'm guessing this came from integration by parts, and I wonder if applying some standard theorems of complex variables might be a better way to evaluate the integral from whose integration by parts this expression arose.
Comment: What if $x \le 0$?
Comment: @AlexM. : Good point; I was tacitly assuming $x>0$. $\qquad$
Comment: Apologies $x > 0$


Data not visible outside Node Request function

Question: Im writing little scrap tool with Node(Express) searching urls from list. Problem is with access to results of search outside of request callback function in forEach loop. Please help - why results array are empty outside request? I want exports this results to the view. Also any variable defined inside request is not defined from outside.
Here my code:
var express = require('express');
var request = require('request');
var bodyParser = require('body-parser');
var urlencodedParser = bodyParser.urlencoded({ extended: false });
var fs = require("fs");
var app     = express();

app.get('/scrap/',function(req,res){
    res.render('start.ejs');

});

app.post('/scrap/result', urlencodedParser, function(req,res){

        var lista = req.body.lista;
        var phrase = req.body.phrase;
        var l = lista.split('\n');
        var results = [];  // declaring results array

        l.forEach(function(elem) {

            request(elem, function(error, response, html) {

                try {
                if (html.indexOf(phrase) > 0) {
                var result = 'Phrase "' + phrase + '" found';
                }
                else {
                  var result = 'Phrase "' + phrase + '" not found';
                }

              }
              catch(err) {
                var result = 'Error: '+ err.message;
              }
             results.push(result);

             console.log(results) // here results array is filled with result

            });
           console.log(results); // results array is empty

        });

         console.log(results); // results array is also empty

            res.render('result.ejs', {
                  result : results[0],
                  phrase : phrase,
            });

});

app.use(function(req, res, next){
    res.redirect('/scrap');
});

app.listen(3000);

Answer: instead of a forEach use a map, and return an array of promises, then qait on all of them before providing the response.
var responsePromises = l.map(geturslResponsePromise)
q.all(responsePromises).then(function(results){
     res.render('result.ejs', {
         result : results[0],
         phrase : phrase,
     });
})

Where geturslResponsePromise is somethign to the effect
var geturslResponsePromise = function(elem) {
   return new Promise(function(resolve, reject){

     request(elem, function(error, response, html) {
        try {
            if (html.indexOf(phrase) > 0) {
                resolve('Phrase "' + phrase + '" found');
            }
            else {
                resolve('Phrase "' + phrase + '" not found');
            }
        }
        catch(err) {
            reject('Error: '+ err.message);
        }

    }) // request
   }) // promise
}

note:  untested code, probably a ton of bugs, but that is the approach I would take with an ES5 based syntax
note2:  I would also recommend more meaningful variable names.  Things like Request, Responses, Url, Uri are fairly well known and understaood in the web space
Comment: Heh, it looks like I still has a lot to learn about asynchronous calls in JS Thanks anyway...
Comment: Your solution works very well btw ! Only that I exchanged "q" to "Promise": Promise.all(responsePromises).
Comment: Just kind of shooting off of  memory - y promise.all


Model selection in PGLS?

Question: I am using Phylogenetic General Least Squares in the R package 'caper'.
I have 4 predictor variables and I would like to know which are correlated with my response variable, while taking the phylogeny into account.
I am uncertain on how to assess the models:

one way is to include all my predictors in one model and get the F-stat using anova().
The other option is to assess multiple models with different combinations of the predictor variables and use AIC() to select the best model.

Which method should I use?
Answer: If your goal is to obtain p-values for the individual predictors, then using anova on your fitted pgls models does that. AIC will give you measures of the overall goodness of fit of each model, but doesn't tell you about the significance of individual parameters. In fact, you can have a model favored by AIC that includes parameters with non-significant p-values (see Why applying model selection using AIC gives me non-significant p-values for the variables.
On the other hand, it is arguably more useful to consider which variables are included in the model selected using AIC, because those variables with non-significant p-values may still be useful. In particular, when you have collinear predictor variables, the p-values can be large even for variables that add predictive power to the model (see AIC or p-value: which one to choose for model selection?).
In practice, I would suggest reporting results from both approaches. While I always appreciate seeing the different models along with AICs, many readers and reviewers care more about seeing p-values for individual predictors. It is easy enough to report AICs along with p-values for predictors, and you may get insights about your data from looking at the AICs and p-values together (e.g., if you have a model with significant variables, and then adding a new variable improves the AIC but causes the other model variables to become non-significant, it would suggest that the new variable is correlated with the old variables and you should not necessarily conclude that the old variables don't matter, even if they have non-significant p-values in the full model).
Comment: Thanks for the clear answer. So should i use anova() for the model with all parameters or the best model selected by AIC? (I notice the output changes with spurious parameters). Cheers
Comment: Well what I was suggesting was to provide the p-values for all of the models/parameters, as well as the AIC. That way people can see how p-values change depending on the model specification. What do you mean "spurious parameters"?
Comment: Oh ok, but reporting the p-values for all the parameters/models is a bit tedious if you are modelling many parameter combinations? "spurious" in reference to the parameters excluded in best model determined by AIC.
Comment: If your concern is reporting a ridiculous number of results, then you can choose to only report models above a certain Akaike weight. If your concern is doing everything by hand, then you might find help from an R package such as [`MuMln`](https://cran.r-project.org/web/packages/MuMIn/index.html). You can also look into model averaging rather than model selection.

Model selection in PGLS?


Concatenate different rows into one in mysql

Question: I have this database ("statement") where each word of a sentence is in a different row
SENTENCE |  SEQUENCE |  TEXT
    A   |   1       |   MY
    A   |   2       |   NAME
    A   |   3       |   IS
    A   |   99      |   CARL
    B   |   1       |   MY
    B   |   2       |   NAME
    B   |   3       |   IS
    B   |   99      |   JUSTINE

I would like to do a select where the result is the complete sentence, like:
 SENTENCE | TEXT
    A   |   MY  NAME IS CARL
    B   |   MY  NAME IS JUSTINE

since I cannot create a new table, I would like to put the command in the select just to have a new column. In each sentence the words are sorted in the column "sequence" and 99 is always the last word of the sentence.
I've tried adapting this solution but it didn't work.
Thank you very much
Turi
Comment: The solution you refer to is SQL-Server. MySQL has a whole other SQL syntax
Answer: select sentence, group_concat(text order by sequence separator ' ')
from your_table
group by sentence


Regarding random variables

Question: Let $X$ be a non-negative random variable. Prove that $$\Pr(X\geq a) \leq \frac{E[e^X]}{e^a}$$
where e is Napier's base.
Can I know what the question means and how to prove it.
Answer: I have never heard of $e$ being referred to as Napier's base.
Back to topic: What you are looking for is Chernoff's bound, in a simplified form:
$$ \Pr(X \geq a) = \Pr(e^X \geq e^a) \leq \frac{E[e^X]}{e^a}$$
First equality follows from monotonicity of the exponential function, while the inequality is an application of Markov's inequality.

Regarding random variables


Variables naming style

Question: What do you prefer to use and what is the best practice - to make long but very meaningful names or to make shorter ones?
For example, if you are writing a class House, will be
int numberOfRooms;

or
int nRooms;

Sure, long names are better for understandig when you read foreign code or give yours to somebody, but they make code longer -> more complicated to read. So I messed up with it. :)
Comment: There's always a balance to be sought, but I prefer to err on the side of readability for the next programmer working on my code. In your example, I'd go with `roomCount`.
Comment: I've never seen variables named like `nRooms`. `numRooms` at the shortest, but I prefer meaningful names.
Comment: A lot of the times I like using underscores... num_rooms
Answer: One of the most important things is understanding code.
It's better to name the variable numberOfRooms or numOfRooms than nRooms - nRooms could mean something else and numOfRooms is just 4 characters longer - so, I think, it worths to name it a little longer.
Answer:
Use the house naming style for wherever you are working.  Other colleagues will be maintaining your code in the future and it is best to make it easy for them.
If you are working for yourself then use the standard naming style for the language you are using.  Delphi, Java, C# and others all have standard styles.
If you are working on a collaborative project then follow the house naming style for that project.
As Miroslav says, longer names are generally better, within reason.

Variables naming style


Geonames and MongoDB: Exporting Access 2010 into MongoDB to use geospatial index

Question: I have an Access 2010 database with information from Geonames. The table name is cities. For simplicity the columns are "name", "latitude", "longitude", "loc". I created "loc" to combine "longitude" and "latitude" into one field so that I can use MongoDB's geospatial index. I had to save the "loc" column in string format since I am combining two decimal values with a comma in between.
When I export this table to a CSV I skip "longitude" and "latitude" since I have the new combined "loc" field.
The CSV looks like:
"geonameid", "name", "loc"
1, "Sweden", "18.068287,59.336341"

After I run MongoImport into "cities" collection, the loc field is embraced with quotation marks such as:
{ "_id" : ObjectId("50a9ed157db1bcfe22cddd0a"), "geonameid" : 20, "name" : "Sweden", "loc" : "18.068287,59.336341", }

From here I run a command to turn "loc" into an array. I use the following command thanks to another contributor here on Stackoverflow:
db.cities.find( { 'loc' : {$type : 2 } } ).forEach( function (x) { x.loc = new Array(x.loc); db.cities.save(x); });

The result is:
{ "_id" : ObjectId("50a9ed157db1bcfe22cddd0a"), "geonameid" : 20, "name" : "Sweden", "loc" : [ "18.068287,59.336341" ], }

How can I remove the quotation marks from my gps coordinates in the "loc" field? I can't code in java and don't mind waiting for MongoDB to perform this task. If it would work to export the CSV with the "longitude" and "latitude" fields and combine them into a new "loc" field in MongoDB I don't mind that either even if it is not a beautiful solution. I just need to get the "loc" field working with the geospatial index.
Answer: The command to turn loc into a usable geospatial array is :
db.cities.find( { 'loc' : {$type : 2 } } ).forEach( function (x) { x.loc = x.loc.split(",").map(parseFloat); db.cities.save(x); });

Answer: You combined numbers into "loc" fild so now it's a string and it's being quoted. Separate it back to numbers before importing into MongoDB.
But you need "loc" field to be an array to use it with GEOindex - and arrays aren't possible with CSV. You need to find a way to export data from MS Access to JSON and then import JSON to MongoDB with "mongoimport --jsonArray" command
Exporting Access to JSON - http://www.divconq.com/2010/export-a-microsoft-access-database-to-json/
Comment: I agree about JSON, created a test .json document and "loc" imported fine. Unfortunately the cmd tool you linked to has a broken AWS S3 link. I tweeted the publisher, hopefully he can provide a working link.


DevExpress XtraReport in a MVC application

Question: Maybe this is very simple, but I just can't get it to work.
 Here's the thing:

I created a XSD schema and then drag and drop the table from my DataSource (SQL Server).
Now I can work in report designer, since I set the data source to the .xsd file, so I drag and drop fields onto the report surface. Everything fine.
I then have the controller which has an action that opens the razor view with report.

So far so good. In action, I just created the instance of one item from the database, and am setting that as a data source for the report, but when I show the view it never binds it. Nothing in the report, just labels and headers. I simply want to be able to pass an object of the type that I created and when I set the report source to be able to see data.
I don't want any parameters and filtering.
Thanks.
Comment: Why don't you contact the DX guys regarding your issue?
Answer: Review this help topic and ensure that you have performed all required steps correctly.
Answer: You have to set the dataSource and dataMember of the report at the code behind event DataSourceDemanded of the XtraReport.
The Data i'm passing is a Datatable object
Private Sub myReport_DataSourceDemanded(sender As System.Object, e As System.EventArgs) Handles MyBase.DataSourceDemanded

    Me.DataSource = session("myData")
    Me.DataMember = "movimentacao_creditos"

End Sub


Is $X$ compact under these conditions?

Question: Suppose $X$ is a normal space so that $\forall$ topological spaces $Y$ if $f:X \to Y$ is an embedding, then $f(X)$ is closed in $Y$. Does it follow that $X$ is compact?
Comment: How is $Y$ quantified?
Comment: No condition on Y.
Comment: Yes. Consider the embedding of $X$ in its Stone-Cech compactification. Since the image $f(X)$ is a closed subspace of a compact set, it is compact.
Comment: @Crostul But this has to work for every imbedding f
Comment: Working for every embedding, it must work for the specific embedding I mentioned. From that, it follows that $X$ is compact.
Comment: @Crostul I edited the question. I think I caused a misunderstanding
Comment: Normal implies Hausdorff in your definition?
Comment: @Henno Brandsma Is there a different convention where it doesn't? The way we learned in class is that normal (T4) implies regular (T3) implies Hausdorff (T2). Were you thinking of a different definition of normal?
Comment: You mention in as definition that normal means you can separate two dijsoint closed sets, but in order to imply Hausdorff, singleton sets have to be closed (so we can apply that condition to them) and this means we must demand $T_1$ too.
Answer: The space $X$ is Tychonoff (compeletely regular, $T_1$; follows from normal, if normal also includes $T_1$), so embedds via $e: X \to [0,1]^I$ for some set $I$ (Tychonoff's embedding theorem, the universal space fact on this page), and so by assumption, also for this particular embedding, $e[X]$ is closed in $[0,1]^I$ and hence compact, and so is the homeomorphic $X$.
In general a Hausdorff space $X$ is called $H$-closed if for every embedding $f:X \to Y$ where $Y$ is Hausdorff, $f[X]$ is closed in $Y$.
There exist $H$-closed spaces that are not compact. And a $T_3$ $H$-closed space must be compact. All this is classical (though not treated in many text books).
So the answer is easily yes if your normal includes $T_1$. Otherwise:

I call a space $X$ universally closed if for all spaces $Y$ and all embeddings $f: X \to Y$ we have that $f[X]$ is closed in $Y$. (Note that this is like $H$-closed but without the Hausdorff requirements.)

Fact: $X$ is universally closed iff $X=\emptyset$. Proof: $X=\emptyset$ is indeed universally closed as the empty set is closed in any topology. And if $X \neq \emptyset$, define $Y^\ast = X \cup \{\infty\}$ for some new point $\infty \notin X$ and let its topology be $\mathcal{T}_X$ (the topology of $X$) together with $Y^\ast$. The inclusion map $f: X \to Y^\ast, f(x)=x$ is an embedding (trivial) and $f[X]$ is not closed in $Y$ as $\{\infty\}$ is not open in $Y^\ast$ (or $\infty \in \overline{X}\setminus X$). (Note that $Y^\ast$ is even compact and normal if $X$ is.) So $X$ is not universally closed.
So in short, without some condition on $X$ or the spacs we can embed in for testing closedness, the notion is literally void.
Summary: if normal is just about separating two disjoint closed sets, then the only space that (is normal and) obeys the closed embedding property is the empty space (which is compact). If normal does imply Hausdorff we can apply the Tychonoff cube (or Cech-Stone compactification) embedding and $X$ is compact that way, and we get the class of all compact Hausdorff spaces, which is a bit more useful than the empty space alone..
Answer: Restating this so that $Y$ is quantified:

Suppose $X$ is a normal space such that for every topological space $Y$ and every imbedding $f:X\to Y$, the image $f(X)$ is closed in $Y$. Then $X$ is compact.

Choose $Y$ to be a compact space. Since $f(X)$ is closed in $Y$, it is compact, and as $f:X\to f(X)$ is a homeomorphism, $X$ must be compact.
There's a flaw in this argument, see if you can find it and fix it. Finished answer below.

 This assumes there exists a compact space $Y$ with at least one imbedding $f:X\to Y$. We need to exhibit such a space to complete the argument. One such space is the Stone-Cech compactification of $X$, which Crostul mentions in the comments.

Is $X$ compact under these conditions?


How to play three staves simultaneously on the piano?

Question: I come across the following stave kind of formation many times:

How does one go about playing this on a keyboard instrument? or Does one need to use two different instruments to play the first stave and the other two separately?
Answer: This is written for piano and voice. The two lower staves are for the piano (they are connected with the bracket at the left) and the the top staff is for the voice. That's why it has the lyrics written underneath.
But, if you don't care about the lyrics and want just the melody, you can play the top staff with a different instrument. In this case though, it seems possible to add the notes to your left hand (the voice is in the bass clef). It will make the whole song a bit more advanced, and it will be hard to distinguish between the voices, but you can try it out to see what it sounds like.
There some overlaps, like the first low E on the voice that is the same on the left hand of the piano, so you'll play it only once.
Answer: Just for general clarification, though it does not pertain to this piece: There are cases, especially in Ravel and later composers, where piano music intended for one player IS written on three staves rather than two.  This is for clarity however, and not done to imply that anyone has three hands or should try to use a foot.
Comment: I would be curious to see an example of three staves adding clarity.


Calculator Shortcuts for Derivative?

Question: I have a TI-84 and I am in a business calculus class.
Our teacher doesn't give us much time on tests and I am a bit slow so I was wondering if there was any way to do some of these problems on the calculator to make things faster.
For example, Find the derivative of: $y = \frac{3}{x}-\frac{x}{2}$
I have multiple choice and the answer seems to be: $\frac{dy}{dx} =\frac{-3}{x^2} - \frac{1}{2}$
Is there any way to get that answer in the calculator?
Answer: There is no way to find symbolic derivatives (i.e. unevaluated derivatives) on a TI-84. Some newer calculators have that capability (like the TI-Nspire), but the TI-84 is limited to numerical approximations. More information here.
For the derivative in question, just use the power rule. The function $$y=\frac{3}{x}-\frac{x}{2}$$ can be rewritten $$y=3x^{-1}-\frac{x^1}{2}$$ Just multiply each term by the exponent, and subtract one. $3x^{-1}$ becomes $-3x^{-2}$, and $\frac{x^1}{2}$ becomes $\frac{x^0}{2}$.

Calculator Shortcuts for Derivative?


Get more drupal.org project usage information

Question: Choosing a Drupal module has become an art-form.  Deciding if the module is active, used frequently, growing in usage, etc. is important.
I'm a site builder.  https://drupal.org/project/usage has lot's of good information but interested in levaring the view.  What kind of URL arguments are supported?  I know that:
?sort=asc will work, but can I filter by category, change time range or make a more sophisticated query?  I can add https://drupal.org/project/usage/webform and get more granular on a project basis but would like more control and to understand the URL arguments supported.
I didn't find any Project documents that were relevant.
Answer: The usage page comes from project_usage_overview(); it's not a View.  The only parameters are those provided by Drupal's tablesort API, "sort" and "order".
?sort=asc you've already discovered, and the other parameter changes the sort column (?order=Project would sort by project name).
Comment: Fantastic - thanks!  I wanted to see trending and some other info - I guess I would have to pull into a spreadsheet to analyze.  I also imagine I have to crawl to each project to get historical data beyond the last few weeks.
Answer: Great question! I'm struggling with the same kind of question, but then limited to any of the charting modules available in Drupal (or at least that I'm aware of ...).
The various "features" available/supported in any such module is, IMHO, only 1 of the criteria to decide for a specific module. But also (maybe even more?) important I think is what is in the very first paragraph of the question in the OP. Therefor I started to use the "maintenance scorecards". Even though I started using it for "charting" modules, I also use it now for any other types of modules I need to decide about.
Without trying to highjack the original question here: I'm now trying to find a way to use something like JSON to periodically (like weekly) go get (retrieve) all sorts of data included somewhere on drupal.org ...
Something that might help for such JSON data is located at https://www.drupal.org/node/669910#comment-7432476 , which is includes a ZIP file with content like so:

a feature that provides some data for Drupal.org. This will meet the requirements for security.drupal.org, it does not meet all the requirements listed above. The data is in JSON format. It will require that views_datasource be installed.
Comment: have you had some success in this?  I'm still trying to get good drupal module stats.
Comment: Refer to my updated answer from a few mins ago.