Why did Shae act as she did at the trial?

Question: In Game of Thrones, Season 4, why did Shae betray Tyrion at his trial?
Did Shae ever love Tyrion, or was he right in thinking that she only loved his gold and the lifestyle he provided?
Comment: Related: [Why was Shae in the Tower of the Hand?](https://scifi.stackexchange.com/q/64565/21267), [Why did Tywin allow Shae to be a witness at the trial?](https://scifi.stackexchange.com/q/56216/21267) and [Why this turn in Shae's character?](https://movies.stackexchange.com/q/31466/11244)
Comment: For the cash money that Tywin was giving her ;)
Comment: @Aegon Absolutely: [spoilers don't go out of date.](https://scifi.meta.stackexchange.com/a/980/31394) There are many people just starting to watch GoT now who won't want to see spoilers from *any* later seasons. (This question was actually flagged by someone concerned about the spoilery title on the HNQ.)
Comment: She was a negotiable affection woman with an arguably moral. Let's apply the Ockham's Razor and assume that's just money.
Comment: She's all about the Benjamins, baby.
Comment: @Randal'Thor Is something from Season 4 still considered a spoiler, 3 years after it was aired?
Comment: @Randal'Thor [Damn Spoilers......](http://imgur.com/a/22AWt)....Guess I should undo an edit I made, thinking that spoilerish titles don't need to be ambiguous after a year or so.
Comment: @Aegon There's been a [meta discussion](https://scifi.meta.stackexchange.com/q/7792/31394) about that as well, with the conclusion that ridiculously vague answers like "why did this happen" *should* be changed, but changed to something still non-spoilery. Ideally one should be able to [find a compromise](https://scifi.meta.stackexchange.com/q/3032/31394) between spoilery titles and meaningless "why did this character do this" titles.
Answer: NOTE: This answer will be strictly about TV show, not the books. In the books things are completely different.

Did she love him?
In the Show, Shae indeed loved Tyrion. She proved it when Tyrion suggested that she should flee before Stannis takes over King's Landing. Shae on the other hand rejected his proposal, risking her life, deciding to stay with him till the bitter end. No amount of money can make a person do that.

Shae: Are you afraid, my lion?
Tyrion: If the city falls, Stannis will burn every Lannister he can
find. Of course I'm afraid.
Shae: I won't let them hurt you.
Tyrion: I'm a Lannister. I don't have a choice in all this. But it's
not your war.
Shae: It is now.
Tyrion: You can't fuck your way out of everything.
Shae: I have so far. Do you remember what you said when you met me in
your tent? That I should make love to you like it was your last day on
this earth.Season 2 Episode 9 - Blackwater

Then Tyrion got hideous facial injuries, was stripped off his post as Hand of the King, lost his Gold Cloaks and the Tribesmen. At his most vulnerable position Shae came to see him. She made it clear for him that she didn't care about the Money.

Tyrion: It was good of you to come.
Shae: Good of me? Of course I come. I want to see you.
Tyrion: Believe me, you don't.
Shae: Have you looked? I will be the first.
Tyrion: Well?
Shae: You are a mess.
Tyrion: I'm a monster as well as a dwarf.  You should charge me
double.
Shae: You think I'm here for money?
Tyrion: That was the arrangement we made.I pay you and you lie to me.
Shae: Oh. I'm a poor little rich man and nobody loves me, so I make
jokes all the time and pay them to laugh. Fuck your moneySeason 2 Episode 10 - Valar Morghulis

She proved it further when she next suggested that Tyrion should flee into exile with her and she was Okay with him being a penniless exile and still wanted to be with him.

Shae: Let's leave.
Tyrion: Leave?
Shae: Leave King's Landing. They tried to kill you. They will try
again. Going into wars, fighting soldiers, you're terrible at this.
Let's take a boat to Pentos and never come back. You don't belong
here.
Tyrion: What would we do in Pentos?
Shae: Eat, drink, fuck, live.
Tyrion: I want to go with you.
Shae: So do it. Your father, your sister, all these bad people, they
can't stop you. Forget about them. Come with me.
Tyrion: I can't. I do belong here. These bad people are what I'm good
at. Outtalking them, outthinking them. It's what I am. And I like it.
I like it more than anything I've ever done. Are you going to leave?
Shae: You have a shit memory. I am yours and you are mine.Season 2 Episode 10 - Valar Morghulis

Then Why betray him?
They started drifting apart in Season 3. Shae already suspected that Tyrion found Sansa attractive. Tyrion found the notion absurd. And apparently Shae seemed content with his denials.
But The drift cemented when Sansa and Tyrion were about to be forcibly married. Tyrion wanted to speak to both Sansa and Shae separately but Shae refused to leave and Sansa refused to dismiss her. Tyrion was forced to inform Sansa of his father's plan in front of Shae. He did pass a code worded apology to Shae, but she either didn't understand it or was too furious to consider it. For her, it was Tyrion who betrayed her for a highborn girl.
The significant blow came before Tyrion's marriage. Shae still harbored hopes that Tyrion might choose exile for her but he refused and Shae realized that she always was and always will be just another whore for Tyrion.

Shae: So, am I invited to your wedding?
Tyrion: I didn't ask for this marriage. I didn't want it.
Shae: No? She's a beautiful girl. You said so yourself.
Tyrion: That doesn't mean that, this is duty, not desire.
Shae: Is that what you will tell yourself when you fuck her?
Tyrion: I don't have a choice. My father
Shae: Does not rule the world. We can still go across the Narrow Sea.
Tyrion: What would I do there? Juggle? I am a Lannister of Casterly
Rock.
Shae: And I'm Shae the funny whore.
Tyrion: My feelings for you have not changed. I will marry Sansa Stark
and do my duty by her.
Shae: While I empty her chamber pot and lick your cock when you're
bored?
Tyrion: I swear to you it will not be like that.
Shae: No? What will it be like?
Tyrion: I will buy you a good home somewhere in the city. You will
have fine clothes, guards to keep you safe, servants. Any children we
might have will be well provided for.
Shae: Children? You think I want children who can never see their
father? Who would be killed in their sleep if their grandfather found
out about them?
Tyrion: Listen. Listen to me, my lady.
Shae: I'm not your lady.
Tyrion: You are. You'll always be my lady.
Shae: I'm your whore. And when you are tired of fucking me, I will be
nothing.Season 3 Episode 7 - The bear and the maiden fair

Later Varys tried to pay her for leaving, she rejected the bag of diamonds and said if Tyrion wants her to leave, he can bloody well ask her himself.
Shae still harbored hopes and tried to seduce Tyrion at number of occasions, Tyrion always made some excuse, which only deepened the rift.
By that time, Shae's presence had been noted by Cersei. Growing anxious for Shae's safety, given Tywin's threat that he'd hang the next whore he found in Tyrion's bed, Tyrion decided it was time to break up for good and have Shae ferried to safety, whatever the cost. Tyrion was very cruel to her, even though he was just pretending to have her leave King's Landing, but it broke Shae's heart.

Shae: What's wrong, my lion?
Tyrion: Don't call me that.
Shae: What should I call you?
Tyrion: I'm afraid our friendship can't continue.
Shae: Our friendship?
Tyrion: There's a ship waiting in the harbor bound for Pentos.
Shae: What?
Tyrion: You'll have your own cabin, of course, and across the Narrow
Sea a house, servants.
Shae: What is this?
Tyrion: I'm a married man. My wife has suffered a great deal, as you
well know. I don't want her to suffer anymore on my account. I need to
uphold my vows.
Shae: She doesn't want you.
Tyrion: I need to do right by her.
Shae: You don't want her.
Tyrion: By our children.
Shae: What are you afraid of?
Tyrion: I'm not afraid.
Shae: You are. You are afraid of your father and your sister. You're
going to run from them all your life?
Tyrion: I need you to leave.
Shae: I'm not afraid of them. I'm not going to run.
Tyrion: Shae.
Shae: We will fight them together. It's like you said, I am yours and
you are mine.
Tyrion: You're a whore! Sansa is fit to bear my children and you are
not. I can't be in love with a whore. I can't have children with a
whore. How many men have you been with?
Shae: How many whores have you been with?
Tyrion: I have enjoyed my time with all of them and I have enjoyed my
time with you most of all. But now that time is over. You'll have a
comfortable life in Pentos. Bronn will escort you to your ship.Season 4 Episode 2 - The Lion and the Rose

So that was it, Tyrion confirmed it that for him she was just a whore and everything he said before was a lie and he was now going to enjoy his life with his new wife and sire children on her, which Shae was unfit for. Shae was now going to be what Tyrion thought she was, a whore. So she sold out.
Later, At Tyrion's trial, she scathingly threw it in Tyrion's teeth when he pleaded for her to stop.

Tyrion: Shae. Please don't.
Shae: I am a whore. Remember?Season 4 Episode 6 - The laws of Gods and Men

Conclusion

Shae did love Tyrion with all her heart.
Tyrion crushed her heart by calling her a whore and unfit to be the mother of his children.
Shae paid back, by selling out and being a whore.
It is a twisted, sad story. Both of them loved each other but both of them thought the other had betrayed them. Both tried to kill the other (Shae at trial, Tyrion in his father's chambers), Tyrion succeeded.
Comment: I used to trust Ageon and his answers, but to be honest I'm afraid due to recent developments that he may, in all honesty, know nothing. =)
Comment: @D.O.B.Y2.0 How great are the chances of that happening? *knock knock* "who are you, Dwarf?", "I am Tyrion Lannister, I want to meet Sealord of Bravos", "And I want to be the Sealord myself for all the good it does me, piss off." "But..." "That's it dwarf, Last Chance, run or suffer"....*waddles away*...."Oh look a dwarf, lets abduct him and sell him to a Circus".... *dies performing cartwheels*
Comment: Yes. In addition Tyrion seems 2b the '*i dont want to belong to any club that would accept me*' kind of person in his romantic relationships.
Comment: @D.O.B.Y2.0 He does have a point however that he is a Lannister of Casterly Rock. What is he supposed to do if he leaves that all behind? In that world, Dwarves are jugglers and entertainers, not the life a Lannister would like to live. He'd have Shae but whats the point of having her in your life if your life loses its meaning?
Comment: @D.O.B.Y2.0 Remember, he almost got sold into slavery on his way to meeting Daenerys, that too with help of Varys and everyone. If he went into self-exile, he would be all alone, with no money, no friends. How long would he last? And not just that, until then, even though his father disagreed vehemently, he was heir to Casterly Rock. He had a shot at real power rather than being someone's advisor at best, jester at worst. Not a lot of people would give up on that. Tyrion loves power, he enjoys it. Changing your core personality for someone never makes you happy
Comment: @MPelletier In the books their relationship is completely different, Shae is uninteresting and uninterested in anything except money and luxury. She repeatedly ignores Tyrion's commands, puts him in jeopardy by inviting a bard into her hideout, and has no issue with him marrying Sansa. In short, she had no emotional attachment to him, while he loved her, and killed her after she betrayed him at the trial.
Comment: @Aegon so youre saying outside of westeros he couldn't have found a person who'd appreciate his talents, and make him his/her advisor?  How it is called, a hand?
Comment: Hell hath no fury like a woman scorned.
Comment: @corsiKa Jaehaerys was still a better name :(
Comment: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/64811/discussion-between-aegon-and-d-o-b-y-2-0).
Comment: I remember (from the books) that Tyrion had specifically asked Shae not to reveal or mention their arrangement, and if she followed through she would be rich. In short, after that conversation, he wanted the full girlfriend experience.
Answer: Tywin or Cersei has got to Shae. She has no money or power in her own right, and is about to lose her only protector. Faced with threats and being a friendless whore in King's landing, she chooses to take the bribe and a ticket on a ship out of there.
Comment: She already had a ticket out of there....On three different occasions, she refused each time.
Answer: I agree. I think Tywin told Shea that he would send Tyrion to the wall if she lied at the trial.
I think once Tyrion demanded a trial by combat, that split moment of her face being afraid told the audience that she feared for his safety (if he lost) and her own if he won (because he would kill her)
Comment: Hi there. While this is a possible answer, it would be better if you oculd improve your post by adding some quotes and/or clips to back this up; you can do so with an [edit].
Answer: She loved him, but she felt scorned when he did what was necessary to save her life.  She refused to have his children (they would killed).  She didn't really trust him - always convinced he didn't love her but wanted Sansa instead.  She betrayed him for that (true or not).  She seemed to gladly go into Tywin's bed.  In the end, she drew a knife first and tried to kill him - maybe because she thought he came to kill her for her betrayal, but that is not why he was there.  Shae's inability to read the situation and trust Tyrion's love lead her down a fatal path that got her killed.
Answer: All Tywin had to do was tell her his plan of getting him found guilty and telling her that if she helped, he would spare Tyrion's life by sending him to the Black.  Simple.  She thought she was saving his life.


How do frame dragging affects a photon for outside observer?

Question: I remember an analogy that explained this phenomenon using magnetic field, a charged particle will experience a force next to another spinning charged particle or something like that. But I don't want to confused this with time dilation so what exactly do frame dragging do to a photon as seen by outside observer? Probe B experiment only seems to validate the existence of this phenomenon by looking for a precession from a gyroscope then what about a photon?
Answer: Indeed a central assertion of relatativistic physics is that any local setup will identify the same coordinate system as the local inertial coordinate system.
In terms of propagating electromagnetic waves the counterpart of a mechanical gyroscope is a ring laser gyroscope.
The operating principle of a ring laser gyro is the Sagnac effect.

There are small ring laser gyroscope designs that are used in aircrafts and ships to measure rotation rate.
Around the world there are a couple of stations where a large ring laser gyroscope is used to perform high resolution measurement of the Earth rotation rate.
These high performance instruments are sensitive enough to pick up ground motion due to earth quakes from all over the world.
The researchers also hope that over time the measurement accuracy can be increased to such a level that frame dragging can be corroborated.

Two examples:
At the geodesics observatory in Wettzell, Germany a square, 4 by 4 meter ring laser gyroscope is operated. (To my knowledge this facility is still in operation as of now, march 2021)
In 2015 the ROMY facility was built (ROMY, ROtational Motions in seismologY)
The ROMY facility has 4 triangular ring laser gyroscopes, arranged as a tetrahedron. These triangles have a perimeter of 20 meters.


which Keras accuracy metric for multiclass classification

Question: I am training a CNN for multiclass image classification into 4 images , what accuracy metric should i use from Keras. My labels are not one hot encoded as I am trying to predict probability of different images.
Comment: What do you mean that you have not one-hot encoded the labels because you want to predict the probabilities? Do you mean the outputs are probabilities instead of categories?
Comment: Yeah , the I want the outputs to be probabilities not a single class , I am working on an emotion classifier whose output I later want to feed to a recommendation algo , as a project , so based on the probabilities of the output emotions , I want to be able to suggest music
Answer: For multiclass classification you can simply use a categorical cross entropy loss function. Depending on whether or not the values are one-hot encoded you would have to use either the sparse categorical cross entropy loss or the normal categorical cross entropy loss.
Another option is f1_score which is a combination of precision_score and recall_score. Below is an implementation in keras which you can use:
from tensorflow.keras import backend as K

def f1(y_true, y_pred):
    def recall_m(y_true, y_pred):
        TP = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
        Positives = K.sum(K.round(K.clip(y_true, 0, 1)))

        recall = TP / (Positives+K.epsilon())
        return recall

    def precision_m(y_true, y_pred):
        TP = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
        Pred_Positives = K.sum(K.round(K.clip(y_pred, 0, 1)))

        precision = TP / (Pred_Positives+K.epsilon())
        return precision

    precision, recall = precision_m(y_true, y_pred), recall_m(y_true, y_pred)

    return 2*((precision*recall)/(precision+recall+K.epsilon()))

Answer: If you are predicting probabilities for each class, you can use the "categorical_crossentropy" loss function in Keras and set the "softmax" activation function on the output layer of your CNN.
Since your labels are not one-hot encoded, you can use the "sparse_categorical_accuracy" metric in Keras to evaluate the accuracy of your model. This metric will compare the predicted class probabilities to the actual class labels.
Here is an example code snippet:
from tensorflow import keras
model = keras.models.Sequential([
    # add your CNN layers here
    keras.layers.Dense(4, activation='softmax') # output layer with 4 classes and softmax activation
])

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['sparse_categorical_accuracy'])
Note that even though your labels are not one-hot encoded, Keras will automatically convert them to one-hot encoded format internally when using the "categorical_crossentropy" loss function.


Are lattice translations generated by crystal momentum or real momentum?

Question: Translation operator have the form
\begin{equation}
T_R = e^{i\frac{\hat{p}}{\hbar}\cdot R}
\end{equation}
and this can be easily proved, with $\hat{p}$ being the total momentum operator; but in mamy textbooks is stated that the generator for lattice translation is the Crystal momentum operator and that is not related in any way to the total momentum $\hat{p}$ (Ashcroft - Appendix M).
How can the lattice translation operator have two form different form?
Comment: The translation symmetry of a crystal is a discrete symmetry. Momentum is the generator of continuous translation symmetry.  Where did you get the above form for $T_R$?
Comment: If you apply $T_R=e^{i\frac{\textbf{p}}{\hbar}R}$ to a generic wave function you would obtain $\psi(r+R)$ but if you define $T_R=e^{i\frac{\textbf{K}}{\hbar}R}$, with $\textbf{K} \psi = \hbar k \psi$, and apply it to a generic wave function you also obtain $\psi(r+R)$ due to the Bloch Theorem; so i am a little confuse, which one Is the translation operator? My source  https://physics.stackexchange.com/questions/536039/conservation-of-crystal-momentum/552365?r=SearchResults#552365 and https://physics.stackexchange.com/questions/538516/unjustified-claim-in-kittel-about-bloch-functions
Answer: Strictly speaking, the crystal momentum operator is not a well-defined operator. This is because crystal momentum is only defined modulo reciprocal lattice vectors $\vec{G}$. It's better to think of the crystal momentum as a label for the eigenstates of the translation operator, which is indeed well-defined.
Usually, when people say a unitary transformation is "generated" by a Hermitian operator, what they have in mind is a continuous unitary transformation. But the lattice translations are a discrete group of unitary transformations, so it's not really appropriate to say they're "generated" by either momentum or crystal momentum.
Nevertheless, it's certainly true that the discrete translations are a subgroup of the continuous translations, and you can write them as
$$
T_{\vec{R}} = e^{i \vec{p} \cdot \vec{R} / \hbar}
$$
as you have done. Now you may ask: if you have an eigenstate of $T_{\vec{R}}$, is it an eigenstate of definite momentum, or of definite crystal momentum? Well, since momentum eigenstates with eigenvalues $\vec{p}$ and $\vec{p} + \hbar \vec{G}$ share the same eigenvalue for $T_{\vec{R}}$, you can superpose them to obtain a new eigenstate of $T_{\vec{R}}$. This is why people say that crystal momentum is not the same as real momentum: you can mix many different states with different momentum, so long as they all differ by reciprocal lattice vectors $\vec{G}$, and obtain a state with well-defined crystal momentum.
The final point I want to make: you say that crystal momentum and real momentum are in no way related. From the above discussion, this is clearly not true. You can think of the crystal momentum as an equivalence class of real momentum, where two momenta are related if they differ by a reciprocal lattice vector. The representatives of each equivalence class are those unique momenta belonging to the first Brillouin zone.
Comment: can you give any references to this answer ?
Comment: To which part in particular?
Comment: To your explanation.
Comment: Again, to which part of my explanation in particular? If you just want to know about crystal momentum in general, you can look at (for example) Ashcroft and Mermin.
Answer: Translation operator commutes with the energy, and with common eigenbasis, its eigenvalue is pure phase and doesn't incorporate the periodicity of the lattice.
To incorporate periodicity of lattice, we use Bloch wavefunction which has extra factor $u(x)$ multiplied to the translation operator and is periodic. But this wavefunction is not momentum eigenstate and therefore its eigenvalue is not the momentum, however it tells how the state transforms under translations.
"To see the mathematics regarding this, please have a look at Robert Eisberg book on Quantum Mechanics"
Comment: My question was about how it is possibile that $T_R=e^{i\frac{p}{\hbar}R}$ and at the same time $T_R=e^{i\frac{K}{\hbar}R}$ where K Is the Crystal momentum operator


What is the meaning of being politically monochrome?

Question: I recently read an article about how a state had become politically monochrome. I know what monochrome means. But I am unable to associate it with the phrase "Politically Monochrome"
Comment: "Politically monochrome" is far from being a common collocation. When I ran a Google search on it just now, I only obtained 68 hits, 22 of which all pointed to the same widely republished article from India titled "Why Gujarat has become politically monochrome is a mystery".
Comment: @ErikKowal : Yes, I was talking about that article.
Answer: Monochrome literally means "one color".
In politics, it's very common to call different parties by an identifying color. For example in the United States "Red states" typically vote Republican while "Blue states" typically vote Democrat.
In a state where one party (or multiple similarly minded, and therefore similarly "colored" parties) consistently wins a super majority or other political solidification of power, you would consider it to be of one color, or monochrome.
Answer: It may refer to the fact that in that specific country the main political party has won the majority of seats in a recent election , as a consequence   the country is now ruled by one single party. It refers also to countries that traditionally have been ruled by one large single party.

A dramatic but largely unacknowledged shift has recently taken place in how the past is understood in China. One way to think about this Chinese transformation is to see it as a sort of "colour revolution".
Answer: It means that there is a lack of diversity in political opinion or allegiance. There is little contrast to be found, as if everything was the same colour.


Hexagon packing in a circle

Question: Suppose I want to pack hexagons in a circle, as on the drawing below (red indicates "packed" hexagons).  I am wondering what is known about this problem. Specifically, I am interested in an approximation to how many fit (given the radius of the circle and the length of the side of the hexagon) and the error in such approximation.  Any ideas?
Comment: This problem is almost, but not quite, equivalent to http://mathoverflow.net/questions/109515/the-gauss-circle-problem-on-a-hexagonal-lattice
Comment: Vaguely related: [Gauss circle problem](http://en.wikipedia.org/wiki/Gauss_circle_problem)
Comment: You can look at the dual lattice - the [triangular lattice](http://paulscottinfo.ipage.com/polyhedra/compounds/duals_comps/dualtess.gif) and count points in there. Since you'll be working with triangles it should be easier to count overall. But it might become more difficult in the edge cases since there doesn't seem to be a neat one-to-one correspondence between triangles in the cirlce and hexagons in the circle.
Comment: Are you only considering packing on a tessellation like this, or are random/irregular packings also under consideration?
Comment: It depends on ratios of circle diameters and whether the placing is central. Here  $ r/R = 1/10 $ it seems.
Answer: Let us try to model the grid:

We have six base directions
$$
u_k = (x_k, y_k) = d (\cos k \pi/3, \sin k \pi/3) \quad (k\in \{0,\ldots,5\})
$$
where $d$ is the incircle diameter of a hexagon cell. Starting from the origin $(0,0)$ each cell can be reached by walking along one of the six directions, e.g.
$$
u = u_2 + 2u_5 - u_1 + 7u_2 + 2 u3 + \cdots
$$
This shrinks down to the integer multiples of two directions, because $u_3 =-u_0$ etc and $u_2 = u_1-u_0$:
$$
u = c_0 u_0 + c_1 u_1
$$
so we can use $(c_0,c_1)$ as coordinates for each cell.
The vertices of the center cell are
$$
v_k = D (\cos (2k+1) \pi/6, \sin (2k+1) \pi/6) \quad (k\in \{0,\ldots,5\})
$$
where $D$ is the diameter of the circumscribed circle. It relates to $d$ via:
$$
D = \frac{2}{\sqrt{3}} d
$$
We can describe every vertex via $(c_0,c_1,k)$, which is not injective.
Each vertex within the circle fulfills
$$
\lVert u + v_k \rVert \le R
$$
Here is an image where the red circles (except for the one around the center) have radius $r_c = (2k + 1) r$.

Here the hexagons were coloured the same, when they have the same circumscribed circle (these are the easy to calculate cases):

The number of black circles between red circles increases with increasing radius. This is because there are more discrete possibilities to position the hexagons.

So it is possibly a good idea to let a machine do the counting, it seems to get only more complicated, with the limit of continous radius possibility for large $r$.

Please take the above graphics with a grain of salt: The solid graph is $f(r) = \frac{A(r)}{A_H} = \frac{\pi r^2}{2 \sqrt{3}}$ which is the area of the circumscribed circle expressed in hexagon cells. Due to the gaps at the rim, the number of hexagons (dots) is less than this ideal number. However the dots with the hexagon count for that radius seem too low, I need to hunt the bug and provide a version with corrected numbers.
Comment: I used GeoGebra. For the images with many objects I made use of GeoGebra's JavaScript facilities.
Comment: Sorry, i've a question for you: what software have used for make it?
Answer: Posting the trivial estimates so that we can measure progress.
Assume that the side of the hexagon has length $1$, and that the radius of the circle is $r$. The area of a single hexagon is then $6\cdot\sqrt3/4=3\sqrt3/2$.
Let $N$ be the number of hexagons inside the circle. Their total area is less than that of the circle, so we get the inequality
$$
\frac{3\sqrt3 N}2<\pi r^2.
$$
On the other hand the hexagons cover the concentric circle of radius $r-2$ completely. Therefore we get another inequality
$$
\frac{3\sqrt3 N}2>\pi (r-2)^2.
$$
The midway point gives then the ballpark estimate of
$$
N\approx\frac{2\sqrt3\pi(r-1)^2}9
$$
together with the bound on the absolute value of the error
$$
|\Delta N|<\frac{4\sqrt3\pi r}9.
$$
The link by Chris Culter suggests that it may be possible to get an error term of order $r^{2/3}$. The problem considered there is about the number of lattice points, so it is not exactly equivalent.

Hexagon packing in a circle


Tried factory resetting my Macbook Air but won't erase disk

Question: I tried factory resetting my Macbook Air following a guide on Macworld, and the first thing I did I went to Disk Utility (in Recovery Mode) and erased Macintosh HD - Data, but now it won't let me erase Macintosh HD. It says that it couldn't be unmounted because it is in use by process 712 (kextcache). Tried unmounting and it won't let me either. What should I do? Right now i can't even book an appointment at the Genius Bar because of Covid.
Answer: Try erasing the entire drive, not just the volumes.
In Disk Utility, Hit  Cmd ⌘   2   (or see the View menu) to show Devices instead of just Volumes.  Select the overall drive you will now see over the volumes (now in a disclosure triangle instead of separate) and Erase that, GUID/APFS.
If you aren't following an internet recovery factory erase, here is the best one:

https://support.apple.com/en-us/HT204904

Click through to the erase portion.
Selecting the correct item in Disk Utility almost always gets an erase completed without reverting to the terminal app and command-line tools.  Also, Apple Support is now delivered almost entirely without Genius Bar visits.


how to express thank you to someone repeatdly help me?

Question: how to express thank you to someone repeatdly help me?
For example, a man frequently try to give some help to me so many times.
or my neighbor try to share/give their food to me.
So can I say "Thank you all the time"
Do you have a better idea or something natural in America?
Answer: Here's one simple and fairly common way to express your gratitude to someone who has been helping you a lot:

Thank you for all the things that you've done for me.

Or:

Thank you for all the things that you do for me.
Comment: But I don't understand why this one will be closed?
Comment: That also works. But the nuance here is that it sounds like you're thanking them for something that they do for your habitually. It really sounds like you two have a client/service provider relationship or something like that.
Comment: When I just write question, people insist more information, context or situation to answer it exactly or properly, so I've tried to explain it specifically..but you said it is based on opinon so it will be closed...? what do I do? Can you teach me how to ASK something I wonder?
Comment: It might get closed, it might not. I don't know. It sounds like a primarily opinion-based question because depending on who's answering it the answer every time is going to be different. However, (it just downed on me) if you make it a phrase request, then I think everything will be fine.
Comment: @이관우 On Stack Exchange, good questions are on-topic. The topic here is 'learning English', but your question is more about interpersonal interactions. The choice of language doesn't seem all that important, except for the bit about America at the end. If personal interaction is the focus of your question, try asking for the question to be migrated to [Interpersonal.SE]. (I don't have a problem with your question remaining open on ELL, by the way - I'm just addressing your comment above about "how to ASK something".)
Answer: People do say "thank you so much, for everything".  "thank you all the time" sounds awkward, though it does still convey the important thing -- that you're thanking someone strongly.


Export Bendy bone squishy deformation?

Question: I read that bendy bones cant be exported to other software, in my case Unity 3D. So people say you have to convert bendy bones to regular bones, then export it. Although i'm wondering if the "squishy" deformation you get with bendy bones able to be exported as well? In other words, the mesh deformation when you move bendy bones closer or further away, that is controlled with the volume settings in the stretch to modifier,
Answer: Strech to modifier simply acts on scaling the bone, so yes, it's exportable: in pose mode select all deforming bones, go to pose menu > animation > bake action, turn on all preferences, and bake. Then you can delete all non deforming bones and export a simple rig without modifiers with ease.

Export Bendy bone squishy deformation?


Why are Padawans of the same age trained together?

Question: In Episode 3, Yoda is teaching Padawans of roughly the same age: around 6. Is there a rule or principle that Jedi teach Padawans of the same age?
Comment: Correct me if I am wrong but the younglings are not padawans until they qualify and then learn under a master/knight?
Comment: Wasn't it Episode II?  Where Obi-Wan came in to ask about his "missing" planet? :)
Comment: Some of them were aliens, you dont know for sure they were anywhere near the same age. Maybe they're grouped based on height, so that no one accidentally cuts off anyone else's head.
Comment: You are correct, @Ancagalon, the younglings are called 'Jedi Initiates'.
Comment: why not? It sounds OK to me
Answer: Yoda is not teaching a class of Padawans but Younglings (Initiates).

As the Jedi were instructed in the ways of the Order and the Force, each member progressed through several different ranks. With the exception of Anakin Skywalker, prospective Jedi were identified a short time after birth by the quantity of midi-chlorians in their blood, a factor which indicated the level of a subject's Force-sensitivity. Training began at the level of the Jedi youngling; at some point in their training, younglings were expected to find their own Kyber crystal—the heart of the lightsaber, a distinctive and elegant weapon of the Jedi—in order to pass an ancient rite of passage known as The Gathering.
Younglings who succeeded in their trials graduated to the level of Padawan, the apprentice of a more experienced member of the Order such as the Jedi Knights and Jedi Masters. In accordance with the Jedi Code, a Master could instruct only one student in the ways of the Force at any given time.
Jedi Order - Wookieepedia

As implied, the order is divided in a specific hierarchical manner, starting from the Younglings before the Padawans:

Before the time came for a youngling to advance to a higher degree of education, Grand Master Yoda served as an instructor in the ways of the Force to all younglings in the course of his long career. In order to qualify for the rank of Padawan, younglings had to complete a series of tests—the Initiate Trials—in order to become apprenticed to more experienced Jedi such as Knights and Masters.
Jedi youngling - Wookieepedia
Answer: There is a well-defined logic behind taking children as Jedi.
The Jedi council prefers Jedi who do not have emotional attachments. Older children generally get attached to their family or even fall in love. This is the same reason the council was skeptical to have Anakin as a Jedi.
Now one would argue that Luke was much older when he went forth to become a Jedi. Well, for one he wasn't emotionally attached to anyone or anything, living on an isolated planet. Also, the Jedi council didn't exist so, no one cared.
Answer: There is a reasonably well upvoted non-canon answer here stating that it appears from the movies that Padawans start very young to prevent too many attachments to the lives they will leave behind. Given this, it would make sense for there to be a "beginner's" class for the younglings who have only recently been brought to the Jedi Temple.  Since they were always brought in at a young age, to have a group of more or less the same age seems logical.
The older Padawans would have quite likely been assigned to a Jedi Master to learn from "in the field", so to speak, and may not train specifically in the Jedi Temple any more.
Answer: It's a common form of pedagogy to train students of the same age under the presumption that they will all learn at the same rate. It stems from the design of the various municipal school systems which were born during the industrial revolution and children are treated as a manufactured product. No school will ever quite match the quality of an old fashioned one on one experience. However, there were many children to train and the Order had a lot of universe to police. Going this route allowed them to churn out Jedi at a more rapid rate.
However, one wonders how many of those students achieved any sort of real mastery over the force. Why are there so few masters? I believe much can be blamed on the educational system they had. Perhaps if there were fewer Jedi who were more individually trained, the whole thing would never have happened.
Now the Jedi clearly knew that they couldn't entirely stamp-manufacture Jedis, and as a result all of the basics of Force mastery were taught in classes. However, padawans were still required to go through an apprenticeship before they would be allowed to operate on their own, to make sure that they were all up to a minimum level of competence.


What does it mean for a wave to be fully transmitted?

Question: I have a misunderstanding concerning what it means for a wave to fully transmit from one medium to another. I will demonstrate.  Say we have a wave $\psi_1 =e^{i(kx-\omega t)}$. When it encounters a different medium some returns and some keeps on. Say the amplitude of the reflected wave is $R$ and that of the transmitted wave is $T$. Does full transmission mean $R=0$ or $T=1$? T can generally be $2$ in some cases. Does $R=0 \implies T=1$ but not the reverse or are the two equivalent? I know the energy transmitted is only proportional to $T^2$, but I'm not talking about energy transmission here, only about what are the conditions for a wave to fully go from one medium to another and what it implies.
Thank you!
Comment: In which cases can $T$ be $2$?
Answer: The confusion may have th eorigin in confusing the amplitude coefficients with the intensity coefficients.
The amplitude coefficients are ratios between the amplitudes of the waves (incident, reflected, transmited). For sound waves, for examples, these amplitudes can the acoustic pressures. We can call these coefficients R and T.
For normal incidence, the boundary condition is indeed T=R+1 and T can be close to 2 if R is close to 1. This happens when there is a very large impedance miss-match between the two media.
This is not contradicting anythig because the R and T don't describe energy transfer.
The ratios between intensities at the interface ($R_I$ and $T_I$) satisfy R+T=1 and the energy is conserved. Even though $T_I$ is indeed proportional to T^2, it is not equal to it. The intensity depends both on the amplitude and the impedance of the medium. For plane sound waves is $I=p^2/(2Z)$ where p is the amplitude of the pressure wave and Z is the impedance of the medium.
The condition R=1 and T=2 (aproximately) happens when the impedance of the second medium ($Z_2$) is much larger than of the first one ($Z_1$). Like sound going from air to water. You can easily see that if $Z_2>>Z_1$ then the transmitted intensity is negligible even though the amplitude of the transmited wave may be twice the one of the reflected wave.
Now getting to total transmission, this happens at a specific value of the incident angle (intromission angle) and only for specific relationships between the impedances and densities of the two media. When this happens both R and $R_I$ are zero. And the transmission coefficient is $T_I=1$. And so is T.
The total transmission does not happen at normal incidence so the relation R+1=T does not apply at the intromissin angle.


Embedding a lightweight web server into a .net application (node.js)?

Question: I have a project built with Awesomium built in .NET and it requires the use of Flash. Flash throws security errors trying to access local content (video player) and the solution(s) Awesomium offers have not been ported to the .NET wrapper yet. I'm wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there.
Any ideas?
Comment: So you're trying to get a flash player to load local content? Would adding something to the hosts file allow you to work around that?
Answer: NHttp provides an HTTP server with request parsing, but you have to roll your own responses.  There's also Kayak, and the framework's own HttpListener.
Nancy is a full MVC framework, supports the ASP.NET Razor syntax, and has lots of options for configuration and extensibility.  There's a self-host package available on nuget.
If you just need to serve up a SWF file and some JSON data, the first set would probably be simpler to integrate -- if you need to render full web pages, I would recommend Nancy.
Answer: Here's another alternative I wrote last year and and has served me well.
EmbedIO: https://github.com/unosquare/embedio
I use it mostly to create RESTful services on the Raspberry Pi (soft-float).
Updated code for Mono 3.10, support for WebSockets, and Asynchronous handling of requests.
NuGet Package also available.
Answer: I'm guessing this is Windows.. You don't (or shouldn't) need to use a web server. If you create a cfg file, doesn't matter what it's called, in this directory:
%appdata%\Macromedia\Flash Player#Security\FlashPlayerTrust
And put a single line in it containing the path to the folder you want to trust then Flash will load local resources without security issues. You can delete the file again when you shutdown (this is what we do).
Same principal on other platforms, just the location of that FlashPlayerTrust folder is different.
Comment: Thank you! I was using Awesomium to screen capture a web page and the Flash security window kept opening and halting the operation of the program. This was a tremendous help.
Answer: For ASP.Net MVC (and other) self-hosting You can use OWIN implementations:

Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applications. OWIN decouples the web application from the server, which makes OWIN ideal for self-hosting a web application in your own process, outside of IIS.

Here you can find a simple example with WebAPI.
Comment: Be aware: OWIN requires elevation to install or even run a web server.  It's impossible (AFAIK) to have a portable-style OWIN server.  IMO this is a ridiculous constraint for a generic web server.
Answer: If you need a little ASP.NET on the server side, use Mono.WebServer and Mono.WebServer.XSP.
Here:
https://github.com/mono/xsp/tree/master/src
Else, you can use uhttpsharp:
https://github.com/raistlinthewiz/uhttpsharp
Or you can use "webserver" from codeplex:
http://webserver.codeplex.com/
Or more heavyweight, Cassini:
https://cassinidev.codeplex.com/
Answer: I appears as though you can play local flash content as long as the content is set to be trusted.
What is Flash Player security for local content?

Local content can be designated as trusted so that it is not interrupted by this dialog box and is allowed to function as designed. This trust must be explicitly designated in one of two ways.

By running a software installation program in which the content in the application you install is already registered as trusted. When you run an installation program, you are explicitly allowing a program to be installed on your computer. Thus, the publisher of the application can automatically register the content with Flash Player as trusted.

By adding specific content or directories to a list of trusted files, through the Global Security Settings panel in the Flash Player Settings Manager. In this panel, you can designate specific content or even directories as trusted by manually registering locations with Flash Player. For step-by-step instructions on how to designate content as trusted, see the TechNote: How do I let local Flash content communicate with the Internet?
Answer: If you would like to take advantage of HTTP2 ability to stream content efficiently, you can also use GRPC to embed an HTTP2 server.
See:
https://grpc.io/docs/quickstart/csharp.html


Foundation spalling repair

Question: I was hoping to get more opinions on the spalling on my post tension concrete foundation. I was wondering if I can just patch this up with some quikrete myself or if I should have a professional clean out and reinforce this area. (Was quoted $3500). It's a 2 story home in California. pictures
Comment: Some photo would be helpfull
Comment: Why is that concrete pulverized like that? Was it cracking, followed by you digging out all of the loose material? It looks like the concrete might not have had the bearing strength to deal with the pressure from the PT cable.
Comment: Is that cable's end just floating in the air? Or is there some concrete that is still somehow holding the cable's tension. If it's a 1/2" cable like is common in residential construction, then that cable had 43,000 pounds of tension in it when installed.
Comment: Did you accidentally cut the cable? I've never seen the corresponding damage, but I imagine that the energy released from a snapped post tension cable could have caused this damage. Is there analogous damage at the other end? If the cut was near the other end (or the cable broke free of its wedge at the other end), then less of the strain energy would have gone to that end.
Answer: Every 10 feet of post tension cable has about 1 inch of stretch in it:
(0.80)(275ksi)(1in/in/29000ksi)(10ft)(12in/ft) = 0.9 in
As the end of that post tension cable moves, your post tension cable is losing its stretch, which will make your slab more prone to cracking.
Best you can do at this point is fill the gap with a material with good compressive strength that isn't going to shrink. Looking at a "water stop" branded Quikrete hydraulic cement, I see a 7 day compressive strength of 4500psi. That sounds excellent.
Now that the post tension cable is patched up, the hydraulic cement is also a good product for patching the spalled concrete. Some latex bonding agent couldn't hurt. Once the cement has dried, then paint it for protection from moisture.

Foundation spalling repair


Mask Keyframes not showing in graph editor

Question: Blender has a masking system which is available in both the Image Editor and the Movie clip editor. The issue however is that when you add key frames to the mask, it shows up on the dopesheet but not in the graph editor. Is there a fix for this or we'd have to frame by frame the masks to get what we want.
Answer: Sadly there is very pour support for mask's control points  animation.
The only one place to access mask's keyframes is in the Dope Sheet in the Mask category.
Comment: Could you show where? Perhaps post a few screenshots illustrating it


How to move documents from SharePoint 2003 to SharePoint 2007 with versioning?

Question: I'm desperately searching for a tool allowing me to copy documents with their old versions from a SharePoint 2003 to a SharePoint 2007 site.
Do you know about any simple (and preferably free) tool which does this?
Comment: I've got the same 401 Unauthorized response. I wonder what your config was like? Are you using the web services to accomplish this or what?
Answer: This may be too late for you, but I needed to migrate from a SharePoint 2003 site to a SharePoint 2007 site and keep not only versions, but also the file metadata from all of the document libraries. The official methods of migrating or upgrading failed, so I ended up writing a tool that must run on the destination SharePoint 2007 server, but can copy from the 2003 server all lists and document libraries with metadata and version intact. It's available with source at http://sourceforge.net/projects/splistcp so feel free to use and improve it.
Comment: Wow, this program is sorely needed. Great!
Comment: will this tool migrate user alerts that exist on a document library/list, as well as metadata (created/modified, etc.)?
Comment: I don't think so, I'd guess that user alerts are part of the MySite feature, rather than part of the list data.
Answer: We recently did a migration from SPS 2003 to MOSS 2007, and I was trying to figure out how to do this. Sadly, there didn't seem to be a great way. What I ended up doing was using a back up of my SPS 2003 content database and a MOSS 2007 VM to do a database attach upgrade of the whole SPS 2003 portal. Then, I used the content migration commands (stsadm -o export, stsadm -o import) to move the lists with all of their versions to the "real" MOSS 2007 site collection.
This page gave me the steps for doing the database migration.
There are also some nice commands you can potentially use for moving just a list here. For the record, the migration commands (e.g. gl-exportlist, gl-importlist) only work between two MOSS 2007 installations.
I definitely had to try it both with the stsadm extensions and the built-in commands a couple of times before the results were acceptable. The real key was doing the database migration to a VM to get everything into MOSS so I could use those tools.
I know this seems like a crazy amount of work, but it's the only way I found to get it done without dropping thousands of dollars for something like AvePoint's DocAve Migrators. And it really wasn't that bad.
One thing to watch out for is that, if you include user security when you do the export and import, you will get a lot of SharePoint groups and users added to your production site collection.
Answer: the splistcp worked really well, but I was getting a time out error every once in a while when it was trying to move a file.  I was getting a time out message, then a message that file couldn't be found, then the program just quit. I downloaded the source code, found in MBSPListItemsMap.cs where the program was trying to get the file.
I added a finally block below the the catch code around line 620 to write to consule to telling me what the system is doing:
<code>                         ` catch (Exception e)
                        {
                            Console.WriteLine(e.Message);
                            bDownloadError = true;
                        }
                        finally
                        {
                            if (bDownloadError)
                            {
                                Console.WriteLine("Error in downloading file: " + fileName);
                                Console.WriteLine("Moving to next file");
                            }

                        }
                        if (!bDownloadError)
                        {
                            if (Program.beVerbose)
                            {
                                Console.WriteLine("Attaching " + fileName);
                            }
                            byte[] fileContents = MBSPSiteMap.ByteArrayFromFilePath(downloadPath);
                            newItem.Attachments.Add(fileName, fileContents);
                            File.Delete(downloadPath);
                        } `
</code>
I also added some Console.WriteLine statements else where to let me know what the system is doing.  Otherwise the system just chuggs along and you don't have a very good indicator of what it is doing.
This program was a great help as I had to move 770 records with about 20 columns of information and several attachments.
THANKS MICHAEL!!!!


How does quantcast determine values in metrics like "percent of site visitors with a master's degree"?

Question: I recently started using Quantcast on my site to determine my audience (which, really the site is so small now that I already know).  When I look at some of the metrics on Quantcast, I see gender, education level, etc.  How does quantcast determine these?  Are they relatively accurate (I'm sure they are more accurate for a large site with more data to draw from).  Does it determine this from tracking IPs across my site and others?  What's going on that gives them enough data to even begin to give a metric on something like education level?
Answer: Like this : http://www.quantcast.com/how-we-do-it
Comment: Ahh, helps looking at the menu, haha.  Thanks, Dominique!


Would a Canon 60Da make a good first dSLR for me, as a previous Canon SLR film shooter?

Question: I have recently returned to photography, having bought a Canon EOS 60Da with 55-250mm zoom, a wide angle lens, and the standard 50mm.  I've never owned a digital camera before; the last (best) SLRs I owned were a Canon AE1 and AV1, and I was wondering how you rate the Canon 60Da. It's not a camera I would have particularly gone out and bought, but a friend's uncle passed away and I was offered the camera and accessories at a very reasonable £250.
Comment: See: ["Do I need a filter to use my Canon EOS 60Da for daylight photography?"](http://photo.stackexchange.com/questions/52779) for one reason why the answer could be "no."
Answer: I shot with an AE-1 for several years, and now use a 60D exclusively.
The main difference between a "normal" 60D and your 60Da is that the internal infrared filter on your camera has been removed so the camera may be used for astrophotography (hence the "a"). Other than that, the 60D and 60Da are the same. For more info on the Da model, see Do I need a filter to use my Canon EOS 60Da for daylight photography?
My understanding is that the auto white balance will not be correct with the 60Da, so you will see color shifts. If you are not going to use the camera for deep-sky astrophotography or infrared photography, you might do better to sell it and purchase a used 60D instead (probably profitable) since this is your first DSLR. However, if you shoot in RAW format, you can correct most white balance issues in post-production - your computer is now your darkroom.
Since you already know the basics of photography, I believe you will find this machine to be a heck of a lot of fun. With digital photography you don't have to worry about developing film, so shoot as much as your SD card can carry, and you aren't stuck with one film speed. The setting for sensitivity is ISO, which is the same scale as film - it starts at 100 and can get as high as 12,800 on this camera, but I wouldn't recommend going past 3200.
This camera has a "crop" sensor, meaning the sensor is smaller than a single 35mm frame, so the lenses you have will be different from the AE-1 or AV-1. Multiply by 1.6x to get the 35mm equivalent. For example, a 50mm lens will have the same coverage as an 80mm lens would have on an AE-1.
I suggest you ignore the "idiot-proof" settings, the flower etc, and start by setting the camera to Av. That is aperture priority, similar to your AV-1. You can use the dial nearest your right forefinger to change the aperture and the camera will control the shutter speed, and the ISO if it is set to auto. You can use the dial on the back with your thumb to set exposure compensation up to 3 stops in either direction.
The Tv setting is shutter priority, with the same logic, and of course M is manual - you control both shutter and aperture manually using the finger dial and the thumb dial on the back.
One tip - if the 50mm is the f/1.4 version, you will find it sharpest and with least chromatic aberration stopped down to f/2 or smaller, but it is a dreamy portrait lens at 1.4.
Definitely read the manual cover to cover, and have fun! You got a fantastic deal - essentially getting all that glass for free - and I predict it will renew your interest in photography completely.


Where to get the tickets I booked online?

Question: I have booked two tickets online. The tickets are to fly from China to Dubai and from Dubai to Afghanistan. Where can I fetch both of these tickets from?
Comment: Welcome to TSE. It's not very clear what you are asking; paper tickets have not existed for international travel for a number of years. If you have your ticket number, there is nothing for you to "fetch" until you obtain your boarding passes on the day of travel. If you do not have a ticket number or reservation code, you would need to ask the airline or whomever you booked your tickets from to provide them.
Comment: [Apropos paper tickets](https://travel.stackexchange.com/q/57939/2509)
Comment: We're not talking about SRH-NDL here.
Comment: Two questions: 1) Did you book from the airline, or from a travel agency? 2) Did you book a regular flight, or is it a chattered flight (like "tour group")?
Comment: I booked it from a travel agency and it is a regular flight
Comment: What airline are you flying on?
Answer: Paper airline tickets are pretty much a thing of the past, replaced by electronic, paperless systems. When you made your flight arrangements, you will have been given confirmation details, usually a combination of numbers and letters, along with your identifying information (name, or surname).
Using that, you go to the airline(s) web site to check in for the flight(s), generally 24-hours before departure, enter your information, and the database will retrieve your flight record, confirm that you've checked in, and lets you print a boarding pass. You can also check in at the airport, either at a kiosk using the confirmation number, or at the counter by showing your government issued ID card or passport.
As you booked through an agency, contact it now if you don't have what you need to check in correctly, and easily, when the time comes to travel.
Answer: This sounds confusing but when you book online you are issued a ticket and given a ticket number to identify it, although you may never actually see a paper ticket.
Often with that ticket number, which is usually a series of numbers, technically called e-ticket number since it refers to an electronic ticket, you can access information regarding the reservation through the website of the airline. It is often possible to print from there an e-ticket receipt which can serve to show that you are indeed traveling, even though it is not really needed since they airline will lookup your info at check-in time using your passport (or other valid national ID for domestic flights).
After booking, online or in-person, you are also almost always given a Booking Reference which is a code of numbers and letters. That is the most common way to look up reservations and it may refer to a number of tickets if you booked several at once (either for several flights, for several people or both).
Answer: If you have a smartphone, then you can use your airline's app. This will show the ticket details. There will be a QR or other bar code. This will let you get through security, and boarding.
If you don't have a smartphone, then you should have received an email that contains a PDF. You print this out, and use it for security and boarding.
You can also log into your airline's website, and download the PDF ticket from there.
In all cases, there will be one ticket for your outbound flight, and a second for the return.
Comment: You seem to be confusing tickets with boarding passes.
Comment: Get a paper boarding pass if at all possible.  More than once I have seen gate scanners unable to read the patterns from a smartphone or tablet.


Set cluster core per rule in Snakemake

Question: I need to download hundreds of large files, and run each of them through my snakemake pipeline. The file download is fast compared to my downstream pipeline. I'd like to limit the number of parallel downloads to 5, but allow the downsteam processing to use 100 cores. In snakemake, is there a way to limit the number of cores used by a certain rule? I picture 5 cores constantly grabbing data, while my other cores are working on the data I've already downloaded. If I run snakemake as usual with 100 cores, it will try to download all files at once, and overload the server.
I already tried to do it by adding 'threads:1' to the rule but It does not work as it is supposed to. I suppose that by adding 'threads:1' to the rule, it should return the same results as when '-j 1' option is used in the command line for that rule, but they return different results.
Answer: You can use resources to limit how many rules can run in parallel. You can name the resources as you please, see resources documentation. Here is an example using the name download_streams.
Snakefile:
rule r1:
    output: touch("{field}.txt")
    resources: download_streams=1
    shell:
        "sleep 2; "
        "echo $(date '+%H:%M:%S') Finished downloading {output}"

Running snakemake  download_{1..10}.txt --resources download_streams=2 -j 10 > log.txt gives the following in log.txt
12:00:58 Finished downloading download_1.txt
12:00:58 Finished downloading download_5.txt
12:01:00 Finished downloading download_6.txt
12:01:00 Finished downloading download_8.txt
12:01:02 Finished downloading download_9.txt
12:01:02 Finished downloading download_10.txt
12:01:04 Finished downloading download_3.txt
12:01:04 Finished downloading download_2.txt
12:01:06 Finished downloading download_4.txt
12:01:06 Finished downloading download_7.txt

Comment: You misunderstand what thread does. It tells snakemake how many cores an instance of a rule will use. By setting threads to 1, you tell snakemake that it can run up to 100 instances of this rule in parallel (with --job 100). If you want to limit how many instances of each rule can be run in parallel, you have to use a unique ressource for each rule.
Comment: Thanks for the answer. It works but it is very unintuitive. First, The 'Threads' option bases on its description is clearly designed for the purpose of limiting the number of available cores for that rule. Why it does not work as it is supposed to? and Second, with resources, how snakemake figure out whether by resources we mean number of cores or available memory, just by the difference in the values??

Set cluster core per rule in Snakemake


Alien movie where some of the aliens were previously abducted kids

Question: I remember watching a movie where, in the beginning, the government gave a seven kids or so to aliens in a UFO. In the midst of the abduction, one runs away and escapes abduction. I don't recall too much of the plot but at one point there is an scene where people have an alien behind a piece of glass, but they are unable to see it because of green smoke. The people try to talk to it and it is angered and bangs a crablike appendage against the glass. Eventually one of them goes into the room where the alien is and discovers that it is actually a previously abducted child (Lumier, I think) who is hooked up to a machine and fed drugs by the abductor aliens. This may be another movie but I think at one point kids start repeating numbers which signify how many children the aliens want to abduct.
Answer: Could this be Torchwood: Children of Earth?

The plot of Children of Earth deals with aliens demanding the Earth's
children, and a related earlier conspiracy 40 years ago; as such,
Torchwood is pitted against the British government when the government
attempts to conceal its past actions and concede to the present-day
aliens' demands.

You can see the scene you're referring to below.
Comment: All the details add up to this, except that the children are basically the source of the drugs that the aliens in the box are consuming. That's why they want them - so they can provide them to others of their kind. They're basically drug dealers trying to re-up their supply, and scaring the shit out of the people of Earth into doing it.


what is (LLVM Clang) ? is it software to code in objective c?

Question: I want to know what is clang is it a software that I install on my Linux then be able to code on objective c .
if yes how I tried downloading it but couldn't find any answers there is not even youtube videos it is like unknown.Any suggestions?
Comment: So you prefer YouTube search instead of google search, eh?
Answer: Forget the term "LLVM". You can indeed install the Clang compiler and use it to compile Objective-C. Example, on Ubuntu:
<code>> sudo apt-get install clang
> clang myfile.m
</code>
Clang is a C, C++ and Objective-C compiler. It's a part of the LLVM collection of projects, and uses other parts extensively, which explains why you also heard the term "LLVM". As an end-user, though, you shouldn't care - just install and use it.
I'm also guessing you will be interested in this answer on how to get some basic library to work with.


git archive including uncommitted modified files

Question: so git archive --format=tar HEAD will give me a tar archive of the latest commit on the current branch. Is there a version that would include local modifications to tracked files that have not yet been committed?
Comment: You could always just make a commit, export your archive, then do a mixed reset back to the previous commit to restore your working copy to the same state it was in before you committed.
Answer: The git way is to commit everything. Remember, branches are cheap.
git checkout -b intermediate-releases/20140414
git commit -m 'Wibble wobble wubble'

Then restore your working copy — I don't know to do that reliably but I'm sure there's a way. Now you can make an archive of the new branch's tip:
git archive intermediate-releases/20140414 | gzip >20140414.tgz

If you really don't want to keep track of that archive (but why not?), you could make a stash, which has the advantage of making it really easy to restore the working copy.
git stash
git archive 'stash@{0}' | gzip >whatever.tgz
git stash pop

If you absolutely don't want to make any change to the working copy, you can use git ls-files to retrieve the list of files and archive these.
git ls-files HEAD | tar -czf whaterver.tgz -T -


Is there a way to limit line width in Gmail?

Question: I'd like my Gmail editor to enforce a maximum line width for emails I'm composing, say 70 or 80 chars.  Is there a way to do this?  Perhaps with a Chrome extension?
Comment: This is the default behavior of their native BlackBerry App.
Answer: Actually, Gmail does this automatically, but it only does it in plain-text messages. Turn off Rich Formatting in your message and it'll be wrapped to ~80 characters before it's sent.
Comment: Maybe at one point. Seems like it wraps at 120 now.
Answer: It doesn't look like there's any such tool out there.
Your most viable option is to use a text editor to compose your message and then paste it into a Gmail message. This might be helpful: How can I add line breaks to a text file?
Answer: You can install a browser extension that let's you define custom CSS, then add this rule:
<code>.ii.gt {
  max-width: 430px;
}
</code>
There's a blog post by a software engineer that details how he did it for the Chrome browser.
Answer: If you are a Firefox user you can have line wrapping and many other editing and formatting features by simply using Thunderbird as your user client. You can have that and still use gmail as your email system.  It will even provides utilities for backing up and restoring messages.  Check out elegant user-designed free software at Mozzila.org.
correte


Does counter-rotating propellers on multi engine airplanes have critical engine?

Question: I read from most of the article and books that counter-rotating propellers multi engine airplanes do not have critical engine, but it just happened to my friend who did his Commercial Multi Engine Rating check-ride that he answered there is no critical engine on counter-rotating propellers and the examiners failed him.
And one of the instructor said that he should answered both engines are equally critical.
 is there any terms that stated that counter-rotating  propellers has both engione critical?
Comment: It's just a matter of semantics.  "There is no critical engine" simply means that neither engine is more, or less, critical than the other.  Which is the same thing as saying "both engines are equally critical."  This is a talking point to clarify during the exam, not failure criteria.  I would file a complaint about this if it was the only reason for failing...
Answer: The term "critical engine" can actually refer to two very different factors:

P Factor
Engine driven accessories, depending on the airplane and how it's configured.

A twin with counter-rotating propellers doesn't have a critical engine from a controlability perspective, but very often there are important engine driven accessories, like hydraulic pumps, vacuum pumps, generators, etc. that are only installed on one engine, and if you lose that engine, well it's more of a problem than the other one.
So you may lose the left engine and it has no effect on control or performance compared to the right, but that engine has the only hydraulic pump, so now you have to do the engine-failure-on-a-missed-approach song and dance, all while hand pumping the gear up.  Gets pretty busy.  In such a situation I'd consider the left engine more critical than the right one even though it's not a stick-and-rudder problem.
I think that's what the examiner was looking for.
Comment: Excellent points, I didn't consider that in my comment above.  Perhaps there is more to the story on this particular exam failure...  Still, you would think the examiner would have explained this to the examinee as the specific reason for failing.
Comment: Yes agreed thanks.  I think part of the problem is students are learning on newer twins with dual everything and are unaware that there are older twins with single accessories that create that situation.  My fav is the B-24, which only had one hydraulic pump, on engine #3.  Shutdown that, and you lose your gear hydraulics and your brakes.  They had a procedure where the waist gunners would hook their parachute harnesses to the waist gun pintle mounts or some other convenient structure and deploy them on landing to help slow down.
Answer: As an addition to John K's answer - There are twins that have propellers on both sides rotating 'outwards', thus both are critical aerodynamically.
Of course another possible answer is the critical engine is the one that that is still running after one of them fails.


EF Code First CTP5. How to store the Inheritated data from a baseclas

Question: I have a User class that holds some default data.
<code>   public class User : BaseEntity
    {
        //-- Declaration
        private string _firstname;
        private string _lastname;
        private ICollection<BaseProfile> _profiles = new List<BaseProfile>();

        //-- Constructor
        public User() { }

        //-- Properties
        public string Firstname
        {
            get { return _firstname; }
            set { _firstname = value; base.Name = string.Format("{0} {1}", this.Firstname, this.Lastname); }
        }
        public string Lastname
        {
            get { return _lastname; }
            set { _lastname = value; base.Name = string.Format("{0} {1}", this.Firstname, this.Lastname); }
        }
        public EMailAddress EmailAddress { get; set; }
        public SocialSecurityNumber SocialSecurityNumber { get; set; }
        public Password Password { get; set; }
        public virtual ICollection<BaseProfile> Profiles { get { return _profiles; } set{_profiles = value; }}
    }
</code>
The Profiles contains diffrent Profiles data based on diffrent profiles the user can have. If the user is a player, then Profiles will contain of a ProfilePlayer clas, if the user would be a Trainer it will contain a ProfileTrainer class. And if the User is a Player and a Trainer it will contain 2 profiles, one ProfilePlayer Class and one ProfileTrainer class. This profile classes would contain information specified for the diffrent profiles the user could be.
Now to my question, how can I tell the EF that it should save the diffrent BaseProfiles as the specified types, cause when EF is createing the databas for me, it's created as a BaseProfiles even if the "real" type is ProfilePlayer class. Do I need to manually create the diffrent tables and then do some mapping or is there a simple way to tell EF to create the diffrent profilesclasses and to save the baseprofiles data into correct table?
Comment: Are you using inheritance for the profile class?
Comment: Yes, my ProfilePlayer, ProfileTrainer are all inheriting the BaseProfiler.
Answer: I did find the solution to my problem.
<code>    modelBuilder.Entity<Domain.BaseProfile>()
        .Map<Domain.Model.ProfilePlayer>(p => p.Requires("Discriminator").HasValue("ProfilePlayer"))
        .Map<Domain.Model.ProfileTrainer>(p => p.Requires("Discriminator").HasValue("ProfileTrainer"));
</code>


Is using the term "What can I do you for" workplace appropriate?

Question: I've been watching Cheers, and in season 5, episode 1, Frasier says "Sure, Sam, what can I do you for?" I was taken aback, as I hadn't heard that phrase before. I did some research regarding the phrase, and it appears that the phrase is appropriate to use among friends, but among strangers it could potentially imply a nefarious undertone. In light of this, would it be appropriate to use this term among coworkers at work that you've gone out for drinks with, or would it be inappropriate in the workplace regardless?
Answer: As noted in the linked answers, it is a playful inversion of the words "for you".
I don't want to over analyse this one line. But Fraiser is both a customer and a friend of Sam. The tone is relaxed.
You surely could say it with colleagues that you've gone for drinks with. That's a relaxed social context.  But remember that a learner may be treated differently from a native speaker.  It is a deliberate "mistake". If a learner produces this mistake, one could assume it is an error and not a deliberate piece of playfulness.
Answer: From my experience, "what can I do you for" is much too informal when speaking with your boss / clients. Also, I find it creepy to say it to a complete stranger. However, it is very welcoming when you say it to a buddy. Have a good day.


Can process be killed during System Call?

Question: Let's assume that we have some really time consuming system call that is currently executing in kernel mode under the context of current user-space process, during the execution of such a system call the SIGKILL is sent to user process. What will happen in this case - would the process be killed immediately or it will wait till the end of system call ? if the process is killed immediately then does the same applies for the case when the user space process is killed while its executing interrupt handler(since interrupt handlers can be executed within the context of an arbitrary user-space process), because this sounds really weird - really important interrupt handler job my be aborted.
Comment: Don't confuse interrupt handlers, which react to an event triggered by hardware (clock, IO completion, ...), with signals, which are triggered by code.
Answer: Some system calls can be interrupted (see e.g. siginterrupt(3)). Otherwise the signal is only delivered when the call returns to userland.
Answer: An example for a really time-consuming system call is pause(). It never completes, except when the process receives a signal.
read() can be interruptable (a better term would be "signalable"), e.g. when reading from a serial line, or not, e.g. when reading from a block device.
Why? The original UNIX logic is as follows: We don't know if any input will be available at the serial line. Therefore, there must be a way to end the system call even if nothing is input. On the other hand, reading from a block device will always complete, possibly with an error when the disk is faulty.
UNIX has evolved a lot. Nowadays, non-interruptable read()s are possible that never complete. Example: Reading from an NFS-mounted filesystem when the NFS server is down and the mount is hard.
Answer: True interrupt handlers are in the kernel, and not really associated with a user process.   Signal handlers are the closest thing a user process has to an interrupt handler.  Some signals are blocked during signal handlers, but SIGKILL is not one of them, so it would exit immediately, just like it would for any other user code.
Answer: A signal can only be delivered when a return to user mode (i.e. exit from kernel mode) is executed and it is your process scheduled to run (usually a privileged assembly instruction that restores the process context and may or may not set user mode, depending whether your process was within a system call or not) - this can be when a system call returns, or when an interrupt handler returns.
To answer your specific questions, it will wait until the end of the system call (which may or may not be interruptible), and if an interrupt handler returns (after completing all of it's work) to your process (i.e. it returns to kernel mode not user mode), the signal won't be delivered until your process subsequently returns from the system call (i.e. to user mode).
If the system call was interrupted (returns EINTR) and is "restartable", the user code supporting the system call interface may choose to automatically reenter the system call without returning to your user code, after your signal handler has run.
Also check this out ...
Finally, the implication here is that a signal may never be delivered to a process, including SIGKILL, if the process never returns from a system call (resulting in an "unkillable" process).


FFX HD Remaster on Vita: VICTORIOUS password not working

Question: I am playing on my PS Vita FFX HD Remaster (Italian language).
I got the airship and using the Password system I managed to unlock on the first try the Murasame area through the use of "MURASAME" password.
For the God Hand I had issues, guides stated the password was GODHAND but what worked was GOD HAND.
Now I can't seem to find a suitable replacement for VICTORIOUS, since it's not working. Any idea?
Comment: I don't have the answer or the ability to check it for a while, but those passwords came from [deciphering clues](http://chaos2.org/ff/ff10/passwords.shtml). If the password doesn't work, could you maybe try checking if the clues have changed? The VICTORIOUS password came from the blue stones at Kilika and Bikanel (alternate letters from each stone) so I would start by checking those stones.
Comment: The original passwords worked fine for me in the PS3 version. Are you sure you are spelling it correctly etc?
Comment: Of course. I tried it several times. GODHAND wouldn't work, but GOD HAND did. As for the other one...no luck.
Answer: Have you tried "VICTORIAS" instead? According to this post, some versions of the game have different passwords/spellings:

Some versions (like Italian/spanish) have different passwords than the English versions. For example, in the Italian version, the password for Rikku's weapon is VICTORIAS.
Comment: Thanks it worked like a charm (though VICTORIAS isn't an italian word!).


What is Captain Janeway's educational background?

Question: What did Captain Janeway specialize in at the academy? If no specialization is known, what is known about her education at the academy?
Answer: The only conclusions we can draw are that Janeway had a passion for science, and studied enough of it to be posted as a Science Officer. She maintained that interest as a Starfleet Captain.
I always got the impression that, while Janeway was a Starfleet officer through and through, she thought of herself as a scientist. Her Memory Alpha entry tells us that, yes, her father raised her to be a skeptic, and to look at the world as a scientist would. It also says that, before serving on Voyager, Janeway posted as science officer on more than one occasion.
Janeway had no particular specialty at the academy; what we know of her academy years tells us about her as a person but is not particularly illuminating in terms of her specialty.
But watching the show, one will notice many times that Captain Janeway can pick up on scientific concepts quite easily. And there are several times that she works on a thorny scientific or engineering issue on her own. In the episode The Omega Directive, Tuvok calls Janeway "a woman of science".
So while her background may not include a formal scientific or engineering specialty, she certainly has the aptitude for these fields.
Comment: Yes, that last paragraph is what prompted my question. She just seemed to know things that Picard would have had to ask Data or Geordi.
Answer: According to Memory Alpha

"When she was a cadet in Starfleet Academy she had a close relationship with Boothby, who brought fresh roses to her quarters
  each morning. She also enjoyed spending her time at a little coffee
  shop on Market Street known as the Night Owl. (VOY: "In the Flesh")
  Her love of coffee and her late nights got her through many of her
  classes, as she often had to pull all-nighters. (VOY: "Good Shepherd")
  She studied under such memorable professors as Patterson, Hendricks,
  and H'ohk. (VOY: "Relativity", "Friendship One", "Darkling")"

As a Starfleet graduate she would have been familiar with Ethics, Starship Mechanics, Mathematics, Chemistry, Astronomy, Piloting, Alien Physiology and a host of other relevant subjects.
She mentions having nightmares about a "Fractal Calculus" final exam and having taken a special interest in "Klingon Physiology" due to a particularly memorably visiting Klingon professor.
As far as her "speciality" is concerned it's noteworthy that post-academy, she also studied Chromolinguistics [communication with light?], American Sign Language and the gestural idioms of the Leyron as well as Klingonese. (VOY: "Macrocosm", "Hope and Fear"). This gift for languages would obviously stand her in good stead for a first contact type role.


How can I search old deleted emails going back a couple of years in Outlook.com?

Question: Is it possible to search old Hotmail/Outlook deleted emails? If so, how please?
Answer: NO not if it's be a while I have Outlook and I had Hotmail and neither one saves deleted email. unless you reclaim the it in the same day or with in a short time period. But the best way to know for sure is go into your deleted files in your Outlook email account, or go up to your delete tab that you click to  delete your e-mail and there should be a pop-up tab or area there where you are given the choice to reclaim or search for any or all your deleted mail as long as it has not been to long of a time, between the time you deleted said mail and tried or try to reclaim it.  Good Luck,  friend.


Does layer size matter in GIMP?

Question: Since GIMP allows to new layers to differ in size from the canvas size, does it matter? Whether a layer of different size from the canvas has uses or hinders.
Comment: What's your real question here?
Comment: @ZachSaucier: If the new one doesn't do, I can't explain any better.
Comment: It's still a bit broad...
Comment: @ZachSaucier, yeah, I figured that before I posted. I may be a noob and bad at any kind of graphics but even I could figure that.
Comment: Can you formulate your question a little bit better? Maybe you should also take a look at the Help Center http://graphicdesign.stackexchange.com/help or take the 2-minute tour http://graphicdesign.stackexchange.com/tour
Answer: Yes.
Not only in gimp but other programs aswell becouse at the end you need an output file in a flat format (like a png or jpg).
One layer could be a little plane and the background a big sky. Of course the layer of the plane has one size, but the important thing is the whole scene.
You can also have some floating images outside the artboard. You can use that space fo place some temporary elements, but at the end they must be croped when exporting the final image.
Comment: Interesting, but wouldn't a layer the same size as the canvas be easier to use even if you'd have something small in that layer dedicated for something small ? My noob's understanding says the RAM/workfile savings wouldn't be worth it in most cases, and you'd need to trim the layer to contain as few extra pixels as possible -after- you've made the little object.
Comment: It seems GIMP doesn't show layers of different size from canvas as different in the previews.
Comment: answer, please.
Comment: I do not like the idea of a small object on a big transparent layer. Positioning and scaling would be a pain to handle. I really do not know about ram or saving performance.
Comment: Also, if you have a big transparent layer, you can not select easily the objects below.
Answer: If you look out at the Introduction section of the GIMP main web-site.
Also try looking out how to change the canvas size just like in photosop
https://docs.gimp.org/en/gimp-image-combining.html

Thank You for question.

Does layer size matter in GIMP?


Howto fix my VAR model predictions?

Question: I am modeling daily orders with seasonality using vector auto-regressive model with exogenous variables. I used the 'vars' package which has functions to fit the model. I got predictions without using exogenous variables but I must include them. When I included them, my predictions came up as NAs. I don't understand why this is happening. My matrix of exogenous variables includes marketing information and plenty of zeros and ones. It is a 1218 x 123 size matrix. My endogenous variables is a 1218 x 4 size matrix. R code below. I really need help on how to fix this problem with my predictions.
<code>final<-merge.zoo(regresseditems, powers, lags)
final<-as.matrix(final)
final[is.na(final)] <- 0
x1<-final[5:1222,]
vardata<-merge.zoo(Total_Orders.ts,prospects_orders.ts,house_orders.ts,
Email_Transactions.ts)

jaba<-as.matrix(vardata)
lambda <- BoxCox.lambda(na.contiguous(jaba))
VARlnorders<-BoxCox(jaba, lambda)
vardatest<-VAR(VARlnorders, p = 123 , type ="both", season =366, exogen=x1)
predictions <-predict(vardatest, n.ahead=254,dumvar=x2)
</code>
(x2 is a 254 x 123 reduced size matrix of the same exogenous variables. n.ahead must equal the number of observations in x2)
<code>$prospects_orders.ts
       fcst lower upper        CI
  [1,]   NA    NA    NA 0.9641635
  [2,]   NA    NA    NA 1.1487698
  [3,]   NA    NA    NA 1.3001178
  [4,]   NA    NA    NA 1.4754121
  [5,]   NA    NA    NA 1.5504319
  [6,]   NA    NA    NA 1.6052040
  [7,]   NA    NA    NA 1.6545732
</code>
Answer: Using the dummy variables, which are the same as the exo variables in the model may cause some problems, as I believe some of the relationships would end up incalculable.
I don't think I can answer your question completely, although looking at your model, I would say that you lag (p) is pretty huge - I would try setting it using the AIC optimal lag in the VAR-function.
Also, although your variables for the model might be quite simple, containing 0s and 1s in places, you still are stretching the abilities of such a model (and as a result the feasibility/credibility of the output) in that you have a relatively small number of observations for the number of variables.
I know that for a lot of models I have done using VAR (package: vars) that the results slowly lose significance and credibility as I added more variables. Try first doing some smaller baskets of variables that make sense together, or even doing some pairwise testing first.
If you did do this, you could try using the smaller number of variables all as endogenous variables in the VAR model too.

Howto fix my VAR model predictions?


Why can't I authenticate to GitHub?

Question: my_username@my_username-laptop MINGW64 ~ (master)
$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/c/Users/my_username/.ssh/id_dsa):Enter
Enter passphrase (empty for no passphrase):Enter
Enter same passphrase again: Enter
Your identification has been saved in /c/Users/my_username/.ssh/id_dsa.
Your public key has been saved in /c/Users/my_username/.ssh/id_dsa.pub.
The key fingerprint is: Enter
SHA256:KMLyesG1eWkXq1iI4y7i+4bmVKgZBdCnReukvJgrtP0 my_username@my_username-laptop
The key's randomart image is: Enter
+---[DSA 1024]----+
|+. ..            |
| .. o.           |
|  .+o            |
| +o+.  ..        |
|oo=+o+..So       |
|.O*o+.= o        |
|*o*o = o         |
|=*oo. .          |
|OB=..E           |
+----[SHA256]-----+

my_username@my_username-laptop MINGW64 ~ (master)
$ cd .ssh

my_username@my_username-laptop MINGW64 ~/.ssh (master)
$ cd ~/.ssh

my_username@my_username-laptop MINGW64 ~/.ssh (master)
$ ls
github_rsa      id_dsa      known_hosts   rsa_key_pair.pub
github_rsa.pub  id_dsa.pub  rsa_key_pair

my_username@my_username-laptop MINGW64 ~/.ssh (master)
$ ls -la
total 45
drwxr-xr-x 1 my_username 197121    0 Nov 17 23:43 ./
drwxr-xr-x 1 my_username 197121    0 Nov 17 23:08 ../
-rw-r--r-- 1 my_username 197121  668 Nov 17 23:43 id_dsa
-rw-r--r-- 1 my_username 197121  614 Nov 17 23:43 id_dsa.pub

my_username@my_username-laptop MINGW64 ~/.ssh (master)
$ cat id_dsa.pub
ssh-dss AAAAB3NzaC1kc3MAAACBAOrkqv9wt7WcngRfKSaMrCSXn8BfJZN7wEJWvpuqpTYWBzCAylqUSVA+GpMuXGhaDdwHJFftmoxi81PnASpIoZZrIRgqRHRnQph9DnQikB1Bkf4B+EpzD3EwKYWRUOFrHwnjPU1ByRgFOTADXn/O9SIj+9APKer9xFNHaBvv9AvDAAAAFQCYK15hX9llcyIPsHedNTpE0BhgaQAAAIAZ3xOjbu1Vs0yposrwfHdc1+WoUdt89Y8a2YEvmeToR7/M7SM6IPPgbxLTz6l32pbmFFUDknMpX0rL/VaP/ygLifKJDxtWlE2doQR+2FwsvQKnk1wyXlYGXPCaI6flxqJRVV8/VJapQBRAC/cC6g6MNPbTs9GyV/z/SYBE/f4EhgAAAIEAlVinwInGC2gfWL5y7iPmv4gHWuJx0bmGq8Dc5UGdB99uxGRkdOlPFQ8BP6dZ1T8+DlikwPE2CH7RNIb+08KEvtdRJCy++6x0wnvL6ApPM1szNL+gUdL8X2/Mt9r2bj3LvjIrz21u4lXgOa+OsCanu4yUfHhPcj5YgQrrrn3P0Gs= my_username@my_username-laptop

my_username@my_username-laptop MINGW64 ~/.ssh (master)

my_username@my_username-laptop MINGW64 ~ (master)
$ ssh -vT firstname.lastname@example.com
OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [22.214.171.124] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/my_username/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client email@example.com <implicit> none
debug1: kex: client->server firstname.lastname@example.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /c/Users/my_username/.ssh/known_hosts:1
Warning: Permanently added the RSA host key for IP address '22.214.171.124' to the list of known hosts.
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/my_username/.ssh/id_rsa
debug1: Trying private key: /c/Users/my_username/.ssh/id_dsa
debug1: Trying private key: /c/Users/my_username/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/my_username/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

my_username@my_username-laptop MINGW64 ~ (master)
$ ssh-agent -s
SSH_AUTH_SOCK=/tmp/ssh-8kgSDhweA5gl/agent.11684; export SSH_AUTH_SOCK;
SSH_AGENT_PID=13892; export SSH_AGENT_PID;
echo Agent pid 13892;

my_username@my_username-laptop MINGW64 ~ (master)
$ ssh-add -l
Could not open a connection to your authentication agent.

my_username@my_username-laptop MINGW64 ~ (master)
$

Comment: I can't see a question here. Did you upload your public key to github via their webinterface?
Comment: @sebix, yes. It didn't work.
Answer: I notice you're using a DSA key.  OpenSSH 7.0 and higher disabled support for DSA keys by default.  You might check whether that is causing problems.  See SSH keeps skipping my pubkey and asking for a password and https://superuser.com/q/1016989/93541.
Answer:
To authenticate an ssh client to a server using publickey, you generate a keypair on the client, keep the privatekey on the client, and copy the publickey to your authorized_keys file on the server which must be in ~/.ssh owned by you and have permissions only for owner (usually 600 aka rw-------). You did not do the second part. If it's too complicated for you, many systems have a script ssh-copy-id which does it for you with a good deal of handholding and error checking.
You don't need ssh-agent because your keyfile is in the default location and has no password.
To use ssh-agent you must either run a new process under ssh-agent, such as new shell or a new terminal (inherently with a new shell) that has environment variables set to access the agent process or have your shell eval the output from ssh-agent so those environment variables are set in your shell. You did not do either. From the man page:

 There are two main ways to get an agent set up: The first is that the
 agent starts a new subcommand into which some environment variables are
 exported, eg ssh-agent xterm &.  The second is that the agent prints the
 needed shell commands (either sh(1) or csh(1) syntax can be generated)
 which can be evaluated in the calling shell, eg eval 'ssh-agent -s' for
 Bourne-type shells such as sh(1) or ksh(1) and eval 'ssh-agent -c' for
 csh(1) and derivatives.

 Later ssh(1) looks at these variables and uses them to establish a con-
 nection to the agent.

Why can't I authenticate to GitHub?


Computer joining a domain doesnt join a specific OU

Question: im working at a company that has a domain name (we'll call it Super) divided into the following OU's
X, Y, A, B and Z.
im an administrator of the Y domain only, so i cant access anything else beyond the Y ou.
i have recently encountered a problem where's i use my administrator user to let a new computer into our OU using active directory, but whenever i use my credentials on the new added machine it is being automatically added to the Super domain, but not the Y OU that i administer, so i cant touch it once its inside the domain. i also dont have any way to move it between OU's aside from calling my superiors and ask them to move it for me, but i dont want to do that for every new pc deployed into my OU network. how can i solve this problem and make new computers show up immediately in my OU?
Answer: You can either pre-stage the computer object in the required OU, or use the -OUPath parameter of the Add-Computer cmdlet.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-computer?view=powershell-5.1


Missing UTF-8 charset in MAMP MySql

Question: I am trying to run a MySql database with MAMP, but when I try to access the database, this error appears:

SQLSTATE[HY000] [2019] Can't initialize character set UTF-8 (path: /Applications/MAMP/Library/share/charsets/)

I ran "show variables" and found that the charset is set to UTF-8. I also looked in the path mentioned in the error and found that there was no file that said anything about UTF-8, so it appears that this charset is missing. Huh??? If it's looking for this charset, it must usually be present. So why is the charset missing? How can I get it there?
Answer: I had a similar problem. In my case I mistyped UTF-8 for establishing the connection.
Try to connect with the charset "utf8" instead of "UTF-8".
Apart from that I also have no UTF-8 charset file in that folder so I guess it's not the real problem.
Comment: I checked and `utf8` is defined in `Index.xml`. Strangely I see `utf-8` defined as an alias in there, so unsure where the problem is coming from. In my case I changed `utf-8` -> `utf8` and things started working.

Missing UTF-8 charset in MAMP MySql