Não estou coneguindo exibir em tela o conteudo do Github, segundo que o exercicio pede, alguem me ajuda?

Question: /*Crie uma tela com um  que deve receber o nome de um usuário no Github. Após digitar o
nome do usuário e clicar no botão buscar a aplicação deve buscar pela API do Github (conforme
URL abaixo) os dados de repositórios do usuário e mostrá-los em tela:
URL de exemplo: https://api.github.com/users/diego3g/repos
Basta alterar "diego3g" pelo nome do usuário.

Adicionar
Depois de preencher o input e adicionar, a seguinte lista deve aparecer abaixo:

repo1
repo2
repo3
repo4
repo5

*/

<meta charset="UTF-8">
<title>Curso Java Script</title>

    <input type = "text" name = "user"/>
    <button onclick="adicionar()">Adicionar</button>

var recebeInput = document.querySelector('#app input');
var recebeBotao = document.querySelector('#app button');
var recebeUl = document.querySelector('#app ul');
function preenchimento(preenchimento){
var login2 = recebeInput.value;

for(repositorio of preenchimento){

    var elementoT = document.createTextNode(repositorio.login2);
    elementoL = document.createElement('li');

    elementoL.appendChild(elementoT);
    recebeUl.appendChild(elementoL);
}

}
function armazenandoSite(login){
if(!login) return;

axios.get('https://api.github.com/users/' + login + '/repos')
.then(function(response){

    preenchimento(response.data);
})
.catch(function(error){

    console.log('Deu erro');
})

}
function adicionar(){
var login = recebeInput.value;
console.log(login);

var requisicao = new XMLHttpRequest();
requisicao.open('GET', 'https://api.github.com/users/' + login + '/repos');
requisicao.send(null);

requisicao.onreadystatechange = function(){

    if(requisicao.readyState === 4){

        if(requisicao.status === 200){

            armazenandoSite(login);

            }

        else{

            console.log('Algo deu errado');

            }

        }

    }
}

Comment: Aonde esta aparecendo alguma mensagem de erro? Qual é a mensagem?
Comment: Erro assim não tem acho que é erro de lógica porque ele não esta puxando os dados para ser printado na tela.
Answer: O teu problema é que a tag . Para além disso podes simplificar o código e fazer algo assim:

var userInput = document.querySelector('#app input[name="user"]');
var ul = document.querySelector('#app ul');

function preenchimento(dados) {
  for (repositorio of dados) {
    const li = document.createElement('li');
    li.innerHTML = repositorio.description;
    ul.appendChild(li);
  }
}

function adicionar() {
  const user = userInput.value;
  const url = 'https://api.github.com/users/' + user + '/repos';
  axios.get(url)
    .then((response) => preenchimento(response.data))
    .catch((error) => {
      console.log('Deu erro a buscar', url);
      console.log('Erro:', error);
    });
}

  <input type="text" name="user" />
  <button onclick="adicionar()" type="button">Adicionar</button>

Comment: Mas estão fechadas:

Ou não posso declrar 2 scripts assim? É porque a maior parte do código esta em outro arquivo um .js
Comment: Ficou bem mais simplificado mesmo.
Comment: E deu certo mesmo, testando aqui, mas eu deixei o script do jeito que está mesmo, e ajeitei o que foi diferente, mas eu pensei que puxava todas as informações do arquivo mais ja está bom, valeu, agora vou para o proximo desafio usando essa base.


(Dis)aligning lyrics to a melody with LilyPond

Question: I am trying to write a score for piano and voice. The piano actually has staves associated with it, but because the melody is already common and known by the intended audience, there is no staff for the voice, only lyrics. Problem is, I can't seem to (dis)align them how I want. In particular,

when the piano should be played legato, Lilypond automatically holds the lyrics accordingly, which is not what I want;
the beam #9 is also causing me troubles for the lyrics

For the correct legati / slurs and the correct beam #9, my .ly code is as follows :
%%%%%%%%%%
%% VERSION
%%%%%%%%%%

\version "184.108.40.206"

%%%%%%%%%
%% LYRICS
%%%%%%%%%

singerLyrics = \lyricmode {
    a b c |
    a b c |
    d e f |
    d e f |
    g h i j k |
    l m |
    g h i j k |
    l m |
    n o p q r |
    s |
    n o p q r |
    s |
}

%%%%%%%%%%%
%% PIANO UP
%%%%%%%%%%%

pianoUpper = \relative c' {
    \clef "treble"
    \key c \major
    \time 6/8

    <e g>8.( \p <f a>16 <e g>8 <c e>4.) |
    <e g>8.( \pp <f a>16 <e g>8 <c e>4.) |
    <f d'>4( \mf <f d'>8 <f b>4.) |
    <e c'>4( \p <e c'>8 <e g>4.) |
    <f a>4( \mf \< <f a>8 8. <g b>16 <f a>8) |

    <e g>8.( \> <f a>16 <e g>8 <c e>4.) |
    <f a>4( \< <f a>8 8. <g b>16 <f a>8) |
    <e g>8.( \> <f a>16 <e g>8 <c e>4.) |
    <f d'>4( \< <f d'>8 << { f'8. d16 8 } \\ { <g b>4 s8 } >> \! |
    <e c'>4.( <g e'>) |

    <e c'>8. \p g16 e8 8. f'16 d8 |
    c4.~ \> c4 r8 \! \bar "|."
}

%%%%%%%%%%%%
%% PIANO LOW
%%%%%%%%%%%%

pianoLower = \relative c {
    \clef "bass"
    \key c \major
    \time 6/8

    <c e g>4 <c e g>8 <c e g>4. |
    <c e g>4 <c e g>8 <c e g>4. |
    <g g'>4 <g g'>8 <g g'>4. |
    <c g'>4 <c g'>8 <c g'>4. |
    f8   f   |

    c, <e g> <e g> c <e g> <e g> |
    f   f   |
    c, <e g> <e g> c <e g> <e g> |
    g, <f' g b> <f g b> g, <f' g b> <f g b> |
    c <e g c> <e g c> c <e g c> <e g c> |

    <g, e' g>4. <g f'> |
    <c e>4 g8 <c, c'>4 r8 \bar "|."
}

%%%%%%%%
%% SCORE
%%%%%%%%

\score {
    <<
        \new PianoStaff <<
        \new Staff = "upper" {\new Voice = "singer" \pianoUpper}
        \new Lyrics \lyricsto singer \singerLyrics
        \new Staff = "lower" \pianoLower
        >>
    >>
}

And the result is :

But if I have the correct lyrics alignment (and no legato, and my beam #9 is all wrong), it looks like :

In the LilyPond documentation, I find what I would need if I actually had a staff for the voice, but I don't. I can't seem to find how to do it.
Has anyone a solution for me?
Comment: use `\(` and `\)` instead of `(` and `)` for phrasing slurs
Comment: @ElementsinSpace thanks, that helps a lot! Now I just need a solution for beam #9.
Comment: Can I ask what you mean by beam #9?
Comment: @Richard beam #9 is written like `4 \( \< 8 << { f'8. d16 8 } \\ { 4 s8 } >> \! \) |` and the entire `<< {} \\ {} >>` construction seems to be taken as one syllable for the lyrics. Someone has answered with a good answer that makes that problem irrelevant, though, so all's fine.
Comment: @Richard or did you ask what I call a beam? English is not my mother tongue, and I learnt music terminology in another language. For me, there are 12 beams in the images that I posted above, and they are separated by bars. Is that a beam? If not, how do you call them in English?
Comment: @Richard Ah, it's a bar or measure. Mmmh. I feel like a fool now.
Answer: I think that the simplest way of doing that is using a NullVoice. It's like a normal voice, but with the catch that it is never typeset anywhere.
So you add a NullVoice into one of your staves and fill it with some notes so that connecting the lyrics to this voice gives you the desired placement. Like this: http://lilybin.com/frt2h1/1 .
(This is also good when typesetting things for a choir. Sometimes you want to typeset only one line of lyrics for all voices, but each voice has some quirky places that would make the lyrics disalign.)
Comment: That is actually SUPER nifty! Thank you very much!


Rudin's Dowker space is collectionwise normal

Question: I am trying to follow K.P. Hart's course Set-theoretic methods in general topology. In Chapter 6, Rudin's Dowker space $X$ is defined as follows. Let $P=\prod_{n=1}^\infty(\omega_n+1)$ be the box product of the successors of the first $\omega$-many uncountable ordinals, let $X'=\{x\in P:(\forall n)\,\operatorname{cf} x_n>\omega\}$, and let $X=\{x\in X':(\exists i)(\forall n)\ \operatorname{cf}x_n<\omega_i\}$. Exercise 2.8 asks to show that $X$ is collectionwise normal, using the following hint: prove that if $\mathcal{F}$ is a discrete family of closed subsets of $X$ then $\mathcal{F}'=\{\operatorname{cl}_{X'}F:F\in\mathcal{F}\}$ is a discrete family of closed subsets of $X'$.
It was already proved that disjoint closed sets in $X$ have disjoint closures in $X'$. I can prove that the space $X'$ is collectionwise normal, and using the statement of the hint I can also show that $X$ is collectionwise normal. But somehow I am not able to prove the hint.
Question: Is it true that if $Y\subseteq Y'$ are topological spaces, disjoint closed subsets of $Y$ have disjoint closures in $Y'$, and $\mathcal{F}$ is a discrete family of closed subsets of $Y$, then $\mathcal{F}'=\{\operatorname{cl}_{Y'}F:F\in\mathcal{F}\}$ is a discrete family of closed subsets of $Y'$? We can also assume that $Y$ and $Y'$ are normal. Or is that a special property of the above spaces $X$, $X'$?
Comment: In your prologue I think you mean that disjoint closed subsets of $X$ have disjoint closures in $X'.$ And in your Q  I think you mean that disjoint closed subsets of $Y$ have disjoint closures in $Y'. $... Because if $T$ is a subspace of $T'$  and every disjoint pair of subsets of $T$ has disjoint closures in $T',$  then for any $U\subset T$  we have $\phi=T\cap (Cl_{T'}(U)\cap Cl_{T'} (T$ \ $U))=$ $Cl_T(U)\cap Cl_T(T$ \ $U),$ so $T$ is a discrete space.
Comment: @DanielWainfleet: Aah, I was writing too quickly... Thank you! Now it is corrected.
Answer: The hint is a classical fact. No need for any assumptions on $X$. So suppose $\mathcal{F}$ is a discrete family. To see that $\{\overline{F}: F \in \mathcal{F}\}$ is also discrete, let $x \in X$ . Then $x$ has an open neighbourhood $O_x$ such that $\left|\{ F \in \mathcal{F}: O_x \cap F \neq \emptyset\}\right| \le 1$. But $O_x \cap F = \emptyset$ implies $O_x \cap \overline{F} = \emptyset$ (as for any $p \in O_x$, $O_x$ is a witnessing neighbourhood that $p \notin \overline{F}$), and this means that $O_x \cap F \neq \emptyset$ iff $O_x \cap \overline{F} \neq \emptyset$, so $O_x$ also intersects at most one set of the form $\overline{F}$, $F \in \mathcal{F}$, i.e.the family of closures is discrete.
Comment: Yes, if $x\in X$ then $x$ has a neighbourhood that intersects at most one set of the form $\overline{F}$, $F\in\mathcal{F}$. But what if $x\in X'\setminus X$? Can one still find such neighbourhood?
Comment: @PeterElias I missed the $X$ and $X'$ distinction, I'll have to think.
Answer: I think that I finally got it. No assumptions on the spaces are needed.
Spaces $X$, $Y$ are not related to the spaces mentioned in the question.
Lemma 1.
Let $\mathcal{F}$ be a discrete family of closed subsets
of a topological space $X$.
Then $\bigcup\mathcal{F}$ is closed.
Proof.
If $x$ belongs to the closure of $\bigcup\mathcal{F}$
then every neighborhood of $x$ intersects at least one
set $F\in\mathcal{F}$.
Since $\mathcal{F}$ is a discrete family,
there exists an open neighbourhood $U$ of $x$
and a set $F\in\mathcal{F}$ such that $U\cap G=\emptyset$
for every $G\in\mathcal{F}\setminus\{F\}$.
It follows that $U\cap V\cap F\neq\emptyset$ for any open
neighbourhood $V$ of $x$, hence $x$ belongs to the closure
of $F$.
Since $F$ is closed, we have
$x\in F\subseteq \bigcup\mathcal{F}$.
Lemma 2.
Let $X$ be a subspace of a topological space $Y$
such that any two closed disjoint subsets of $X$ have
disjoint closures in $Y$.
Let $\mathcal{F}$ be a discrete family of closed subsets
of $X$.
Then $\mathcal{F}'=\{\operatorname{cl}_Y(F)\!:F\in\mathcal{F}\}$ is a discrete family of closed subsets of $Y$.
Proof.
Let $y\in Y$.
We have to find an open neighbourhood of $y$ that
intersects at most one member of $\mathcal{F}'$.
If $y\in\bigcup\mathcal{F}'$ then there exists
$F\in\mathcal{F}$ such that $y\in\operatorname{cl}_Y(F)$.
Let us denote $\mathcal{G}=\mathcal{F}\setminus\{F\}$.
Then $\mathcal{G}$ is a discrete family of closed subsets
of $X$.
By the above lemma, $\bigcup\mathcal{G}$ is closed in $X$.
Since $F$ and $\bigcup\mathcal{G}$ are disjoint closed
subsets of $X$, their closures in $Y$ are disjoint,
hence $y\notin\operatorname{cl}_Y(\bigcup\mathcal{G})$.
The set
$U=Y\setminus\operatorname{cl}_Y(\bigcup\mathcal{G})$
is an open neighbourhood of $y$ that is disjoint to
every set $\operatorname{cl}_Y(G)$ for $G\in\mathcal{G}$,
hence $U$ intersects at most one member of $\mathcal{F}'$.
If $y\notin\bigcup\mathcal{F}'$ then
$Y\setminus\bigcup\mathcal{F}'$ is an open neighborhood
of $y$ that is disjoint to any member of $\mathcal{F}'$.
Comment: I have just realized that in the last sentence of the proof of Lemma 2, it is not clear why $\bigcup\mathcal{F}'$ should be closed in $Y$.


Does MySQL support user defined data types

Question: Is it possible to define (alias) a base data type in MySQL?
Currently I would like to define UUID as char(32), and then use UUID as the type throughout the schema definition.  As we're prototyping at the moment, UUID is very likely to change - I'd like to ensure that this change is reflected consistently throughout the schema.
I'm thinking something like:
alias type UUID char(32);
Thanks in advance!
Comment: An uuid consists of 36 chars, if it contains dashes.
Answer: In this case a text preprocesor like M4 or any C-language preprocesor may be useful.
If you have the following in file tables.sql:
define(UUID, char(32))
create table mytable1 (my_uuid UUID);
create table mytable2 (my_uuid UUID);

Running
$ m4 tables.sql

you'll get:
create table mytable1 (my_uuid char(32));
create table mytable2 (my_uuid char(32));

Comment: An uuid consists of 36 chars, if it contains dashes.
Answer: well ENUM does the work until certain expectation of your custom data types, but i'm too hoping to look forward to this topic
Comment: Please be more specific and provide a clear explanation of your solution, preferably with examples.


Set default registration type for content type

Question: I created a registration type for a certain content type using the registrations module (https://drupal.org/project/registration).
But the user can select or disable a registration type.
Can you force this registration on a certain content type?
Answer: Since Registrations are fields make it a required field.
And then from the default values select the type of registration you want to force for a content type.


Distinguish between substructure, submodel, elementary substructure, and elementary submodel.

Question: I can see (although I must not really understand) the definition of these terms, but could someone please explain the difference between these concepts, and whether any one of them imply the other? Furthermore, does elementary equivalence imply isomorphism, or the otherway around?
Answer: I don't know the exact difference between 'model' and 'structure', since it is used sometimes as synonym. I will refer the explanation mentioned in Wikipeda.
The term 'model' means a structure satisfying the theory $T$ (explicitly mentioned or not). From this we can infer the meaning of the term 'submodel': it means a substructure satisfying $T$ of a model of $T$.
I will give a example: imagine the theory of fields over the language $\mathcal{L}=\langle 0,1,+,\cdot\rangle$. The structure of real numbers $\mathbb{R}$ is a field. That is, $\Bbb{R}$ is a model of theory of fields. You are also noticed that structures of all integers $\Bbb{Z}$ is a substructure of $\Bbb{R}$, but it is not a field so $\Bbb{Z}$ is not a submodel of $\Bbb{R}$.
According to above definition and example, submodels are substructures, but the converse is not true.
The term elementary substructure is a substructure having same formulas true over the substructure with original structure. To be formal, if $\mathfrak{B}$ is a substructure of $\mathfrak{A}$ then we call $\mathfrak{B}$ is an elementary substructure of $\mathfrak{A}$ if for each formula $\phi(x_1,\cdots,x_n)$ with $n$ variables and for each $a_1,\cdots,a_n\in \mathfrak{B}$, we have
$$\mathfrak{A}\models \phi(a_1,\cdots,a_n)\iff \mathfrak{B}\models \phi(a_1,\cdots,a_n).$$
Trivially, elementary substructure is a substructure. Also, it is known that $(\Bbb{Q},<)$ is a elementary substructure of $(\Bbb{R},<)$. However they are not isomorphic.
Lastly, the term 'elementary submodel' is a synonym of 'elementary substructure', since if a structure satisfies some theory $T$, then its elementary substructure also satisfies $T$.
Comment: @chibro2 Yes. Elementary structure satisfies *all* sentences which is true over original structure.
Comment: @chibro2 Every substructure is a submodel, but other directon does not hold. Remember the definition of a model: it refers both *structure* and *theory*, not a structure only, and if a structure is a model, then a structure satisfies given theory. (I think the sentence '$\mathfrak{A}$ is a model of $T$' describes the situation well.)
Comment: @chibro2: In general, there is no canonical way of "completing" a substructure to an elementary substructure. Skolem's theorem tells us that every set can be enriched to become an elementary substructure that is not much larger, but this is by no means canonical. In some cases, however, it can be made canonical. For instance, for algebraically closed fields (more generally, strongly minimal theories), algebraic closure is just what you need.
Comment: Is it a necessary condition that elementary substructures satisfy the same existential sentences as the original structure? If not is there a theorem whereby you can "complete" a substructure this way?
Comment: Additionally, when you say "the term 'submodel': it means a substructure satisfying T of a model of T." Isn't that the same as saying "elementary substructure is a substructure having same formulas true over the substructure with original structure". But submodel and elementary substructure are not the same concepts right?


linux + at command + how to kill the job

Question: I use the at command in order to run the task (test script ) every one min
 at -f /tmp/test now +1 minute
 commands will be executed using /bin/tcsh
 job 1438153690.a at Wed Jul 29 10:08:10 2015

but how to kill this Job? ( 1438153690.a ) If needed ?
Answer: Before it starts running, use atrm to remove the job from the queue; afterwards, use kill.
By the way, at won't run it every minute, as your question appears to suppose; it will run it once, in 60s time.  To run it every minute, use cron.


objective j loads slowly in browsew

Question: I am iOS developer. I know just a couple of languages and I hate html because of the lack of possibilities there.. I've just red about objective-j. When I try to open any code in web browser (last versions of Safari, Google Chrome) it loads increadibly slow..

Is it normal?
How to make it work fast?
Are there any other languages similar to c, objective-c that I can use for creating a web-site?

And another queastion coming with: How can I make Xcode work with objective-j? I use coda 2.0 at the moment.
Answer: Make sure you run jake deploy to create the stripped and precompiled version of the app you're testing. Most sample code out there will be run in uncompiled "debug" mode which is great when you're developing but in actual deployment you'll want the precompiled version of your app.
Also, the current development version of Cappuccino and Objective-J is much faster than the last release 0.9.6, thanks to a new, better compiler. Keep an eye out for a future Cappuccino 0.9.7 release.
I think if you write a significant app in Cappuccino you'll find the load time to be absolutely comparable with other large web apps such as Gmail.
Currently you can only use Xcode to edit the user interface of a Cappuccino app. It does not work well to edit Cappuccino code itself since the latest versions of Xcode don't include the necessary plugin framework. You can learn more about good editor options in the development environment tutorial.
I am not familiar with other languages similar to Objective-C for the web, but Intel has an Objective-C to JavaScript compiler here.

objective j loads slowly in browsew


Prove that the function $f(x)=\sin\frac{1}{x} \ (x\ne 0); f(0)=0$ is integrable on $[0,1]$.

Question: I am trying to approach this integral using the Riemann criterion. For that being, I need to prove that there is a partition of the interval where the upper sum - lower sum is less than epsilon. However I do not understand which partition I should take.
Comment: The function is bounded and continuous on $(0,1]$. Hence the only discontinuity is at $x=0$.
Comment: I know continuous functions are RS-Integrable but how do I use the fact that f(0)=0
Comment: The value at $0$ is immaterial (other than being finite). Mohammad's answer gives a blueprint for any answer.
Answer: Your function $ f(x) = \sin (1/x)$ is bounded between $-1$ and $1$
The contribution of your function over an interval of length $\epsilon$ to the Reimann's sum is at most $2\epsilon$
Note that your function is continuous over $[0,1-\epsilon]$ for any small  $\epsilon >0$
Your partition is the union of a partition on $[0,1-\epsilon]$ and $[1-\epsilon,0]$
Can you take over from here?
Comment: I understand why the function over an interval of length $\epsilon$ to the Reimann's sum is at most $2\epsilon$, but I do not understand the partition.
Comment: Pick $n$ large enough so that $1/n<\epsilon$ and divide your interval into $n$ parts.
Comment: I have tried but I can not embrace the argument as a whole. Could you help me?
Answer: A bounded function that is continuous everywhere on a compact interval, except at one point, is Riemann integrable.
We will use the following criterium of integrability.
$f:[a,b]\to \mathbb{R}$ is Riemann-integrable if the following condition is satisfied:
For all $\epsilon > 0$, there is a partition $P$ of $[a,b]$ such that $U(f,P) - L(f,P) < \epsilon$.
Proof: Let $z$ be the point of discontinuity. We assume without loss of generality that $z$ is not a boundary point of $[a,b]$, otherwise the proof must be slightly adapted.  Let $\epsilon >0$.  Put $x_{n-1} = z- \mu, x_{n+1} = z+ \mu$ where $\mu$ is so small that $x_{n\pm1} \in (a,b)$ and such that the distance between these points is small.
Because $f\vert_{[a, x_{n-1}]}$ is continuous, it is integrable, so there is a partition $P_1:= (x_0 = a, \dots, x_{n-1})$ of $[a,x_{n-1}]$ such that $U(f\vert_{[a,x_{n-1}]},P_1) - L(f\vert_{[a,x_{n-1}]},P_1)$ is small . Similarly, there is a partition $P_2 = (x_{n+1}, \dots x_r=b)$ of $[x_{n+1}, b]$ with a similar condition.
Consider the partition $P:= P_1 \cup P_2 \cup \{z\}$.
Then $$U(f,P) - L(f,P) = \sum_{i=1}^{n-1} (M_i - m_i)(x_i - x_{i-1} ) + (M_n-m_n)(x_n - x_{n-1}) + (M_{n+1}-m_{n+1})(x_{n+1} - x_{n}) + \sum_{i=n+2}^r (M_i - m_i)(x_i - x_{i-1} )$$
and all these terms can be made small.
Comment: Here 0 is the boundary point and the discontinuity point
Answer: This function is continuous and therefore according to Reimann-Lebesgue theorem is integrable.
Answer: Suppose $f$ is bounded on $[a,b]$ and Riemann integrable on $[c,b]$ for each $c, a<c\le b.$ Then $f$ is  Riemann integrable on $[a,b].$
Proof: Suppose $|f|\le M$ on $[a,b].$ (Assume $M>0.$) Choose $c\in (a,b]$ such that $c-a< \epsilon/(2M).$ Because $f$ is Riemann integrable on $[c,b],$ there is a partition $P$ of $[c,b]$ such that
$$U(P,f,[c,b]) - L(P,f,[c,b]) < \epsilon/2.$$ Define $P'= P \cup \{a\}.$ Then
$$U(P',f,[a,b]) - L(P',f,[a,b])$$ $$ \le 2M(c-a) + U(P,f,[c,b]) - L(P,f,[c,b]) < \epsilon/2 + \epsilon/2.$$
This proves the result, which implies your result for $\sin(1/x).$


Why is $a \times b$ the null vector of the anti-symmetric matrix $M = ab^{\mathrm T} - ba^{\mathrm T}$?

Question: Let $a$ and $b$ be two vectors of size $3 \times 1$. The matrix $M = ab^{\mathrm T} - ba^{\mathrm T}$ is $3 \times 3$ anti-symmetric (easy to prove), and also $a \times b$ is its null vector. I have proven this, but only by substituting $a$ as $a = (a_1, a_2, a_3)^{\mathrm T}$ and $b$ as $b = (b_1, b_2, b_3)^{\mathrm T}$ and doing the calculations.
Is there any other (shorter) proof or any identity/theorem I am missing?
Also, let's say we didn't know the null vector was $a \times b$. How could one try and approach the problem of finding the null vector of $M$ from "scratch"?
Comment: Isn't it obvious that $Mx=0$ if $x$ is orthogonal to both $a$ and $b$?
Comment: What are you talking about? $ab^T(a\times b)$ is equal to zero.
Comment: From "scratch" it is not obvious.
Answer: Note that $x^t y$ is just the inner product $x.y$ (at least, identifying $\mathbb{R}$ with the space of $1\times 1$ real matrices). Since $a\times b$ is orthogonal to $a$ and $b$, we have $M(a\times b) = a(b.(a\times b)) - b(a.(a\times b)) = 0$.
Answer: For a vector $\vec a=[a_1,a_2,a_3]^{T}$, define
$[\vec a]_{\times}=\left[\begin{matrix}0&-a_3&a_2\\a_3&0&-a_1\\-a_2&a_1&0\end{matrix}\right]$.
Then we have some properties like: $[\vec a]_{\times}\vec a=\vec 0$, $\:\:\vec a\times\vec b=[\vec a]_{\times}\vec b$, $\;\;[\vec a\times\vec b]_{\times}=[\vec a]_{\times}[\vec b]_{\times}-[\vec b]_{\times}[\vec a]_{\times}$. See: https://en.wikipedia.org/wiki/Skew-symmetric_matrix
Now, I think here, $\vec a\vec b^{T}-\vec b\vec a^{T}=[\vec a\times\vec b]_{\times}$. Therefore, $(\vec a\vec b^{T}-\vec b\vec a^{T})(\vec a\times\vec b)=\vec 0$.
There is a connection with lie algebras. But, I don't know about them.
Comment: Although proving that $a b^{\mathrm T} - b a^{\mathrm T} = [a \times b]_{\times}$ would be enough to then immediately conclude that $a \times b$ is the null vector, it is not very obvious why it holds (I know it does hold, though). It would also help in deriving the answer from "scratch" in this way.


"java.lang.SecurityException: Prohibited package name: java.sql" error happen only when executing outside of Eclipse

Question: I am writing a Topic Modeling program using Apache Tika to extract the text contents from other file type. Actually It run perfectly on Eclipse. But when I export to JAR file to use from command prompt of the Window 10. This error message appear when it try the code: "parser.parse(stream, handler, metadata, parseContext);"
"java.lang.SecurityException: Prohibited package name: java.sql"
I didn't upload my java code here because I don't think they are the root of the problem. Since it run perfectly inside Eclipse IDE. So do anyone know why it only happen when I try to run it from command line. What are the different in JVM between inside and outside of Eclipse IDE? Thank you.
<code>        package Views;

import java.io.*;
import org.apache.commons.io.FileUtils;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.AutoDetectParser;
import org.apache.tika.parser.ParseContext;
import org.apache.tika.sax.BodyContentHandler;

public class TestTika {

    public static void main(String[] args) throws IOException {
        String inputFolderName = "data";
        String outputFolderName = "data_text";
        System.out.println("Extracting text data from '" + inputFolderName + "' to '" + outputFolderName + "'");

        FileUtils.deleteDirectory(new File(outputFolderName)); // Delete the old file in this directory
        System.out.println("Delete all of the old files in directory'" + outputFolderName + "' successfully \n");

        if (new File(outputFolderName).mkdir()) {
            System.out.println("Created folder '"+ outputFolderName );
        }

        File inputFolder = new File(inputFolderName);
        File[] listOfFiles = inputFolder.listFiles();

        String fileName;

        for (File file : listOfFiles) {
            if (file.isFile()) {
                fileName = file.getName();
                System.out.println("\n" + fileName);
                BodyContentHandler handler = new BodyContentHandler();
                AutoDetectParser parser = new AutoDetectParser();
                Metadata metadata = new Metadata();
                ParseContext parseContext = new ParseContext();
                FileInputStream stream = new FileInputStream(new File(inputFolderName + "/" + fileName));
                try {

//////////////////////////////////// Error: Prohibited package name: java.sql ////////////////////////////////
//////////////////////////////////// /////////////////////////////////////////////////////////////////////////

                    parser.parse(stream, handler, metadata, parseContext);

                } catch (Exception e) {
                    System.out.println("Warning: Error when processing file:" + fileName
                            + " . This file will be igrored! \n" + e.getMessage() + "\n" + e.toString());
                    e.printStackTrace();
                    continue;
                } finally {
                    stream.close();
                }
                String s = handler.toString();
                Writer writer = null;
                try {
                    writer = new BufferedWriter(new OutputStreamWriter(
                            new FileOutputStream(outputFolderName + "/" + fileName + ".txt"), "utf-8"));
                    writer.write(s);
                } catch (IOException ex) {
                    // report
                    System.out.println("Warning: Error when saving file:" + fileName
                            + ".txt  . This file had been ignore! \n" + ex.getMessage());
                    continue;
                } finally {
                    try {
                        writer.close();
                    } catch (Exception ex) {
                        /* ignore */}
                }
            }

        }
        System.out.println("Extracting text data from document files has been completed!");
        return;

    }

}

java.lang.SecurityException: Prohibited package name: java.sql
        at java.base/java.lang.ClassLoader.preDefineClass(Unknown Source)
        at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
        at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.base/java.net.URLClassLoader.defineClass(Unknown Source)
        at java.base/java.net.URLClassLoader.access$100(Unknown Source)
        at java.base/java.net.URLClassLoader$1.run(Unknown Source)
        at java.base/java.net.URLClassLoader$1.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.net.URLClassLoader.findClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:113)
        at Views.TestTika.main(TestTika.java:43)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
</code>
Comment: I just added the java code and exception detail in my question. Please note that it still work in Eclipse but the exception will be thrown when I execute it in command line: java -jar TestTika.jar
Answer: The 'prohibited package name' is thrown, when you are using a class of a package starting with 'java.' that is not found in your rt.jar. Either you created such a class yourself, or you have a .jar file containing such a class in your classpath.
If it's the former, put the class in another package. If it's the latter, try to find the .jar file containing this class (e.g. print out the classpath found in the system property java.class.path)
Comment: Thank you for your response. But I did not create any package or class  start with "java." And I use Apache Tika http://www.apache.org/dyn/closer.cgi/tika/tika-app-1.17.jar at https://tika.apache.org/download.html  They've developed it for almost 10yrs I don't think they make that simple error. and I could
 not find any java package inside tika-app-1.17.jar . I double-checked it by creating a java package just for testing purpose. It throw this exception immediately when I try to run in Eclipse, doesn't need to wait until I export into JAR file and run in command line.
Comment: You are using some eclipse magic to create the jar file (jarinjarloader), so it'spossible that some wrong class files have been packaged. That's why I recommended to check the classpath. You can also try the -verbose:class option, which will show when a class is loaded. But I don't know when this option prints the class name. So this might not work either.
Answer: Ran into this issue when creating a Runnable JAR via Eclipse (Mars).
In the Jar generator I was setting the library handling option to

Package required libraries into generated JAR

but switching to

Extract required libaries

solved the issue