What happens to consciousness after death?

Question: Is it possible that our innate sense of self, our egocentric outlook on the world, could be wrong? After all, our brains are never REALLY connected; so we cannot know for sure that our consciousness is REALLY separated by anything else than space and time. What I mean is; Is it possible that there could be only a single universal consciousness of which we are all a part? Could this REALLY be how it is? Or are there any philosophical arguments against this view? I haven't been myself since I first had this thought and I'm dying for an answer. On the one hand it feels exhilarating, on the other hand it kinda kills one's self image. What do you people think?
Comment: Sometimes it's useful to examine the question one has posed.  Your question raises many others.  For example, what do these words mean to you: *connected, separated, possible, part, really, myself, self-image, consciousness?*
Comment: Hi, welcome to Philosophy SE. Please visit our [Help Center](https://philosophy.stackexchange.com/help) to see what questions we answer and how to ask. That there is "a single universal consciousness of which we are all a part" is a common thread in Buddhist and Hinduist traditions, see [Nondualism](https://en.wikipedia.org/wiki/Nondualism). In the West some philosophies can also be read in this way (neo-Platonism, [absolute idealism](https://en.wikipedia.org/wiki/Absolute_idealism)).  However, "what do you think" questions that invite personal opinions are off-topic on this SE.
Comment: What happens to a flame after it goes out?
Comment: I'm hoping you haven't died yet, and got your answer.
Comment: No one seems to have mentioned absolute monism, and https://en.wikipedia.org/wiki/Advaita_Vedanta - this school holds that only Brahman is ultimately real, and all other beings are eminations or aspects of that transcendental identity. So you can follow the critiques of that, including the Buddhist one of anatta, the lack of any persistent self-essence, and sunyata, the dependence of things on causes and conditions. There is a widespread critique of absolute monism as a form of solipsism.
Answer: If it is true, so what? You cannot do anything with it anyway.

Is it possible that our innate sense of self, our egocentric outlook on the world, could be wrong?

Yes, it could be. But at present, we have no indication that it is not right.

After all, our brains are never REALLY connected;

I will assume you mean physically connected.

so we cannot know for sure that our consciousness is REALLY separated by anything else than space and time.

This amounts to a an empty statement. You are saying: our brains are separated by space and time and then: we do not know if our consciousness is connected by something other than space and time. True and true but they do not lead us anywhere.

What I mean is; Is it possible that there could be only a single universal consciousness of which we are all a part?

It is possible, yes, but we have no indication of this at the moment.

Or are there any philosophical arguments against this view?

Well from a philosophical point of view it is — for instance — possible that nothing exists beyond your brain in a vat and everything that comes into it is just a simulation; that no physical reality exists and all you see and hear is just artificial stimuli. That is a possibility in just the same way as you proposal of connection/collective consciousness is.
But... so what?
You can also — possibly — fly by your own doing, by tapping into a hitherto unknown source of force that can propel you through the air and maybe even space. That is a possibility, you cannot prove that it is not so.
But I do not foresee you in the near future climbing up on the nearest table and throwing yourself off of it in the hope that you will be able to tap into that unknown source of force before you land on the floor. Even if it could be true, you place no faith in it being so, now do you?
Hence, as long as you cannot point to anything that speaks for your proposition of a shared consciousness actually being true, it is a pointless exercise because for all practical intents and purposes it is not true.

What happens to consciousness after death?

It — most likely — returns to the state it was in before birth. Where do you think your consciousness was before you were born?
Answer: It doesn't follow, if there is only a single universal consciousness of which we are all a part, that you are an eternal part, or even a part that persists for some limited time after death. The single universal consciousness could continue minus your consciousness which has been terminated by death.
The question whether when you are alive you are a part of a single universal consciousness is separate from the question whether when you are not alive you remain a part of that consciousness. The consciousness can plainly do without you, as it did before your consciousness began. Why not after your death as well ?
Comment: "... your consciousness which has been terminated by death". This is not provable. It's your *life* that is terminated by your death.
Comment: You have quoted out of context. I was talking about what could be the case. The point was that if his consciousness has been terminated by death then the single universal comsciousness could continue. It would simply be minus his existence. I was talking hypothetically. I would not be so crude as to make a blank, unargued claim that his or anyone else's consciousness will be terminated by death. My philosophical standards are higher than that. My own views about death and its aftermath make no appearance here.
Answer: This is one of those ideas that sticks to you when once you run into it. I can't shake it either. But for me, it evolved over time. It's easy to think dramatically about the consequences of a collective consciousness.

Is hurting others is the same as hurting yourself
When we die, do we merge with being itself and sense all life?

It's impossible to know. Any questions about the outcome of this way of thinking are purely speculative. Only a liar or a fool can answer your question confidently. That said, i have pondered this concept for a while and do have some interesting questions that might make you think.
You define the idea as a "single universal (un)consciousness" but i think that's wrong, you cannot attribute quantity (single) to consciousness. It is like the idea of time and space, it's just a thing that is, you cannot question it because you experience it. But the question might you might ask is why?
If you try to comprehend why you exist, why you able to think, why anything "is" rather than the more sensible default of "isn't", you might feel the same sense of awe i do. It's a total mind fuck, the human mind is not capable of understanding such transcendent concepts.
It's impossible to fully understand the existence of consciousness. But in knowing that i cannot understand it i feel secure because in some ways the things that we have no hope of understanding are the most true. They lie outside the human ability to inevitably corrupt and re-purpose things we understand.
Ultimately my musings have lead me to the weird belief that consciousness is a universal and omnipresent force that is focused by locales of kinetic complexity at all scales. And by these rules we are the a greatly focused consciousness at our scale because of the unparalleled complexity of the brain. Also consider that this would mean

A pebble rolling down a hill is aware to some degree
Cities think
Computers are already conscious (oops)
Our encompassing universe is conscious and we are conscious of it while inhabiting it. Much like the cells of our bodies, and the particles of a cell and the atoms of the particle.

This is a more reasonable to me than the alternative idea of drawing a line in the sand saying "this object is not conscious, this simple organism might be, and i certainly am" does not make sense to me. There are no lines in the sand with anything natural, except for maybe a beach.
Comment: That's a good question. But it doesn't apply only to computers. It applies to everything that's not *you*. Is your friend conscious or is he/she just a soul-less zombie? Is that computer conscious or just acting like a human, who are generally believed to be conscious? The only thing you really know for sure is 'i think, therefore i am'.
Comment: +1 Although I disagree that computers ever will be conscious. You might also look at near and shared death experiences.
Comment: I don't mean conscious as in 'behaves indistinguishable from humans'. I mean that it is experiencing the universe. Perhaps in a similar way to a single celled organism.
Comment: Or merely acts in a way that it appears to be experiencing the universe.  How would you tell the difference?
Comment: I think that the way out of that is to realize that our consciousness is a simulation of what we think we are going to do. We estimate probabilities of future events and actions, and that includes our own actions. It was shown recently that brains constantly predict, and that this then matches the immediate future more closely or less. Consciousness is basically a prediction about what I'm going to be thinking and experiencing. In other words, we can simulate other minds because that increases survival, and as a side benefit, we get this self-simulation we call 'me'.
Answer: If the following answers are strictly related only to one particular religion, you may ignore this.  If you can find anything sensible/true, you may search other websites and test them.

Is it possible that our innate sense of self, our egocentric outlook
on the world, could be wrong?

Of course. Scientific analysis is enough for understanding this. It can be realized only by self realization.  Actually all of us cannot maintain our ego throughout our life as it is now.  When people have certain experiences they may understand it.   You might have read about some people's anecdotes when they visited some places or when they met some great men.  Some of them have said that they felt like melting their ego when they visited such places or great persons.

After all, our brains are never REALLY connected; so we cannot know
for sure that our consciousness is REALLY separated by anything else
than space and time.

Before asking about connections, you could ask this question to yourself:  "For the growth and development of brains do the things needed for it have any connection?"  If not possible, again my humble reply is about self realization.  Or you may google and find what great Non-dualists who realized the truth have said about it.

What I mean is; Is it possible that there could be only a single
universal consciousness of which we are all a part?

If I take your words in literary sense I would say that it is not possible because if you say so you mean you need to wait for something to happen/become.  Since you need not wait for a possibility, I am compelled to say so.  Also, since consciousness is eternal, unchanging, present at all times, immutable, undivided, and infinite we need not use the word--'parts'. You may verify this: How is the "I" the universe? But if you consider only the essence of that question, again I say, "Of course"; but only up to a certain extent. This is because, if I said so it would be a denial of the words of great men who used the term 'non-dual' after realizing it.

Could this REALLY be how it is?

Yes.

Or are there any philosophical arguments against this view?

I don't know if there is.  If you wish to argue against this you may take your own idea as you mentioned about brains.  But when you realize yourself you realize that the creator and creation are one.  So you will 'get' the proof from within you.
See:https://en.wikipedia.org/wiki/Chaitanya_(consciousness)

I haven't been myself since I first had this thought and I'm dying for
an answer. On the one hand it feels exhilarating, on the other hand it
kinda kills one's self image. What do you people think?

You are right. It will kill the self image that you misunderstood that it is strictly related to your body as in a delusion. But you need not fear of some great loss.  Please listen to Sri Ramana Maharshi's parable of salt doll.

What happens to consciousness after death?

When you realize yourself you will understand that there is no birth and death to the self. Please read the first link about consciousness and then read the Bhagavad Gita 2.20.
Answer: I see a mayor problem with your question(s). It appears that you do not realize that there are at least two types/levels of "consciousness" (three if you believe in a "supreme" being). They are:
1 - Individual
2 - Group
3 - Transcendent/universal
So, obviously, there are three answers to your main question.
1 - The individual's consciousness ceases to exist, when the individual dies.
2 - The group's consciousness ceases to exist, when all the group's members die (or are no longer a group).
3 - The transcendent consciousness never ceases to exist, as it does not depend on any individual or group.
This makes it clear that for an individual's consciousness to continue to exist, after death, is to somehow become part of the transcendent (supreme being's)  consciousness!


Received a badge (vox populi) I shouldn't have

Question: I just got a notification that I received the Vox Populi (use 40 votes in one day) badge, but my user page shows I've only made 2 votes today (which sounds about right; I certainly didn't vote on 40 questions and answers today).  Is anyone else getting a notification like this?
Comment: Ok, so a *bug* is [status-bydesign]? How does that work?
Answer: We just deployed a change that affects the voting badges.  This is why you see a number of these badges being awarded.
For more information about this change, you can see this answer.
Note that there is a bug with Vox Populi only that is awarding too many of them, beyond the expected more for retroactive awards, and a fix is being deployed now.  The erroneous awards there will be cleaned up shortly.
Answer: Yes. I got he notification too and thought it was weird and worried someone was using my account. Hopefully its just a bug.
Comment: Exactly what I was worried about :)


Is it good form to put detailed reasons why you are resigning from a company in a resignation letter?

Question: When writing a letter of resignation where you are not happy with the company's direction, is it good form to add a detailed laundry list of what those things are or just keep it generic like "the direction of the company..."?
Comment: do you have to give a reason at all? Just state that you're leaving and leave. Unless you want to rant and don't care about the bridges you may be burning, in which case rant, but it won't help you or anyone else.
Comment: Do you already have a new job to go to after resigning ? Or do you not have any new job yet, and resign because you are not happy with the company's direction ? - Either way, what good does it do to you if you complain about the company's direction ? It appears from your previous questions that the owner or the company already does not care about employee's inputs, and only care about fast delivery of the products. So, they are not likely to care about your opinion in your resigning letter.
Comment: No, not even in an exit interview. They won't change anything anyway; at best they will badmouth you for it.
Comment: Are you leaving on good terms? What is the size of the company? If it's small company where you know everyone and get along well, but for other reasons want to leave, then I'd let them know why (in general terms, though, not a whole laundry list).
Comment: Is there a reason to believe that somebody actually wants to know?
Comment: Letters of resignation are different to exit interviews. I'm not sure why anyone thinks that it's a good idea to treat them the same. They have different purposes, and people should do different things in each.
Comment: What would it benefit you to do that?
Answer:
or just keep it generic like "the direction of the company..."?

Don't even go that far. No reasons are necessary. Just something like this is sufficient and clear:

I hereby give X days notice of my resignation. My last day with the company will be [date].

Giving even a vague reason opens the door to bad feelings ("What's wrong with the direction of the company? It seems fine to me!"), and the consequences that can come from that (which will vary depending on where you are in the world).

I'm surprised that I need to write this, but apparently a lot of people consider resignation letters and exit interviews to be things that should be handled the same way, so: This is only advice about what to write in a resignation letter. I do not recommend saying this in an exit interview.
Comment: And to add to that: the person who needs that letter doesn't care why. Maybe someone else does, and _maybe_ you want to risk a burned bridge to tell them. But the purpose of a resignation letter (at least in the US) is just to establish that you're leaving voluntarily, for legal reasons. (For example, they won't have to pay for your unemployment benefits.)
Comment: @yshavit, yeah thats also a grey area. In some States of the Union if you have some vague reason of why you are leaving that can help you with unemployment in a case where you should feel the need to obtain it. I am not an attorney, but I have since learned this.
Comment: I feel this could be improved by clarifying the difference between an exit interview and a resignation letter. To me it currently sounds like you shouldn't give reasons in a letter, but you can in an exit interview, which would presumably invite the same repurcussions and bad feeling as putting them in the letter.
Answer:
is it good form to add a detailed laundry list of what those things are or just keep it generic like "the direction of the company..."?

If you want to keep it professional you should avoid the detailed laundry list. There is no need for you to give detailed explanations, and doing so unrequested could burn some bridges.
Saying such things would be more appropriate if there were some sort of exit interview and were asked about your reasons in detail. Anyways, you also want to keep it professional and constructive if such interview ever happens.
Comment: The typical response would be "I want to develop myself in a different way".
Comment: Even in exit interviews, be cautious. I've been in exit interviews as observer, interviewer an das leaving employee. And I can tell you, it's not worth it to provide reasoning.
Answer: It's not mentioned but some companies request you do an exit interview and there are times you can mention things like:

I've capped out in my position and I'm looking for more opportunities
didn't feel like I was growing within the company
new position is offering a better salary

And a few other things that you can mention that may not necessarily burn a bridge. If you're never wanting to go back and have an exit interview then fully disclose.
Comment: An exit interview is definitely the place to give you feedback. If they don't request one, they don't want your feedback
Comment: @noob, new position is offering a better salary is a good one.
Comment: @SirDuckduck, I have a feeling no exit interview will happen. I am not the only one leaving this place and they did not seem to care what this other colleague thought either, its full steam ahead, parties in Aspen, Colorado, lavish trips to Europe all paid for by 30 million of VC funding, who cares what I think.
Answer: Resignation is a very formal milestone in the life of an employee. It it is the one action he can take without any possible recourse for the employer - the employer has no say in it whatsoever. It is not a discussion, it is not something that can be taken back easily.
Interestingly, threatening resignation while not having formally resigned yet is not a powerful tool for an employee. It usually does not work in the way intended, it just puts you on an (at least) mental blacklist with your manager - he'll probably not spend a lot more effort or money on you if he knows that you're looking for a new job anyways.
Any attempts to improve the situation have to happen before your resignation.
If you resign out of the blue, with your boss having not a single idea of why that could be, this means that you never even tried to improve anything. Anything that leads to your resignation could have been discussed with your manager beforehand - without threatening resignation. So if you brought problems up, and they were not resolved, and you do eventually resign, your boss will know perfectly well what the issue was (or if not, because they were unable to listen, then it wouldn't matter anyways).
If you have a new job (a freshly signed contract) at the time of your resignation, then the standard reason for resigning is "I got a new offer which was just too good to pass by". This is never a lie - whatever "too good" means (could be money, incentives, time to travel, interesting topics, whatever). I wouldn't go into too much detail, and usually not even tell them the new firm.
If you do not have a new job, then saying something like "I need substantial time off to take care of my own life" is perfectly fine. This could include fixing stuff that broke because the job was so bad - but there is zero reasons to let them know that. They can't help you anymore, in the best case it's neutral, and worst case you're burning bridges.
Comment: The employer might be called for references for future jobs. Better not to burn bridges.
Comment: Yes, that's the advice I give - don't burn bridges. Do you see something else in my answer? If so, please point it out and I'll optimize my wording... @vikingsteve
Comment: Well, "It it is the one action he can take without any possible recourse for the employer" - this is incorrect. A bad employer can affect your future reputation and chances of employment
Comment: @vikingsteve, he can burn bridges by behaving badly after resigning, but the act of resigning in itself can never be bad - or else we're living in slavery. I think (or intend) that the rest of my answer gives hints as to which course to take after resigning with respect to giving details and so on. If you find I misrepresent *those* points in some way, let me know. But we cannot tell people that they cannot ever resign...
Answer: Unless there is a contract or other legal constraint requiring you give a reason, I wouldn't offer one.  Just say you are leaving to pursue another opportunity.
Other answers suggest that you present your reasons at a formal exit interview.  I generally disagree:

If the exit interview is the first time you're airing your laundry, then you've done your employer and yourself a disservice by not at least trying to improve things while you were there.

If you raised these issues as an employee but couldn't get support to address them, then don't expect your comments to change things after you leave.  Even if they change, it won't benefit you.

One possible benefit to giving some of your reasons is if you think it may benefit someone you leave behind.


Can a DH param .pem file force the usage of only a single type of diffie-hellman exchange

Question: Is it possible to create a diffie-hellman param .pem file to force the openssl ctx to use only a certain type of dh exchange. For example, I know that it can be used to set the length of the dh key, but what about the type?
Answer: No. The type of exchange is set by the cipher suite, which agreed upon by the client and server during the handshake. As such you cannot specify, say, DHE vs. ECDHE in the DH parameters file. If you want to control that you should configure the supported cipher suites and the preferred cipher suite order on your server.
Comment: ... through TLS1.2. In 1.3 keyexchange is now separated from the ciphersuite and controlled directly by the supported_groups and key_share extensions -- but in 1.3 non-EC DHE must use only standardized groups (from rfc7919) so the concept of a DH parameters file becomes moot.
Comment: @dave_thompson_085 Good point.


Are angular acceleration and velocity frame dependent?

Question: Basically what I am trying to ask is if a body has an angular velocity $\omega$  or angular acceleration $\alpha$ about an axis then will it have the same angular velocity and acceleration along any other axis?
I am really confused .
As we know torque $\tau$ of all the forces acting on the body about the earlier axis is
                              $$\tau=I\alpha$$
Where I is the moment of inertia of the body about that axis.  ( $\alpha$ depends on $\tau$ and $I$ .
If we change the axis then the radius vector of each particle from the force will change about the new axis and hence torque will change (because $\tau=r\times F$) .
Also the moment of inertia of the body about that axis will change.
Hence $\alpha$ may change or may not ( according to me) because $\tau$ and $I$ may change.
Comment: you need to specify if the body is a rigid body or a particle?
Comment: You can take any. What I am asking is whether the particle or rigid body undergoing pure rotation will have same angular vel or accln about diffetent axes.
Answer: This issue is a bit confusing because there are two types of angular momentum. There's spin, where a rigid body rotates about an axis through its center of mass, and there's orbital, where the center of mass of a rigid body rotates about an axis. For example, the Earth spins about its axis and rotates around the Sun. The total angular momentum can always be decomposed into a sum of these two terms.
You probably have never heard of this, because the definition of the torque is just $\mathbf{r} \times \mathbf{F}$, which doesn't have any reference to "spin or orbital". But when you write the equation $\tau = I \alpha$, you're implicitly choosing to talk about one or the other, or else $\tau$, $I$, and $\alpha$ are meaningless. (For example, the Earth takes 1 day to spin but 1 year to orbit. So you can't just say "the" angular velocity of the Earth.)
If you're talking about spin, $I$ means the moment of inertia about the center of mass, $\alpha$ means the angular acceleration about an axis through the center of mass, and $\tau$ means the torque about the center of mass. There's no meaningful way to change axes or origin because it's always the center of mass.
Now let's talk about the orbital part. The instantaneous angular velocity can always be defined, even if the object isn't moving in a circle about some point, using the equation
$$\mathbf{v} = \boldsymbol{\omega} \times \mathbf{r}$$
However, you can see this quantity is frame dependent: if we just move the origin, $\mathbf{r}$ will change but $\mathbf{v}$ won't, so $\boldsymbol{\omega}$ will change. As an example, if you see an airplane from the ground, its angular velocity appears very low, but if you're hovering next to it, it zips around really fast. So in this case, everything does change.

Okay, maybe neither of these examples were really what you wanted: the first was trivial, and the second didn't say much. We can get more insight by not doing the spin-orbital decomposition at all, which requires tossing out $\boldsymbol{\omega}$ and $\alpha$. The only rotational equation we have left is
$$\tau = \frac{dL}{dt}$$
which expanded out is
$$ \sum \mathbf{r} \times \mathbf{F} = \frac{d}{dt}\left( \sum \mathbf{r} \times \mathbf{p}\right)$$
Let's transform to another frame. To make it easy, let's just shift the origin by $\mathbf{r}_0$. Now if physics works, the resulting equation should be equivalent.
Let's confirm it. In the other frame, we have
$$ \sum (\mathbf{r} + \mathbf{r}_0) \times \mathbf{F} = \frac{d}{dt}\left(\sum (\mathbf{r} + \mathbf{r}_0) \times \mathbf{p}\right)$$
If we subtract out our previous equation, we're left with
$$ \sum \mathbf{r}_0 \times \mathbf{F} = \frac{d}{dt} \left( \sum \mathbf{r}_0 \times \mathbf{p} \right)$$
Since $\mathbf{r}_0$ is constant, the derivative only acts on $\mathbf{p}$, giving $\sum \mathbf{r}_0 \times \mathbf{F}$ on the right hand side. So the equation is true. Physics works!
Comment: yes! it's a great way to end a derivation.
Comment: were the last two words inspired by Prof Lewin? :D
Comment: ... the physics equivalent of QED in mathematics, perhaps.
Comment: For the translation variant *orbital* angular velocities, you will need to clarify that it is generally only the component perpendicular to the position vector, $\vec{v}_{\bot}$, that is obtained with $\vec{v}_{\bot} = \vec{\Omega}_{orb} \times \vec{r}$.
Answer: First of all, how could you be sure that the same force $F$ will produce  rotation about different axes simultaneously?
When you apply some force on the body, calculating from your body fixed frame, it will have certain torque about the origin. If you change the system, then you will get different values of the torque, but here torque has all the 3 components, so you cannot apply $\tau=I\alpha$ formulae.
What you can do is to apply Euler's equation of dynamics and find $\omega_x,\,\omega_y,\,\omega_z$, at some instant $t = t_1$ this values will give you rotation about some instantaneous axes
Now changing the coordinate system will give you different values of the $\omega$ vector's components. But to your surprise, at that very instant $t = t_1$, $\omega_x',\,\omega_y',\, \omega_z'$ will have such values that will indicate the same rotation axis (instantaneous) as we got before ,
For your convenience, you can go through Euler's Equation of dynamics, David Morin's Classical Mechanics textbook.
Comment: I am talking only about pure rotation. And the new frame will also be inertial.
Comment: i never talked about translation + rotation , u have to specify rotation about fixed principal axis , then only T=Ia relation is valid , but then for a fixed force torque will have  some fixed direction about any of the principal axes , for the other axes it will have  0 value , and the frames are body fixed frame always  ,if the body is under acceleration  it is always some non-inertial frame
Answer: If the body is a point mass, and even if frames are stationary, still the angular velocity and accelerations may or may not come out to be the same. The question is a little too generic.
Consider for example, the case of a uniform circular motion, if the angular velocity is measured about an axis which does NOT pass through the centre, it will be a function of time, this is because the torque of the centripetal force will NOT be zero about such an axis.
On the other hand, consider a point mass moving in a straight line. The angular velocity about axes (passing through all points on a parallel line and perpendicular to the plane of motion) will be the same.
It mainly has to do with the expression for torque which comes from what Force the point mass is experiencing. If the torque depends on which axis is chosen, then $\omega$ and $\alpha$ will change.
If it is not a point mass, then firstly you can not measure $\omega$ and $\alpha$ about points which are not on the object/rigid body (unless its acting as the Instantaneous Centre). But, about all points on the rigid body, $\omega$ and $\alpha$ will be the same.
Comment: And if the new axis is itself rotating with some ang vel or accln ( not having  tranlational vel and accln) then what ( consider a particle only having ang vel and accln a and w about some axis)
Comment: If the new axis is rotating with respect to the old one, then definitely angular velocity and acceleration will change (unless of course the axis does not coincide with the object).
Comment: If we want to FIND ang vel or accln about the new axis then can we  simply do w+w' or a+a' ( where w' and a' are ang vel aaccln of the new axis , given that one is having anticlockwise  and other clockwise rotation)
Comment: @TriptiKhulbe, no, that will *not* work. To find relative ang vel or accn, find the relative linear vel or accn and then divide by the modulus of radius vector from the axis to the object.
Comment: But the axis is not moving linearly ( consider an infinitesimally thin rod as the axis)
Comment: U need to find the velocity vectors at a given time and follow above process. It will of course change with time, so it will be tedious to make a function in time


Data mining on reviews of the games

Question: I am trying to text mine the reviews of the games and want to find the interesting things from the reviews
example of the data is
<code>'review': ['Simple yet with great replayability. In my opinion does "zombie" hordes and team work better than left 4 dead plus has a global leveling system. Alot of down to earth "zombie" splattering fun for the whole family. Amazed this sort of FPS is so rare.',
'Amazing, Non-stop action of blowing stuff to bits, Decapitation and shooting everything you see. With a combination of action, thriller and emmersive gameplay, as well as enviromental challanges (Jump physics). This game will really put your eyes to the test, can you see the enemys before they see you? Cause their are so many!This is the second level of the killing floor, I quote bill LF4D "Son we just crossed the street" But in reality they only moved up an elevator level on genes. What has yet to come as the game is slowly realsed with thrilling and horryfing creations, But who really cares, Let\'s just blow it up, I invite you to get on the GODAMN KILLING FLOOR, LET'S SHOOT  AND GET PAID!',......
]

</code>
I am interested to find the name of games and types of games(strategy, shooting, etc) from the reviews data.
I tried and created the regular expression such that getting the text which has data ( is a game )
so that I will get the reviews
<code>Dying Light is a game.
Magicka is a game

</code>
I want a suggestion to improve the results for the above
and my interst is to text mine and find the game type such as a puzzle, shooting,etc
Answer: Suggestion to improve the results is to use NER. You can at very least extract names and types. Search a bit more maybe someone has also trained on different types/genres of game also, so you could discriminate on that also.

Data mining on reviews of the games


Testing independence of random variables in Python

Question: Are there any tools available in Python that allow for testing of independence of two random variables (data columns)? I have two columns of data $X$ and $Y$. They can be both discrete, with values $\{0,1\}$ or one of them can be continuous. I would like to perform some statistical test to be sure they are independent. I am using Python so it would nice to have some ready-to-use tool implemented. I my also use R if it is not something difficult to do.
Answer: As is discussed in the link to Cross-Validated SO from Mephy, this is isn't an easy thing to do.
If they are independent, you might expect a correlation between pairs of variables to be close to zero. That would mean that knowing anything about one of the two variables doesn't give you any insight as to the behaviour of the second. To this end, there is a nice answer here, which shows how to compute pairwise pearson correlation (with corresponding p-values) for all columns in a Pandas DataFrame.
The Pearson correlation does assume your random variables to be normally distributed, so keep that in mind when interpreting results. Alternatively, you could swap out that pearsonr function for the Spearman Rank correlation function: spearmanr, which does not assume normality of your variables.
Another (perhaps simpler) way using just a Pandas DataFrame is to use the built in method corr: This takes a keyword method, which allows you to specify one of three:

method : {'pearson', 'kendall', 'spearman'}

If you random variables are time-series (you didn't mention it), another possible tool to look at would be Granger Causality. This could also be performed pairwise (or batch-wise) across variables. It tests to see if a the future value of variable can be better predicted when historic values of the a different variable are included in the model. For example, if the price of StockA can be predicted with an accuracy of 52% using its own prices of the previous 5 days, the Granger test would have a null hypothesis that including some lags from StockB would not improve the accuracy. So if the accuracy does indeed jump up to 53% when including lagged prices of StockB, (and the test is significant), the null hypothesis is rejected and we say that StockB Granger-causes StockA.
This is implemented in the vars package in R (there are others too). As a bonus, this version can also perform the Wald test for correlation in error processes of predictor and target variables.
Answer: This is a hard problem to solve and there are many tests that attempt to answer it.. One way of testing it is using mutual information, available on scikit-learn for either continuous variables or discrete variables. It returns zero for independent variables and higher values the more dependence there is between the variables (makes it harder to call something "independent/dependent" but makes it easier to rank features by their independence).
from sklearn.feature_selection import mutual_info_regression
import numpy as np

x = np.linspace(0, 10, 50)
y = x + np.random.randn(50)
z = np.random.randn(50)

# reshape necessary because the function accepts many
# features at once to be compared with the right-hand side
print(mutual_info_regression(x.reshape(-1, 1), y))
print(mutual_info_regression(x.reshape(-1, 1), z))

> 1.20832658
> 0

Answer: For the sake of those wanderers looking for more info about testing for independence, conditional in this case, I'm referencing a paper I read recently, despite the fact that it may not be exactly what the OP is looking for.
An interesting approach is presented by researchers from CalTech where they use a decision tree to test for conditional independence here.
the corresponding repo is here.
One apparent advantage of this method as compared to others is its speed. I say apparent as I've yet to try it. The benchmarking included in the paper, nonetheless, are impressive.
Comment: Unforetunately fcit doesn't seem to be as fast as it's claims, even with tiny dimensions. Hopefully we can take another look at it as an option after the next update.


How to recognise chords and chord progressions by ear?

Question: I am pretty comfortable with playing melodies by ear, but when it comes down to the next level, chords and chord progressions, i fumble pretty hard.
I tend to pick up the 3rd of a chord and play it as the 1st, and it messes up everything.(example: C-E-G, Cmaj, to E-G#-B, Emaj).
Also chord progressions just can't make any sense! I have done my research and I know about some 'popular' progressions but in the real world it just doesn't work. The chords seem all over the place and i can't put my finger on what the progression is.
Do i just keep at it, listening to 4chord songs and tryig to find the tonic, chord progression and chords? Or is there a more lucrative approach?
Comment: @Aaron FWIW I don't think the answers to that question are particularly comprehensive - it would be nice if we could get more answers/replies from different perspectives....
Comment: @topomorto What do you see in terms of gaps in comprehensiveness or perspective?
Comment: @Aaron hmmm... perhaps it's hard to go into a lot more detail from a general perspective - There are more specifics you can go into from the perspective of certain styles&genres, such as types of chords to listen for, typical motions and cadences, etc.... maybe the ideal from a reference POV would be to have a bunch of 'how to work out chord progressions in XXX style' questions, but I guess we're unlikely to get them.
Comment: @topomorto I'm on board, and it seems like the perfect self-answer opportunity. Or at least post a question as a test-case to see if it gets some good answers. A community wiki could be added to the canonical question to point to the more specific variants, too.
Answer: Let's stick with, for now, the 6 main chords used diatonically. I, ii, iii, IV, V and vi - omitting the not-so-common viio.
Establishing the I is the most important start, and we're looking for the chord that sounds like the piece has come 'home' - to a place where it could end satisfactorally.
Back to the start of the piece - which most often is I. Contnue listening until you hear a change. Obviously it's not I after that, but there's a chance it'll be one of the other 5! You say you listen to the 3rd in a chord. that's good, because that will tell whether the next chord is major or minor. If it's major, there's a 50:50 guess - it will be (in diatonic land) either IV or V. Often IV feels like it's gone up, while V sounds like it's gone up even more, or down.
Next change, if major again, will be 50:50 again.
For minors, there's a 33% guessing chance, but by actually playing I>ii, I>iii, I>vi, IV>ii, IV>iii, IV>vi etc., you'll get the 'feel' of where each change goes.
There's another idea I use with students - put dots (full stops, not notes!) on a paper, 4 per line, for as many lines as needed. Establish the sound of chord I, and, as you listen to the piece, count along, and put I in each bar that sounds like it. Then establish what V sounds like, and fill in the V bars, until it's complete.
Of course, all this works best with simple triadic chords - I maj7 can often sound like iii and so on.But it's a good start point. And the more one does, the more experienced one gets.


bind-keys with a macro for lambda functions

Question: I am trying to bind keys to a lambda function using bind-key.el. I have the following factor macro
;; taken from Emacs Doom
(defmacro cmd! (&rest body)
  (declare (doc-string 1) (pure t) (side-effect-free t))
  `(lambda (&rest _) (interactive) ,@body))

which creates a lambda interactive function. So at first, I tried using that to bind-keys with no success.
(use-package org
:bind (:map org-mode-map
("C-c C-f" . (cmd! (message "Test")))))

But then I get the error. use-package: org-super-agenda wants arguments acceptable to the 'bind-keys' macro.... I also tried
(bind-keys :map org-mode-map
     ("C-c C-f" . (cmd! (message "Test"))))

but then I get the error command-execute: Wrong type argument: commandp, (cmd! (message "Test")) when I press C-c C-f.
I then tried replacing (cmd! ... with (lambda () (interactive) ...)
(bind-keys :map org-mode-map
     ("C-c C-f" . (lambda () (interactive) (message "Test"))))

but then I get stuck in an infinite loop when executing the previous statement. When stopping with C-g, I find that I am stuck in a function called prin1-to-string with a seemingly infinite
(closure ((binding closure ((binding closure ((binding closure ... nil ... ...)

as an argument. I think the reason is that in my particular file with lexical binding, closing the lambda expression is expensive.
How am I supposed to do this efficiently?
Answer: Here's the format.
(bind-key KEY-NAME COMMAND &optional KEYMAP PREDICATE)
(bind-key "M-h" #'some-interactive-function my-mode-map)

(bind-key "C-c iv" (lambda()(interactive) (my-function-here my-func-parameter)) my-mode-map)
Documentation is your friend. C-h f bind-key.


XCode Project is not version controlled

Question: I have linux and svn server running and can terminal into it from my mac. In xcode I have setup a repositories and setup the folder structure branches, releases, tags, trunk for a project.

I have imported my first project into the trunk folder successfully.
I then create a different folder locally
In Xcode SCM, I navigate to /truck/ and click on it.
I click the checkout button and choose the location. It checks out successfully and prompts if I wish to open project so I do.

Everything appears fine but when I test by making changes to a file, I do not get any file status letters 'M' etc telling me that the file has be modified. It does not seem to be version controlled even though I have checked it out.
Any ideas?
Answer: As well as Foo.xcodeproj (which is actually a directory, not a file, even though it looks like a file in the Finder), you also need to put Foo.xcodeproj/project.pbxproj under version control, since this is where all the important project-related stuff is actually stored.
Don't bother putting anything else under Foo.xcodeproj/ into version control - these are just user-specific settings: window positions, breakpoints, etc.

XCode Project is not version controlled


Peristaltic Pump Recomendations

Question: I'm thinking of purchasing a Peristaltic Pump for home brewing. The fact that they are self priming, that you can adjust the speed easily, and reverse the flow makes them seem really appealing to me. I've seen people recommend Cole Parmer medical pumps, but the used ones seem a little pricey. Does anyone have any other recommendations for a cheaper alternative? if not, which Cole Parmer should I go for.
Comment: What do you plan to use it for? E.g. recycling the mash, transfer to fermentors or something else? While most peristaltic pumps will handle the temperature range, the volume capacity is usually limited. Reverse flow sounds fun, how do you plan to use that?
Comment: Do peristaltic pump really-self prime?  Every peristaltic I have used in the lab need me to get liquid at least to the pump before it flowed.  Gravity seemed to be enough. Would dry tubing and the liquid to be pumped sitting below the pump really climb up the tubing into and past the pump?
Answer: You could make your own. A little googling will turn up several interesting DIY peristaltic pumps specifically designed for homebrewing. Here is a particularly interesting one that also has a pretty good discussion thread to go along with it:
http://www.homebrewtalk.com/f51/cake-pan-skateboard-wheel-bike-brakes-homemade-peristaltic-pump-279120/
Comment: It's a good build - especially after he moved over to a 2-wheel design. If you can get it, use norprene tubing - it's far more resilient than silicone, requiring replacement much less often. I've been planning to build one of these for ages, but just haven't got round to it

Peristaltic Pump Recomendations


Upgrade to magento 2.4.3

Question: I'm trying to upgrade Magento 2.4.2 to the latest release of Magento 2.4.3
How can I do this with the composer?
Comment: https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html
Answer: For community edition
composer require magento/product-community-edition=2.4.3 --no-update

For enterprise edition
composer require magento/product-enterprise-edition=2.4.3 --no-update
composer require magento/magento-cloud-metapackage=2.4.3 --no-update

=========Then fire below command==========
composer update
rm -rf var/di var/cache/ var/page_cache/ generated/code/
php bin/magento setup:upgrade
php bin/magento indexer:reindex
PHP bin/magento c:f

After upgrade, check your Magento version with the following command:

php bin/magento --version
Comment: i think these are the right removes for magento opensource
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
Comment: yes @eima you are absolutely right, i have update answer, thank you
Answer: 1. change php version to 7.4
2. php bin/magento maintenance:enable
3. COMPOSER_MEMORY_LIMIT=-1  composer require magento/product-community-edition=2.4.3-p1 --no-update

4. open composer.json and remove amazon pay by adding it it under "replace" (only if you do not need and already installed)
     "require": {
                [...]
            },
            "replace": {
                "amzn/amazon-pay-sdk-php": "*",
                "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
                "amzn/login-with-amazon-module": "*",
                "amzn/amazon-pay-module": "*",
                "amzn/amazon-pay-and-login-magento-2-module": "*"
            },
            "config": {
                [...]

open composer.json and replace content of "require-dev"

    "require-dev": {
        "allure-framework/allure-phpunit": "~1.4",
        "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
        "friendsofphp/php-cs-fixer": "~2.18.1",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "*",
        "magento/magento2-functional-testing-framework": "^3.0",
        "pdepend/pdepend": "~2.7.1",
        "phpcompatibility/php-compatibility": "^9.3",
        "phpmd/phpmd": "^2.8.0",
        "phpstan/phpstan": "^0.12.77",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "^6.0.3",
        "squizlabs/php_codesniffer": "~3.5.4",
        "symfony/finder": "^5.2"
    },

6. COMPOSER_MEMORY_LIMIT=-1 composer update
7. redis-clis FLUSHALL
8. php bin/magento c:f
9. php bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}
10. php bin/magento setup:upgrade
11. php bin/magento module:enable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}
12. php bin/magento c:f
13. php bin/magento maintenance:disable

now login to admin -> configuration -> catalog and configure elastic search.
Comment: usually it take up to 30min or sometimes more than 1 hour. keep wait until it start upgrade process and press enter in SSH after every 5-10min. so it will not timeout
Comment: composer update takes too much time and there is not response, approx. how much time have to wait for it ?
Answer: Run the below commands :

composer require magento/product-community-edition 2.4.3 --no-update

composer update
Comment: Check any log file generate or something. Generally it can't take this much of time.
Comment: composer update gives blank with no any result, its been around 1hr+, how much it should take ?
Answer: I believe the above answers will help, but...
no one mentioned --use-default-magento-values during updating, it will help the composer to update Magento composer dependencies in the composer.json file.
I'd recommend using the following command
composer require magento/product-community-edition=2.4.3-p1 --no-update --use-default-magento-values
And check your composer file, If you are okay with composer.json file changes, so run composer update command, Otherwise, you need to run the following command:
composer require magento/product-community-edition=2.4.3-p1 --no-update --interactive-magento-conflicts to interact with the magento changes provided then run composer update command.
I hope this answer may help someone to upgrade Magento to the current latest stable version.
-- Update --
Magenot updated the documentation for this commands like the following:
Choose one of the following composer commands based on the PHP version, and run the command to upgrade your instance.
For 7.3 or higher:
composer require-commerce magento/<product> <version> --no-update [--interactive-root-conflicts] [--force-root-updates] [--help]
For PHP 7.2 or lower:
composer require magento/<product> <version> --no-update [--interactive-magento-conflicts] [--use-default-magento-values] [--help]
Answer: Enable Maintenace mode
php bin/magento maintenance:enable

Backup composer.json file
cp composer.json composer.json.bak

Update composer.json file with latest version
composer require magento/product-community-edition=2.4.3 --no-update

If you get an error related to allure-framework/allure-phpunit and phpunit/phpunit package, change the version of those two packages in the composer.json file from the vanilla 2.4.3 version and run the above command again.
Update packages
composer update

This command will take some time to finish.
Clear cache and regenerate code.
php bin/magento cache:clean

rm -rf var/cache/*

rm -rf var/page_cache/*

rm -rf generated/code/*

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy -f

Disable maintenance mode
php bin/magento maintenance:disable

For more information follow this step by step upgrade guide.

Upgrade to magento 2.4.3


If a mapping and it's inverse are both one to one, then must the mapping be bijective?

Question: If $\sigma$: $A$ $\rightarrow$ $B$ was a mapping which was one to one, and had an inverse $\sigma$$^{-1}$: $B$ $\rightarrow$ $A$ which is also one to one, then are they both bijective mappings?
I'm almost certain that this is true, and is pretty much just a different way of saying the mapping is bijective, but I'm a bit ill at the moment and so I don't trust my brain too much on this.
Comment: In fact, assuming by inverse you mean a two sided inverse (both $\sigma\sigma^{-1}$ and $\sigma^{-1}\sigma$ being the appropriate identity) the existence of such an inverse *implies* that $\sigma$ is one-to-one and onto.
Answer: If $\sigma^{-1}$ is defined on all of $B$, this means that $\sigma$ is onto too. Hence, $\sigma$ is a bijection. Inverses of bijections are also bijections.
Comment: Yes, I thought so, I just for some reason had a nagging suspicion that that wasn't the same as sigma being onto...I know that the question was simple, but I couldn't let that suspicion go
Comment: If $\sigma $ wasn't onto, we would only have $\sigma^{-1}: \mathrm{Im}(\sigma) \to A$.
Comment: I know, that was the exact same logic I was using, it's just that right now with my head pounding so much I could say 2+2=4 and still not believe it
Answer: Let $\sigma \subseteq A \times B$.  Suppose $\sigma$ is 1-1 in the sense: for every $a$ there is at most one $b$ with $(a,b) \in \sigma$; and suppose $\sigma^{-1}$ is 1-1 in the sense: for every $b$ there is at most one $a$ with $(a,b) \in \sigma$.  Then $\sigma$ is a bijection from the domain of $\sigma$ to the range of $\sigma$.


Does rotating the focus ring in AF mode cause any harm?

Question: If I rotate focus ring in AF mode, does this hurt the camera or lens? My friend today rotated the ring 1/2 times before I saw him on Autofocus on my Canon 600d with lens: EF-S 18-55mm 1:3.5-5.6 III.  What damage could possibly have been caused?
Answer: As far as I know EF-S 18-55mm III do not have FTM (full time manual mode). So "playing" with focus ring with AF mode can burn the motor inside. And such action should be avoided
In worst case scenario you will not be able to autofocus
Comment: @Stanley if you cannot tell a difference, it's likely that there isn't any. Does your camera still work? Does it still auto focus?
Comment: can you tell me if the worst possible outcome was done when he rotated it, what would be changed in the photos of my camera :/?
Comment: In worst case scenario you will not be able to autofocus
Comment: THANKS A LOT ,i am a paronoid guy by nature and i think there is a little more blury image, and yes the camera stil autofocus perfectly i just think the overall quelity is worst? but if this is true about the worst case scenario is just not autofocus i am fine
Answer: Are you using the 18-55mm with the STM designation? I am pretty sure lenses with the STM (stepping) will let you take over focus without any will effects. The lens works by wire, by which I mean when you turn the focus ring you are not turning any gears but are sending an electronic signal to change the focus of the lens. If it is not an stm lens that is not good and it may have been damaged. Have you taken any pictures since the incident? Make sure you double check your pictures on a monitor zoomed in to check your focus. Do not rely on the camera's lcd screen. Worst case scenario you have to buy another lens and at least it was not too expensive (relatively speaking to the L line of lenses).
Comment: well damn... sorry i am into photography from 2 weeks... how to check if its STM
Comment: @Stanley, this sequence of symbols (STM) should be printed on lens. And actually should be part of the name of the lens
Comment: I just noticed that you wrote your lens is the mark III. I do not think they make a mark III with the stepping motor which probably means it is not a STM lens.
Comment: There was a new Q posted for this.  Dpreview points out that the focus ring turns with the autofocus and is not clutched or "by wire". Basically if the ring turns by itself, don't fight it.
Answer: The Canon EF-S 18-55mm F/3.5-5.6 III does not have a quick-shift autofocus system (although the STM version of the 18-55mm does). It does have an internal focus system like all EF-S lenses. This means that you can damage the lens but not the camera that way.
In all likelihood, the lens will not be damage though but in the worst case, you lost an extremely cheap lens which is a great opportunity to get something decent :) Simply try to use autofocus on subjects close and far to see if it still works. Image quality won't be affected any other way, so AF will or not.
Comment: I am so poor i worked 3 months for this.. so you are telling me that even in the worst case scenario its just the FOCUS that is broken , not the quality,light receiving and the many others thinks , just the focus? and by the way THANKS YOU ALL guys you help so much!
Comment: Yes, right, image quality should not be affected in any other way. Noise, color, dynamic-range, all that are dictated by the camera and since the Canon EF mount has no mechanical connection, this damage is extremely unlikely to affect the camera.
Comment: Last question thank you a lot, let say i broke it and i am not able to AF, can i still focus perfectly on MF or the broken parts will affect even the MF
Comment: If its the motor than you can still focus manually.


Is it possible to recreate the deploy bytecode of a contract in solidity?

Question: So I'd need something like the GetCode.at(address) function presented in the official doc: https://solidity.readthedocs.io/en/v0.5.0/assembly.html#example
but which allows me to deploy that contract in a new address.
Is it possible to get the deploy bytecode or rebuild it from the runtime one with solidity?
Answer: You can get the raw bytecode and try to redeploy with a new transaction. Set the "data" part of the transaction to the existing bytecode and submit. You can submit using MetaMask (if you're using web3) or even using the geth console. Lots of articles out there on how to do that.
I'm guessing you have the source code or the ABI somewhere? Otherwise, you won't be able to call the contract's functions.
Comment: This might help: https://gist.github.com/holiman/069de8d056a531575d2b786df3345665.

Basically, it uses assembly to copy the bytes at a specific address. You would need to know the constructor args and the address of the original.
Comment: hey thanks, but I need to do it in solidity. I guess is not possible.
Answer: The .getCode() method only returns you the deployed bytecode. What you want is the data that was sent alongside the transaction that deployed the contract. Etherscan gives you a link to the deploying transaction.
For instance, for this contract, the deployment took place here. So that's the bytecode that will deploy a new contract.
Keep in mind that the longer bytecode also contains the constructor parameters towards the end. So if you want to deploy by hand, don't forget to update those too.
Comment: Hey thanks, I know, but as I said, I need to do it in solidity. I guess is not possible.
Comment: There is a way in `assembly {` to get the deployed code of a contract. To deploy it at another address, you would have to prepend it with the constructor and append it with the constructor arguments. So in effect you need some prior knowledge of how this specific other contract was deployed.


Can miners know when their pool mines a block?

Question: In other words, is it possible to pool mine in a transparent way?
Comment: Is it a pool you own or some pool that you participate in but that you do not control?
Comment: I'm not currently mining, but assume it's a pool I didn't control.
Answer: Yes. A pool operator gives its miners the hash of a block it created in the hopes that some miner will discover a unique solution to a hashing algorithm. If a miner finds a solution it gives it to the pool, and the pool then submits the entire block it created on the network. All the miners know the block hash and can thus verify if it is an accepted block.
Answer: In theory, the aggregate set of miners can know when the find a block, because they know the difficulty of a share they found, and can compare to the difficulty required to mine next block. They also have the block hash and can check whether it is present in the blockchain.
However, a single miner cannot know whether another miner on the same pool did find a block, unless that miner or the pool broadcasts that fact.
Answer: anybody can see when the pool mines a block. Click the link on your pool's site that says "Pool Blocks".
Comment: But aren't you just relying on the pool operators' honesty?


Experience with effective subject and body for "credit card expiring soon" emails

Question: I have a subscription service that has a few dozen subscribers drop off every month because of expired credit cards. I was hoping to gain a little insight into some best practices for an email to prod someone to take the time to update their credit card information. I will certainly test variations over time, but I'd like to see what others have experienced with this.
Comment: Can you provide a little bit more detail about what you have tried, and what changes, if any, you have considered?
Comment: We haven't tried anything yet, and I haven't found any wisdom on the approach/tone of an email like this online anywhere. Just curious about where people have found success (or not).
Answer: Without knowing the numbers for the lifetime value of a customer, and the percentage of people that do give you new credit card information, we can only offer generic advice.
Ideally you should make sure that there is something in it for your customer. Something like giving them a month free service if they update their credit card details within the next 48 hours (you can play with the timing here).  If you do that, the email is more of a "cool, free stuff" sort of thing than a boring task.
Assuming that you can't do this for whatever reason, I would follow the general pattern of a company that has tested this extensively.  eBay and PayPal are good examples.  eBay uses something like this:

Dear eBay customer,
This is a courtesy reminder that the credit card on file for your eBay account will soon be closed.
  In order to provide you with uninterrupted service, it is necessary that you update this information accordingly. To update your credit card information (very important) go to:
[Insert URL here]
It may take up to 24 hrs to process the credit card information.
To check your account status go to:
  [Insert other URL here]
Thank you for your prompt attention to this matter and thank you for using eBay
Answer: Since you have the credit card information, you have the expiry date. A month or two, before their cards are about to expire, you might want to send them an email saying "Hey, We noticed that your blah blah credit card is about to expire. We wanted to remind you to renew it or change the payment method since we feel sad when you do not receive our service". Keep the tone light and friendly and give the email a personality, make it seem as if it is a person, "Hi I am Ben from Bro-Burgers, ... "
Comment: Would making it too personal "Ben from Bro-Burgers.." make customers uncomfortable since it's related to credit card information?  You don't want them to think anyone who works there could just access their card info.  Otherwise, I think your answer is sound.
Comment: Well, you can add something like, "Don't worry, we can only see the expiry date of your credit card and not any other information. (We will take your secrets to our cyber grave!)"


Winterizing a home

Question: I'd like to know how to winterize a home.
Are there any special instructions other than putting in regular antifreeze in all fixtures , open valves to drain the pipes and drain the pressure and hot water tanks?
And how do I drain loops in the pipes  where the water is trapped in not draining thru drain valves, or the hot water tank below the drain?
Thanks for any help.
Comment: Make sure water pipes are on the "heated" side of insulation. Here, we don't envelope the pipes in insulation, but rather drape it over (or under) the pipes...but it only gets down to 25 degrees F for a few days each winter around here.
Comment: You could suck water out of the water supply piping with a shop vac. Open the farthest faucet to allow air in to sweep the water out. (But don't use it on the drains.) I am doubtful about using regular auto antifreeze in the drains, or the toilets. AFIK when people winterize camping trailers/RVs they use a special antifreeze having non-toxic propylene glycol as the active ingredient and which does *not* have all the anti-corrosion additives that are in auto antifreeze. Check with an RV online site or better yet a local dealer. Where is this house? Is it basement, pier-and-beam, or slab?
Comment: Pier-and-beam.  Is there any adapter that could be used for a shop-vac?  Also how about the HW tank?
Comment: After the water supply to the tank is shut off, flush the toilet, then siphon out the remainder of the water in the tank and/or use a large sponge. The tank should be dry if the house interior will be below freezing. Put the right amount of antifreeze in the toilet bowl and in the traps for the lavatory, the tub, the shower.
Answer: You're on the right track.
You need to remove any liquid water from any place i could damage something if frozen.
Some things I didn't hear you mention:  The ice maker in the fridge, dishwasher, and the laundry washing machine; sprinkler systems in the lawn, garden hoses in storage.  Paint cans and liquid chemicals should also be considered if they are made from water.  Any canned or especially glass-jarred food.
Getting water out of most of those works the same way as catching the low lying loops that you mentioned.
What you need is an air compressor, and an adapter from that to a garden hose fitting.

Set the compressor output pressure to 20psi.  30 tops if you have a tall house.
Shut off the main water inlet.
Gravity Drain water as you normally would, by running the lowest bathtub with the highest faucet open.
Shut off the breaker or heat source for the hot water tank. Lock it out or tag it with a note that it must not be turned on unless the tank is filled.
Shut off gas entirely for that matter.
Drain the hot water tank.
Find the closest hose bib to the shut off valve.  In many cases it's in the basement right next to it.
Let the compressor pressurize, then hook it up.  Keep it plugged in to power and running at all times until you're done to avoid water in the compressor tank.
Open the faucet on the hose bib slowly until it's fully open, and you should hear the pipes pressurize to 20psi
Then go around and use every water faucet and appliance until it's spurting dry air.
Drain the hot water tank once more.

Your washing machine may need to be filled up with water in order to pump the last bit of water out it's drain hose.  Pre fill some buckets for that or use a hose from a neighbor.  Even then, it might retain some int he hose, so consider detaching it or laying it on the floor to drain into a towel.
The same could go for your dishwasher, but you should find out how it drains first.
For paints, and containers of liquid, bring them to the basement, and put them in the corner that's he deepest under ground, and cover them with a blanket.
You can of course skip some of this depending on your climate and tolerance for risk.

Winterizing a home


Irrationality measure of the Chaitin's constant $\Omega$

Question: What is known about irrationality measure of the Chaitin's constant $\Omega$? Is it finite? Can it be a computable number? Can it be $2$?
Comment: The Wikipedia article you link to has an entire section on the uncomputability of halting probabilities. It also explains that the halting probability depends on the program encoding used, so different halting probabilities might have different irrationality measures. Since they're uncomputable, they're transcendental, so their irrationality measure is at least $2$.
Comment: Have you made any progress on this question? I like it and think it deserves more attention.
Comment: @joriki It would be interesting though, if the irrationality measure was independent of the machine used.
Comment: @QuinnCulver Unfortunately, I still do not know the answer.
Comment: @VladimirReshetnikov Why not offer a bounty then?
Answer: Since $\Omega$ is incompressible, its irrationality measure must be 2.  In more detail:
If the irrationality measure of $\Omega$ were some $\alpha>2$, pick any $\beta$ in $(2,\alpha)$.  Then there would be infinitely many pairs $(p,q)$ of integers $p$ and $q>0$  with $|p/q-\Omega|<q^{-\beta}$; since $\Omega\in(0,1)$, such a pair will have $0\le p\le q$.
Given such a pair with $q\ge 2$, let $n:=\lfloor{\beta \log_2 q-1}\rfloor$.  Given the triple $(n,p,q)$, we can then determine that the first $n$ bits of $\Omega$ are given by
$$\lfloor{2^n \Omega}\rfloor=\lfloor{\delta+(2^np/q)}\rfloor,\qquad\delta\in[-\frac{1}{2},\frac12]. \qquad(*)$$
Letting $m:=\lfloor{(2^np/q)-\frac{1}{2}}\rfloor$, we can see that the right-hand side of (*) varies over exactly the values $m$ and $m+1$ as $\delta$ runs over $[-\frac12,\frac12]$.  Therefore, (*) must hold for either $\delta=-1/2$ or $\delta=1/2$, so the first $n$ bits of $\Omega$ can be computed from the quadruple $(n,p,q,\delta)$, $\delta\in\{\pm \frac12\}.$
Let $K(x)$ be the prefix Kolmogorov complexity of a string $x$ (see e.g. $\S 3.1$,
[Li and Vitányi 2008] for this definition.)  Then  there is some constant $c>0$ such that, for all $n$, if $\Omega[1:n]$ is the first $n$ bits of $\Omega$, then $$K(\Omega[1:n])\ge n-c \qquad\hbox{(Lemma 3.6.2, [Li and Vitányi 2008].) }\qquad(**)$$  But, using a prefix code, we can code the quadruple $(n,p,q,\delta)$ in no more than $2\log_2 q+O(\log \log q)=\frac{2}{\beta}n+O(\log n)$ bits. Therefore, for infinitely many $n$,
$$
K(\Omega[1:n])\le\frac{2}{\beta}n+O(\log n),
$$
contradicting (**).
Comment: It seems you need for there to be a computable sequence of the pairs $(p,q)$. I'm not convinced that can be done though.
Comment: You don't need a computable sequence of $(p,q)$'s. Given any individual $p/q$, you can code it up in $\le(2/\beta+o(1))n$ bits, and, for large enough $n$, this will violate the incompressibility of the first $n$ bits of $\Omega$. So, you just need to pick one approximant which has large enough denominator.
Comment: Where did you use the fact that there are infinitely many pairs $(p,q)$? What is $m$?
Comment: $m=\lfloor{(2^np/q)-\frac{1}{2}}\rfloor$.  The fact that there are infinitely many pairs $(p,q)$ is used to establish that there exists one such pair with large enough $q$.
Comment: Even though I don't understand your answer yet, I will award you the bounty since its time is running out and you gave the question serious attention, which is what the bounty was for.


MySQL freezes every hour at the exact same time

Question: We have an hard-to-understand issue with our production MySQL RDS 8.0.20 instance. It's db.r5.2xlarge instance, Ireland region, Multi-AZ, besides, there is a Replica.
Problem:

Every hour, at the exact same time, at :00 we experience a database glitch. Sometimes it's big and customers are affected, sometimes it's not, but we always see a glitch.
By big I mean it could be few seconds or even up to 10 seconds, by small I mean it could be second or so.
What is a glitch? Well, our java application fires the following sequences:

set autocommit = 0
Then makes insert(s) / update(s) / select(s)
commit

So what we see, is that this exact COMMIT sql takes lots of time.
Literally, in our slow query logs, we see 10s or 20s COMMITs.
To put it simply: selects, inserts, updates go fast, COMMITs are stuck.
Once an hour, at :00.
Observations:

In performance insights, we see that there is a spike, every hour, at the exact time of a glitch. wait/sync/cond/sql/MYSQL_BIN_LOG::COND_done contributes to this spike.
The queries are in status "waiting for handler commit".

There is an increased database connections at this time, but this is normal & expected: if application continues to receive http requests and some database connections from the conn. pool are stucked, then application starts to open new connections.

We noticed that there is a minor spike in Write Latency ( it's visible in RDS console ).
It's usually 3ms, but it jumps to 8ms. We suspect that it may have a big/huge value during the glitch, but it's 8ms because it's averaged for a minute. Unfortunately, the minute of granularity seems the maximum.

We haven't noticed any other change of metrics. Disk IO, CPU, innodb reads / writes / updates look good, both from normal monitoring and from the performance insights look good. We haven't even noticed anything in Enhanced monitoring. Write IOPS is 600, Read IOPS is 300, Queue Depth is 0.75. They sometimes jumping due to the heavy read SQLs, but they are very stable +- during the glitch.

We don't see anything unusual in innodb_rows_read.avg, innodb_rows_updated.avg, innodb_rows_deleted.avg and innodb_rows_inserted.avg. Basically, during the time of a glitch, +- 2 minutes these metrics are usual, which means that there is no any special activity going during this time.

We have also reviewed all our cron jobs etc, it doesn't look to us that there is anything happening in the database which contributes to this glitch.
There are increased locks at this time, but I think it's also expected: queries are waiting for lock on binlog.

We have innodb_flush_log_at_trx_commit = 2 and sync_binlog = 0. We have innodb_log_file_size = 134217728, which is 134 MB. I know, it's a bit small and could be made 1GB, but since the issue happens at exact time without any insert / update / delete activity, I doubt it's connected.

There are no other slow query logs ( > 1s ) at the time or before the time.

A bit of data from SHOW ENGINE INNODB STATUS ( run at normal time when there is no issue but a good production load ):

7174379566 OS file reads,
10959861316 OS file writes,
1045626171 OS fsyncs
215.88 reads/s,
16384 avg bytes/read,
1249.28 writes/s,
128.21 fsyncs/s
482.54 inserts/s,
210.98 updates/s,
48.02 deletes/s, 56656.29 reads/s
Number of system rows inserted 10524,
updated 61130, deleted 6743, read 66988909
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 17.58 reads/s

Upd on 13.04
Dears, thank you for helping, attaching more info for visibility and also some more research results.

We were suggested that innodb_io_capacity could be an issue as the default value 200 is not enough. We have verified and found out that at any arbitrary time ( during peak traffic! ) we have less than 1% of dirty pages. So it's not issue.

We were suggested to disable innodb_change_buffering ( put it to None instead of All ). However, this query taken from MySQL docs suggested that we don't have lots of change_buffer_pages, i.e. change_buffer_page_percentage = 0.28
SELECT (SELECT COUNT() FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE PAGE_TYPE LIKE 'IBUF%') AS change_buffer_pages,
(SELECT COUNT() FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE) AS total_pages,
(SELECT ((change_buffer_pages/total_pages)*100))
AS change_buffer_page_percentage;

We were checking 20 minutes after the glitch, 2 mins before the glitch etc. All the times change_buffer_page_percentage is less than 0.5

AWS claims that other customer can't affect this.
We will keep insisting.

It seems that the glitch happens at 00 minute of every hour, somewhere at 30 seconds, i.e. ~hh:00:30. Usually it lasts 1 to few seconds.

Some screens attached for more visibility.
Attaching some screens from AWS RDS Enhanced Monitoring with 1 sec resolution ( there is absolutely nothing visible in normal 1 minute resolution ).

Avg Queue Size had a big spike, Disk IO Util jumped to 100%, Disk IO Await had a spike.
( the biggest spikes were around 09:00:40 utc time )
The interesting thing to note that there were no spikes in TPS, Read Kb/s, Write Kb/s, Read IO/s, Write IO/s.
Physical Disk IO metrics didn't have any spikes.
CPU Total maximum value was around 60, CPU Idle minimum value was around 40.

Upd again.
Attaching more screens from Performance Insights.
Glitch at 15:00:30.

Upd with SHOW ENGINE INNODB STATUS
At 09:00:16 - before the issue is happening.
https://pastebin.com/8Ca6nX1H
At 09:00:31 - the issue is not yet happening ( or maybe, just starting to happen? ). There is no transactions stuck, but SEMAPHORE section looks a bit suspicious, it looks like there is a contention.
https://pastebin.com/amK4L789
At 09:00:32 - here we already have an issue.
You can clearly see that there are lots of transactions in "commit" state.
This is the glitch.
https://pastebin.com/NgTUzkqc
At 09:00:35 - we have even more transactions stuck.
P.S I have lots of these "show engine innodb status".
Starting from 08:55 ( i.e. 5 mins before the glitch ) and possibly ending 5 minutes after the glitch, I can attach more if needed.
SHOW GLOBAL STATUS at 17:00:08 UTC ( before the glitch ):
https://pastebin.com/88qXVuVW
SHOW GLOBAL STATUS at 17:01:08 UTC ( after the glitch ):
https://pastebin.com/p2arDzmm
Upd 15.04
The issue is still happening, we are looking to make restart-required changes on the weekends at night.
At this moment, we have changed dynamic configuration for innodb_change_buffering and we disabled it, i.e. set it to none.
This was suggestion by AWS.
Didn't help.
As most of these parameters require restart, we will apply them during the weekend ( innodb_thread_concurrency is already inifnite ):
innodb_read_io_threads=64  # from 4 to encourage multi core processing
innodb_write_io_threads=64  # from 4 part 2 as listed in dba.stackexchange.com Question 5666
innodb_thread_concurrency=0  # to ensure OS managed active threads per Q 5666 Rolando answer
innodb_lru_scan_depth=100  # from ? to conserve 90% CPU cycles used for function
net_buffer_length=64K  # from 16K to reduce packet handling interruptions

Answer: At exactly :00, do SHOW FULL PROCESSLIST;.  You might prep for it by connecting as root just before the top of the hour.
Once you have the list of queries running, provide them, plus SHOW CREATE TABLE for the tables in question.
It sounds like you have a cron job or an EVENT that is being naughty and needs to be improved.
Some common causes:

Using MyISAM instead of InnoDB.
Rebuilding a summary table from scratch instead of doing it incrementally.
Assigning top-of-hour to lots of cron jobs.  It is possible, even wise, to scatter them across the hour.  Specify different minutes instead of simply 0.

Multiple COMMITs?  Are they from different connections?  Or explicit COMMITs after each query?  Find the queries in the source code.  A COMMIT may take a "long time" because of some cleanup work that happens then.
Is Replication / Clustering involved?  If so, other causes come to mind.
Set long_query_time = 0.1 across one top-of-hour.  That may help find more stuff via the slowlog.
Was a deadlock listed in the SHOW ENGINE InnoDB STATUS?  It is usually worth looking into, even if it is unrelated to the target problem.
If you provide GLOBAL STATUS and VARIABLES, something may show up:  http://mysql.rjweb.org/doc.php/mysql_analysis#tuning
Answer: This is on rds. Probably shared Infra structure. The problem might be a busy neighbor.
An other application that shares your infra might have an hourly procedure that steals your io causing your app a delay.
Answer: Summary from SHOW GLOBAL STATUS reports on 4/13/2021 at 17:00 and 17:01 consider these AWS RDS Parameter Group changes,
innodb_read_io_threads=64  # from 4 to encourage multi core processing
innodb_write_io_threads=64  # from 4 part 2 as listed in dba.stackexchange.com Question 5666
innodb_thread_concurrency=0  # to ensure OS managed active threads per Q 5666 Rolando answer
innodb_lru_scan_depth=100  # from ? to conserve 90% CPU cycles used for function
net_buffer_length=64K  # from 16K to reduce packet handling interruptions

Other observations,
SHOW GLOBAL STATUS reports
com_begin count did not increase in this one minute
com_commit count increased by 128838 - usually these numbers closer to paired
com_stmt_prepare count usually is close to com_stmt_close at 151 days
almost half have not closed to release resources.
SHOW ENGINE INNODB STATUS report includes
'not gap waiting' for a specific table - OPTIMIZE TABLE tbl_name may avoid this issue for this one table.
Providing additional requested Apr 8, 2021 at 21:02 would allow more in depth analysis of your instance performance.   One set of SHOW GLOBAL VARIABLES; would be MOST helpful and 400 lines of slow query log from first minute of any hour would be useful.
Answer: Originally self-answered in the question body:

The problem was in the Secondary Disk, i.e. Multi-AZ.
Solution was to switch off Multi-AZ and then enable again.
This changed the Secondary Disk, actual hardware and the problem disappeared.
To my regret, AWS Support failed to identify the problem.
MySQL internal team even sent a response something like: it's in your application, work with your DBA. Quite a BAD job from their side.


Hardness of a modified version of NTRU

Question: Let the modified NTRU be $h=f/g$  such that $f$ is not necessarily a short polynomial, is the NTRU problem  still hard in this case?
Answer: Finding an answer is not hard, but answers will not be unique. Given $h$, pick your favourite short polynomial $g$ then compute $f=gh$ using multiplication mod $X^n-1$. As $f$ is unconstrained the resulting answer is a legitimate solution.
Comment: @DonFreecs I think the answers will be pretty uniform as well; fixing invertible $g$ and letting $h$ run over all possible values will give all values of $f$ and vice-versa.
Comment: Thanks dear professor
Comment: I  don't know if I need to open another question or keep discussing here,
another question how about distinguishing from uniform?

Hardness of a modified version of NTRU


Best 32 bit electronics for delta?

Question: I'm looking to update my Delta printer's electronics from 8-bit to 32-bit.
So I checked Marlin and found out that they working on a project they call it Re-ARM and as far as I can tell they will support few chip-sets - I can't remember which one, so until when that happens I need to use something else but what?
I need it to be open source but the Smoothieboard (original one) is too expensive. I saw MKS SBASE but they are closed-source. There is also the MKS GEN version of it but again it uses an ATmega2560. Is there solution for now for my problem until 32-bit Marlin reaches test phase ?
Comment: I think this question is too subjective. Please do not ask questions that are [primarily opinion-based](https://3dprinting.stackexchange.com/help/dont-ask).
Comment: @TomvanderZanden Looking past the possibility of multiple, opinion-based answers, the scope for which the user is asking for is looking **any** solution. So, multiple (even opinion-based) answers are acceptable for the user in this situation.
Comment: I believe MKS SBASE is open source as it runs smoothie board firmware, or at least it can. I am running one on a delta and it works well for my purposes. But you can get similar results with the 8bit AVR marlin boards.
Comment: @hilo90mhz What you saying is that MKS SBASE can run genuine smoothie firmware right ?
Comment: I believe so, but I would research it more as I could be mistaken and it is some modified version of the smoothie firmware, it has been a little time since mine was setup.
Comment: Hi, have you resolved your problem at all? If so, would you like to post an answer? If not, could you update your question, with more information?
Answer: Note that I am not stating this as the best 32 bit solution, as that is too subjective. Although you might want to read Recommendations for a good 32 bit microprocessor to run Marlin, which I cover in On which board can 32 bit Marlin run?

So, to clarify, yes, while the MKS-BASE is based on the 8 bit ATmega2560, the MKS-SBASE is powered by 32 bit ARM, 100M Cortex-MS MCU-LPC1768.
Anyway, SmoothieWare can indeed run on MKS-SBASE. There is an extensive guide on Instructables - Configuring MKS SBASE V1.X 32-bit controller basics and into to SmoothieWare.
You first need the drivers (for Windows). Plug in the MKS-SBASE board and then install the driver.

Connecting USB
Plug in USB to the board and look at the LEDs at the upper left
  corner.  Immediately the D7 led lights up. After a bit D1 also
  starts lightning while D2 and D3 blinks rapidly.
Open device manager and update drivers for the new Smoothie/Serial USB
  device with the signed drivers you just downloaded from Github located
  in the easy to find folder:
  \MKS-SBASE\MKS-SBASE\Driver\smoothieware-windows-signeddriver-v1.0

Then to install the firmware:

Installing firmware

Firmware from MKS are just and old copy of Smoothieware, so we always just want to use the newest version from Smoothieware.

In other words: always use firmware from Smoothieware.
If you can't find config.txt file from original Smoothieware, just use the one from MKS.

Download official firmware from Smoothieware's firmware page which is a subpage on their own Github page (you might want to
  download their full Github repository (folder) in order to find their
  config.txt file)

Start by using the Stable version. When everything is working fine, you can use the Nightly version instead. It is the newest
  version, but not fully tested yet, and considered as beta/test.

Insert the SD Card into the MKS Sbase board and plug in the USB Cable. Your SD Card is now going to show in your file-Explorer.

If not, you need to make sure you have the Drivers installed.

If you can't find the config.txt file from Smoothieware, just locate the config.txt in \MKS
  Sbase\MKS-SBASE-master\MKSSBase-firmware and copy it to your SD Card.

Smoothieware suggest disabling auto-Mount on the SD when connecting to USB. Especially when using a Mac, as OSX tends to do
  funky stuff at strange times.
I have changed nothing on my Win10. And nothing bad has happened the past year.

The D7 lights up, shortly after D1 follows. D2, D3, D4 blinks and then D4 turns steady while D2 and D3 continues blinking.

At this point, the firmware.bin had changed to firmware.cur file on the SD card

After successful updated, the file name will turn into firmware.cur.

Changing or Updating firmware
Just delete the firmware.cur file from your SD, or rename to
  firmware.cur.old or similar, and copy on the new firmware.bin file
  to your SD. Powercycle your printer (also unplug USB) and you can see
  your new firmware.cur file on your SD card.
Note: After making any changes to your config.txt file in the future, you need to power-cycle your controller, meaning disconnect
  both power (if in use) and USB. You can send a reset command, but only
  through true terminal use and not through Printrun/Pronterface or
  similar.

The guide, as stated above is extremely detailed, and goes on to explain all of the other aspects. The contents are as follows:

Table Of Contents:

Connect and install

Connecting USB
Installing firmware

Configuring Smoothieware compared to Marlin
Obvious difference from Marlin

Less obvious differneces
Firmware and Config file(s)
Configuring firmware
Comments

Firmware Step 1: Default feed rate

1/32 Multistepping
Connecting Motors
External Motor Controllers

Firmware Step 2: Cartesian axis speed limits, pins and current

Pins
Current

Firmware Step 3: LCD, SD and Extruder

LCD and SD
Extruder Setup
Delta driver current

Firmware Step 4: Hotend temperature control configuration

Thermistor Type
PID Tuning
Hotend Thermistor - Physical Layout
Hotend Heater Pins - Physical Layout

Firmware Step 5: Heated bed temperature control configuration

Thermistor Type
Temperature Control Bed BANG-BANG
Heated bed thermistor - Physical Layout
Heated bed heater pins - Physical Layout

Firmware Step 6: Configuring Endstops

Homing direction
Disable unused endstops
Define axes size
Reversing endstop output
Fast and slow homing rates

Firmware step 7: Network Settings
Step 8: What's next?

More advanced setup?
Using Switches

As there is way to much to cover here, please visit the Instructables page for the complete guide, in order to complete the configuration.

Best 32 bit electronics for delta?